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

mpif90 error while linking

Arun_chandran
Principiante
3.217 Visualizações

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 Respostas
VarshaS_Intel
Moderador
3.186 Visualizações

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


Arun_chandran
Principiante
3.176 Visualizações

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

VarshaS_Intel
Moderador
3.129 Visualizações

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

 

Arun_chandran
Principiante
3.119 Visualizações

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

VarshaS_Intel
Moderador
3.060 Visualizações

Hi,


Thanks for reporting the bug.


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


Thanks & Regards,

Varsha


VarshaS_Intel
Moderador
2.716 Visualizações

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

 

Responder