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

Unable to "use mpi" in a simple "hello world" Fortran program

n_van_jy
Beginner
451 Views

Hello eveyone, I'm trying to compiler a simple "Hello World" program in Fortran90 like below with Intel oneAPI HPC toolkit in visual studio 2019:

 

"

program main
use mpi
character * (MPI_MAX_PROCESSOR_NAME) processor_name
integer myid, numprocs, namelen, rc, ierr
call MPI_INIT( ierr )
call MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr )
call MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr )
call MPI_GET_PROCESSOR_NAME(processor_name, namelen, ierr)
print *,"Hello World! Process ",myid," of ", numprocs, " on", processor_name
call MPI_FINALIZE(rc)
end

"

 

but the compiler told me that it cannot open the compiled modele file. Here is the error:

"

error #7002: Error in opening the compiled module file. Check INCLUDE paths. [MPI] 

error #6591: An automatic object is invalid in a main program. [PROCESSOR_NAME] 

error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association. 

"

I have re-installed the vs and intel oneAPI and  ensured the versions of intel oneAPI

Base toolkit and HPC toolkit match.

Does anybody could tell me what's wrong? Thanks in advance.

0 Kudos
3 Replies
VarshaS_Intel
Moderator
408 Views

Hi,


Thanks for posting in Intel Communities.


Could you please let us know the Intel oneAPI version and Microsoft Visual Studio version you are using?


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
384 Views

Hi,


We have not heard back from you. Could you please provide us with the details mentioned in the previous post?


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
362 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need any additional information, please post a new question.


Thanks & Regards,

Varsha


0 Kudos
Reply