#include <dirent.h>
#include <errno.h>
#include <unistd.h>
+
+#ifndef MPI_DISABLED
#include <mpi.h>
+#endif
using namespace std;
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;
}
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' )
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;
}