Software Archive
Read-only legacy content
17061 Discussions

Compile OpenMP or MPI Fortran code for Intel Phi

Jeremie_Lagraviere
299 Views

Hi everyone,

Here is my problem:

I have two different programs:

  • One in Fortran / MPI
  • One in Fortran / OpenMP

And I would like to compile them in order to have them running on an Intel Xeon Phi.

I just installed the free-version-for-academics of the Parallel Studio Cluster Edition 2016 on my server.

Here are my questions:

  • What I do not know is: which compiler should I use to compile my fortran code ?
  • Where are the includes and libraries for mpi/fortran ?
  • Should I install the bindings to get access to things like mpif.h, mpifort etc. ?

I am asking this, because until now I was running and compiling my code on a supercomputer (using openmpi.intel module) that gave me access to "mpifort", however now, on my local server, using the  Parallel Studio Cluster Edition 2016, I do not see any trace of "mpifort". So, I am wondering should I use "ifort" with some options to point to the lib and includes ?

Also, if there is some documentation somewhere about this kind of things I would love to read it.

Thanks in advance for your help.

0 Kudos
2 Replies
TimP
Honored Contributor III
299 Views

If you're looking for documentation on OpenMPI mpifort, look on their website.  I don't know that OpenMPI is supporting Intel(r) Xeon Phi(tm), but you could install it on your own server, according to instructions on their web site, starting with an installation of ifort.  This is better than installing the (older?) openmpi which probably comes with your linux distro and works with gfortran.  When you do it yourself you can specify openmpi install paths correctly so as not to break your Intel MPI installation.

If you have an academic license for Parallel Studio Cluster Edition, why not use that?  There should be a "getting started" paper in the documents section of your installation.  A very old version of it comes up in Google. If you haven't set up modules or the like, you would source both the mpivars and the compilervars scripts to set up paths on host side. The ifort wrapper is named mpiifort, and the -mmic option is used to generate the executables for Intel(r) Xeon Phi(tm) by cross-compilation. 

If you're not actually running a cluster, the full cluster documentation, e.g.

https://software.intel.com/en-us/articles/configuring-intel-xeon-phi-coprocessors-inside-a-cluster

may be somewhat beyond what you wish to tackle, but it should help you over some of the hurdles.   MPI is a viable method for running a single node with processes running on both host and coprocessor, as well as for a cluster.  However, OpenMPI may be restricted to running solely on host or solely on coprocessor, if it still doesn't support communication between them, as Intel MPI does.

0 Kudos
Kevin_D_Intel
Employee
299 Views

If you installed the complete Parallel Studio XE 2016 Cluster Edition product then you should have all that you need. You would use the mpiifort (note the double "ii" is not a typo) for your MPI code and ifort with the -qopenmp option for your OpenMP code.

The complete set of product documentation is available here: https://software.intel.com/en-us/intel-software-technical-documentation

Under the left-side navigation, under Projects, you can filter the documentation list by selecting Intel® MPI Library. That will afford good getting started and reference materials. You can also filter by selecting Intel® Fortran Compiler for Fortran compiler specific getting started and reference materials.

Hope that helps.

0 Kudos
Reply