Discussion:
MPICH2 spawn failed for error stack
(too old to reply)
k***@gmail.com
2008-06-26 19:53:50 UTC
Permalink
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
Michael Hofmann
2008-06-27 11:00:28 UTC
Permalink
Post by k***@gmail.com
Hello, I am trying to spawn external mpi program inside the main mpi
MPI_Comm_spawn(128)...........: MPI_Comm_spawn(cmd=" ", argv=0x566720,
^^^^^^^
Post by k***@gmail.com
maxprocs=1, MPI_INFO_NULL, root=0, MPI_COMM_WORLD,
^^^^^^^^^^
Post by k***@gmail.com
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'
^^^^^^^^^^^
Are you using the correct name of the executable file?
Post by k***@gmail.com
np = 2
^^^^^^
What datatype is used for 'np'? Is it 'INTEGER' or is it 'real*8' because
of the 'implicit real*8 (a-h,o-z)' statement at the beginning?
Post by k***@gmail.com
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
Michael
k***@gmail.com
2008-07-01 11:42:56 UTC
Permalink
Thanks Michael. The problem is still there, even np is "INTEGER".
Whatever executable file I call, it is shown the same error.
Michael Hofmann
2008-07-03 14:39:43 UTC
Permalink
Post by k***@gmail.com
Thanks Michael. The problem is still there, even np is "INTEGER".
Whatever executable file I call, it is shown the same error.
The program runs fine for me, so there seems to be something wrong in your
MPI environment.
Post by k***@gmail.com
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
At least some parameters of mpi_comm_spawn get lost ('cmd' and 'maxprocs'
are wrong). Maybe you are mixing different MPI versions? Do other MPI
programs run fine? Process creation is very system-depended stuff and my
require some special privileges or configurations.

I think you should try to contact someone who is responsible for the
parallel system (or the MPI) you are using.


Michael

Loading...