Changeset d13e27 for src/comm/comm_mpi.cpp
- Timestamp:
- Mar 29, 2013, 5:03:13 PM (13 years ago)
- Children:
- f57182
- Parents:
- 5ba22b
- File:
-
- 1 edited
-
src/comm/comm_mpi.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/comm/comm_mpi.cpp
r5ba22b rd13e27 344 344 } 345 345 346 void CommMPI::PrintString(const char* format, ...) 347 { 348 va_list args; 349 va_start(args, format); 350 vsprintf(print_buffer, format, args); 351 printf("VMG: Rank %d: %s\n", GlobalRank(), print_buffer); 352 va_end(args); 353 } 354 355 void CommMPI::PrintStringOnce(const char* format, ...) 356 { 357 if (GlobalRank() == 0) { 346 void CommMPI::Print(const OutputLevel level, const char* format, ...) 347 { 348 bool print = (level == Output); 349 350 #ifdef OUTPUT_INFO 351 print |= (level == Info); 352 #endif 353 #ifdef OUTPUT_DEBUG 354 print |= (level == Debug); 355 #endif 356 #ifdef OUTPUT_TIMING 357 print |= (level == Timing); 358 #endif 359 360 if (print) { 361 va_list args; 362 va_start(args, format); 363 vsprintf(print_buffer, format, args); 364 printf("VMG: Rank %d: %s\n", GlobalRank(), print_buffer); 365 va_end(args); 366 } 367 } 368 369 void CommMPI::PrintOnce(const OutputLevel level, const char* format, ...) 370 { 371 bool print = (level == Output); 372 373 #ifdef OUTPUT_INFO 374 print |= (level == Info); 375 #endif 376 #ifdef OUTPUT_DEBUG 377 print |= (level == Debug); 378 #endif 379 #ifdef OUTPUT_TIMING 380 print |= (level == Timing); 381 #endif 382 383 if (GlobalRank() == 0 && print) { 358 384 va_list args; 359 385 va_start(args, format); … … 900 926 } 901 927 902 #ifdef DEBUG_OUTPUT928 #ifdef OUTPUT_DEBUG 903 929 if (rank == 0) 904 std::printf(" Dims: %d %d %d\n", dims[0], dims[1], dims[2]);930 std::printf("Process grid: %d %d %d\n", dims[0], dims[1], dims[2]); 905 931 #endif 906 932
Note:
See TracChangeset
for help on using the changeset viewer.
