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

Mpi code not running

Lamine06F
Novice
1,653 Views

I have a simple code and here isit :

program MPI_program
 
    use MPI
 
    implicit none
    ! Data declarations for MPI
INTEGER :: ierr   ! error signal variable. Standard value = 0
INTEGER :: rank   ! process ID / Number
INTEGER :: nprocs ! number of processors
 
    ! Initialize MPI
! Initialize subroutine
CALL MPI_INIT(ierr)
 
! Setup Communicator sizé
CALL MPI_COMM_SIZE(MPI_COMM_WORLD, nprocs, ierr)
 
! Setup ranks/IDs for each process
CALL MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)
 
! Type the main code
print *, 'Hello World ! I am process', rank, ' of ', nprocs, 'Process(es)'
     
! Finalize MPI
! Finalize subroutine
CALL MPI_FINALIZE(ierr)
 
   
    end program MPI_program
and Ihave followed all the instruction given here https://www.intel.com/content/www/us/en/docs/mpi-library/developer-guide-windows/2021-9/configuring-a-microsoft-visual-studio-project.html to config it. At the end, when I hit ctrl+F5 to build it, I have this error :
Erreur fatal error LNK1181: impossible d'ouvrir le fichier en entr‚e 'impi.lib' LINK.
Please any clue  about what is wrong
Thanks
0 Kudos
1 Solution
VeenaJ_Intel
Moderator
1,605 Views

Hi,

 

Thanks for posting in Intel communities.

 

I have attempted to recreate the problem using the code you provided, and I am pleased to inform you that it compiles without any issues.

 

To assist you further, I have attached the following for your reference:

 

  • Screenshots of the Configuration Settings 
  • Project Files
  • Compilation Screenshot

 

It is worth noting that during my investigation, I discovered that the issue can indeed be recreated if the following setting is not correctly configured or left empty:

 

Properties -> Linker -> General -> Additional Library Directories

 

Please configure it with the path "$(I_MPI_ONEAPI_ROOT)\lib\$(ConfigurationName);$(I_MPI_ONEAPI_ROOT)\lib".

 

I have included a screenshot highlighting the problem when this setting is not correctly configured.

 

If the issue persists on your end despite using the provided configuration settings, please provide the following details:

 

  • Your Project Files
  • Screenshots of Configuration Settings
  • Output of "lscpu" Command 
  • Operating System Version and Details 
  • One API Toolkit Version
  • Visual Studio Version

 

With the above mentioned details, we can perform a detailed analysis of the issue. 

 

Thanks and Regards,

Veena

 

View solution in original post

0 Kudos
3 Replies
VeenaJ_Intel
Moderator
1,606 Views

Hi,

 

Thanks for posting in Intel communities.

 

I have attempted to recreate the problem using the code you provided, and I am pleased to inform you that it compiles without any issues.

 

To assist you further, I have attached the following for your reference:

 

  • Screenshots of the Configuration Settings 
  • Project Files
  • Compilation Screenshot

 

It is worth noting that during my investigation, I discovered that the issue can indeed be recreated if the following setting is not correctly configured or left empty:

 

Properties -> Linker -> General -> Additional Library Directories

 

Please configure it with the path "$(I_MPI_ONEAPI_ROOT)\lib\$(ConfigurationName);$(I_MPI_ONEAPI_ROOT)\lib".

 

I have included a screenshot highlighting the problem when this setting is not correctly configured.

 

If the issue persists on your end despite using the provided configuration settings, please provide the following details:

 

  • Your Project Files
  • Screenshots of Configuration Settings
  • Output of "lscpu" Command 
  • Operating System Version and Details 
  • One API Toolkit Version
  • Visual Studio Version

 

With the above mentioned details, we can perform a detailed analysis of the issue. 

 

Thanks and Regards,

Veena

 

0 Kudos
Lamine06F
Novice
1,566 Views

Your explanation was important for me to progress. Thank and have a long life

0 Kudos
VeenaJ_Intel
Moderator
1,547 Views

Hi,

 

Thanks and glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel

 

Thanks and Regards,

Veena

 

0 Kudos
Reply