Skip to content

Commit

Permalink
Using preprocessor version variable from daos_version.h
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ganyushin committed Jul 6, 2022
1 parent 0640a10 commit 1f0d757
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions source/adios2/toolkit/transport/file/FileDaos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#define CheckDAOSReturnCode(r) CheckDAOSReturnCodeF((r), __FILE__, __LINE__)
#define DefaultMaxDFSBatchSize 8589934592
#define DAOS_VERSION 2
namespace adios2
{
namespace transport
Expand Down Expand Up @@ -194,7 +193,7 @@ class FileDaos::Impl

// std::cout << "single process start daos_pool_connect..." <<
// std::endl;
#if DAOS_VERSION == 2
#if DAOS_API_VERSION_MAJOR == 2
rc = daos_pool_connect(uuid_c, Group.c_str(), poolFlags, &poh, NULL,
NULL);
#else
Expand All @@ -204,7 +203,7 @@ class FileDaos::Impl
CheckDAOSReturnCode(rc);
// std::cout << "single process daos_pool_connect succeeded!" <<
// std::endl;
#if DAOS_VERSION == 2
#if DAOS_API_VERSION_MAJOR == 2
rc = daos_cont_open(poh, cuuid_c, contFlags, &coh, NULL, NULL);
#else
rc = daos_cont_open(poh, CUUID, contFlags, &coh, NULL, NULL);
Expand All @@ -228,7 +227,7 @@ class FileDaos::Impl
if (comm.Rank() == 0)
{
// std::cout << "start daos_pool_connect..." << std::endl;
#if DAOS_VERSION == 2
#if DAOS_API_VERSION_MAJOR == 2
rc = daos_pool_connect(uuid_c, Group.c_str(), poolFlags, &poh,
NULL, NULL);
#else
Expand All @@ -237,7 +236,7 @@ class FileDaos::Impl
#endif
CheckDAOSReturnCode(rc);
// std::cout << "daos_pool_connect succeeded!" << std::endl;
#if DAOS_VERSION == 2
#if DAOS_API_VERSION_MAJOR == 2
rc = daos_cont_open(poh, cuuid_c, contFlags, &coh, NULL, NULL);
#else
rc = daos_cont_open(poh, CUUID, contFlags, &coh, NULL, NULL);
Expand Down Expand Up @@ -991,5 +990,4 @@ void FileDaos::Truncate(const size_t length)
}

} // end namespace transport
} // end namespace adios2
#undef DAOS_VERSION
} // end namespace adios2

0 comments on commit 1f0d757

Please sign in to comment.