X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/f2373be314dc298d602b1939cde3d5ae990dd07f..71a0a66deb80dc52590280b3aa470b970862db93:/writeout.cpp?ds=inline diff --git a/writeout.cpp b/writeout.cpp index 966559d..af67fb5 100644 --- a/writeout.cpp +++ b/writeout.cpp @@ -85,12 +85,9 @@ writeout::~writeout() { if(fulldir != "") { for (map::iterator ofit = of.begin(); ofit != of.end(); ++ofit) { - cout << ofit->first << endl; if( cRank[0] == '0' ) { int jobsdone=0; while(jobsdonefirst << endl; - cout << "here" << endl; string nextfile; if( (nextfile = getdatfile(ofit->first)) == "" ) sleep(1); @@ -131,11 +128,9 @@ string writeout::getdatfile(string subname) DIR *dp; struct dirent *dirp; - cout << "getting:" << subname << endl; - if((dp = opendir(fulldir.c_str())) == NULL) { logf << "Error(" << errno << ") opening " << fulldir << endl; - cout << "blub" << endl; + closedir(dp); return ""; } @@ -143,14 +138,13 @@ string writeout::getdatfile(string subname) { myfile = string(dirp->d_name); - cout << myfile << endl; - if(myfile.length() > 3 && myfile.substr(myfile.length()-4) == "part" && subname == myfile.substr( myfile.find("-")+1, myfile.rfind(".")-myfile.find("-")-1 ) ) { - cout << myfile << endl; + closedir(dp); return myfile; } } + closedir(dp); return ""; }