- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I'm trying to set up and compile a code in Fortran with MPI libreries.This is the sample code:
PROGRAM main USE MPI IMPLICIT NONE TYPE tMPI INTEGER :: rank, nCPU, iErr, status END TYPE tMPI ! TYPE(tMPI) :: MPIdata CALL MPI_INIT(MPIdata%iErr) CALL MPI_COMM_RANK(MPI_COMM_WORLD, MPIdata%rank, MPIdata%iErr) CALL MPI_COMM_SIZE(MPI_COMM_WORLD, MPIdata%nCPU, MPIdata%iErr) WRITE(*,*) 'Hallo world' STOP END PROGRAM
And this is what I did:
- Debugging>Command: mpiexec.exe
- Debugging>Command Arguments: -n 4
- Linker > General>Additional Library Directories: $(MSMPI_LIB32)
- Linker > Input>Additional Dependencies: msmpi.lib msmpifec.lib
- I also added mpi.f90 from “C:\Program Files\Microsoft HPC Pack 2008 R2\Inc” to my Source Files folder.
I obtained the following errors:
error LNK2019: unresolved external symbol MPI_INIT referenced in function MAIN__ main.obj error LNK2019: unresolved external symbol MPI_COMM_RANK referenced in function MAIN__ main.obj error LNK2019: unresolved external symbol MPI_COMM_SIZE referenced in function MAIN__ main.obj fatal error LNK1120: 3 unresolved externals x64\Release\prova.exe
Thanks,
Sebastiano
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sebastiano,
It looks like you are trying to use Microsoft* MPI with Microsoft Visual Studio*.
Please try Intel(R) MPI Library for Windows OS. How to use it with Microsoft Visual Studio described at the page https://software.intel.com/ru-ru/node/535525 .
In other case, if you need to use Microsoft MPI, the following can be useful for you
--
Dmitry
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page