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

mpif90 error while linking

Arun_chandran
Beginner
2,617 Views

Hi,

 

mpif90 was giving error while executing it as given below.

 

home/arun/intel_mpi/mpi/2021.7.1/bin/mpif90 -DAdd_ -DInt=int -DUInt="unsigned int " -cpp -c a.f -o a.f.o
gfortran: warning: int: linker input file unused because linking not done
gfortran: error: int: linker input file not found: No such file or directory

 

Seems the wrapper compiler has issue in parsing "unsigned int ".

 

The below patch is fixing this issue.

$ cat intelmpi_mpif90_fix.patch
diff --git a/bin/mpif90 b/bin/mpif90
index cf0922a..1cb5fa2 100755
--- a/bin/mpif90
+++ b/bin/mpif90
@@ -550,6 +550,7 @@ for arg in "$@" ; do
;;
-D*)
cppflags="$cppflags $arg"
+ qarg="\"$arg\""
;;
*.F|*.F90|.fpp|.FPP)
# If FCCPP is not empty, then we need to do the following:

 

Could you please comment about it?

 

--Arun

 

0 Kudos
6 Replies
VarshaS_Intel
Moderator
2,586 Views

Hi,


Thanks for posting in Intel Communities.


Could you please let us know the OS and hardware details you are using?


And also, could you please provide us with the complete sample reproducer code along with the steps to reproduce the issue?


Thanks & Regards,

Varsha


0 Kudos
Arun_chandran
Beginner
2,576 Views

Hi ,

 

The below reproduces the error for me.

 

arun@arun-VirtualBox:~/fortran$ /opt/intel/oneapi/mpi/2021.7.1/bin/mpif90 -DAdd_ -DInt=int -DUInt="unsigned int " -cpp -c a.f90 -o a.f90.o
gfortran: error: int: No such file or directory
arun@arun-VirtualBox:~/fortran$ cat a.f90
program hello
print *, "Hello World!"
end program
arun@arun-VirtualBox:~/fortran$ /opt/intel/oneapi/mpi/2021.7.1/bin/mpif90 -DAdd_ -DInt=int -cpp -c a.f90 -o a.f90.o ----> no error
f951: Warning: Nonexistent include directory _I_MPI_SUBSTITUTE_INSTALLDIR/include/gfortran/9.1.0_ [-Wmissing-include-dirs]
f951: Warning: Nonexistent include directory _I_MPI_SUBSTITUTE_INSTALLDIR/include_ [-Wmissing-include-dirs]
arun@arun-VirtualBox:~/fortran$

 

--Arun

0 Kudos
VarshaS_Intel
Moderator
2,529 Views

Hi,

 

Could you please try using the 'mpiifort' at the time of compilation, as we are able to get the expected results? Please find the commands:

mpiifort -DAdd_ -DInt=int -DUInt="unsigned int " -cpp -c a.f90 -o a.f90.o
mpiifort a.f90.o -o a -lmpi
mpirun -n 2 ./userhello

 

Please find the below screenshot for more details.

mpiifort.png

Thanks & Regards,

Varsha

 

0 Kudos
Arun_chandran
Beginner
2,519 Views

Yes there is no issue with mpiifort, mpif90 is the problematic one.

0 Kudos
VarshaS_Intel
Moderator
2,460 Views

Hi,


Thanks for reporting the bug.


We were able to reproduce it and we have informed the development team about it.


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
2,116 Views

Hi,

 

Thanks for your patience.

 

The issue raised by you has been fixed in the Intel MPI 2021.9 version.

 

We will be closing this case from our side. If the issue still persists with the new release, then please create a new thread for us to investigate.

 

Thanks & Regards,

Varsha

 

0 Kudos
Reply