Skip to content
Snippets Groups Projects
Commit 1177a091 authored by williamfgc's avatar williamfgc Committed by GitHub
Browse files

Merge pull request #231 from williamfgc/bpfilebug

Fixing issue #230 a bug for path in file name
parents 9e5112f9 94536817
No related branches found
No related tags found
No related merge requests found
...@@ -166,6 +166,13 @@ constexpr float DefaultBufferGrowthFactor(1.05f); ...@@ -166,6 +166,13 @@ constexpr float DefaultBufferGrowthFactor(1.05f);
* 2Gb - 100Kb (tolerance)*/ * 2Gb - 100Kb (tolerance)*/
constexpr size_t DefaultMaxFileBatchSize(2147381248); constexpr size_t DefaultMaxFileBatchSize(2147381248);
constexpr char PathSeparator =
#ifdef _WIN32
'\\';
#else
'/';
#endif
// adios alias values and types // adios alias values and types
constexpr bool DebugON = true; constexpr bool DebugON = true;
constexpr bool DebugOFF = false; constexpr bool DebugOFF = false;
......
...@@ -111,8 +111,11 @@ BP1Base::GetBPNames(const std::vector<std::string> &baseNames) const noexcept ...@@ -111,8 +111,11 @@ BP1Base::GetBPNames(const std::vector<std::string> &baseNames) const noexcept
const int rank) -> std::string { const int rank) -> std::string {
const std::string bpBaseName = AddExtension(baseName, ".bp"); const std::string bpBaseName = AddExtension(baseName, ".bp");
// name.bp.dir/name.bp.rank // path/root.bp.dir/root.bp.rank
const std::string bpName(bpBaseName + ".dir/" + bpBaseName + "." + const std::string bpRootName =
bpBaseName.substr(bpBaseName.find_last_of(PathSeparator));
const std::string bpName(bpBaseName + ".dir/" + bpRootName + "." +
std::to_string(rank)); std::to_string(rank));
return bpName; return bpName;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment