Changeset 3fbbfbb for utilities.f
- Timestamp:
- 06/16/10 08:25:47 (14 years ago)
- Branches:
- master
- Children:
- 5fef0d7
- Parents:
- 9f146fa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utilities.f
r9f146fa r3fbbfbb 7 7 ! ********************************************************************* 8 8 9 !! Calculate the best way to distribute the work load across processors. 10 ! It calculates the average number of interactions and then tries to 11 ! assign a number of interactions to each processor that is as close 12 ! as possible to the average. The routine should be called once for 13 ! every molecule in the system. 14 ! 15 ! @param num_ppr Number of processors per replica 16 ! @param nml index of molecule or zero. 17 ! 18 ! @author Jan H. Meinke 9 !> Calculate the best way to distribute the work load across processors. 10 !! It calculates the average number of interactions and then tries to 11 !! assign a number of interactions to each processor that is as close 12 !! as possible to the average. The routine should be called once for 13 !! every molecule in the system. 14 !! 15 !! @param num_ppr Number of processors per replica 16 !! @param nml index of molecule or zero. 17 !! 18 !! @author Jan H. Meinke 19 !< 19 20 subroutine distributeWorkLoad(num_ppr,nml) 20 21 … … 117 118 end subroutine distributeWorkLoad 118 119 119 ! -----------------------------------------------------------------------120 ! The function fileNameMP takes a template of a file name in the121 ! variable base. The position of the first and last character that122 ! may be replaced by rank in the string are given in i1 (first) and123 ! i2 (last).124 ! The function returns an empty string if the rank would need more125 ! characters than is allowed by the template.126 ! For example,127 ! \code128 ! rank = 11129 ! fileName = fileNameMP('base_0000.dat', 6, 9, rank)130 ! write (logString, *), fileName131 ! \endcode132 ! will output base_0011.dat.133 ! 134 ! @param base the base file name, e.g., base_0000.dat.135 ! @param i1 index of the first character that may be replaced136 ! @param i2 index of the last character that may be replaced137 ! @param rank the number that should be inserted into the file name.138 ! 139 ! @return file name for rank140 ! -----------------------------------------------------------------------120 !> 121 !! The function fileNameMP takes a template of a file name in the 122 !! variable base. The position of the first and last character that 123 !! may be replaced by rank in the string are given in i1 (first) and 124 !! i2 (last). 125 !! The function returns an empty string if the rank would need more 126 !! characters than is allowed by the template. 127 !! For example, 128 !! \code 129 !! rank = 11 130 !! fileName = fileNameMP('base_0000.dat', 6, 9, rank) 131 !! write (logString, *), fileName 132 !! \endcode 133 !! will output base_0011.dat. 134 !! 135 !! @param base the base file name, e.g., base_0000.dat. 136 !! @param i1 index of the first character that may be replaced 137 !! @param i2 index of the last character that may be replaced 138 !! @param rank the number that should be inserted into the file name. 139 !! 140 !! @return file name for rank 141 !< 141 142 character*80 function fileNameMP(base, i1, i2, rank) 142 143 … … 172 173 173 174 174 ! ----------------------------------------------------------------------175 ! Add messages to log. This routine takes the log (debugging) mes-176 ! sages and writes them to the log file if the log level is less or177 ! equal to the maximum log level given by the global variable178 ! MAXLOGLEVEL.179 ! 180 ! @author Jan H. Meinke181 ! 182 ! @param loglevel level at which this message should be added to183 ! the log.184 ! @param message message to be written to the log.185 ! @param rank global rank of this node if running an MPI job zero186 ! otherwise.187 ! ----------------------------------------------------------------------175 !> 176 !! Add messages to log. This routine takes the log (debugging) mes- 177 !! sages and writes them to the log file if the log level is less or 178 !! equal to the maximum log level given by the global variable 179 !! MAXLOGLEVEL. 180 !! 181 !! @author Jan H. Meinke 182 !! 183 !! @param loglevel level at which this message should be added to 184 !! the log. 185 !! @param message message to be written to the log. 186 !! @param rank global rank of this node if running an MPI job zero 187 !! otherwise. 188 !< 188 189 subroutine addLogMessage(loglevel, message, rank) 189 190 190 integer maxloglevel, logfileunit 191 integer MAXLOGLEVEL, LOGFILEUNIT 192 common /log/MAXLOGLEVEL, LOGFILEUNIT 191 193 192 194 integer :: loglevel, rank
Note:
See TracChangeset
for help on using the changeset viewer.