Changeset 961

Show
Ignore:
Timestamp:
10/22/06 16:47:37 (7 years ago)
Author:
leo
Message:
 
Location:
sandbox/trunk/pdp/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • sandbox/trunk/pdp/src/N-body.cpp

    r960 r961  
    9393        for(size_t step=0; step<times; ++step) 
    9494        { 
    95                 XERIAL_DEBUG(_logger, "step " << step); 
     95                XERIAL_INFO(_logger, "step " << step); 
    9696                naiveUpdate(dt); 
    9797                XERIAL_DEBUG(_logger, "\n" << StringUtil::join(_particle, "\n")); 
  • sandbox/trunk/pdp/src/Replication.cpp

    r959 r961  
    7272                opt.add(Option(OPT_VERBOSE, "v", "verbose", "display vorbose log messages")); 
    7373                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)")); 
    7575                opt.add(OptionWithArgument(OPT_LOGLEVEL, "w", "loglevel", "LOGLEVEL", "0:all, 1:trace, 2:debug, 3:info, 4:warn, 5:error, 6:fatal, 7:off)")); 
    7676                opt.add(OptionWithArgument(OPT_OUTPUTDIR, "d", "dir", "PATH", "output folder")); 
     
    100100                string fileName = opt.getArgument(0); 
    101101                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")); 
    103103 
    104104                ReplicationProcess rp(fileName, outputDir, bufferSize); 
     
    217217                                MPI::BYTE.Pack(&(fileBuffer[0]), readBytes, &(packedDataBuffer[0]), maximumPackedDataSize, sendBufferPosition, comm); 
    218218 
    219                                 XERIAL_TRACE(_logger, "broad casting data"); 
    220  
     219                                XERIAL_TRACE(_logger, "broad casting data: size = " << sendBufferPosition); 
    221220                                comm.Bcast(&(packedDataBuffer[0]), sendBufferPosition, MPI::PACKED, serverProcess); 
    222221                                sendBytes += readBytes; 
    223222                                XERIAL_DEBUG(_logger, "send bytes = " << sendBytes); 
    224                                 comm.Barrier(); 
    225223                        } 
    226224                } 
     
    244242                        XERIAL_THROW(Exception, "cannot open file " << outputFileName); 
    245243 
    246  
    247  
    248244                uint64 recievedBytes = 0; 
    249245                while(recievedBytes < fileSize) 
     
    251247                        XERIAL_TRACE(_logger, "braad cast wait"); 
    252248                        comm.Bcast(&(packedDataBuffer[0]), maximumPackedDataSize, MPI::PACKED, serverProcess); 
     249                        XERIAL_TRACE(_logger, "receirved broad cast data"); 
    253250                        int incomingDataSize = 0; 
    254251                        int packedBufferPosition = 0; 
     
    263260                        recievedBytes += incomingDataSize; 
    264261                        XERIAL_DEBUG(_logger, "recieved bytes = " << recievedBytes); 
    265                         comm.Barrier(); 
    266                 } 
     262                } 
     263 
    267264        } 
    268265 
     
    276273        } 
    277274} 
    278