Commit cbf6f551 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Cleaner output for CSAM-15 school.


Former-commit-id: 04b741c80cdb62c8c5631dee14740d6351e72576
parent c5895316
...@@ -797,7 +797,6 @@ int main(int argc, char *argv[]) { ...@@ -797,7 +797,6 @@ int main(int argc, char *argv[]) {
engine_redistribute(&e); engine_redistribute(&e);
#endif #endif
message("Before write !");
/* Write the state of the system as it is before starting time integration. */ /* Write the state of the system as it is before starting time integration. */
tic = getticks(); tic = getticks();
#if defined(WITH_MPI) #if defined(WITH_MPI)
...@@ -830,8 +829,8 @@ int main(int argc, char *argv[]) { ...@@ -830,8 +829,8 @@ int main(int argc, char *argv[]) {
/* Legend. */ /* Legend. */
if (myrank == 0) /* if (myrank == 0) */
printf("# step time e_tot e_kin e_temp dt dt_step count dt_min dt_max\n"); /* printf("# step time e_tot e_kin e_temp dt dt_step count dt_min dt_max\n"); */
/* Let loose a runner on the space. */ /* Let loose a runner on the space. */
for (j = 0; j < runs && e.time < clock; j++) { for (j = 0; j < runs && e.time < clock; j++) {
...@@ -865,15 +864,25 @@ int main(int argc, char *argv[]) { ...@@ -865,15 +864,25 @@ int main(int argc, char *argv[]) {
} }
/* Dump a line of agregate output. */ /* Dump a line of agregate output. */
/* if (myrank == 0) { */
/* printf("%i %e %.16e %.16e %.16e %.3e %.3e %i %.3e %.3e", j, e.time, */
/* e.ekin + e.epot, e.ekin, e.epot, e.dt, e.dt_step, e.count_step, */
/* e.dt_min, e.dt_max); */
/* for (k = 0; k < timer_count; k++) */
/* printf(" %.3f", ((double)timers[k]) / CPU_TPS * 1000); */
/* printf("\n"); */
/* fflush(stdout); */
/* } */
if (myrank == 0) { if (myrank == 0) {
printf("%i %e %.16e %.16e %.16e %.3e %.3e %i %.3e %.3e", j, e.time, if (j == 0)
e.ekin + e.epot, e.ekin, e.epot, e.dt, e.dt_step, e.count_step, printf("# Step Time time-step CPU Wall-clock time [ms]\n");
e.dt_min, e.dt_max);
for (k = 0; k < timer_count; k++) printf("%i %e %.3e", j, e.time, e.dt );
printf(" %.3f", ((double)timers[k]) / CPU_TPS * 1000); printf(" %.3f", ((double)timers[timer_count-1]) / CPU_TPS * 1000);
printf("\n"); printf("\n");
fflush(stdout); fflush(stdout);
} }
/* for ( k = 0 ; k < 5 ; k++ ) /* for ( k = 0 ; k < 5 ; k++ )
printgParticle( s.gparts , pid[k] , N ); */ printgParticle( s.gparts , pid[k] , N ); */
} }
...@@ -891,7 +900,7 @@ int main(int argc, char *argv[]) { ...@@ -891,7 +900,7 @@ int main(int argc, char *argv[]) {
/* Dump the task data. */ /* Dump the task data. */
/* #ifdef WITH_MPI #ifdef WITH_MPI
for ( j = 0 ; j < nr_nodes ; j++ ) { for ( j = 0 ; j < nr_nodes ; j++ ) {
MPI_Barrier( MPI_COMM_WORLD ); MPI_Barrier( MPI_COMM_WORLD );
if ( j == myrank ) { if ( j == myrank ) {
...@@ -914,14 +923,14 @@ sleep(1); ...@@ -914,14 +923,14 @@ sleep(1);
#else #else
for ( k = 0 ; k < e.sched.nr_tasks ; k++ ) for ( k = 0 ; k < e.sched.nr_tasks ; k++ )
if ( !e.sched.tasks[k].skip && !e.sched.tasks[k].implicit ) if ( !e.sched.tasks[k].skip && !e.sched.tasks[k].implicit )
printf( " %i %i %i %i %lli %lli %i %i\n" , fprintf(stderr, " %i %i %i %i %lli %lli %i %i\n" ,
e.sched.tasks[k].rid , e.sched.tasks[k].type , e.sched.tasks[k].rid , e.sched.tasks[k].type ,
e.sched.tasks[k].subtype , e.sched.tasks[k].subtype ,
(e.sched.tasks[k].cj == NULL) , e.sched.tasks[k].tic , (e.sched.tasks[k].cj == NULL) , e.sched.tasks[k].tic ,
e.sched.tasks[k].toc , e.sched.tasks[k].toc ,
e.sched.tasks[k].ci->count , e.sched.tasks[k].ci->count ,
(e.sched.tasks[k].cj==NULL)?0:e.sched.tasks[k].cj->count ); (e.sched.tasks[k].cj==NULL)?0:e.sched.tasks[k].cj->count );
#endif */ #endif
/* Write final output. */ /* Write final output. */
#if defined(WITH_MPI) #if defined(WITH_MPI)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment