diff --git a/README.md b/README.md index b59660b8..f14bc6b7 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. @@ -253,13 +254,6 @@ At this point hopefully, spack will now install all of the relavant dependencies 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; 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