Many thanks for your response Jeff. I have tried investigating the
problem further and it appears that the problem is not specific to
MPI_CART_CREATE. For example I can replicate the problem with standard
MPI send and receive routines.
If the machine I am using is short of physical memory would this cause
problem with the MPI buffer - and hence cause the hang?
Below is a snippet of the code:
Thanks in advance....
SUBROUTINE cartesian_coord(dims,COMM_CART_3D)
IMPLICIT NONE
INCLUDE 'mpif.h'
INTEGER,INTENT(IN) :: dims(3)
INTEGER,INTENT(OUT) :: COMM_CART_3D
LOGICAL :: isperiodic(3)
LOGICAL :: reorder
INTEGER :: ndims
INTEGER :: ierr
INTEGER :: numprocs
isperiodic(1) = .FALSE.
isperiodic(2) = .FALSE.
isperiodic(3) = .FALSE.
reorder = .FALSE.
ndims = 3
WRITE(*,*)'--> Ready to create cartesian coordinate system'
CALL MPI_COMM_SIZE(MPI_COMM_WORLD,numprocs,ierr)
WRITE(*,*)'--> Processors: ',numprocs,'Blocks: ',dims(1)*dims(2)*dims(3)
CALL
MPI_CART_CREATE(MPI_COMM_WORLD,ndims,dims,isperiodic,reorder,COMM_CART_3
D,ierr)
END SUBROUTINE
On 5 Jan 2005, at 16:00, Jeff Squyres wrote:
> On Dec 31, 2004, at 12:57 PM, Stephen Scott wrote:
>
>> (1) I want to test and debug an MPI program on a single CPU machine.
>> From what I have read this should be possible.
>
> Sorry for the delay; apparently a bunch of mails slipped by me in the
> holiday rush!
>
> Yes, this should be fine to do.
>
>> (2) I am using the Intel Fortran compiler under Linux (RedHat WS). I
>> initially installed both the Intel Fortran and and Intel C++ compilers
>> and then reinstalled the latest version of LAM. This appears to have
>> worked and simple MPI hello world programs run without problem. I
>> invoke using the following command:
>>
>> $ mpirun -np 4 hello_world
>
> Good.
>
>> Now onto the problem....
>>
>> I am using the MPI_CART_CREATE routine to create my Cartesian (3D)
>> co-ordinate system. However, this fails at run time if I specify a
>> co-ordinate system that requires more than 1 process. The manner of
>> failure varies:
>>
>> (a) If for example my co-ordinate system requires 8 (2*2*2) processes
>> and I invoke with less than 8 processes (mpirun -np 7 my_prog) the
>> program exits with the following error:
>>
>> MPI_Cart_create: invalid dimension argument: Invalid argument (rank
>> 0, MPI_COMM_WORLD)
>> [snip]
>>
>> (b) If I take the same example and invoke with the correct number of
>> processes (mpirun -np 8 my_prog) then the program 'hangs' at the point
>> where it attempts to create the Cartesian co-ordinate system.
>>
>> (c) If I specify the co-ordinate system requires only a single process
>> and run with a single process there appears to be no problem (although
>> it defeats the point)
>
> Can you send a representative code snipit of what is blocking?
> MPI_CART_CREATE does no care how many physical processors you have.
>
> --
> {+} Jeff Squyres
> {+} jsquyres_at_[hidden]
> {+} http://www.lam-mpi.org/
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
|