[Myrinet] application hangs when using 'call system'
Jeff Nucciarone <[email protected]>
| Newsgroups | gmane.network.myrinet.general |
|---|---|
| Message-ID | <[email protected]> |
I am in the process of debugging an application that appears to hang
whenever a Fortran call to 'system' is made. In the following example code:
---[cut here]---
include 'mpif.h'
integer :: time_array0(8), time_array1(8), taskid
character*50 scom
call MPI_INIT (mpierr)
call MPI_COMM_SIZE (MPI_COMM_WORLD,numtasks,mpierr)
call MPI_COMM_RANK (MPI_COMM_WORLD,taskid,mpierr)
c
write (scom,600) taskid
call system (scom)
600 format ('echo This is task ',i3,' on `/bin/hostname`')
c
call date_and_time(values=time_array0)
write (6,601) taskid,time_array0(2),time_array0(3),time_array0(1),
1 time_array0(5),time_array0(6),time_array0(7)
601 format (' starting taskid=',i3, ' date & time is ',i2,'/',i2,
1 '/',i4,2x,i2,':',i2,':',i2)
c
write(*,*) 'Starting MPI_BARRIER: ', taskid
call MPI_BARRIER (MPI_COMM_WORLD,mpierr)
write(*,*) 'End of MPI_BARRIER: ', taskid
call MPI_FINALIZE (mpierr)
end
---[cut here]---
the code will hang and never return from the MPI_BARRIER call.
If the line 'call system (scom) ' is removed, the code will run
normally. (The system call is for example only. I know I can use the MPI
hostname call to obtain the host id!)
I suspect the 'system' call is somehow upsetting GM. Any ideas (other
than eliminating any calls to system)?
GM build ID is "1.5.1_Linux [email protected] Tue Apr 9 08:07:01
EDT 2002." and compiler used was PGI's f90.
Thanks,
--Jeff