Commit 3255afcf authored by Kilian Lackhove's avatar Kilian Lackhove
Browse files

Addressed Chris remarks

parent a9094a81
...@@ -3,6 +3,9 @@ Changelog ...@@ -3,6 +3,9 @@ Changelog
v4.3.3 v4.3.3
------ ------
**Library**:
- Auto-detect a shared filesystem and removed --shared-filesystem option (!654)
**Packaging**: **Packaging**:
- Fix NekMesh dependencies for DEB package (!650) - Fix NekMesh dependencies for DEB package (!650)
......
...@@ -322,19 +322,20 @@ namespace Nektar ...@@ -322,19 +322,20 @@ namespace Nektar
{ {
if (m_comm->GetRank() == 0) if (m_comm->GetRank() == 0)
{ {
std::ofstream testfile ("shared-fs-testfile"); std::ofstream testfile("shared-fs-testfile");
testfile << "" << std::endl; testfile << "" << std::endl;
ASSERTL1(!testfile.fail(), "Test file creation failed");
testfile.close(); testfile.close();
} }
m_comm->Block(); m_comm->Block();
std::ifstream testfile("shared-fs-testfile"); int exists = (bool)boost::filesystem::exists("shared-fs-testfile");
int exists = (bool) testfile;
m_comm->AllReduce(exists, LibUtilities::ReduceSum); m_comm->AllReduce(exists, LibUtilities::ReduceSum);
m_sharedFilesystem = (exists == m_comm->GetSize()); m_sharedFilesystem = (exists == m_comm->GetSize());
if ((m_sharedFilesystem && m_comm->GetRank() == 0) || !m_sharedFilesystem) if ((m_sharedFilesystem && m_comm->GetRank() == 0) ||
!m_sharedFilesystem)
{ {
std::remove("shared-fs-testfile"); std::remove("shared-fs-testfile");
} }
...@@ -346,7 +347,7 @@ namespace Nektar ...@@ -346,7 +347,7 @@ namespace Nektar
if (m_verbose && m_comm->GetRank() == 0 && m_sharedFilesystem) if (m_verbose && m_comm->GetRank() == 0 && m_sharedFilesystem)
{ {
cout << "shared filesystem detected" << endl; cout << "Shared filesystem detected" << endl;
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment