Nektar++-5.0.0 installation on Linux
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hello everyone After a couple of unsuccessful attempts, I decided to write here for some help. I've tried to build Nektar++-5.0.0 from its source using two different environments: - On a machine that has Ubuntu-16.04, GCC-9.3.0 and OpenMPI-4.0.4 - On a Docker environment (hosted on the Ubuntu machine) with CentOS-7, GCC-4.8.5 and OpenMPI-4.0.4 I initially tried using Docker because I'm preparing containers for a project I'm developing at the moment. I had some environment related troubles with GCC-7.3.0, so decided to stick with the default GCC which is 4.8. I don't have the logs right now but build failed with something like:
MMFAdvection.cpp:945:35: error: 'dF' may be used uninitialized in this function [-Werror=maybe-uninitialized
I thought this might be due to the old GCC version (which now I think it's not), and decided to complete the installation using the new GCC suite on my laptop which is the system I shared in the first item above. However, these new attempts also have failed. This my build script:
export PATH=/opt/openmpi-4.0.4/bin:$PATH export LD_LIBRARY_PATH=/opt/openmpi-4.0.4/lib:$LD_LIBRARY_PATH cmake .. \ # I'm in src/build -DCMAKE_INSTALL_PREFIX=/opt/nektar++-5.0.0 \ -DNEKTAR_BUILD_DEMOS=ON \ -DNEKTAR_BUILD_LIBRARY=ON \ -DNEKTAR_BUILD_SOLVERS=ON \ -DNEKTAR_BUILD_UTILITIEs=ON \ -DNEKTAR_USE_MPI=ON \ -DNEKTAR_USE_OPENBLAS=ON \ -DNEKTAR_USE_BOOST=ON \ -DNEKTAR_USE_SCOTCH=ON \ -DTHIRDPARTY_BUILD_OPENBLAS=ON \ -DTHIRDPARTY_BUILD_BOOST=ON \ -DTHIRDPARTY_BUILD_SCOTCH=ON
make install
This is the shorter script which I've excluded FFTW, HDF5, ARPACK, PETSC and METIS. When HDF5 is enabled, the build fails with:
[ 13%] Building CXX object library/LibUtilities/CMakeFiles/LibUtilities.dir/BasicUtils/FieldIOHdf5.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp: In member function ‘virtual void Nektar::LibUtilities::FieldIOHdf5::v_Import(const string&, std::vector<std::shared_ptr<Nektar::LibUtilities::FieldDefinitions> >&, std::vector<std::vector<double> >&, Nektar::LibUtilities::FieldMetaDataMap&, const Nektar::Array<Nektar::OneD, int>&)’: /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp:1028:31: error: implicitly-declared ‘Nektar::LibUtilities::FieldIOHdf5::OffsetHelper& Nektar::LibUtilities::FieldIOHdf5::OffsetHelper::operator=(const Nektar::LibUtilities::FieldIOHdf5::OffsetHelper&)’ is deprecated [-Werror=deprecated-copy] 1028 | decompsToOffsets[i] = running; | ^~~~~~~
So I've disabled HDF5 and a couple of others. Eventually, I want them too, but I wanted to use as little external libs as possible in the first step. Then initiated a new build which failed with the following error:
[ 20%] Building CXX object library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp: In member function ‘void Nektar::SpatialDomains::MeshGraph::SetExpansionsToEvenlySpacedPoints(int)’: /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp:1529:54: error: implicitly-declared ‘Nektar::LibUtilities::BasisKey& Nektar::LibUtilities::BasisKey::operator=(const Nektar::LibUtilities::BasisKey&)’ is deprecated [-Werror=deprecated-copy] 1529 | expIt->second->m_basisKeyVector[i] = bkeynew;
Error due to "bkeynew" assignment repeats itself a couple of times and then the build exits with:
*cc1plus: all warnings being treated as errors <<<* library/SpatialDomains/CMakeFiles/SpatialDomains.dir/build.make:254: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o' failed make[2]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o] Error 1 CMakeFiles/Makefile2:2271: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all' failed make[1]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2
See the line I've highlighted. All of these errors occur because "-Werror" flag is enabled. I know this is the right way of doing things, however on a large application like Nektar I'm not sure if it must be this strict. So the question is what would be the best solution to tackle those warnings? I'm planning to disable the "Werror" flag unless there is a better idea. Thank you Fatih Ertinaz
Hi Fatih, Apologies for the slow response on this. Did you resolve this problem? I’m not aware that there should be any issues building on Ubuntu 16.04. I suspect the issues you’re encountering on Ubuntu may be due to using GCC 9.3 but I’ll double check this. I’ve just attempted a build of Nektar++ 5.0.0 (from the 5.0.0 release tar.gz one the downloads page) in a clean Ubuntu 16.04 docker container. I built OpenMPI-4.0.4 from source and installed it in /opt/openmpi-4.0.4 to replicate your MPI configuration. I’m using the version of gcc installed by default via the “build-essential” meta-package (this seems to be GCC 5.4.0). I used the same cmake configuration that you provided in your email. I don’t think OpenBLAS is being built in my local test, I’m not sure why, but the build does complete successfully. With regard to CentOS 7, I also encountered this error when attempting to build on CentOS 7 a few months ago. I resolved it by explicitly initialising the ’F’ and ‘dF’ variables in MMFAdvection.cpp - you should be able to change line 873 of nektar++-5.0.0/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp to "NekDouble newy, F = 0.0, dF = 0.0, y0, tmp;” and this should resolve this build error on CentOS 7. I think this issue has been resolved in the current master and the fix will therefore appear in subsequent releases. Let us know if you’re still experiencing build issues. Kind regards, Jeremy
On 20 Oct 2020, at 19:27, Fatih Ertinaz <fertinaz@gmail.com> wrote:
This email from fertinaz@gmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hello everyone
After a couple of unsuccessful attempts, I decided to write here for some help.
I've tried to build Nektar++-5.0.0 from its source using two different environments: On a machine that has Ubuntu-16.04, GCC-9.3.0 and OpenMPI-4.0.4 On a Docker environment (hosted on the Ubuntu machine) with CentOS-7, GCC-4.8.5 and OpenMPI-4.0.4 I initially tried using Docker because I'm preparing containers for a project I'm developing at the moment. I had some environment related troubles with GCC-7.3.0, so decided to stick with the default GCC which is 4.8. I don't have the logs right now but build failed with something like: MMFAdvection.cpp:945:35: error: 'dF' may be used uninitialized in this function [-Werror=maybe-uninitialized
I thought this might be due to the old GCC version (which now I think it's not), and decided to complete the installation using the new GCC suite on my laptop which is the system I shared in the first item above.
However, these new attempts also have failed.
This my build script: export PATH=/opt/openmpi-4.0.4/bin:$PATH export LD_LIBRARY_PATH=/opt/openmpi-4.0.4/lib:$LD_LIBRARY_PATH cmake .. \ # I'm in src/build -DCMAKE_INSTALL_PREFIX=/opt/nektar++-5.0.0 \ -DNEKTAR_BUILD_DEMOS=ON \ -DNEKTAR_BUILD_LIBRARY=ON \ -DNEKTAR_BUILD_SOLVERS=ON \ -DNEKTAR_BUILD_UTILITIEs=ON \ -DNEKTAR_USE_MPI=ON \ -DNEKTAR_USE_OPENBLAS=ON \ -DNEKTAR_USE_BOOST=ON \ -DNEKTAR_USE_SCOTCH=ON \ -DTHIRDPARTY_BUILD_OPENBLAS=ON \ -DTHIRDPARTY_BUILD_BOOST=ON \ -DTHIRDPARTY_BUILD_SCOTCH=ON
make install
This is the shorter script which I've excluded FFTW, HDF5, ARPACK, PETSC and METIS.
When HDF5 is enabled, the build fails with: [ 13%] Building CXX object library/LibUtilities/CMakeFiles/LibUtilities.dir/BasicUtils/FieldIOHdf5.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp: In member function ‘virtual void Nektar::LibUtilities::FieldIOHdf5::v_Import(const string&, std::vector<std::shared_ptr<Nektar::LibUtilities::FieldDefinitions> >&, std::vector<std::vector<double> >&, Nektar::LibUtilities::FieldMetaDataMap&, const Nektar::Array<Nektar::OneD, int>&)’: /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp:1028:31: error: implicitly-declared ‘Nektar::LibUtilities::FieldIOHdf5::OffsetHelper& Nektar::LibUtilities::FieldIOHdf5::OffsetHelper::operator=(const Nektar::LibUtilities::FieldIOHdf5::OffsetHelper&)’ is deprecated [-Werror=deprecated-copy] 1028 | decompsToOffsets[i] = running; | ^~~~~~~
So I've disabled HDF5 and a couple of others. Eventually, I want them too, but I wanted to use as little external libs as possible in the first step.
Then initiated a new build which failed with the following error: [ 20%] Building CXX object library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp: In member function ‘void Nektar::SpatialDomains::MeshGraph::SetExpansionsToEvenlySpacedPoints(int)’: /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp:1529:54: error: implicitly-declared ‘Nektar::LibUtilities::BasisKey& Nektar::LibUtilities::BasisKey::operator=(const Nektar::LibUtilities::BasisKey&)’ is deprecated [-Werror=deprecated-copy] 1529 | expIt->second->m_basisKeyVector[i] = bkeynew;
Error due to "bkeynew" assignment repeats itself a couple of times and then the build exits with: cc1plus: all warnings being treated as errors <<< library/SpatialDomains/CMakeFiles/SpatialDomains.dir/build.make:254: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o' failed make[2]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o] Error 1 CMakeFiles/Makefile2:2271: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all' failed make[1]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2
See the line I've highlighted. All of these errors occur because "-Werror" flag is enabled. I know this is the right way of doing things, however on a large application like Nektar I'm not sure if it must be this strict.
So the question is what would be the best solution to tackle those warnings? I'm planning to disable the "Werror" flag unless there is a better idea.
Thank you
Fatih Ertinaz
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
A correction to my previous message, for anyone trying to build 5.0.0 on CentOS 7:
- you should be able to change line 873 of nektar++-5.0.0/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp to "NekDouble newy, F = 0.0, dF = 0.0, y0, tmp;” and this should resolve this build error on CentOS 7.
In fact, dF should be initialised to 1.0, as shown in MMFAdvection.cpp in the current master branch: https://gitlab.nektar.info/nektar/nektar/-/blob/master/solvers/ADRSolver/Equ... <https://gitlab.nektar.info/nektar/nektar/-/blob/master/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp> "NekDouble newy, F = 0.0, dF = 1.0, y0, tmp;
On 23 Oct 2020, at 10:37, Jeremy Cohen <jeremy.cohen@imperial.ac.uk> wrote:
Hi Fatih,
Apologies for the slow response on this. Did you resolve this problem?
I’m not aware that there should be any issues building on Ubuntu 16.04. I suspect the issues you’re encountering on Ubuntu may be due to using GCC 9.3 but I’ll double check this.
I’ve just attempted a build of Nektar++ 5.0.0 (from the 5.0.0 release tar.gz one the downloads page) in a clean Ubuntu 16.04 docker container. I built OpenMPI-4.0.4 from source and installed it in /opt/openmpi-4.0.4 to replicate your MPI configuration. I’m using the version of gcc installed by default via the “build-essential” meta-package (this seems to be GCC 5.4.0).
I used the same cmake configuration that you provided in your email. I don’t think OpenBLAS is being built in my local test, I’m not sure why, but the build does complete successfully.
With regard to CentOS 7, I also encountered this error when attempting to build on CentOS 7 a few months ago. I resolved it by explicitly initialising the ’F’ and ‘dF’ variables in MMFAdvection.cpp - you should be able to change line 873 of nektar++-5.0.0/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp to "NekDouble newy, F = 0.0, dF = 0.0, y0, tmp;” and this should resolve this build error on CentOS 7. I think this issue has been resolved in the current master and the fix will therefore appear in subsequent releases.
Let us know if you’re still experiencing build issues.
Kind regards,
Jeremy
On 20 Oct 2020, at 19:27, Fatih Ertinaz <fertinaz@gmail.com <mailto:fertinaz@gmail.com>> wrote:
This email from fertinaz@gmail.com <mailto:fertinaz@gmail.com> originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hello everyone
After a couple of unsuccessful attempts, I decided to write here for some help.
I've tried to build Nektar++-5.0.0 from its source using two different environments: On a machine that has Ubuntu-16.04, GCC-9.3.0 and OpenMPI-4.0.4 On a Docker environment (hosted on the Ubuntu machine) with CentOS-7, GCC-4.8.5 and OpenMPI-4.0.4 I initially tried using Docker because I'm preparing containers for a project I'm developing at the moment. I had some environment related troubles with GCC-7.3.0, so decided to stick with the default GCC which is 4.8. I don't have the logs right now but build failed with something like: MMFAdvection.cpp:945:35: error: 'dF' may be used uninitialized in this function [-Werror=maybe-uninitialized
I thought this might be due to the old GCC version (which now I think it's not), and decided to complete the installation using the new GCC suite on my laptop which is the system I shared in the first item above.
However, these new attempts also have failed.
This my build script: export PATH=/opt/openmpi-4.0.4/bin:$PATH export LD_LIBRARY_PATH=/opt/openmpi-4.0.4/lib:$LD_LIBRARY_PATH cmake .. \ # I'm in src/build -DCMAKE_INSTALL_PREFIX=/opt/nektar++-5.0.0 \ -DNEKTAR_BUILD_DEMOS=ON \ -DNEKTAR_BUILD_LIBRARY=ON \ -DNEKTAR_BUILD_SOLVERS=ON \ -DNEKTAR_BUILD_UTILITIEs=ON \ -DNEKTAR_USE_MPI=ON \ -DNEKTAR_USE_OPENBLAS=ON \ -DNEKTAR_USE_BOOST=ON \ -DNEKTAR_USE_SCOTCH=ON \ -DTHIRDPARTY_BUILD_OPENBLAS=ON \ -DTHIRDPARTY_BUILD_BOOST=ON \ -DTHIRDPARTY_BUILD_SCOTCH=ON
make install
This is the shorter script which I've excluded FFTW, HDF5, ARPACK, PETSC and METIS.
When HDF5 is enabled, the build fails with: [ 13%] Building CXX object library/LibUtilities/CMakeFiles/LibUtilities.dir/BasicUtils/FieldIOHdf5.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp: In member function ‘virtual void Nektar::LibUtilities::FieldIOHdf5::v_Import(const string&, std::vector<std::shared_ptr<Nektar::LibUtilities::FieldDefinitions> >&, std::vector<std::vector<double> >&, Nektar::LibUtilities::FieldMetaDataMap&, const Nektar::Array<Nektar::OneD, int>&)’: /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp:1028:31: error: implicitly-declared ‘Nektar::LibUtilities::FieldIOHdf5::OffsetHelper& Nektar::LibUtilities::FieldIOHdf5::OffsetHelper::operator=(const Nektar::LibUtilities::FieldIOHdf5::OffsetHelper&)’ is deprecated [-Werror=deprecated-copy] 1028 | decompsToOffsets[i] = running; | ^~~~~~~
So I've disabled HDF5 and a couple of others. Eventually, I want them too, but I wanted to use as little external libs as possible in the first step.
Then initiated a new build which failed with the following error: [ 20%] Building CXX object library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp: In member function ‘void Nektar::SpatialDomains::MeshGraph::SetExpansionsToEvenlySpacedPoints(int)’: /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp:1529:54: error: implicitly-declared ‘Nektar::LibUtilities::BasisKey& Nektar::LibUtilities::BasisKey::operator=(const Nektar::LibUtilities::BasisKey&)’ is deprecated [-Werror=deprecated-copy] 1529 | expIt->second->m_basisKeyVector[i] = bkeynew;
Error due to "bkeynew" assignment repeats itself a couple of times and then the build exits with: cc1plus: all warnings being treated as errors <<< library/SpatialDomains/CMakeFiles/SpatialDomains.dir/build.make:254: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o' failed make[2]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o] Error 1 CMakeFiles/Makefile2:2271: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all' failed make[1]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2
See the line I've highlighted. All of these errors occur because "-Werror" flag is enabled. I know this is the right way of doing things, however on a large application like Nektar I'm not sure if it must be this strict.
So the question is what would be the best solution to tackle those warnings? I'm planning to disable the "Werror" flag unless there is a better idea.
Thank you
Fatih Ertinaz
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk <mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Hello Jeremy, I took the lazy approach and disabled "Werror" flag which resolved the build issues. Then tested it using the Taylor-Green vortex tutorial, and it seemed to work fine. Thank you for your help Fatih On Fri, Oct 23, 2020 at 5:42 AM Jeremy Cohen <jeremy.cohen@imperial.ac.uk> wrote:
A correction to my previous message, for anyone trying to build 5.0.0 on CentOS 7:
- you should be able to change line 873 of nektar++-5.0.0/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp to "NekDouble newy, F = 0.0, dF = 0.0, y0, tmp;” and this should resolve this build error on CentOS 7.
In fact, dF should be initialised to 1.0, as shown in MMFAdvection.cpp in the current master branch: https://gitlab.nektar.info/nektar/nektar/-/blob/master/solvers/ADRSolver/Equ...
"NekDouble newy, F = 0.0, dF = 1.0, y0, tmp;
On 23 Oct 2020, at 10:37, Jeremy Cohen <jeremy.cohen@imperial.ac.uk> wrote:
Hi Fatih,
Apologies for the slow response on this. Did you resolve this problem?
I’m not aware that there should be any issues building on Ubuntu 16.04. I suspect the issues you’re encountering on Ubuntu may be due to using GCC 9.3 but I’ll double check this.
I’ve just attempted a build of Nektar++ 5.0.0 (from the 5.0.0 release tar.gz one the downloads page) in a clean Ubuntu 16.04 docker container. I built OpenMPI-4.0.4 from source and installed it in /opt/openmpi-4.0.4 to replicate your MPI configuration. I’m using the version of gcc installed by default via the “build-essential” meta-package (this seems to be GCC 5.4.0).
I used the same cmake configuration that you provided in your email. I don’t think OpenBLAS is being built in my local test, I’m not sure why, but the build does complete successfully.
With regard to CentOS 7, I also encountered this error when attempting to build on CentOS 7 a few months ago. I resolved it by explicitly initialising the ’F’ and ‘dF’ variables in MMFAdvection.cpp - you should be able to change line 873 of nektar++-5.0.0/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp to "NekDouble newy, F = 0.0, dF = 0.0, y0, tmp;” and this should resolve this build error on CentOS 7. I think this issue has been resolved in the current master and the fix will therefore appear in subsequent releases.
Let us know if you’re still experiencing build issues.
Kind regards,
Jeremy
On 20 Oct 2020, at 19:27, Fatih Ertinaz <fertinaz@gmail.com> wrote:
This email from fertinaz@gmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hello everyone
After a couple of unsuccessful attempts, I decided to write here for some help.
I've tried to build Nektar++-5.0.0 from its source using two different environments:
- On a machine that has Ubuntu-16.04, GCC-9.3.0 and OpenMPI-4.0.4 - On a Docker environment (hosted on the Ubuntu machine) with CentOS-7, GCC-4.8.5 and OpenMPI-4.0.4
I initially tried using Docker because I'm preparing containers for a project I'm developing at the moment. I had some environment related troubles with GCC-7.3.0, so decided to stick with the default GCC which is 4.8. I don't have the logs right now but build failed with something like:
MMFAdvection.cpp:945:35: error: 'dF' may be used uninitialized in this function [-Werror=maybe-uninitialized
I thought this might be due to the old GCC version (which now I think it's not), and decided to complete the installation using the new GCC suite on my laptop which is the system I shared in the first item above.
However, these new attempts also have failed.
This my build script:
export PATH=/opt/openmpi-4.0.4/bin:$PATH export LD_LIBRARY_PATH=/opt/openmpi-4.0.4/lib:$LD_LIBRARY_PATH cmake .. \ # I'm in src/build -DCMAKE_INSTALL_PREFIX=/opt/nektar++-5.0.0 \ -DNEKTAR_BUILD_DEMOS=ON \ -DNEKTAR_BUILD_LIBRARY=ON \ -DNEKTAR_BUILD_SOLVERS=ON \ -DNEKTAR_BUILD_UTILITIEs=ON \ -DNEKTAR_USE_MPI=ON \ -DNEKTAR_USE_OPENBLAS=ON \ -DNEKTAR_USE_BOOST=ON \ -DNEKTAR_USE_SCOTCH=ON \ -DTHIRDPARTY_BUILD_OPENBLAS=ON \ -DTHIRDPARTY_BUILD_BOOST=ON \ -DTHIRDPARTY_BUILD_SCOTCH=ON
make install
This is the shorter script which I've excluded FFTW, HDF5, ARPACK, PETSC and METIS.
When HDF5 is enabled, the build fails with:
[ 13%] Building CXX object library/LibUtilities/CMakeFiles/LibUtilities.dir/BasicUtils/FieldIOHdf5.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp: In member function ‘virtual void Nektar::LibUtilities::FieldIOHdf5::v_Import(const string&, std::vector<std::shared_ptr<Nektar::LibUtilities::FieldDefinitions> >&, std::vector<std::vector<double> >&, Nektar::LibUtilities::FieldMetaDataMap&, const Nektar::Array<Nektar::OneD, int>&)’: /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp:1028:31: error: implicitly-declared ‘Nektar::LibUtilities::FieldIOHdf5::OffsetHelper& Nektar::LibUtilities::FieldIOHdf5::OffsetHelper::operator=(const Nektar::LibUtilities::FieldIOHdf5::OffsetHelper&)’ is deprecated [-Werror=deprecated-copy] 1028 | decompsToOffsets[i] = running; | ^~~~~~~
So I've disabled HDF5 and a couple of others. Eventually, I want them too, but I wanted to use as little external libs as possible in the first step.
Then initiated a new build which failed with the following error:
[ 20%] Building CXX object library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp: In member function ‘void Nektar::SpatialDomains::MeshGraph::SetExpansionsToEvenlySpacedPoints(int)’: /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp:1529:54: error: implicitly-declared ‘Nektar::LibUtilities::BasisKey& Nektar::LibUtilities::BasisKey::operator=(const Nektar::LibUtilities::BasisKey&)’ is deprecated [-Werror=deprecated-copy] 1529 | expIt->second->m_basisKeyVector[i] = bkeynew;
Error due to "bkeynew" assignment repeats itself a couple of times and then the build exits with:
*cc1plus: all warnings being treated as errors <<<* library/SpatialDomains/CMakeFiles/SpatialDomains.dir/build.make:254: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o' failed make[2]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o] Error 1 CMakeFiles/Makefile2:2271: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all' failed make[1]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2
See the line I've highlighted. All of these errors occur because "-Werror" flag is enabled. I know this is the right way of doing things, however on a large application like Nektar I'm not sure if it must be this strict.
So the question is what would be the best solution to tackle those warnings? I'm planning to disable the "Werror" flag unless there is a better idea.
Thank you
Fatih Ertinaz
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Hi Fatih, Thanks for the update and glad to hear you got things working by disabling the flag. I believe this issue has been resolved in the current development version of the code and so this shouldn’t present an issue in future releases. Best wishes, Jeremy
On 23 Oct 2020, at 15:28, Fatih Ertinaz <fertinaz@gmail.com> wrote:
Hello Jeremy,
I took the lazy approach and disabled "Werror" flag which resolved the build issues. Then tested it using the Taylor-Green vortex tutorial, and it seemed to work fine.
Thank you for your help
Fatih
On Fri, Oct 23, 2020 at 5:42 AM Jeremy Cohen <jeremy.cohen@imperial.ac.uk <mailto:jeremy.cohen@imperial.ac.uk>> wrote: A correction to my previous message, for anyone trying to build 5.0.0 on CentOS 7:
- you should be able to change line 873 of nektar++-5.0.0/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp to "NekDouble newy, F = 0.0, dF = 0.0, y0, tmp;” and this should resolve this build error on CentOS 7.
In fact, dF should be initialised to 1.0, as shown in MMFAdvection.cpp in the current master branch: https://gitlab.nektar.info/nektar/nektar/-/blob/master/solvers/ADRSolver/Equ... <https://gitlab.nektar.info/nektar/nektar/-/blob/master/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp>
"NekDouble newy, F = 0.0, dF = 1.0, y0, tmp;
On 23 Oct 2020, at 10:37, Jeremy Cohen <jeremy.cohen@imperial.ac.uk <mailto:jeremy.cohen@imperial.ac.uk>> wrote:
Hi Fatih,
Apologies for the slow response on this. Did you resolve this problem?
I’m not aware that there should be any issues building on Ubuntu 16.04. I suspect the issues you’re encountering on Ubuntu may be due to using GCC 9.3 but I’ll double check this.
I’ve just attempted a build of Nektar++ 5.0.0 (from the 5.0.0 release tar.gz one the downloads page) in a clean Ubuntu 16.04 docker container. I built OpenMPI-4.0.4 from source and installed it in /opt/openmpi-4.0.4 to replicate your MPI configuration. I’m using the version of gcc installed by default via the “build-essential” meta-package (this seems to be GCC 5.4.0).
I used the same cmake configuration that you provided in your email. I don’t think OpenBLAS is being built in my local test, I’m not sure why, but the build does complete successfully.
With regard to CentOS 7, I also encountered this error when attempting to build on CentOS 7 a few months ago. I resolved it by explicitly initialising the ’F’ and ‘dF’ variables in MMFAdvection.cpp - you should be able to change line 873 of nektar++-5.0.0/solvers/ADRSolver/EquationSystems/MMFAdvection.cpp to "NekDouble newy, F = 0.0, dF = 0.0, y0, tmp;” and this should resolve this build error on CentOS 7. I think this issue has been resolved in the current master and the fix will therefore appear in subsequent releases.
Let us know if you’re still experiencing build issues.
Kind regards,
Jeremy
On 20 Oct 2020, at 19:27, Fatih Ertinaz <fertinaz@gmail.com <mailto:fertinaz@gmail.com>> wrote:
This email from fertinaz@gmail.com <mailto:fertinaz@gmail.com> originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hello everyone
After a couple of unsuccessful attempts, I decided to write here for some help.
I've tried to build Nektar++-5.0.0 from its source using two different environments: On a machine that has Ubuntu-16.04, GCC-9.3.0 and OpenMPI-4.0.4 On a Docker environment (hosted on the Ubuntu machine) with CentOS-7, GCC-4.8.5 and OpenMPI-4.0.4 I initially tried using Docker because I'm preparing containers for a project I'm developing at the moment. I had some environment related troubles with GCC-7.3.0, so decided to stick with the default GCC which is 4.8. I don't have the logs right now but build failed with something like: MMFAdvection.cpp:945:35: error: 'dF' may be used uninitialized in this function [-Werror=maybe-uninitialized
I thought this might be due to the old GCC version (which now I think it's not), and decided to complete the installation using the new GCC suite on my laptop which is the system I shared in the first item above.
However, these new attempts also have failed.
This my build script: export PATH=/opt/openmpi-4.0.4/bin:$PATH export LD_LIBRARY_PATH=/opt/openmpi-4.0.4/lib:$LD_LIBRARY_PATH cmake .. \ # I'm in src/build -DCMAKE_INSTALL_PREFIX=/opt/nektar++-5.0.0 \ -DNEKTAR_BUILD_DEMOS=ON \ -DNEKTAR_BUILD_LIBRARY=ON \ -DNEKTAR_BUILD_SOLVERS=ON \ -DNEKTAR_BUILD_UTILITIEs=ON \ -DNEKTAR_USE_MPI=ON \ -DNEKTAR_USE_OPENBLAS=ON \ -DNEKTAR_USE_BOOST=ON \ -DNEKTAR_USE_SCOTCH=ON \ -DTHIRDPARTY_BUILD_OPENBLAS=ON \ -DTHIRDPARTY_BUILD_BOOST=ON \ -DTHIRDPARTY_BUILD_SCOTCH=ON
make install
This is the shorter script which I've excluded FFTW, HDF5, ARPACK, PETSC and METIS.
When HDF5 is enabled, the build fails with: [ 13%] Building CXX object library/LibUtilities/CMakeFiles/LibUtilities.dir/BasicUtils/FieldIOHdf5.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp: In member function ‘virtual void Nektar::LibUtilities::FieldIOHdf5::v_Import(const string&, std::vector<std::shared_ptr<Nektar::LibUtilities::FieldDefinitions> >&, std::vector<std::vector<double> >&, Nektar::LibUtilities::FieldMetaDataMap&, const Nektar::Array<Nektar::OneD, int>&)’: /home/fertinaz/nektar/nektar++-5.0.0/library/LibUtilities/BasicUtils/FieldIOHdf5.cpp:1028:31: error: implicitly-declared ‘Nektar::LibUtilities::FieldIOHdf5::OffsetHelper& Nektar::LibUtilities::FieldIOHdf5::OffsetHelper::operator=(const Nektar::LibUtilities::FieldIOHdf5::OffsetHelper&)’ is deprecated [-Werror=deprecated-copy] 1028 | decompsToOffsets[i] = running; | ^~~~~~~
So I've disabled HDF5 and a couple of others. Eventually, I want them too, but I wanted to use as little external libs as possible in the first step.
Then initiated a new build which failed with the following error: [ 20%] Building CXX object library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp: In member function ‘void Nektar::SpatialDomains::MeshGraph::SetExpansionsToEvenlySpacedPoints(int)’: /home/fertinaz/nektar/nektar++-5.0.0/library/SpatialDomains/MeshGraph.cpp:1529:54: error: implicitly-declared ‘Nektar::LibUtilities::BasisKey& Nektar::LibUtilities::BasisKey::operator=(const Nektar::LibUtilities::BasisKey&)’ is deprecated [-Werror=deprecated-copy] 1529 | expIt->second->m_basisKeyVector[i] = bkeynew;
Error due to "bkeynew" assignment repeats itself a couple of times and then the build exits with: cc1plus: all warnings being treated as errors <<< library/SpatialDomains/CMakeFiles/SpatialDomains.dir/build.make:254: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o' failed make[2]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/MeshGraph.cpp.o] Error 1 CMakeFiles/Makefile2:2271: recipe for target 'library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all' failed make[1]: *** [library/SpatialDomains/CMakeFiles/SpatialDomains.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2
See the line I've highlighted. All of these errors occur because "-Werror" flag is enabled. I know this is the right way of doing things, however on a large application like Nektar I'm not sure if it must be this strict.
So the question is what would be the best solution to tackle those warnings? I'm planning to disable the "Werror" flag unless there is a better idea.
Thank you
Fatih Ertinaz
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk <mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users <https://mailman.ic.ac.uk/mailman/listinfo/nektar-users>
participants (2)
- 
                
                Fatih Ertinaz
- 
                
                Jeremy Cohen