Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28517 Discussions

Unable to read in values thru namelist in Fortran after using PETSc 64bit indices in linux



I found that I am unable to read in values thru namelist in Fortran after using PETSc 64bit indices in linux. It is compiled using Intel Fortran 2018

I have a parameter txt file which is read in using namelist in Fortran:

namelist /body_input/ no_body, convex_body, motion_type, hover, wing_config  ...

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 *, "ibm3d_input file not present or wrong filename."


        end if

        read (44,nml = solver_input)

        read (44,nml = grid_input)

        read (44,nml = body_input)...

After using PETSc 64bit indices, my code aborts and I realise that it is because the values have became NaN. Strangely, it does not occur in windows with VS2008. That was Intel Fortran 2013.

I wonder if it's a bug with the Intel Fortran compiler 2018.

Anyone has similar experience?

0 Kudos
2 Replies
Honored Contributor III

I suspect a bug in your program that is causing memory to be overwritten. That you did not see it before does not imply a compiler bug. You have some debugging to do. Comment out code until you find the change that causes the problem to go away. That often (but not always) helps identify the actual culprit.

0 Kudos
Honored Contributor III

What do you mean by "PETSc 64bit indices"? Are these different from 64-bit signed integers?

You have provided very little information about the abort. For instance, where did the program abort? What have you tried to find that location? Do you see an error message just before the abort?

Can you provide a simplified version of your program (preferably, one that does not use MPI) that demonstrates the problem?

0 Kudos