Commit db257fe6 authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont

Improving test output

parent 7863e933
......@@ -65,6 +65,10 @@ MACRO(ADD_TEST_FORTRAN executable)
IF(EXISTS ${fortran_source_dir}/${executable}.f90)
ADD_EXECUTABLE(${executable} ${fortran_source_dir}/${executable}.f90)
ENDIF(EXISTS ${fortran_source_dir}/${executable}.f90)
IF(EXISTS ${fortran_source_dir}/${executable}.F90)
ADD_EXECUTABLE(${executable} ${fortran_source_dir}/${executable}.F90)
ENDIF(EXISTS ${fortran_source_dir}/${executable}.F90)
GET_PROPERTY(fortran_dependencies GLOBAL PROPERTY FORTRAN_TEST_DEPENDENCIES)
GET_PROPERTY(fortran_ldpath GLOBAL PROPERTY FORTRAN_TEST_LDPATH)
......@@ -128,6 +132,10 @@ MACRO(ADD_MPI_TEST_FORTRAN script files)
ADD_EXECUTABLE(${executable} ${fortran_source_dir}/${executable}.f90)
ENDIF(EXISTS ${fortran_source_dir}/${executable}.f90)
IF(EXISTS ${fortran_source_dir}/${executable}.F90)
ADD_EXECUTABLE(${executable} ${fortran_source_dir}/${executable}.F90)
ENDIF(EXISTS ${fortran_source_dir}/${executable}.F90)
GET_PROPERTY(fortran_dependencies GLOBAL PROPERTY FORTRAN_TEST_DEPENDENCIES)
GET_PROPERTY(fortran_ldpath GLOBAL PROPERTY FORTRAN_TEST_LDPATH)
GET_PROPERTY(fortran_path GLOBAL PROPERTY FORTRAN_TEST_PATH)
......
......@@ -59,6 +59,11 @@ if(XDMF_BUILD_DSM)
set(XDMF_LIBRARIES ${XDMF_LIBRARIES} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
get_filename_component(MPI_LIBRARY_DIR ${MPI_LIBRARY} PATH)
set(XDMF_LIBRARY_DIRS ${XDMF_LIBRARY_DIRS} ${MPI_LIBRARY_DIR})
# intel compiler requires an extra tag for CXX_FLAGS in order to properly build
STRING(REGEX MATCH "icpc" IS_INTEL "${CMAKE_CXX_COMPILER}")
if (NOT "${IS_INTEL}" STREQUAL "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMPICH_IGNORE_CXX_SEEK")
endif (NOT "${IS_INTEL}" STREQUAL "")
endif(MPI_FOUND)
option(XDMF_BUILD_DSM_THREADS ON)
if (XDMF_WRAP_PYTHON)
......
......@@ -72,7 +72,12 @@ XdmfAttribute::getItemTag() const
std::string
XdmfAttribute::getName() const
{
return mName;
if (mName.c_str() == NULL) {
return "";
}
else {
return mName;
}
}
shared_ptr<const XdmfAttributeType>
......@@ -125,7 +130,12 @@ XdmfAttribute::setCenter(const shared_ptr<const XdmfAttributeCenter> center)
void
XdmfAttribute::setName(const std::string & name)
{
mName= name;
if (mName.c_str() == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Internal Name String is a null reference");
}
else {
mName = name;
}
}
void
......
......@@ -223,7 +223,10 @@ XdmfCurvilinearGrid::XdmfCurvilinearGrid(const shared_ptr<XdmfArray> numPoints)
XdmfCurvilinearGrid::~XdmfCurvilinearGrid()
{
delete mImpl;
if (mImpl) {
delete mImpl;
}
mImpl = NULL;
}
const std::string XdmfCurvilinearGrid::ItemTag = "Grid";
......@@ -238,6 +241,9 @@ XdmfCurvilinearGrid::getDimensions()
shared_ptr<const XdmfArray>
XdmfCurvilinearGrid::getDimensions() const
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Curvilinear Grid Internal Object is NULL");
}
return mImpl->mDimensions;
}
......@@ -269,6 +275,9 @@ XdmfCurvilinearGrid::populateItem(const std::map<std::string, std::string> & ite
void
XdmfCurvilinearGrid::setDimensions(const shared_ptr<XdmfArray> dimensions)
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Curvilinear Grid Internal Object is NULL");
}
mImpl->mDimensions = dimensions;
}
......
......@@ -33,6 +33,7 @@ shared_ptr<XdmfGeometry> XdmfGeometry::New()
}
XdmfGeometry::XdmfGeometry() :
XdmfArray(),
mNumberPoints(0),
mType(XdmfGeometryType::NoGeometryType())
{
......
......@@ -35,7 +35,8 @@ XdmfGraph::New(const unsigned int numberNodes)
XdmfGraph::XdmfGraph(const unsigned int numberNodes) :
XdmfSparseMatrix(numberNodes,
numberNodes)
numberNodes),
mTime(shared_ptr<XdmfTime>())
{
}
......@@ -51,6 +52,19 @@ XdmfGraph::getItemTag() const
return ItemTag;
}
shared_ptr<XdmfTime>
XdmfGraph::getTime()
{
return boost::const_pointer_cast<XdmfTime>
(static_cast<const XdmfGraph &>(*this).getTime());
}
shared_ptr<const XdmfTime>
XdmfGraph::getTime() const
{
return mTime;
}
unsigned int
XdmfGraph::getNumberNodes() const
{
......@@ -77,6 +91,12 @@ XdmfGraph::populateItem(const std::map<std::string, std::string> & itemPropertie
}
}
void
XdmfGraph::setTime(const shared_ptr<XdmfTime> time)
{
mTime = time;
}
void
XdmfGraph::traverse(const shared_ptr<XdmfBaseVisitor> visitor)
{
......
......@@ -72,10 +72,16 @@ public:
std::string getItemTag() const;
shared_ptr<XdmfTime> getTime();
shared_ptr<const XdmfTime> getTime() const;
unsigned int getNumberNodes() const;
using XdmfSparseMatrix::insert;
void setTime(const shared_ptr<XdmfTime> time);
void traverse(const shared_ptr<XdmfBaseVisitor> visitor);
protected:
......@@ -91,6 +97,8 @@ private:
XdmfGraph(const XdmfGraph &); // Not implemented.
void operator=(const XdmfGraph &); // Not implemented.
shared_ptr<XdmfTime> mTime;
};
#ifdef _WIN32
......
......@@ -73,7 +73,12 @@ XdmfGrid::getItemTag() const
std::string
XdmfGrid::getName() const
{
return mName;
if (mName.c_str() == NULL) {
return "";
}
else {
return mName;
}
}
shared_ptr<XdmfTime>
......@@ -143,7 +148,12 @@ XdmfGrid::populateItem(const std::map<std::string, std::string> & itemProperties
void
XdmfGrid::setName(const std::string & name)
{
mName = name;
if (mName.c_str() == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Internal Name String is a null reference");
}
else {
mName = name;
}
}
void
......
......@@ -324,7 +324,10 @@ XdmfRectilinearGrid::XdmfRectilinearGrid(const std::vector<shared_ptr<XdmfArray>
XdmfRectilinearGrid::~XdmfRectilinearGrid()
{
delete mImpl;
if (mImpl) {
delete mImpl;
}
mImpl = NULL;
}
const std::string XdmfRectilinearGrid::ItemTag = "Grid";
......@@ -340,6 +343,9 @@ XdmfRectilinearGrid::getCoordinates(const unsigned int axisIndex)
shared_ptr<const XdmfArray>
XdmfRectilinearGrid::getCoordinates(const unsigned int axisIndex) const
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Xdmf Rectilinear Grid Internal Object is NULL");
}
if(axisIndex < mImpl->mCoordinates.size()) {
return mImpl->mCoordinates[axisIndex];
}
......@@ -355,6 +361,9 @@ XdmfRectilinearGrid::getCoordinates()
const std::vector<shared_ptr<XdmfArray> >
XdmfRectilinearGrid::getCoordinates() const
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Xdmf Rectilinear Grid Internal Object is NULL");
}
return mImpl->mCoordinates;
}
......@@ -368,6 +377,9 @@ XdmfRectilinearGrid::getDimensions()
shared_ptr<const XdmfArray>
XdmfRectilinearGrid::getDimensions() const
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Xdmf Rectilinear Grid Internal Object is NULL");
}
shared_ptr<XdmfArray> dimensions = XdmfArray::New();
dimensions->reserve(mImpl->mCoordinates.size());
for(std::vector<shared_ptr<XdmfArray> >::const_iterator iter =
......@@ -404,6 +416,9 @@ void
XdmfRectilinearGrid::setCoordinates(const unsigned int axisIndex,
const shared_ptr<XdmfArray> axisCoordinates)
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Xdmf Rectilinear Grid Internal Object is NULL");
}
if(mImpl->mCoordinates.size() <= axisIndex) {
mImpl->mCoordinates.reserve(axisIndex + 1);
unsigned int numArraysToInsert =
......@@ -418,5 +433,8 @@ XdmfRectilinearGrid::setCoordinates(const unsigned int axisIndex,
void
XdmfRectilinearGrid::setCoordinates(const std::vector<shared_ptr<XdmfArray> > axesCoordinates)
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Xdmf Rectilinear Grid Internal Object is NULL");
}
mImpl->mCoordinates = axesCoordinates;
}
......@@ -353,7 +353,10 @@ XdmfRegularGrid::XdmfRegularGrid(const shared_ptr<XdmfArray> brickSize,
XdmfRegularGrid::~XdmfRegularGrid()
{
delete mImpl;
if (mImpl) {
delete mImpl;
}
mImpl = NULL;
}
const std::string XdmfRegularGrid::ItemTag = "Grid";
......@@ -368,6 +371,9 @@ XdmfRegularGrid::getBrickSize()
shared_ptr<const XdmfArray>
XdmfRegularGrid::getBrickSize() const
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Regular Grid Internal Object is NULL");
}
return mImpl->mBrickSize;
}
......@@ -381,6 +387,9 @@ XdmfRegularGrid::getDimensions()
shared_ptr<const XdmfArray>
XdmfRegularGrid::getDimensions() const
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Regular Grid Internal Object is NULL");
}
return mImpl->mDimensions;
}
......@@ -394,6 +403,9 @@ XdmfRegularGrid::getOrigin()
shared_ptr<const XdmfArray>
XdmfRegularGrid::getOrigin() const
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Regular Grid Internal Object is NULL");
}
return mImpl->mOrigin;
}
......@@ -428,17 +440,26 @@ XdmfRegularGrid::populateItem(const std::map<std::string, std::string> & itemPro
void
XdmfRegularGrid::setBrickSize(const shared_ptr<XdmfArray> brickSize)
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Regular Grid Internal Object is NULL");
}
mImpl->mBrickSize = brickSize;
}
void
XdmfRegularGrid::setDimensions(const shared_ptr<XdmfArray> dimensions)
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Regular Grid Internal Object is NULL");
}
mImpl->mDimensions = dimensions;
}
void
XdmfRegularGrid::setOrigin(const shared_ptr<XdmfArray> origin)
{
if (mImpl == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Regular Grid Internal Object is NULL");
}
mImpl->mOrigin = origin;
}
......@@ -67,7 +67,12 @@ XdmfSet::getItemTag() const
std::string
XdmfSet::getName() const
{
return mName;
if (mName.c_str() == NULL) {
return "";
}
else {
return mName;
}
}
shared_ptr<const XdmfSetType>
......@@ -112,7 +117,12 @@ XdmfSet::populateItem(const std::map<std::string, std::string> & itemProperties,
void
XdmfSet::setName(const std::string & name)
{
mName = name;
if (mName.c_str() == NULL) {
XdmfError::message(XdmfError::FATAL, "Error: Internal Name String is a null reference");
}
else {
mName = name;
}
}
void
......
......@@ -71,22 +71,46 @@ XdmfCoreItemFactory::createItem(const std::string & itemTag,
else {
expressionToParse = expression->second;
}
std::map<std::string, std::string>::const_iterator variableNames =
itemProperties.find("VariableNames");
std::vector<std::string> nameVector;
std::string variableList = variableNames->second;
size_t barSplit = 0;
std::string subcontent;
while (barSplit != std::string::npos) {
barSplit = 0;
barSplit = variableList.find_first_of("|", barSplit);
if (barSplit == std::string::npos) {
subcontent = variableList;
}
else {
subcontent = variableList.substr(0, barSplit);
variableList = variableList.substr(barSplit+1);
barSplit++;
}
nameVector.push_back(subcontent);
}
std::map<std::string, shared_ptr<XdmfArray> > variableCollection;
for (unsigned int i = 0; i < childItems.size(); ++i) {
try {
shared_ptr<XdmfArray> tempArray =
shared_dynamic_cast<XdmfArray>(childItems[i]);
if (tempArray->getName().compare("") != 0)
{
variableCollection[tempArray->getName()] = tempArray;
tempArray->read();
for (unsigned int i = 0; i < childItems.size() && i < nameVector.size(); ++i) {
if (nameVector[i].compare("") != 0) {
if (shared_ptr<XdmfArray> array =
shared_dynamic_cast<XdmfArray>(childItems[i])) {
variableCollection[nameVector[i]] = array;
array->read();
}
else {
XdmfError::message(XdmfError::FATAL,
"Error: Function passed non-Array item");
}
}
catch (...) {
XdmfError::message(XdmfError::FATAL,
"Error: Function passed non-Array item");
}
}
shared_ptr<XdmfArray> parsedArray = shared_ptr<XdmfArray>();
parsedArray = XdmfFunction::evaluateExpression(expressionToParse,
variableCollection);
......
......@@ -114,11 +114,11 @@ std::map<std::string, shared_ptr<XdmfFunction::XdmfFunctionInternal> >
XdmfFunction::abs))
("ABS_TOKEN", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
XdmfFunction::abs))
("ARCCOS", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
("ACOS", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
XdmfFunction::arccos))
("ARCSIN", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
("ASIN", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
XdmfFunction::arcsin))
("ARCTAN", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
("ATAN", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
XdmfFunction::arctan))
("AVE", XdmfFunctionInternalImpl::New((shared_ptr<XdmfArray> (*)(std::vector<shared_ptr<XdmfArray> >))
XdmfFunction::average))
......@@ -349,15 +349,15 @@ XdmfFunction::arctan(std::vector<shared_ptr<XdmfArray> > values)
shared_ptr<XdmfArray>
XdmfFunction::average(std::vector<shared_ptr<XdmfArray> > values)
{
double total = sum(values)->getValue<double>(0);;
int totalSize = 0;
for (unsigned int i = 0; i < values.size(); ++i)
{
totalSize += values[i]->getSize();
}
shared_ptr<XdmfArray> returnArray = XdmfArray::New();
returnArray->insert(0, total/totalSize);
return returnArray;
double total = sum(values)->getValue<double>(0);;
int totalSize = 0;
for (unsigned int i = 0; i < values.size(); ++i)
{
totalSize += values[i]->getSize();
}
shared_ptr<XdmfArray> returnArray = XdmfArray::New();
returnArray->insert(0, total/totalSize);
return returnArray;
}
shared_ptr<XdmfArray>
......@@ -520,7 +520,7 @@ XdmfFunction::evaluateExpression(std::string expression,
}
}
// Found to be a digit
if (mValidDigitChars.find(expression[i]) != std::string::npos||
if (mValidDigitChars.find(expression[i]) != std::string::npos ||
(expression[i] == '-' && hyphenIsDigit)) {
// Progress until a non-digit is found
int valueStart = i;
......@@ -776,6 +776,16 @@ XdmfFunction::getItemProperties() const
functionProperties[constructedIt->first] = constructedIt->second;
}
std::stringstream variableStream;
for (std::map<std::string, shared_ptr<XdmfArray> >::const_iterator variableIter = mVariableList.begin();
variableIter != mVariableList.end();
++variableIter) {
variableStream << "|" << variableIter->first;
}
functionProperties["VariableNames"] = variableStream.str();
return functionProperties;
}
......@@ -1157,7 +1167,6 @@ XdmfFunction::traverse(const shared_ptr<XdmfBaseVisitor> visitor)
for (std::map<std::string, shared_ptr<XdmfArray> >::iterator it = mVariableList.begin();
it != mVariableList.end();
++it) {
it->second->setName(it->first);
it->second->accept(visitor);
}
}
This diff is collapsed.
......@@ -160,6 +160,29 @@ public:
*/
std::vector<unsigned int> getDataspaceDimensions() const;
/**
* Gets the controller in string form. For writing to file.
*
* Example of use:
*
* C++
*
* @dontinclude ExampleXdmfHeavyDataController.cpp
* @skipline //#initialization
* @until //#initialization
* @skipline //#getDescriptor
* @until //#getDescriptor
*
* Python
*
* @dontinclude XdmfExampleHeavyDataController.py
* @skipline #//initialization
* @until #//initialization
* @skipline #//getDescriptor
* @until #//getDescriptor
*
* @return A string that contains relevant information for the controller
*/
virtual std::string getDescriptor() const;
virtual std::string getName() const;
......
This diff is collapsed.
......@@ -82,7 +82,7 @@ XdmfDSMCommMPI::~XdmfDSMCommMPI()
try {
XdmfError::message(XdmfError::FATAL, "Failed to free intercomm Comm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -93,7 +93,7 @@ XdmfDSMCommMPI::~XdmfDSMCommMPI()
try {
XdmfError::message(XdmfError::FATAL, "Failed to free intercomm Comm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -128,7 +128,7 @@ XdmfDSMCommMPI::Accept(unsigned int numConnections)
message = message + DsmPortName;
XdmfError::message(XdmfError::FATAL, message);
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -138,7 +138,7 @@ XdmfDSMCommMPI::Accept(unsigned int numConnections)
try {
XdmfError::message(XdmfError::FATAL, "Failed to merge intercomm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -170,7 +170,7 @@ XdmfDSMCommMPI::Accept(unsigned int numConnections)
message = message + DsmPortName;
XdmfError::message(XdmfError::FATAL, message);
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -180,7 +180,7 @@ XdmfDSMCommMPI::Accept(unsigned int numConnections)
try {
XdmfError::message(XdmfError::FATAL, "Failed to merge InterComm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -206,7 +206,7 @@ XdmfDSMCommMPI::ClosePort()
message = message + DsmPortName;
XdmfError::message(XdmfError::FATAL, message);
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -228,7 +228,7 @@ XdmfDSMCommMPI::Connect()
message = message + DsmPortName;
XdmfError::message(XdmfError::FATAL, message);
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -237,7 +237,7 @@ XdmfDSMCommMPI::Connect()
try {
XdmfError::message(XdmfError::FATAL, "Failed to merge InterComm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -257,7 +257,7 @@ XdmfDSMCommMPI::Connect()
message = message + DsmPortName;
XdmfError::message(XdmfError::FATAL, message);
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -266,7 +266,7 @@ XdmfDSMCommMPI::Connect()
try {
XdmfError::message(XdmfError::FATAL, "Failed to merge InterComm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -291,7 +291,7 @@ XdmfDSMCommMPI::Disconnect()
try {
XdmfError::message(XdmfError::FATAL, "Failed to disconnect Comm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -312,7 +312,7 @@ XdmfDSMCommMPI::DupComm(MPI_Comm comm)
try {
XdmfError::message(XdmfError::FATAL, "Failed to disconnect Comm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -324,7 +324,7 @@ XdmfDSMCommMPI::DupComm(MPI_Comm comm)
try {
XdmfError::message(XdmfError::FATAL, "Failed to duplicate Comm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -348,7 +348,7 @@ XdmfDSMCommMPI::DupInterComm(MPI_Comm comm)
try {
XdmfError::message(XdmfError::FATAL, "Failed to disconnect Comm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -360,7 +360,7 @@ XdmfDSMCommMPI::DupInterComm(MPI_Comm comm)
try {
XdmfError::message(XdmfError::FATAL, "Failed to duplicate Comm");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -438,7 +438,7 @@ XdmfDSMCommMPI::Init()
try {
XdmfError::message(XdmfError::FATAL, "Failed to initialize size");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -446,7 +446,7 @@ XdmfDSMCommMPI::Init()
try {
XdmfError::message(XdmfError::FATAL, "Failed to initialize rank");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -466,7 +466,7 @@ XdmfDSMCommMPI::OpenPort()
message = message + DsmPortName;
XdmfError::message(XdmfError::FATAL, message);
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......@@ -479,7 +479,7 @@ XdmfDSMCommMPI::OpenPort()
try {
XdmfError::message(XdmfError::FATAL, "Failed to write port to file");
}
catch (XdmfError e) {
catch (XdmfError & e) {
throw e;
}
}
......
......@@ -429,8 +429,9 @@ XDMFH5Pget_fapl_dsm(hid_t fapl_id, MPI_Comm *intra_comm /* out */,
done:
if (FAIL == ret_value) {
/* need to free anything created here */
if (intra_comm_tmp != MPI_COMM_NULL)
if (intra_comm_tmp != MPI_COMM_NULL) {
MPI_Comm_free(&intra_comm_tmp);
}
}
FUNC_LEAVE_API(ret_value)
......@@ -470,8 +471,9 @@ XDMF_dsm_fapl_get(H5FD_t *_file)
done:
if ((NULL == ret_value) && err_occurred) {
/* need to free anything created here */
if (fa && (MPI_COMM_NULL != fa->intra_comm))
if (fa && (MPI_COMM_NULL != fa->intra_comm)) {
MPI_Comm_free(&fa->intra_comm);
}
}
FUNC_LEAVE_NOAPI(ret_value)
......@@ -508,9 +510,12 @@ XDMF_dsm_fapl_copy(const void *_old_fa)
done:
if ((NULL == ret_value) && err_occurred) {
/* cleanup */
<