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

The Fortran program is not working with Windows 10 as it used to work with Windows 7

El_Noshokaty__Said
New Contributor I
2,276 Views

Hi everyone,

I have a 64bit Fortran program that was compiled by Intel Fortran Compiler under Windows 7 pro 64bit and MS MPI 2008 R2. When I moved to Windows 10 and run the same program I noticed that arrays are not any more sent between tasks. I used to send the array variable specifying its start location; say A(1), and it's length; say 100. Only non-array variables are sent and received. I unstalled the old MS MPI and replace it with a new one (V10) but the problem still exists. Is there any idea why is that? I need help.

Best regards.

Said

0 Kudos
1 Solution
El_Noshokaty__Said
New Contributor I
2,276 Views

Dear Jim,

Good news. The problem was solved. Weird enough. At the beginning of the program, I checked whether TASKID = 0 or otherwise. If 0, this is the main task. Under Windows 7, TASKID is read as assumed, i.e. 0, 1, 2, 3,..., while under Windows 10, it is sometimes read correctly and sometimes not. I let P = TASKID then I checked for P, where P is INTERGER*4 while TASKID is INTEGER. That is it.

You being supportive until the last minute is behind this discovery. I would like to thank you, Blackbelt. You deserve it. Besides, I will take your advice regarding the Parallel Studio into consideration.

Until we meet again, accept my best regards. 

Said 

View solution in original post

0 Kudos
10 Replies
jimdempseyatthecove
Honored Contributor III
2,276 Views

Can you show the send, receive and array declarations?

It is best to construct a simple reproducer, then post it here (compete with versions and build options).

