Closed cmacmackin closed 1 year ago
There was a good reason for this in https://github.com/ExCALIBUR-NEPTUNE/NESO-Spack/pull/1. Specifically this was a work around to:
Are these two reasons for the workaround now obsolete?
@will-saunders-ukaea might remember more details about https://github.com/ExCALIBUR-NEPTUNE/NESO-Spack/commit/ddc682e2e9fd0690d4b82f2aa8509806f785632c?
Hence the hopefully temporary fix to build nektar in the spack install directory.
I think I fixed the issue with linking against third-party libraries built as part of Nektar already. I'll have a check. The other problems would be better fixed by creating a patch to the CMake, as @oparry-ukaea did in #13, with the idea of trying to get these merged upstream eventually.
On Wed, Jan 11, 2023 at 3:47 PM Will Saunders @.***> wrote:
- We wanted the objects for the solvers that ship with Nektar++ so that we didn't have copies of these sources in NESO. Ideally these equation solvers would be linked into a library as part of the nektar++ build (maybe @oparry-ukaea https://github.com/oparry-ukaea is looking into this?). Hence the copy of the solver objects.
- Nektar++'s cmake files (i.e. the ones we use to build against nektar++) were pointing to third party libraries that were built as part of the nektar++ build (e.g. blas) and the paths in these cmake files were to the build directory (not the install directory). Hence the build in the spack directory (I'm sure there is a better solution here we really need to get up an running at the time).
- Similar issue with NekPy build not getting copied to install directory I think.
Hence the hopefully temporary fix to build nektar in the spack install directory.
— Reply to this email directly, view it on GitHub https://github.com/ExCALIBUR-NEPTUNE/NESO-Spack/pull/17#issuecomment-1378994356, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6ESPN7HPOFRH5ZRLTL5B3WR3IZRANCNFSM6AAAAAATYD7XRY . You are receiving this because you authored the thread.Message ID: @.***>
-- Chris MacMackin
1. was fixed by #13 for Nektar's CompressibleFlowSolver, which I think is all we're using at the moment. That PR also added a CMake macro that makes it trivial to build libraries for Nektar's other built-in solvers, if we need them.
For 3. Nektar has a make target called 'nekpy-install-system' which might do what we want.
So @oparry-ukaea say's we've fixed (1). I've confirmed that I fixed (2) by getting Nektar to link against spack-installed versions of those libraries, rather than building them itself (see #3). To be sure, I ran ldd
on the Nektar shared libraries and some of the executables to confirm they weren't linking to anything in the build directory. I also confirmed that the LinearAlgebraUnitTests-rg
executable could run.
Issue (3) still appears to be an outstanding problem. I will look into that tomorrow. Probably it does just require running an extra make command or patching the CMakeLists files.
I've now updated the Spack package to ensure that NekPy gets installed. That should sort out all of the problems which prompted the decision to build Nektar in the install tree. @jwscook, could you please review this now (or delegate to someone to review).
For some reason, the Nektar++ source was being copied to a directory in the install-tree and built there. This meant the installation was unnecessarily large (as it contained build artefacts) and also caused problems when trying to build Nektar++ using the development workflow. For that, CMake was being run in the top-level directory of the repository, before the copying took place (for some reason). This caused problems when it was rerun with a different compiler/toolchain.