Changeset bd2278d for utilities.f
- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utilities.f
r2ebb8b6 rbd2278d 114 114 end subroutine distributeWorkLoad 115 115 116 c-----------------------------------------------------------------------117 cThe function fileNameMP takes a template of a file name in the118 cvariable base. The position of the first and last character that119 cmay be replaced by rank in the string are given in i1 (first) and120 ci2 (last).121 cThe function returns an empty string if the rank would need more122 ccharacters than is allowed by the template.123 cFor example,124 c\code125 crank = 11126 cfileName = fileNameMP('base_0000.dat', 6, 9, rank)127 cwrite (*,*), fileName128 c\endcode129 cwill output base_0011.dat.130 c131 c@param base the base file name, e.g., base_0000.dat.132 c@param i1 index of the first character that may be replaced133 c@param i2 index of the last character that may be replaced134 c@param rank the number that should be inserted into the file name.135 c136 c@return file name for rank137 c-----------------------------------------------------------------------116 !----------------------------------------------------------------------- 117 ! The function fileNameMP takes a template of a file name in the 118 ! variable base. The position of the first and last character that 119 ! may be replaced by rank in the string are given in i1 (first) and 120 ! i2 (last). 121 ! The function returns an empty string if the rank would need more 122 ! characters than is allowed by the template. 123 ! For example, 124 ! \code 125 ! rank = 11 126 ! fileName = fileNameMP('base_0000.dat', 6, 9, rank) 127 ! write (*,*), fileName 128 ! \endcode 129 ! will output base_0011.dat. 130 ! 131 ! @param base the base file name, e.g., base_0000.dat. 132 ! @param i1 index of the first character that may be replaced 133 ! @param i2 index of the last character that may be replaced 134 ! @param rank the number that should be inserted into the file name. 135 ! 136 ! @return file name for rank 137 !----------------------------------------------------------------------- 138 138 character*80 function fileNameMP(base, i1, i2, rank) 139 139 140 140 character*(*) base 141 ci1, i2: Index of first and last character that can be replaced142 crank: rank of node141 ! i1, i2: Index of first and last character that can be replaced 142 ! rank: rank of node 143 143 integer i1, i2, rank 144 144 … … 150 150 endif 151 151 152 cTODO: Allow arbitrary rank152 ! TODO: Allow arbitrary rank 153 153 154 154 if (rank.lt.10) then … … 166 166 endif 167 167 end function fileNameMP 168 cEnd fileNameMP168 ! End fileNameMP 169 169
Note:
See TracChangeset
for help on using the changeset viewer.