Skip to content

Commit

Permalink
log function modified
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardolombardi committed Nov 6, 2015
1 parent 14eaebd commit 99927d1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Class_Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ void Class_Log::writeLog(string msg) {
// =================================================================================== //

int rank = 0;

#if NOMPI==0
int error_flag = MPI_Comm_rank(comm,&rank);
bool flag = MPI::Is_finalized();
if (!(flag))
int error_flag = MPI_Comm_rank(comm,&rank);
#endif
if(rank == 0){
// Open the .log file
Expand All @@ -62,7 +65,7 @@ void Class_Log::writeLog(string msg) {
// Close file
file_handle.close();
}
#if NOMPI==0
error_flag = MPI_Barrier(comm);
#endif
//#if NOMPI==0
// error_flag = MPI_Barrier(comm);
//#endif
return; };

0 comments on commit 99927d1

Please sign in to comment.