Changeset 961
- Timestamp:
- 10/22/06 16:47:37 (7 years ago)
- Location:
- sandbox/trunk/pdp/src
- Files:
-
- 2 modified
-
N-body.cpp (modified) (1 diff)
-
Replication.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sandbox/trunk/pdp/src/N-body.cpp
r960 r961 93 93 for(size_t step=0; step<times; ++step) 94 94 { 95 XERIAL_ DEBUG(_logger, "step " << step);95 XERIAL_INFO(_logger, "step " << step); 96 96 naiveUpdate(dt); 97 97 XERIAL_DEBUG(_logger, "\n" << StringUtil::join(_particle, "\n")); -
sandbox/trunk/pdp/src/Replication.cpp
r959 r961 72 72 opt.add(Option(OPT_VERBOSE, "v", "verbose", "display vorbose log messages")); 73 73 opt.add(OptionWithArgument(OPT_REPLICATION_MODE, "m", "replication", "MODE", " 0 (default) : one to N replication, 1 : chain replication")); 74 opt.add(OptionWithArgument(OPT_BUFFERSIZE, "b", "buffer", "MBYTES", "buffer size (default: 16M)"));74 opt.add(OptionWithArgument(OPT_BUFFERSIZE, "b", "buffer", "MBYTES", "buffer size (default: 2M)")); 75 75 opt.add(OptionWithArgument(OPT_LOGLEVEL, "w", "loglevel", "LOGLEVEL", "0:all, 1:trace, 2:debug, 3:info, 4:warn, 5:error, 6:fatal, 7:off)")); 76 76 opt.add(OptionWithArgument(OPT_OUTPUTDIR, "d", "dir", "PATH", "output folder")); … … 100 100 string fileName = opt.getArgument(0); 101 101 int replicationMode = Integer::parseInt(opt.getValue(OPT_REPLICATION_MODE, "0")); 102 size_t bufferSize = Integer::parseInt(opt.getValue(OPT_BUFFERSIZE, " 16"));102 size_t bufferSize = Integer::parseInt(opt.getValue(OPT_BUFFERSIZE, "2")); 103 103 104 104 ReplicationProcess rp(fileName, outputDir, bufferSize); … … 217 217 MPI::BYTE.Pack(&(fileBuffer[0]), readBytes, &(packedDataBuffer[0]), maximumPackedDataSize, sendBufferPosition, comm); 218 218 219 XERIAL_TRACE(_logger, "broad casting data"); 220 219 XERIAL_TRACE(_logger, "broad casting data: size = " << sendBufferPosition); 221 220 comm.Bcast(&(packedDataBuffer[0]), sendBufferPosition, MPI::PACKED, serverProcess); 222 221 sendBytes += readBytes; 223 222 XERIAL_DEBUG(_logger, "send bytes = " << sendBytes); 224 comm.Barrier();225 223 } 226 224 } … … 244 242 XERIAL_THROW(Exception, "cannot open file " << outputFileName); 245 243 246 247 248 244 uint64 recievedBytes = 0; 249 245 while(recievedBytes < fileSize) … … 251 247 XERIAL_TRACE(_logger, "braad cast wait"); 252 248 comm.Bcast(&(packedDataBuffer[0]), maximumPackedDataSize, MPI::PACKED, serverProcess); 249 XERIAL_TRACE(_logger, "receirved broad cast data"); 253 250 int incomingDataSize = 0; 254 251 int packedBufferPosition = 0; … … 263 260 recievedBytes += incomingDataSize; 264 261 XERIAL_DEBUG(_logger, "recieved bytes = " << recievedBytes); 265 comm.Barrier();266 } 262 } 263 267 264 } 268 265 … … 276 273 } 277 274 } 278


