Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
7 Views

Compiling MPI applications with MS-MPI and Intel Fortran

Hello

I use as example this topic https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/606268 with MS VS 2010 & Intel Fortran 13 (Added helloworld.f, mpif.h, mpifptr.h, mpi.f90 to source files of my project)

but I have error at complition

1>Compiling with Intel(R) Visual Fortran Compiler XE 13.0.1.119 [IA-32]...
1>mpi.f90
1>C:\Program Files (x86)\Microsoft SDKs\MPI\Include\mpi.f90(393): error #5102: Cannot open include file 'mpifptr.h'

I also added mpifptr.h from c:\Program Files (x86)\Microsoft SDKs\MPI\Include\x86\ to c:\Program Files (x86)\Microsoft SDKs\MPI\Include\ but resived

1>Compiling with Intel(R) Visual Fortran Compiler XE 13.0.1.119 [IA-32]...
1>mpi.f90
1>Linking...
1>helloworld.obj : error LNK2019: unresolved external symbol  _MPI_INIT в функции _MAIN__
1>helloworld.obj : error LNK2019: unresolved external symbol _MPI_COMM_SIZE в функции _MAIN__
1>helloworld.obj : error LNK2019: unresolved external symbol _MPI_COMM_RANK в функции _MAIN__
1>helloworld.obj : error LNK2019: unresolved external symbol _MPI_GET_PROCESSOR_NAME в функции _MAIN__
1>helloworld.obj : error LNK2019: unresolved external symbol _MPI_FINALIZE в функции _MAIN__
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_DUP_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_NULL_DELETE_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_NULL_COPY_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_COMM_DUP_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_COMM_NULL_DELETE_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_COMM_NULL_COPY_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_WIN_DUP_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_WIN_NULL_DELETE_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_WIN_NULL_COPY_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_TYPE_DUP_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_TYPE_NULL_DELETE_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_TYPE_NULL_COPY_FN"
1>helloworld.obj : error LNK2001: unresolved external symbol "_MPI_CONVERSION_FN_NULL"
1>Release\Console1.exe : fatal error LNK1120: 18 unresolved external symbols

For MS MPI path

C:\Users\user>set msmpi
MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
MSMPI_LIB32=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x86\
MSMPI_LIB64=C:\Program Files (x86)\Microsoft SDKs\MPI\Lib\x64\

Have I some problems with links/path due to error of MSMPI installation?

Best regards,

Aleksa

0 Kudos
1 Reply
Highlighted
Black Belt
7 Views

You need to add the include

You need to add the include and library paths for the MS MPI to your project properties, and also name the .lib that has the MS MPI routines under "Additional Dependencies" in the Linker property page. It isn't sufficient to just have MS MPI installed.

Note that the same would be true if you were using Intel MPI.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos