Skip to content

Commit

Permalink
Merge pull request #116 from fangohr/add-octopus-15
Browse files Browse the repository at this point in the history
Support compilation of Octopus 15.x
  • Loading branch information
fangohr authored Jan 10, 2025
2 parents c6675a3 + 0343575 commit 7cd02e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM debian:bullseye
FROM debian:bookworm

# # which spack version are we using now? Default is develop
# # but other strings can be given to the docker build command
# # (for example docker build --build-arg SPACK_VERSION=v0.16.2)
ARG SPACK_VERSION=develop
ARG OCT_VERSION=14.1
ARG OCT_VERSION=15.1
ARG BERKELEYGW_VER=""
RUN echo "Building with spack version ${SPACK_VERSION}"

Expand Down Expand Up @@ -34,7 +34,7 @@ RUN apt-get install -y --no-install-recommends \
gfortran \
git \
openssh-server \
python \
python3 \
unzip \
vim \
&& rm -rf /var/lib/apt/lists/*
Expand Down
13 changes: 11 additions & 2 deletions spack/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class Octopus(AutotoolsPackage, CudaPackage):

license("Apache-2.0")

version("15.1", sha256="6c4deb535ddfcdcdf6f26764b38fb1ad05faa9b418ec18d5d93f8d1040165bda")
version("15.0", sha256="d339721d06155b3470f5a798c5b1eb3fe6252fa8c4b2a4efe27ed715f60a4313")
version("14.1", sha256="6955f4020e69f038650a24509ff19ef35de4fd34e181539f92fa432db9b66ca7")
version("14.0", sha256="3cf6ef571ff97cc2c226016815d2ac4aa1e00ae3fb0cc693e0aff5620b80373e")
version("13.0", sha256="b4d0fd496c31a9c4aa4677360e631765049373131e61f396b00048235057aeb1")
Expand All @@ -48,6 +50,13 @@ class Octopus(AutotoolsPackage, CudaPackage):
depends_on("cxx", type="build") # generated
depends_on("fortran", type="build") # generated

# To compile Octopus 15 with gcc, we need at least gcc 11.3:
conflicts(
"%gcc@:11.2",
when="@15:",
msg="GCC version must be at least 11.3 for Octopus version 15 or newer",
)

variant("mpi", default=True, description="Build with MPI support")
variant("scalapack", default=False, when="+mpi", description="Compile with Scalapack")
variant("berkeleygw", default=False, description="Compile with BerkeleyGW")
Expand Down Expand Up @@ -99,8 +108,8 @@ class Octopus(AutotoolsPackage, CudaPackage):
depends_on("libxc@2:2", when="@:5")
depends_on("libxc@2:3", when="@6:7")
depends_on("libxc@2:4", when="@8:9")
depends_on("[email protected]:", when="@10:")
depends_on("[email protected]:", when="@develop")
depends_on("[email protected]:6", when="@10:")
depends_on("[email protected]:6", when="@develop")
depends_on("netcdf-fortran", when="+netcdf") # NetCDF fortran lib without mpi variant
with when("+mpi"): # list all the parallel dependencies
depends_on("fftw@3:+mpi+openmp", when="@8:9") # FFT library
Expand Down

0 comments on commit 7cd02e3

Please sign in to comment.