Commit aa51d516 authored by Kenneth Leiter's avatar Kenneth Leiter

BUG: Restore correct parsing of relative file paths for heavy data files.

Heavy data files that are specified with relative paths should be
located with respect to the XML file location.

Fix compiler error on intel with XdmfExodusWriter missing include.
parent c8b356a6
......@@ -1083,8 +1083,25 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
}
}
std::string hdf5Path = contentVals[contentIndex].substr(0, colonLocation);
std::string dataSetPath = contentVals[contentIndex].substr(colonLocation+1);
std::string hdf5Path =
contentVals[contentIndex].substr(0, colonLocation);
std::string dataSetPath =
contentVals[contentIndex].substr(colonLocation+1);
// FIXME: for other OS (e.g. windows)
if(hdf5Path.size() > 0 && hdf5Path[0] != '/') {
// Dealing with a relative path for hdf5 location
std::map<std::string, std::string>::const_iterator xmlDir =
itemProperties.find("XMLDir");
if(xmlDir == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
"'XMLDir' not found in itemProperties in "
"XdmfArray::populateItem");
}
std::stringstream newHDF5Path;
newHDF5Path << xmlDir->second << hdf5Path;
hdf5Path = newHDF5Path.str();
}
// Parse dimensions from the content
std::vector<unsigned int> contentDims;
......
......@@ -21,6 +21,7 @@
/* */
/*****************************************************************************/
#include <cstring>
#include <exodusII.h>
#include <set>
#include <sstream>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment