k***@gmail.com
2008-06-26 19:53:50 UTC
Hello, I am trying to spawn external mpi program inside the main mpi
program. But I met the fatal error like:
Fatal error in MPI_Comm_spawn: Other MPI error, error stack:
MPI_Comm_spawn(128)...........: MPI_Comm_spawn(cmd=" ", argv=0x566720,
maxprocs=1, MPI_INFO_NULL, root=0, MPI_COMM_WORLD,
intercomm=0x7fbffff0d0, errors=0x55a7fc) failed
I have no idea about this problem. I tried to delete spawn part, then
the program was ok. I just know MPICH2, torque installed. Please give
me some suggestions. Thanks.
The code is attached below.
implicit real*8 (a-h,o-z)
external system
include 'mpif.h'
save
character *25 cmd
INTEGER comm,parecomm,INTERCOMM,ARRAY_OF_ERRCODES(2),ierr
comm = MPI_COMM_WORLD
call MPI_init(ierr)
call MPI_COMM_RANK(comm,myid,ierr)
call MPI_COMM_SIZE(comm,nnodes,ierr)
write(*,*) 'start to run...',myid
cmd = 'XXX'
np = 2
call MPI_COMM_GET_PARENT(parecomm, ierr)
if(parecomm == MPI_COMM_NULL) then
call MPI_COMM_SPAWN(cmd,MPI_ARGV_NULL,np,MPI_INFO_NULL,
& 0,comm,INTERCOMM,ARRAY_OF_ERRCODES,ierr)
endif
write(*,*) 'end of running',myid
call MPI_FINALIZE(ierr)
end
program. But I met the fatal error like:
Fatal error in MPI_Comm_spawn: Other MPI error, error stack:
MPI_Comm_spawn(128)...........: MPI_Comm_spawn(cmd=" ", argv=0x566720,
maxprocs=1, MPI_INFO_NULL, root=0, MPI_COMM_WORLD,
intercomm=0x7fbffff0d0, errors=0x55a7fc) failed
I have no idea about this problem. I tried to delete spawn part, then
the program was ok. I just know MPICH2, torque installed. Please give
me some suggestions. Thanks.
The code is attached below.
implicit real*8 (a-h,o-z)
external system
include 'mpif.h'
save
character *25 cmd
INTEGER comm,parecomm,INTERCOMM,ARRAY_OF_ERRCODES(2),ierr
comm = MPI_COMM_WORLD
call MPI_init(ierr)
call MPI_COMM_RANK(comm,myid,ierr)
call MPI_COMM_SIZE(comm,nnodes,ierr)
write(*,*) 'start to run...',myid
cmd = 'XXX'
np = 2
call MPI_COMM_GET_PARENT(parecomm, ierr)
if(parecomm == MPI_COMM_NULL) then
call MPI_COMM_SPAWN(cmd,MPI_ARGV_NULL,np,MPI_INFO_NULL,
& 0,comm,INTERCOMM,ARRAY_OF_ERRCODES,ierr)
endif
write(*,*) 'end of running',myid
call MPI_FINALIZE(ierr)
end