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

OpenMPI 1.10.0 built with Intel Parallel Studio XE 2016

Fabrice_Roy
Beginner
858 Views

Hello,

I have built Open MPI 1.10.0 using Intel compilers 16.0.0.
When I am trying to compile the following test code:
 

  program testmpi
    use mpi
    implicit none

    integer :: pid
    integer :: ierr
    integer :: tok

    call mpi_init(ierr)
    call mpi_comm_rank(mpi_comm_world, pid,ierr)
    if(pid==0) then
       tok = 1
    else
       tok = 0
    end if
    call mpi_bcast(tok,1,mpi_integer,0,mpi_comm_world,ierr)
    call mpi_finalize(ierr)
  end program testmpi



I get the following error message:

testmpi.f90(21): error #6285: There is no matching specific subroutine for this generic subroutine call.   [MPI_BCAST]
    call mpi_bcast(tok,1,mpi_integer,0,mpi_comm_world,ierr)
---------^
compilation aborted for testmpi.f90 (code 1)


The compilation and execution succeed if I declare tok as

integer, dimension(1) :: tok


I have also built Open MPI 1.10.0 with GNU 5.2.0 compilers and both versions of the test code (with tok declared as an integer or as an integer, dimension(1) ) compile and execute.
Open MPI was configured with the same options with both compilers.
Do you have any idea how I could solve this problem?
Thanks,

Fabrice Roy 

0 Kudos
4 Replies
TimP
Honored Contributor III
858 Views

As far as I can see, this is simply a matter of ifort requiring standards compliant source code. Openmpi interface correctly specifies an array argument. Although you are running on a platform where the hardware doesn't distinguish an array of length 1 from a scalar, there are platforms where this would fail even if the compiler let it slip by.  As you're probably aware, another option is to use the array constructor [tok] which should do the right thing for each platform.

0 Kudos
Fabrice_Roy
Beginner
858 Views

Thanks for your answer.

If I understand correctly what you are writing and what I have read in the MPI norm, using a scalar as a sending buffer should not have worked previously. Am I right?

This seems to be a new behaviour for ifort 16. OpenMPI built with ifort 15 does not behave the same way.

I suppose ifort 16 is working the way it is intended to work and I have to modify my code using the array constructor.

Thanks again.

0 Kudos
TimP
Honored Contributor III
858 Views

The scalar could work on Intel platforms as long as the compiler allowed the standards violation to slip by.

0 Kudos
Jeff_Squyres
Beginner
858 Views

The issue is that Intel Parallel Studio 2016 changed to partially -- but not completely -- support the !GCC$ pragma for ignore TKR.

Specifically, Open MPI's configure script tests whether the Fortran compiler supports the !GCC$ pragma or not.  Prior to the 2016 version, the Intel Parallel Studio ifort compiler (correctly) failed this test, and Open MPI (correctly) fell back to using the !DEC$ pragma for ignore-TKR behavior.  With the 2016 version, the configure test for !GCC$ in Open MPI v1.10.0 passes, but the !GCC$ pragma doesn't actually work (at least in the way that Open MPI uses it).  Meaning: Open MPI compiles the "mpi" module, but all MPI interfaces with a choice buffer (such as MPI_BARRIER) don't actually adhere to the ignore-TKR behavior, and therefore you get a compile failure when you try to compile your test program.

We've made the configure test in Open MPI more stringent so that Intel Parallel Studio 2016's pseudo-!GCC$-support now fails the test, and configure correctly falls back to !DEC$.  Although this updated test will be in 1.10.x nightly snapshot tarballs (http://www.open-mpi.org/nightly/v1.10/) very soon, it'll still take a little time before we are able to get an official release out of Open MPI 1.10.1 (which will contain this fix).

0 Kudos
Reply