From ac90b385a141413b712300479afee108715d7084 Mon Sep 17 00:00:00 2001 From: Sichao25 Date: Thu, 12 Mar 2026 19:04:24 -0400 Subject: [PATCH 1/2] update spack instruction --- README.md | 13 +++++++------ spack/spack-scorec.yaml | 29 +++++++++++++++++++++++++++++ spack/spack.yaml | 9 --------- 3 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 spack/spack-scorec.yaml diff --git a/README.md b/README.md index b59660b8..7e4738a7 100644 --- a/README.md +++ b/README.md @@ -190,12 +190,13 @@ ctest --test-dir build-pcms --output-on-failure ## Spack based build 1. Install spack ```console - $ mkdir /lore/$USER/spack - $ cd /lore/$USER/spack + $ mkdir $HOME/$USER/spack + $ cd $HOME/$USER/spack $ git clone -c feature.manyFiles=true -b v1.0.4 https://github.com/spack/spack.git $ . spack/share/spack/setup-env.sh + $ spack repo add https://github.com/spack/spack-packages ``` - We can also add the spack setup line into the `~/.bashrc` with `echo ". spack/share/spack/setup-env.sh" >> ~/.bashrc"`. This will load the spack setup script every time we start our terminal session. To make sure latest version of spack packages are available, we can run `spack repo add https://github.com/spack/spack-packages` after loading spack. + We can also add the spack setup line into the `~/.bashrc` with `echo ". spack/share/spack/setup-env.sh" >> ~/.bashrc"`. This will load the spack setup script every time we start our terminal session. 2. Get PCMS spack repo The following commands will add the pcms recipe files to spack. They are not currently installed inthe upstream spack repository. ```console @@ -224,8 +225,8 @@ ctest --test-dir build-pcms --output-on-failure 4. Install PCMS repo ```console - $ mkdir /lore/$USER/pcms-coupler - $ cd /lore/$USER/pcms-coupler + $ mkdir $HOME/$USER/pcms-coupler + $ cd $HOME/$USER/pcms-coupler $ git clone https://github.com/SCOREC/pcms.git $ cd pcms/spack $ spack env create -d env spack.yaml @@ -234,7 +235,7 @@ ctest --test-dir build-pcms --output-on-failure $ spack install ``` -At this point hopefully, spack will now install all of the relavant dependencies and a baseline build of PCMS. The default environment has PCMS in develop mode. To modify and recompile PCMS you can modify the code and rerun `spack install`. +If work in SCOREC system, you can directly use the spack-scorec.yaml which contains compilers information. At this point hopefully, spack will now install all of the relavant dependencies and a baseline build of PCMS. The default environment has PCMS in develop mode. To modify and recompile PCMS you can modify the code and rerun `spack install`. 4. Python API (optional) If you want to use the python API, you can install the `pcms+python` package with spack instaed of `pcms`. This will install the python bindings for PCMS and all of the dependencies needed to use them. diff --git a/spack/spack-scorec.yaml b/spack/spack-scorec.yaml new file mode 100644 index 00000000..d7edec6e --- /dev/null +++ b/spack/spack-scorec.yaml @@ -0,0 +1,29 @@ +# This is a Spack Environment file. +# +# It describes a set of packages to be installed, along with +# configuration settings. +spack: + specs: + - pcms + view: true + concretizer: + unify: true + + packages: + all: + providers: + mpi: [mpich] + gcc: + externals: + - spec: gcc@12.4.0 languages:='c,c++,fortran' + prefix: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof + extra_attributes: + compilers: + c: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof/bin/gcc + cxx: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof/bin/g++ + fortran: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof/bin/gfortran + develop: + pcms: + spec: pcms@develop + path: ../ + diff --git a/spack/spack.yaml b/spack/spack.yaml index d7edec6e..76dc85ec 100644 --- a/spack/spack.yaml +++ b/spack/spack.yaml @@ -13,15 +13,6 @@ spack: all: providers: mpi: [mpich] - gcc: - externals: - - spec: gcc@12.4.0 languages:='c,c++,fortran' - prefix: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof - extra_attributes: - compilers: - c: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof/bin/gcc - cxx: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof/bin/g++ - fortran: /opt/scorec/spack/rhel9/v0222_2/install/linux-rhel9-x86_64_v3/gcc-11.4.1/gcc-12.4.0-5xg2r2h6cc5mckmjid2g6bftg5kh3cof/bin/gfortran develop: pcms: spec: pcms@develop From 5ec4716693eab58e72de3db8e92de759a7c8260a Mon Sep 17 00:00:00 2001 From: Sichao25 Date: Thu, 12 Mar 2026 19:05:05 -0400 Subject: [PATCH 2/2] remove todo --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 7e4738a7..f14bc6b7 100644 --- a/README.md +++ b/README.md @@ -254,13 +254,6 @@ If work in SCOREC system, you can directly use the spack-scorec.yaml which conta PS: If you need certain config options for the python API, you can specify them in the spack spec. For example, to build the python API with Exodus support, one compatible config is `pcms+python ^omega-h+trilinos ^trilinos@15.0.0:+exodus ^netcdf-c@4.8.1+mpi`. At this moment, omega-h spack package does not have the exodus support, so you need to manually add `args.append("-Omega_h_USE_SEACASExodus:BOOL=ON")` to the `package.py` file of omega-h in spack before installing pcms with spack. -### BUILD TODO -- create a spack environment that's part of this project that can build the whole stack. - most of the pieces are in place for this, but it will require createing a package for redev - and of the SCOREC version of Omega\_h - - scorec version 10.1.0 of Omega\_h is in spack@develop - https://github.com/spack/spack/blob/8ddaa08ed2aacb4b5e587a33c625492cbdd4886e/var/spack/repos/builtin/packages/omega-h/package.py#L21 - Details instructions for a few systems are available on the wiki. Another Executing Approach: One would also comment out the BUILDING_TESTING in CMakeFiles.txt included in test folder;