X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/e82cb4b1f88e18f5b9487e49f79b9a091942132f..38ffdcb3843eec92d62b23d32a735107a49fb7d8:/writeout.cpp?ds=sidebyside diff --git a/writeout.cpp b/writeout.cpp index 9fc40f5..a756394 100644 --- a/writeout.cpp +++ b/writeout.cpp @@ -10,7 +10,10 @@ #include #include #include + +#ifndef MPI_DISABLED #include +#endif using namespace std; @@ -25,8 +28,8 @@ void writeout::newsub(string subname) { of[subname] = new ofstream; if ( fulldir != "" ) { - if(rank>0) of[subname]->open( (fulldir + "/rank" + cRank + "-" + subname + ".tmp").c_str() ); - else of[subname]->open( (fulldir + "/" + signature + "-" + subname + ".dat").c_str() ); + if(rank>0) of[subname]->open( (fulldir + "/rank" + cRank + "_" + subname + ".tmp").c_str() ); + else of[subname]->open( (fulldir + "/" + signature + "_" + subname + ".dat").c_str() ); if ( !of[subname]->is_open() ) { logf << "WRITEOUT: Could not open output-file!" << endl << flush; @@ -142,8 +145,8 @@ writeout::~writeout() } else { ofit->second->close(); - rename((fulldir + "/rank" + cRank + "-" + ofit->first + ".tmp").c_str(), - (fulldir + "/rank" + cRank + "-" + ofit->first + ".part").c_str()); + rename((fulldir + "/rank" + cRank + "_" + ofit->first + ".tmp").c_str(), + (fulldir + "/rank" + cRank + "_" + ofit->first + ".part").c_str()); } } if( cRank[0] == '0' ) @@ -170,7 +173,7 @@ string writeout::getdatfile(string subname) myfile = string(dirp->d_name); if(myfile.length() > 3 && myfile.substr(myfile.length()-4) == "part" && - subname == myfile.substr( myfile.find("-")+1, myfile.rfind(".")-myfile.find("-")-1 ) ) { + subname == myfile.substr( myfile.find("_")+1, myfile.rfind(".")-myfile.find("_")-1 ) ) { closedir(dp); return myfile; }