Skip to content

Commit

Permalink
Merge pull request #3266 from dmitry-ganyushin/adios2-daos
Browse files Browse the repository at this point in the history
Changed parameters for DAOS API functions.
  • Loading branch information
dmitry-ganyushin committed Jul 6, 2022
2 parents d18b0af + 1f0d757 commit 1c0f906
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions source/adios2/toolkit/transport/file/FileDaos.cpp
Expand Up @@ -31,7 +31,6 @@

#define CheckDAOSReturnCode(r) CheckDAOSReturnCodeF((r), __FILE__, __LINE__)
#define DefaultMaxDFSBatchSize 8589934592

namespace adios2
{
namespace transport
Expand Down Expand Up @@ -194,13 +193,21 @@ class FileDaos::Impl

// std::cout << "single process start daos_pool_connect..." <<
// std::endl;
#if DAOS_API_VERSION_MAJOR == 2
rc = daos_pool_connect(uuid_c, Group.c_str(), poolFlags, &poh, NULL,
NULL);
#else
rc = daos_pool_connect(UUID, Group.c_str(), poolFlags, &poh, NULL,
NULL);
#endif
CheckDAOSReturnCode(rc);
// std::cout << "single process daos_pool_connect succeeded!" <<
// std::endl;

#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);
#endif
CheckDAOSReturnCode(rc);
// std::cout << "single process daos_cont_open succeeded!" <<
// std::endl;
Expand All @@ -220,12 +227,20 @@ class FileDaos::Impl
if (comm.Rank() == 0)
{
// std::cout << "start daos_pool_connect..." << std::endl;
#if DAOS_API_VERSION_MAJOR == 2
rc = daos_pool_connect(uuid_c, Group.c_str(), poolFlags, &poh,
NULL, NULL);
#else
rc = daos_pool_connect(UUID, Group.c_str(), poolFlags, &poh,
NULL, NULL);
#endif
CheckDAOSReturnCode(rc);
// std::cout << "daos_pool_connect succeeded!" << std::endl;

#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);
#endif
CheckDAOSReturnCode(rc);
// std::cout << "daos_cont_open succeeded!" << std::endl;

Expand Down Expand Up @@ -975,4 +990,4 @@ void FileDaos::Truncate(const size_t length)
}

} // end namespace transport
} // end namespace adios2
} // end namespace adios2

0 comments on commit 1c0f906

Please sign in to comment.