Quantcast
Channel: Clusters and HPC Technology
Viewing all articles
Browse latest Browse all 927

Intel Visual Studio MPI setup

$
0
0

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:

  1. Debugging>Command: mpiexec.exe
  2. Debugging>Command Arguments: -n 4
  3. Linker > General>Additional Library Directories: $(MSMPI_LIB32)
  4. Linker Input>Additional Dependencies: msmpi.lib msmpifec.lib
  5. 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

 


Viewing all articles
Browse latest Browse all 927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>