Hi,
I have an intel i7-4770 cpu.
Running my CFD simulation code using 1 - 3procs works well. However, when using >=4 procs, I almost always get 2 lines of the error:
file not present or wrong filename.
Occasionally, I can get the code working, but it's like 1 out of 20 tries, although it can be quite random.
I guess it has to do with some file opening:
do ijk=0,num_procs-1
call MPI_Barrier(MPI_COMM_WORLD,ierr)
if (ijk==myid) then
open (unit = 44 , FILE = "ibm3d_input.txt" , status = "old", iostat = openstatus(4))
if (openstatus(4) > 0) then
print *, "file not present or wrong filename."
stop
end if
read (44,nml = solver_input)
...
It happens also when I simply use:
open (unit = 44 , FILE = "ibm3d_input.txt" , status = "old", iostat = openstatus(4))
if (openstatus(4) > 0) then
print *, "file not present or wrong filename."
on all procs.
Do I have to use mpi commands like MPI_FILE_OPEN for file opening?
Or how do I avoid this problem?
Thanks!