JAVA

argv(1) = '--slave'

argv(2) = ' '

call MPI_COMM_SPAWN('./spawn\0',

+ argv,

+ PROCESS,

+ MPI_INFO_NULL,

+ 0,

+ MPI_COMM_SELF,

+ icomm,

+ errcodes,

+ ierr)

if((ierr.ne.MPI_SUCCESS).or.(icomm.eq.MPI_COMM_NULL))then

write(*,*)'MPI_COMM_SPAWN error:',ierr

goto 100

endif

*

do i=1,PROCESS

if(errcodes(i).ne.MPI_SUCCESS) then

write(*,*)iam,': spawn error =',ierr,' for process ',i

endif

enddo

ELSE

*

call MPI_COMM_GET_PARENT(icomm,ierr)

if((ierr.ne.MPI_SUCCESS).or.(icomm.eq.MPI_COMM_NULL))then

write(*,*)'MPI_COMM_GET_PARENT error:',ierr

goto 100

endif

ENDIF

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


<< >>