Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
27 Views

Coarray library for native MIC execution

I'm attempting to compile a Fortran coarray application for native MIC execution but I'm unable to locate a couple of supporting libraries on my system. I am compiling in Windows with ifort 16.0.3.207 and Parallel Studio 2016 Cluster Edition Update 3.  I also have MPSS 3.7.2 installed including the coprocessor essentials bundle.  Here is a sample program that simply says hello from each image (in order):

Program Test_micCAF
    Implicit None
    Integer :: i
    
    Do i = 1,num_images()
        If (this_image() .EQ. i) Write(*,'(A,I4)') 'Hello from image',i
        SYNC ALL
    End Do
End Program Test_micCAF

I can compile successfully for the MIC without specifying the -coarray option (ifort /Qmic micCAF.f90 -o micCAF.mic):  This produces an executable that successfully runs a single instance on the coprocessor.  However, when I add the coarray compiler option (ifort /Qmic -coarray micCAF.f90 -o micCAF.mic) the compiler fails with:

k1om-mpss-linux-ld.exe: cannot find -licaf
k1om-mpss-linux-ld.exe: cannot find -lmpi_mt

I've been unable to find what I think is the necessary *.so file: libicaf.so (listed in this tutorial: https://software.intel.com/en-us/articles/building-a-native-application-for-intel-xeon-phi-coprocess...).  I've checked multiple installations of the product (2015 and 2016 versions) and thoroughly (i think) searched the file systems for Parallel Studio and MPSS in search of this library without success.  Is there source code that can be compiled into the *.so file? Or some way to create the library from the libicaf.dll that is available as part of the Parallel Studio 2016 installation?

Cheers.

-whit

0 Kudos
6 Replies
Highlighted
27 Views

Interesting. Most of the MIC libraries are provided for building on Windows but not those. I will make inquiries of the developers on Monday. I do know that heterogenous Windows-MIC applications are not supported, but I see no reason why a native build couldn't be. Note that the article you reference shows building on Linux.

0 Kudos
Highlighted
Beginner
27 Views

Thank you for the quick reply.  I haven't been able to find much in the way of documentation for compiling on a Windows host for native execution, or for native execution of a coarray application for that matter.

Since my post this morning, I've made enough progress to get things running:

I've extracted the following files from the latest Linux Fortran Redistributable package and copied them to "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\compiler\lib\intel64_win_mic\"

  • libicaf.so
  • libmpi_mt.so
  • libmpi_mt.so.4
  • libmpi_mt.so.5
  • libmpi_mt.so.12
  • libmpi_mt.so.12.0

Compilation (ifort /Qmic -coarray micCAF.f90 -o micCAF.mic) is now successful but with a warning:

k1om-mpss-linux-ld.exe: warning: libmpi_mt.so.4, needed by C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\compiler\lib\mic/libicaf.so, not found (try using -rpath or -rpath-link)

I copy the binary and needed libraries to a working directory on the MIC:

  • micCAF.mic
  • libicaf.so
  • libintlc.so.5
  • libmpi_mt.so.12 (renamed to libmpi.so.12 since that's the library the binary seeks and I can't find a library actually named this...)
  • libmpi_mt.so.4

I also copy the contents of the /mpi/mic/bin folder from the Linux Redistributable to the /bin folder on the MIC.  The program now runs.

I think there are two shortfalls here:

  1. Libraries to support compilation on Windows for a MIC native execution coarray Fortran application are missing from the Windows Parallel Studio 2016 installation.
  2. The default configuration of the MIC file system image from Windows MPSS 3.7.2 is missing the MPI execution and support files to execute a native coarray Fortran application.
0 Kudos
Highlighted
Black Belt
27 Views

I understood it was intentional not to support any form of MPI on MIC with Windows host.

0 Kudos
Highlighted
Beginner
27 Views

It's not my intent to invoke MPI between the host and the MIC, but the MIC does need MPI for a native coarray application regardless of the host OS (right?).  Is the MIC file system missing the MPI files because it is loaded from the Windows host MPSS?  Does a Linux hosted MPSS load a different default file system image to the MIC?

According to the MPSS User Guide, I can make changes to the file system that is loaded at MIC boot.  I'll be doing this so that I don't need to copy the MPI files from the host to the MIC after every reset.

0 Kudos
Highlighted
27 Views

Intel Fortran applications that use coarrays need the Intel MPI runtime. Tim is correct that we don't support heterogeneous coarrays with a Windows host, but one should be able to use Windows to build a native MIC-only coarray application. I will ask why this isn't being provided. It might be an oversight.

0 Kudos
Highlighted
27 Views

At the moment, it appears that this was an oversight. I have filed issue DPD200413988 on this.

I'll note that it is generally required that you copy any dependent shared libraries to the MIC system before execution. Most are not included in the default MPSS configuration.

0 Kudos