Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.

file not present or wrong filename - when using >=4 procs

Wee_Beng_T_
Beginner
718 Views

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!

 

 

 

 

 

 

 

 

0 Kudos
5 Replies
Artem_R_Intel1
Employee
718 Views

Hello Wee Beng,

As far as I see you use relative path to ibm3d_input.txt - is the problem reproducible with the absolute path?

0 Kudos
Wee_Beng_T_
Beginner
718 Views

Hi Artem,

Do you mean this:

open (unit = 44 , FILE = "C:\obj_tmp\ibm3d_IIB_mpi\ibm3d_input.txt" , status = "old", iostat = openstatus(4))

I still get:

 file not present or wrong filename.

 file not present or wrong filename.
Press any key to continue . . .

0 Kudos
Steve_H_Intel1
Employee
718 Views


Wee Beng:

1) What does the data type declaration of the "openstatus" variable look like?

2) What is the value of "openstatus(4)"  when you are getting the "file not present or wrong filename." diagnostic message in your program fragment:
                                   ...

    open (unit = 44 , FILE = "ibm3d_input.txt" , status = "old", iostat = openstatus(4))

    if (openstatus(4) > 0) then

    print *, "file not present or wrong filename."
                                  
...
Thank you,

-Steve

0 Kudos
Wee_Beng_T_
Beginner
718 Views

Hi Steve,

openstatus is defined as:

integer :: openstatus(6)

The error actually occured here:

open (unit = 55 , FILE = "output.txt" , status = "replace", iostat = openstatus(4))

if (openstatus(4) > 0) then

    print *, "output file not present or wrong filename."
    
    print *, myid,openstatus(4)

    stop

end if

close (55)

I got :

output file not present or wrong filename.

          1          38
Enter new start

Sometimes myid = 2 or 0 also appears giving:

 output file not present or wrong filename.
           0          38
 output file not present or wrong filename.
           1          38

The error number is 38, which is related to REWIND error.

What does this means?

Thanks

 

 

0 Kudos
Steve_H_Intel1
Employee
718 Views


Wee Beng:

>The error number is 38, which is related to REWIND error.

You may want to visit the URL:

     https://software.intel.com/en-us/node/526160

and insert, where appropriate, calls to "ERRSNS" to see if there is an OS error code that is provided.

-Steve

0 Kudos
Reply