Changeset 38d77eb for main_p.f


Ignore:
Timestamp:
11/19/09 11:29:48 (14 years ago)
Author:
baerbaer <baerbaer@…>
Branches:
master
Children:
7137e5d
Parents:
32289cd
Message:

Redirected standard out to logString.

SMMP produced a lot of log messages. This became an issue when run in massively
parallel environments. I replaced all writes to standard out to a write to logString.
The next step is to pass this string to a function that writes the messages to a log
file according to their importance and the chosen log level.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@34 26dc1dd8-5c4e-0410-9ffe-d298b4865968

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main_p.f

    r32289cd r38d77eb  
    151151         call mpi_group_range_incl(group_world, 1, proc_range, group(i)
    152152     &                              ,error)
    153          write (*,*) "Assigning rank ", j, proc_range,
     153         write (logString, *) "Assigning rank ", j, proc_range,
    154154     &               "to group", group(i)
    155155         call flush(6)
     
    162162             my_mpi_comm = comm(i)
    163163             rep_id = i - 1
    164              write (*,*) rep_id, "has comm", my_mpi_comm
     164             write (logString, *) rep_id, "has comm", my_mpi_comm
    165165             call flush(6)
    166166         endif
     
    168168
    169169!     Setup the communicator used for parallel tempering
    170       write (*,*) "PTGroup=", ranks(:num_replica)
     170      write (logString, *) "PTGroup=", ranks(:num_replica)
    171171      call flush(6)
    172172      call mpi_group_incl(group_world, num_replica, ranks, group_partem,
     
    176176
    177177      if (partem_comm.ne.MPI_COMM_NULL) then
    178          write (*,*) partem_comm,myrank, "is master for ", rep_id, "."
     178         write (logString, *) partem_comm,myrank, "is master for ",
     179     &      rep_id, "."
    179180      endif
    180181
     
    182183      call mpi_comm_size(my_mpi_comm,no,ierr)
    183184
    184       write (*,*) "My new rank is ", myrank, "of", no
     185      write (logString, *) "My new rank is ", myrank, "of", no
    185186      call flush(6)
    186187! = Done setting up communicators =====================================
     
    220221
    221222!     ========================================  start of parallel tempering run
    222       write (*,*) "There are ", no,
     223      write (logString, *) "There are ", no,
    223224     &            " processors available for ",rep_id
    224225      call flush(6)
     
    234235
    235236      if(my_pt_rank.eq.0) then
    236          write(*,*) "time for simulation using ", num_proc,
     237         write (logString, *) "time for simulation using ", num_proc,
    237238     &        " processors =",  endwtime - startwtime, " seconds"
    238239         call flush(6)
Note: See TracChangeset for help on using the changeset viewer.