none
Does MPI_IN_PLACE work with CCS 2003? RRS feed

  • Question

  • I am tuning my app on CCS 2003, and using MPI_Reduce (in Intel Fortran). 

    If my master process (0) uses this code:
     
       xarray2=xarray1
       call
    MPI_Reduce(xarray2,xarray1,nsize,MPI_DOUBLE_PRECISION,MPI_SUM,0,MPI_COMM_WORLD,ierr)

    then the program works.  But this is like saying:

      B=A
      A=B+C

    when I want to say:

      A += C

    My xarrays are large, to the tune of 100 MegaBytes (not kidding!) or more, so any extra copying around has huge performance implications.  This is of course why MPI_IN_PLACE was invented.

    If my app uses this (for process 0):

       call MPI_Reduce(MPI_IN_PLACE,xarray1,nsize,MPI_DOUBLE_PRECISION,MPI_SUM,0,MPI_COMM_WORLD,ierr)

    then I get "forrtl: severe (157): Program Exception - access violation" inside of MPI_Reduce.

    Looking at MPI_IN_PLACE, I see it is just declared as an integer in mpif.h, never assigned, and happens to have the value of 0 (zero) just before the MPI_Reduce call.  Naively, I would guess that it didn't get assigned to some magic value.

    Is this known to work or not work on CCS 2003?  My new cluster with HPC 2008 will arrive in a few weeks, but I would like to get some work done before then...

    Thanks for any advice!
    Chuck
    Thursday, December 4, 2008 11:11 PM

Answers

  •  My tests shows MPI_IN_PLACE works in both CCS 2003 and 2008 in Fortran and C. the following are some of my code. Can you send me your code so that we can provide more information? Thanks.

           integer count  
           parameter (count=100000000)  
           integer buf(count), rbuf(count)  
           ...  
     
           if (rank .eq. 0) then  
              call mpi_reduce( MPI_IN_PLACE, buf, count, MPI_INTEGER,   
         $         MPI_SUM, 0, MPI_COMM_WORLD, ierr )  
           else  
              call mpi_reduce( buf, rbuf, count, MPI_INTEGER,   
         $         MPI_SUM, 0, MPI_COMM_WORLD, ierr )  
           endif     
           ... 
    Friday, January 9, 2009 7:56 PM

All replies

  • I guess this is a dead forum.  No one even viewed this posting in nearly two weeks.  A shame.

    Maybe this is fixed in HPC 2008; I will just have to try it myself.
    Tuesday, December 16, 2008 7:10 PM
  • Hi Chuck, sorry that you didn't get reply earlier.

    MPI_Recude and MPI_IN_PLACE should work fine with CCS, I am not aware of any problem of that sort.  But it is posible that there is a bug with the Fortran MPI interface. The MPI interface implementation changed with Windows HPC 2008, please verifity.
    A sample code that causes this problem will greatly help.

    thanks,
    .Erez
    Monday, December 22, 2008 9:09 AM
  •  My tests shows MPI_IN_PLACE works in both CCS 2003 and 2008 in Fortran and C. the following are some of my code. Can you send me your code so that we can provide more information? Thanks.

           integer count  
           parameter (count=100000000)  
           integer buf(count), rbuf(count)  
           ...  
     
           if (rank .eq. 0) then  
              call mpi_reduce( MPI_IN_PLACE, buf, count, MPI_INTEGER,   
         $         MPI_SUM, 0, MPI_COMM_WORLD, ierr )  
           else  
              call mpi_reduce( buf, rbuf, count, MPI_INTEGER,   
         $         MPI_SUM, 0, MPI_COMM_WORLD, ierr )  
           endif     
           ... 
    Friday, January 9, 2009 7:56 PM