Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28924 Discussions

MPI with ifort on win 11 and visual studio 2022

rmoortgat
New Contributor I
738 Views

Dear friends,

 

I'm desperately trying to run this simple code.

 

program Hello_World
implicit none

integer :: i
character(len=20) :: name[*]

if (this_image() == 1) then
write(*,'(a)',advance='no') 'Enter your name: '
read(*,'(a)') name

do i = 2, num_images()
name[i] = name
end do
end if

sync all

write(*,'(3a,i0)') 'Hello ',trim(name),' from image ', this_image()

read(*,*)

end program Hello_World

 

I installed the mpi libraries and added /Qcorray to the ifort.cfg

Now the the code compiles without errors but it doesn't run.

It closes immediately with following error:

'hellompi.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
The thread 0x3818 has exited with code 4294967295 (0xffffffff).
The thread 0x58b8 has exited with code 4294967295 (0xffffffff).
The thread 0x4b4c has exited with code 4294967295 (0xffffffff).
The program '[7844] hellompi.exe' has exited with code 4294967295 (0xffffffff).

I need this mpi support because I am studying the wonderfull book 'Modern Fortran' by Milan Curcic.

 

Kind Regards

Roger

0 Kudos
2 Replies
Ron_Green
Moderator
697 Views

Ah ha - I see the problem

 (Win32): 

 

You can only use Coarrays with 64bit builds.  Intel MPI is used for CAF, and it only supports 64bit applications.

0 Kudos
Barbara_P_Intel
Employee
694 Views

How did you install the software? I tried your test on my Windows laptop; it ran just fine with both ifx and ifort. I have the HPC Toolkit installed. With that you don't need to install anything else.

0 Kudos
Reply