How to make each pe writing to a different log file?

I want to write the log file separately, that is, each pe writes to a different log file, instead the default setting all the pes output within the same file such as ccsm.log.110224-115416.

Does anyone can give me some suggestions how to achieve this? Very appreciate.
 
I can do it now, Great, simply by adding some code near 167 of seq_comm_mct.F90 as follows:

infile = 'out.xxx'

call mpi_init(ierr)
call shr_mpi_chkerr(ierr,subname//' mpi_init')
call mpi_comm_rank(MPI_COMM_WORLD, mype , ierr)

write(infile(5:7),'(i3.3)')mype
open(iulog,file=trim(infile))

and then replace iulog=6 to another unit other than 6, such as iulog=113

that's all
 
Back
Top