ExCALIBUR-NEPTUNE / NESO

MIT License
4 stars 4 forks source link

Spack install of Nektar fails #134

Open JosephThomasParker opened 1 year ago

JosephThomasParker commented 1 year ago

Following the README's Building with Spack instructions on a fresh clone of main (6fe4953), I get the spack install of Nektar fails with

==> Installing nektar-5.3.0-2e0fb8-nfuhvytmwz5aghvlo3ejng4igmcfmtq2
==> No binary for nektar-5.3.0-2e0fb8-nfuhvytmwz5aghvlo3ejng4igmcfmtq2 found: installing from source
fatal: unable to access 'https://gitlab.nektar.info/nektar/nektar.git/': The certificate issuer's certificate has expired.  Check your system date and time.
==> Error: FetchError: All fetchers failed for spack-stage-nektar-5.3.0-2e0fb8-nfuhvytmwz5aghvlo3ejng4igmcfmtq2

/home/jparker/spack/lib/spack/spack/package.py:1537, in do_fetch:
       1534
       1535        self.stage.create()
       1536        err_msg = None if not self.manual_download else self.download_instr
  >>   1537        start_time = time.time()
       1538        self.stage.fetch(mirror_only, err_msg=err_msg)
       1539        self._fetch_time = time.time() - start_time
       1540

==> Warning: Skipping build of neso-working-chflxttex7omj5dxljdmr4pciqogf3mz since nektar-5.3.0-2e0fb8-nfuhvytmwz5aghvlo3ejng4igmcfmtq2 failed
==> Error: neso-working-chflxttex7omj5dxljdmr4pciqogf3mz: Package was not installed
==> Error: Installation request failed.  Refer to reported errors for failing package(s).

This is with Spack 0.18.1 and Python 3.9.12 on CentOS 7.3.

Any ideas?

oparry-ukaea commented 1 year ago

Which version of git do you have?

JosephThomasParker commented 1 year ago

Ah!

$ git --version
git version 1.8.3.1

Thanks - I'll try with something newer!

JosephThomasParker commented 1 year ago

Hmm, I get the same error with git 2.35.2 and with Spack 0.19.0.

oparry-ukaea commented 1 year ago

Does git clone https://gitlab.nektar.info/nektar/nektar.git work outside of the Spack build?

JosephThomasParker commented 1 year ago

No it doesn't work, but it does work on my local machine. I think this a problem with the security certificates on the remote machine, so I chase it up with the sysadmin. Thanks Owen!

oparry-ukaea commented 1 year ago

No problem!

JosephThomasParker commented 1 year ago

Ok, the checkout of Nektar is sorted, but the spack install still fails with nektar:

==> Installing nektar-5.3.0-2e0fb8-now6omu4hxi32itzofe6ua36o2fpnm4w
==> No binary for nektar-5.3.0-2e0fb8-now6omu4hxi32itzofe6ua36o2fpnm4w found: installing from source
==> Using cached archive: /home/jparker/spack/var/spack/cache/_source-cache/git//nektar/nektar.git/2e0fb86da236e7e5a3590fcf5e0f608bd8490945.tar.gz
==> Warning: Fetching from mirror without a checksum!
  This package is normally checked out from a version control system, but it has been archived on a spack mirror.  This means we cannot know a checksum for the tarball in advance. Be sure that your connection to this mirror is secure!
==> Applied patch /home/jparker/code/NESO-2/NESO-Spack/packages/nektar/add_compflow_solver_lib.patch
==> nektar: Executing phase: 'cmake'
==> nektar: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j16'

22 errors found in build log:
     9232                     from /home/jparker/spack/opt/spack/linux-centos7-haswell/gcc-12.1.0/boost-1.79.0-c7y3k6idkrfrr2bu2sfc7xm3zru6ur7r/include/boost/geometry/algorithms/detail/closest_points/imp
             lementation.hpp:17,
     9233                     from /home/jparker/spack/opt/spack/linux-centos7-haswell/gcc-12.1.0/boost-1.79.0-c7y3k6idkrfrr2bu2sfc7xm3zru6ur7r/include/boost/geometry/algorithms/closest_points.hpp:14,
     9234                     from /home/jparker/spack/opt/spack/linux-centos7-haswell/gcc-12.1.0/boost-1.79.0-c7y3k6idkrfrr2bu2sfc7xm3zru6ur7r/include/boost/geometry/geometry.hpp:69,
     9235                     from /home/jparker/spack/opt/spack/linux-centos7-haswell/gcc-12.1.0/boost-1.79.0-c7y3k6idkrfrr2bu2sfc7xm3zru6ur7r/include/boost/geometry.hpp:17,
     9236                     from /tmp/jparker/spack-stage/spack-stage-nektar-5.3.0-2e0fb8-now6omu4hxi32itzofe6ua36o2fpnm4w/spack-src/library/FieldUtils/ProcessModules/ProcessInterpPointDataToFld.cpp:40
             :
     9237    /home/jparker/spack/opt/spack/linux-centos7-haswell/gcc-12.1.0/boost-1.79.0-c7y3k6idkrfrr2bu2sfc7xm3zru6ur7r/include/boost/geometry/geometries/point_xyz.hpp: In member function 'void boost::
             geometry::model::d3::point_xyz<CoordinateType, CoordinateSystem>::x(const CoordinateType&)':
  >> 9238    /home/jparker/spack/opt/spack/linux-centos7-haswell/gcc-12.1.0/boost-1.79.0-c7y3k6idkrfrr2bu2sfc7xm3zru6ur7r/include/boost/geometry/geometries/point_xyz.hpp:68:27: error: type/value mismatch
              at argument 1 in template parameter list for 'template<class _Key, class _Compare, class _Alloc> class std::set'
     9239       68 |     { this->template set<0>(v); }
     9240          |                           ^

I don't really know how to go about fixing this. Is there some way of pinning the versions of dependencies so that environment uses a toolchains that's known to work?

jwscook commented 1 year ago

I've had this error before. Is that with GCC 12? If so, try with GCC 11 or even 10.

JosephThomasParker commented 1 year ago

How can I force the spack environment to build with gcc 11? I've installed that in the environment, and changed the spack yaml to start with

spack:
  # add package specs to the `specs` list
  specs:
  - neso%gcc@11.3.0 ^openblas ^hipsycl
  - gcc@11.3.0

but it still installs everything with gcc@12...

oparry-ukaea commented 1 year ago

This wasn't obvious to me either.... spack install caches the 'concretized' specs in spack.lock.
You need spack concretize -f to force it to notice any changes you make to spack.yml

JosephThomasParker commented 1 year ago

Ah thanks! That's now building neso@working%gcc@11.3.0, though all the dependencies are built with 12. It fails with the same error, that seems to point to boost@1.79%gcc@12, so maybe I should rebuild that with 11.

jwscook commented 1 year ago

Do you get the same error in a new git clone?