Skip to content

Commit

Permalink
Merge pull request #4096 from pnorbert/fix-campaign-dir
Browse files Browse the repository at this point in the history
Do not create adios-campaign/ unless there is something to record
  • Loading branch information
pnorbert committed Mar 13, 2024
2 parents fc38559 + 7ca0afb commit 34093ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/adios2/engine/campaign/CampaignManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ CampaignManager::CampaignManager(adios2::helper::Comm &comm)
{
std::cout << "Campaign Manager " << m_WriterRank << " constructor called" << std::endl;
}
helper::CreateDirectory(m_CampaignDir);
}

CampaignManager::~CampaignManager()
Expand All @@ -103,6 +102,7 @@ void CampaignManager::Open(const std::string &name)
{
std::cout << "Campaign Manager " << m_WriterRank << " Open(" << m_Name << ")\n";
}
m_Opened = true;
}

void CampaignManager::Record(const std::string &name, const size_t step, const double time)
Expand Down Expand Up @@ -151,8 +151,10 @@ void CampaignManager::Close()
{
if (!cmap.empty())
{
helper::CreateDirectory(m_CampaignDir);
CMapToSqlite(cmap, m_WriterRank, m_Name);
}
m_Opened = false;
}

} // end namespace engine
Expand Down

0 comments on commit 34093ee

Please sign in to comment.