39 use ctlblk_mod,
only: mpi_comm_inter
45 LOGICAL :: DONE, NEWFILE
46 INTEGER :: STATUS(MPI_STATUS_SIZE)
47 INTEGER :: IERR, COUNT, LUN,IER
48 CHARACTER*255 :: FNAME
49 CHARACTER*1,
ALLOCATABLE :: BUF(:)
65 print *,
' STARTING UP IO SERVER ...'
71 CALL mpi_recv(done,1,mpi_logical, &
72 0,1,mpi_comm_inter,status,ierr)
75 print *,
' SHUTTING DOWN IO SERVER ...'
81 CALL mpi_recv(newfile,1,mpi_logical, &
82 0,2,mpi_comm_inter,status,ierr)
86 CALL mpi_recv(lun,1,mpi_integer, &
87 0,3,mpi_comm_inter,status,ierr)
91 CALL mpi_recv(fname,255,mpi_character, &
92 0,4,mpi_comm_inter,status,ierr)
98 CALL baopenwt(lun,fname,ier)
99 print *,
' FILE ',fname,
' OPENED AS UNIT ',lun
104 CALL mpi_probe(0,5,mpi_comm_inter,status,ierr)
105 CALL mpi_get_count(status,mpi_character,count,ierr)
106 ALLOCATE( buf( count ) )
110 CALL mpi_recv(buf,count,mpi_character, &
111 0,5,mpi_comm_inter,status,ierr)
115 CALL wryte(lun,count,buf)