Dear All,
There appears to be an obscure bug in version 15 of the Fortran compiler involving MPI, OpenMP and string passing all together.
We're running on Intel hardware under Linux. First the compiler:
mpif90 --version ifort (IFORT) 15.0.3 20150407 Copyright (C) 1985-2015 Intel Corporation. All rights reserved.
... now the smallest code I could devise which still has the bug:
program test implicit none integer i !$OMP PARALLEL DEFAULT(SHARED) !$OMP DO do i=1,10 call foo end do !$OMP END DO !$OMP END PARALLEL end program subroutine foo implicit none character(256) str call bar(str) return end subroutine subroutine bar(str) implicit none character(*), intent(out) :: str write(str,'(I1)') 1 return end subroutine
... compiling with:
mpif90 -openmp test.f90
... results in code which crashes randomly with OMP_NUM_THREADS greater than one. This does not occur with version 14 of the compiler.
Regards,
John.