Commit 01e359d1 authored by Steffen Schotthöfer's avatar Steffen Schotthöfer
Browse files

screen output formatting

parent a46087e8
......@@ -342,25 +342,26 @@ void PrintLogHeader( std::string inputFile ) {
log->info( "| |_|\\_\\___| |_| |_| \\_\\|_| |" );
log->info( "| |" );
log->info( "------------------------------------------------------------------------" );
log->info( "| Copyright statement goes here |" );
log->info( "------------------------------------------------------------------------\n" );
log->info( "Git commit :\t{0}", GIT_HASH );
log->info( "Config file:\t{0}", inputFile );
log->info( "MPI Threads:\t{0}", nprocs );
log->info( "OMP Threads:\t{0}", omp_get_max_threads() );
log->info( "\n" );
log->info( "-------------------------- Config File Info ----------------------------\n" );
log->info( "| Copyright statement goes here |" );
log->info( "------------------------------------------------------------------------" );
log->info( "|" );
log->info( "| Git commit :\t{0}", GIT_HASH );
log->info( "| Config file:\t{0}", inputFile );
log->info( "| MPI Threads:\t{0}", nprocs );
log->info( "| OMP Threads:\t{0}", omp_get_max_threads() );
log->info( "|" );
log->info( "-------------------------- Config File Info ----------------------------" );
log->info( "|" );
// print file content while omitting comments
std::ifstream ifs( inputFile );
if( ifs.is_open() ) {
std::string line;
while( !ifs.eof() ) {
std::getline( ifs, line );
if( line[0] != '%' ) log->info( " {0}", line );
if( line[0] != '%' ) log->info( "| {0}", line );
}
}
log->info( "------------------------------------------------------------------------\n" );
// log->info( "------------------------------------------------------------------------" );
}
MPI_Barrier( MPI_COMM_WORLD );
}
......
......@@ -102,8 +102,8 @@ void Solver::Solve() {
lineToPrint += tmp + " |";
hLine += tmpLine;
}
log->info( "------------------------------ Solver Starts ----------------------------" );
log->info( " The simulation will run for {} iterations.", _nEnergies );
log->info( "----------------------------- Solver Starts ----------------------------" );
log->info( "| The simulation will run for {} iterations.", _nEnergies );
log->info( hLine );
log->info( lineToPrint );
log->info( hLine );
......
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