I noticed you posted this (https://social.msdn.microsoft.com/Forums/en-US/b06edbbe-6d05-4354-ba70-46decc128a8b/the-ms-mpi-is-not-working-with-windows-10-as-it-used-to-work-with-windows-7?forum=windowsgeneraldevelopmentissues) and have yet to receive a response from MS nor its contributors to its Developer Network.

It appears that OpenMPI (https://www.open-mpi.org/software/ompi/v1.6/ms-windows.php) is not supported after Windows 7 and Windows Server 2003/2008. If it were, that might be a choice. What is not indicated is if it can be made to run on (in) Windows 10 when the .exe is configured to run in compatibility mode (as compatible with Windows 7).

Speaking of which, have you tried attributing your executables as being in compatability mode (Win7)?

Also, I haven't tried this, but you may be able to use the Intel MPI runtime library with your MS headers(modules) with potentially some tweaks to the APIs. See: https://software.intel.com/en-us/mpi-library/features

Jim Dempsey

0 Kudos
El_Noshokaty__Said
New Contributor I
2,276 Views

Hi Jim,

Thank you for being helpful, wherever I post my problem. Please read the following code as a summary of the problem:

      PROGRAM ALLAH
      USE PORTLIB
      USE MSFLIB
      INCLUDE "c:\sos\include\mpif.h"
      INTEGER NUMTASKS, TASKID, IERR     ! NUMTASKS=No of tasks, TASKID=Task ID, IERR=Error code (all are MS MPI reserved words)
      INTEGER ISTAT(MPI_STATUS_SIZE)     ! MS MPI status  (MS MPI reserved word)                              
      INTEGER*4 P, NP, N7, BUF(360)             ! P=Process no, NP=No of Processes, BUF=One dimensional array, N7=array no of items
      CALL MPI_INIT( IERR )
      CALL MPI_COMM_SIZE(MPI_COMM_WORLD, NUMTASKS, IERR)
      CALL MPI_COMM_RANK(MPI_COMM_WORLD, TASKID, IERR)
      NP=NUMTASKS-1
      ! The following code is in TASKID=0
      DO P=1,NP
      CALL MPI_SEND(BUF(1), N7, MPI_INTEGER4, P, (P*1000)+81, MPI_COMM_WORLD, IERR)
      END DO
      ! The following code is in TASKID other than 0
      CALL MPI_RECV(BUF(1), N7, MPI_INTEGER4, 0, (P*1000)+81, MPI_COMM_WORLD, ISTAT, IERR)
      ! The following code is to finalize processing
      CALL MPI_FINALIZE( IERR )
      END PROGRAM ALLAH

I think that the problem is in identifying BUF as an array of more than one item. No problem, for example, in sending and receiving NP as one item. 

I hope things are clear enough.

Best regards.

Said

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,276 Views

CALL MPI_SEND(BUF(1:N7), N7, MPI_INTEGER4, P, (P*1000)+81, MPI_COMM_WORLD, IERR)
...
CALL MPI_RECV(BUF(1:N7), N7, MPI_INTEGER4, 0, (TASKID*1000)+81, MPI_COMM_WORLD, ISTAT, IERR)

Assuming the receiving tasks (ranks) found value of N7

Jim Dempsey

0 Kudos
El_Noshokaty__Said
New Contributor I
2,276 Views

Dear Jim,

Tasks other than 0 already know TASKID as P and know what is N7. I tried your code but the problem still the same.

Best regards.

Said

 

0 Kudos
El_Noshokaty__Said
New Contributor I
2,276 Views

Dear Jim,

I now discovered that the problem is not only for array variables but also for character strings. I think the problem has to do with ‘msmpifmc.lib’ which supports the FORTRAN program in putting the buffer length after the pointer of either the array variable or the character string. I’m now trying using the new version of this lib but I get the compiler message: ‘msmpifmc.lib (mpifbind.obj): error LINK2019: unresolved external symbol __guard_check_icall_fptr referenced in function MPIR_Comm_copy_attr_f77_proxy’. Do you think this new version will solve the problem?

 

Best regards.

 

Said

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,276 Views

OK,

By chance, is the module that declares the interfaces for your MPI library come from the MPI library, or is it one that you obtained elsewhere?

this hack may work....

Instead of using the argument A(1), or A(1:N) for the argument of the buffer, use C_LOC(A(1))

***This requires that your module accepts the equivalent of a void*

Jim Dempsey

0 Kudos
El_Noshokaty__Said
New Contributor I
2,276 Views

Dear Jim,

The hack did not work. The compiler considered C_LOC as an unresolved external symbol. The problem as I can see is in the argument length rather than the argument as a pointer. The ‘msmpifmc.lib’ is obtained from the MS MPI (v10) from Microsoft. Its function is to support the FORTRAN program by putting the length after the pointer. I would think the problem is created by this lib. The symbol '__guard_check_icall_fptr' reported in the compiler error message is introduced in MSMPI (V10). There should be a corresponding Intel compiler flag to turn this on. I'm afraid that I have reached a deadlock by questioning this lib.

Please, advise what to do. Do you think that moving to Intel Parallel Studio XE for Windows FORTRAN is a good solution and under which conditions? I think Microsoft Visual Studio will also be needed. Much of a headache, I know. 

Best regards.

Said

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,276 Views

Then try LOC(A(1))

(C_LOC required USE, INTRINSIC :: ISO_C_BINDING, which might not have been available in older versions of IVF)

Updating your compiler to Intel Parallel Studio for Windows Cluster Edition would be a good move. Make sure it is Cluster Edition. You would then have a fully integrated Fortran compiler with MPI integration (using Intel versions of MPI). Your problem  appears to be an incompatibility between Intel Fortran and Microsoft MPI.  You will also get additional programming capability of CO-Arrays if that fits your programming needs (now or in the future). And bug fixes as well as newer Fortran Language features. Then finally software support from Intel (as opposed to from users on this forum).

I would suggest you defer updating Microsoft Visual Studio to 2019, as it is reported on the IDZ forum as having some integration issues. I use a version of MS VS 2013 upgraded form 2012 and earlier 2005. When MS VS appears to have no integration issues (possibly next year) then consider an upgrade to MS VS 2019 (by then there may be a version 2020). "Newest version" isn't always the best choice.

Jim Dempsey

0 Kudos
El_Noshokaty__Said
New Contributor I
2,277 Views

Dear Jim,

Good news. The problem was solved. Weird enough. At the beginning of the program, I checked whether TASKID = 0 or otherwise. If 0, this is the main task. Under Windows 7, TASKID is read as assumed, i.e. 0, 1, 2, 3,..., while under Windows 10, it is sometimes read correctly and sometimes not. I let P = TASKID then I checked for P, where P is INTERGER*4 while TASKID is INTEGER. That is it.

You being supportive until the last minute is behind this discovery. I would like to thank you, Blackbelt. You deserve it. Besides, I will take your advice regarding the Parallel Studio into consideration.

Until we meet again, accept my best regards. 

Said 

0 Kudos
Klaus-Dieter_O_Intel
2,276 Views

This issue is now closed. If you have a similar question, please start a new thread.

0 Kudos
Reply