fix the wrong communicator in writing *.bandinfo.dat when running ensemble jobs.

hdf_archive::open no longer creates files when it tries to open non existing files.


git-svn-id: https://subversion.assembla.com/svn/qmcdev/trunk@6725 e5b18d87-469d-4833-9cc0-8cdfa06e9491
This commit is contained in:
Ye Luo 2016-01-31 21:38:24 +00:00
parent 3a2a2000a3
commit 29f55503c1
2 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ namespace qmcplusplus
}
//write to a file
const Communicate* comm=OHMMS::Controller;
const Communicate* comm=myComm;
if(comm->rank()) return;
string aname= make_bandinfo_filename(mybuilder->getName(),spin

View File

@ -97,8 +97,8 @@ bool hdf_archive::open(const std::string& fname,unsigned flags)
return true;
close();
file_id = H5Fopen(fname.c_str(),flags,access_id);
if(file_id==is_closed)
file_id = H5Fcreate(fname.c_str(),flags,H5P_DEFAULT,access_id);
// if(file_id==is_closed)
// file_id = H5Fcreate(fname.c_str(),flags,H5P_DEFAULT,access_id);
return file_id != is_closed;
}