-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate Spack builds for gcc and intel
- Loading branch information
1 parent
7a47d18
commit 7b79244
Showing
3 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,37 @@ | ||
# Makefile for building, pulling, running, and pushing Docker images for GISS-GC | ||
# development environment. | ||
# | ||
# The GNU compilers will be used by default. To build with Intel compilers, call | ||
# | ||
# make build COMPILER=intel | ||
|
||
# Default target | ||
all: build | ||
|
||
DOCKERFILE = ${GISS_HOME}/docker/Dockerfile.devenv | ||
NAMESPACE = ghcr.io/fetch4 | ||
IMAGE_NAME = giss-gc-dev-env | ||
TAG = latest | ||
# Variables | ||
COMPILER ?= gcc | ||
DOCKERFILE = Dockerfile.$(COMPILER) | ||
NAMESPACE = ghcr.io/fetch4 | ||
IMAGE_NAME = giss-gc-dev-env-$(COMPILER) | ||
TAG = latest | ||
|
||
IMAGE = $(NAMESPACE)/$(IMAGE_NAME):$(TAG) | ||
# Full image name | ||
IMAGE = $(NAMESPACE)/$(IMAGE_NAME):$(TAG) | ||
|
||
# Pull the Docker image from the registry | ||
pull: | ||
docker pull $(IMAGE) | ||
|
||
# Build the Docker image using the specified Dockerfile | ||
build: | ||
docker build -f $(DOCKERFILE) -t $(IMAGE) . | ||
|
||
# Run the Docker container interactively with the home directory mounted | ||
# NOTE: This exposes your home directory to the Docker image and should be used | ||
# with caution. | ||
run: | ||
docker run --rm -it -v ${HOME}:${HOME} $(IMAGE) | ||
|
||
# Push the Docker image to the registry | ||
push: | ||
docker push $(IMAGE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
spack: | ||
packages: | ||
all: | ||
compiler: [gcc@13.2.0] | ||
specs: | ||
- cmake | ||
- gmake | ||
- hdf5 | ||
- netcdf-c+mpi+parallel-netcdf | ||
- netcdf-fortran | ||
- openmpi | ||
concretizer: | ||
unify: true | ||
config: | ||
install_missing_compilers: true | ||
install_tree: /opt/software | ||
view: /opt/views/view | ||
compiler: | ||
spec: gcc@=13.2.0 | ||
paths: | ||
cc: /usr/bin/gcc | ||
cxx: /usr/bin/g++ | ||
f77: /usr/bin/gfortran | ||
fc: /usr/bin/gfortran | ||
flags: {} | ||
operating_system: ubuntu24.04 | ||
target: x86_64 | ||
modules: [] | ||
environment: {} | ||
extra_rpaths: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
spack: | ||
packages: | ||
all: | ||
compiler: [intel@2024.0] | ||
specs: | ||
- cmake | ||
- gmake | ||
- hdf5 | ||
- netcdf-c+mpi+parallel-netcdf | ||
- netcdf-fortran | ||
- openmpi | ||
concretizer: | ||
unify: true | ||
config: | ||
install_missing_compilers: true | ||
install_tree: /opt/software | ||
view: /opt/views/view | ||
compiler: | ||
spec: intel@=2024.0 | ||
paths: | ||
cc: /opt/intel/oneapi/compiler/2024.0/bin/icx | ||
cxx: /opt/intel/oneapi/compiler/2024.0/bin/icpx | ||
f77: /opt/intel/oneapi/compiler/2024.0/bin/ifx | ||
fc: /opt/intel/oneapi/compiler/2024.0/bin/ifx | ||
flags: {} | ||
operating_system: ubuntu24.04 | ||
target: x86_64 | ||
modules: [] | ||
environment: {} | ||
extra_rpaths: [] |