1
0
Fork 0
mirror of https://github.com/cosmo-sims/monofonIC.git synced 2024-09-19 17:03:45 +02:00

reformatted mem+time output

This commit is contained in:
Oliver Hahn 2023-04-04 01:08:26 +02:00
parent 8b267f07be
commit 69f8b1243c
3 changed files with 13 additions and 13 deletions

View file

@ -32,7 +32,7 @@ void memory_report(void)
curr_mem_high_mark = local_mem_high_mark; curr_mem_high_mark = local_mem_high_mark;
#endif #endif
if( curr_mem_high_mark > 1.1*global_mem_high_mark ){ if( curr_mem_high_mark > 1.1*global_mem_high_mark ){
music::ilog << "----mem-> new memory high mark: " << curr_mem_high_mark/(1ull<<20) << " MBytes / task" << std::endl; music::ilog << std::setw(57) << std::setfill(' ') << std::right << "mem high: " << std::setw(8) << curr_mem_high_mark/(1ull<<20) << " MBytes / task" << std::endl;
global_mem_high_mark = curr_mem_high_mark; global_mem_high_mark = curr_mem_high_mark;
} }
} }

View file

@ -357,7 +357,7 @@ int run( config_file& the_config )
music::ilog << "\n>>> Generating LPT fields.... <<<\n" << std::endl; music::ilog << "\n>>> Generating LPT fields.... <<<\n" << std::endl;
double wtime = get_wtime(); double wtime = get_wtime();
music::ilog << std::setw(40) << std::setfill('.') << std::left << ">> Computing phi(1) term" << std::endl; music::ilog << std::setw(79) << std::setfill('.') << std::left << ">> Computing phi(1) term" << std::endl;
phi.FourierTransformForward(false); phi.FourierTransformForward(false);
phi.assign_function_of_grids_kdep([&](auto k, auto wn) { phi.assign_function_of_grids_kdep([&](auto k, auto wn) {
@ -368,7 +368,7 @@ int run( config_file& the_config )
phi.zero_DC_mode(); phi.zero_DC_mode();
music::ilog << "----cpu-> phi(1) took " << get_wtime() - wtime << "s" << std::endl; music::ilog << std::setw(70) << std::setfill(' ') << std::right << "took : " << std::setw(8) << get_wtime() - wtime << "s" << std::endl;
//====================================================================== //======================================================================
//... compute 2LPT displacement potential .... //... compute 2LPT displacement potential ....
@ -379,7 +379,7 @@ int run( config_file& the_config )
phi2.FourierTransformForward(false); phi2.FourierTransformForward(false);
wtime = get_wtime(); wtime = get_wtime();
music::ilog << std::setw(40) << std::setfill('.') << std::left << ">> Computing phi(2) term" << std::endl; music::ilog << std::setw(79) << std::setfill('.') << std::left << ">> Computing phi(2) term" << std::endl;
Conv.convolve_SumOfHessians(phi, {0, 0}, phi, {1, 1}, {2, 2}, op::assign_to(phi2)); Conv.convolve_SumOfHessians(phi, {0, 0}, phi, {1, 1}, {2, 2}, op::assign_to(phi2));
Conv.convolve_Hessians(phi, {1, 1}, phi, {2, 2}, op::add_to(phi2)); Conv.convolve_Hessians(phi, {1, 1}, phi, {2, 2}, op::add_to(phi2));
Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 1}, op::subtract_from(phi2)); Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 1}, op::subtract_from(phi2));
@ -398,7 +398,7 @@ int run( config_file& the_config )
} }
phi2.apply_InverseLaplacian(); phi2.apply_InverseLaplacian();
music::ilog << "----cpu-> phi(2) took " << get_wtime() - wtime << "s" << std::endl; music::ilog << std::setw(70) << std::setfill(' ') << std::right << "took : " << std::setw(8) << get_wtime() - wtime << "s" << std::endl;
if (bAddExternalTides) if (bAddExternalTides)
{ {
@ -419,18 +419,18 @@ int run( config_file& the_config )
//... phi3 = phi3a - 10/7 phi3b //... phi3 = phi3a - 10/7 phi3b
//... 3a term ... //... 3a term ...
wtime = get_wtime(); wtime = get_wtime();
music::ilog << std::setw(40) << std::setfill('.') << std::left << ">> Computing phi(3a) term" << std::endl; music::ilog << std::setw(79) << std::setfill('.') << std::left << ">> Computing phi(3a) term" << std::endl;
Conv.convolve_Hessians(phi, {0, 0}, phi, {1, 1}, phi, {2, 2}, op::assign_to(phi3)); Conv.convolve_Hessians(phi, {0, 0}, phi, {1, 1}, phi, {2, 2}, op::assign_to(phi3));
Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 2}, phi, {1, 2}, op::multiply_add_to(phi3,2.0)); Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 2}, phi, {1, 2}, op::multiply_add_to(phi3,2.0));
Conv.convolve_Hessians(phi, {1, 2}, phi, {1, 2}, phi, {0, 0}, op::subtract_from(phi3)); Conv.convolve_Hessians(phi, {1, 2}, phi, {1, 2}, phi, {0, 0}, op::subtract_from(phi3));
Conv.convolve_Hessians(phi, {0, 2}, phi, {0, 2}, phi, {1, 1}, op::subtract_from(phi3)); Conv.convolve_Hessians(phi, {0, 2}, phi, {0, 2}, phi, {1, 1}, op::subtract_from(phi3));
Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 1}, phi, {2, 2}, op::subtract_from(phi3)); Conv.convolve_Hessians(phi, {0, 1}, phi, {0, 1}, phi, {2, 2}, op::subtract_from(phi3));
// phi3a.apply_InverseLaplacian(); // phi3a.apply_InverseLaplacian();
music::ilog << "----cpu-> phi(3a) took " << get_wtime() - wtime << "s" << std::endl; music::ilog << std::setw(70) << std::setfill(' ') << std::right << "took : " << std::setw(8) << get_wtime() - wtime << "s" << std::endl;
//... 3b term ... //... 3b term ...
wtime = get_wtime(); wtime = get_wtime();
music::ilog << std::setw(40) << std::setfill('.') << std::left << ">> Computing phi(3b) term" << std::endl; music::ilog << std::setw(71) << std::setfill('.') << std::left << ">> Computing phi(3b) term" << std::endl;
Conv.convolve_SumOfHessians(phi, {0, 0}, phi2, {1, 1}, {2, 2}, op::multiply_add_to(phi3,-5.0/7.0)); Conv.convolve_SumOfHessians(phi, {0, 0}, phi2, {1, 1}, {2, 2}, op::multiply_add_to(phi3,-5.0/7.0));
Conv.convolve_SumOfHessians(phi, {1, 1}, phi2, {2, 2}, {0, 0}, op::multiply_add_to(phi3,-5.0/7.0)); Conv.convolve_SumOfHessians(phi, {1, 1}, phi2, {2, 2}, {0, 0}, op::multiply_add_to(phi3,-5.0/7.0));
Conv.convolve_SumOfHessians(phi, {2, 2}, phi2, {0, 0}, {1, 1}, op::multiply_add_to(phi3,-5.0/7.0)); Conv.convolve_SumOfHessians(phi, {2, 2}, phi2, {0, 0}, {1, 1}, op::multiply_add_to(phi3,-5.0/7.0));
@ -438,11 +438,11 @@ int run( config_file& the_config )
Conv.convolve_Hessians(phi, {0, 2}, phi2, {0, 2}, op::multiply_add_to(phi3,+10.0/7.0)); Conv.convolve_Hessians(phi, {0, 2}, phi2, {0, 2}, op::multiply_add_to(phi3,+10.0/7.0));
Conv.convolve_Hessians(phi, {1, 2}, phi2, {1, 2}, op::multiply_add_to(phi3,+10.0/7.0)); Conv.convolve_Hessians(phi, {1, 2}, phi2, {1, 2}, op::multiply_add_to(phi3,+10.0/7.0));
phi3.apply_InverseLaplacian(); phi3.apply_InverseLaplacian();
music::ilog << "----cpu-> phi(3b) took " << get_wtime() - wtime << "s" << std::endl; music::ilog << std::setw(70) << std::setfill(' ') << std::right << "took : " << std::setw(8) << get_wtime() - wtime << "s" << std::endl;
//... transversal term ... //... transversal term ...
wtime = get_wtime(); wtime = get_wtime();
music::ilog << std::setw(40) << std::setfill('.') << std::left << ">> Computing A(3) term" << std::endl; music::ilog << std::setw(71) << std::setfill('.') << std::left << ">> Computing A(3) term" << std::endl;
for (int idim = 0; idim < 3; ++idim) for (int idim = 0; idim < 3; ++idim)
{ {
// cyclic rotations of indices // cyclic rotations of indices
@ -455,7 +455,7 @@ int run( config_file& the_config )
Conv.convolve_DifferenceOfHessians(phi2, {idimp, idimpp}, phi, {idimp, idimp}, {idimpp, idimpp}, op::subtract_from(*A3[idim])); Conv.convolve_DifferenceOfHessians(phi2, {idimp, idimpp}, phi, {idimp, idimp}, {idimpp, idimpp}, op::subtract_from(*A3[idim]));
A3[idim]->apply_InverseLaplacian(); A3[idim]->apply_InverseLaplacian();
} }
music::ilog << "----cpu-> A(3) took " << get_wtime() - wtime << "s" << std::endl; music::ilog << std::setw(70) << std::setfill(' ') << std::right << "took : " << std::setw(8) << get_wtime() - wtime << "s" << std::endl;
} }
///... scale all potentials with respective growth factors ///... scale all potentials with respective growth factors

View file

@ -273,9 +273,9 @@ int main( int argc, char** argv )
#endif #endif
if( peak_mem > (1ull<<30) ) if( peak_mem > (1ull<<30) )
music::ilog << "----mem-> peak memory usage was " << peak_mem /(1ull<<30) << " GBytes / task" << std::endl; music::ilog << "Peak memory usage was " << peak_mem /(1ull<<30) << " GBytes / task" << std::endl;
else else
music::ilog << "----mem-> peak memory usage was " << peak_mem /(1ull<<20) << " MBytes / task" << std::endl; music::ilog << "Peak memory usage was " << peak_mem /(1ull<<20) << " MBytes / task" << std::endl;
#if defined(USE_MPI) #if defined(USE_MPI)