Skip to content

Commit

Permalink
Merge pull request #200 from LLNL/feature/toss4
Browse files Browse the repository at this point in the history
Patches for building on TOSS4 with spack v0.19.1.
  • Loading branch information
mdavis36 authored Apr 19, 2023
2 parents 0be2bcd + 98ea74c commit 688a7b1
Show file tree
Hide file tree
Showing 20 changed files with 350 additions and 256 deletions.
2 changes: 1 addition & 1 deletion .gitlab/machines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- shell
variables:
HOSTNAME: "lassen"
BUILD_ALLOC: lalloc 1
BUILD_ALLOC: lalloc 1 -W 90
TEST_ALLOC: $BUILD_ALLOC
extends: [.on_blueos]

Expand Down
2 changes: 1 addition & 1 deletion .gitlab/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
script:
- ml load mpifileutils
- cd $SPHERAL_BUILDS_DIR
- source $CI_PROJECT_DIR/$SCRIPT_DIR/gitlab/clean_spheral_builds.sh 50
- source $CI_PROJECT_DIR/$SCRIPT_DIR/gitlab/clean_spheral_builds.sh 40
extends: [.toss_resource_general]
when: always

Expand Down
2 changes: 1 addition & 1 deletion .uberenv_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"package_version" : "develop",
"package_source_dir" : "../../..",
"spack_url" : "https://github.com/spack/spack",
"spack_commit" : "457fe842f05edb5d17160b0ecf32aeca9d46113c",
"spack_commit" : "5e0d2107348eed6cbe6deca43a30f5b06c5e40af",
"spack_configs_path" : "scripts/spack/configs",
"spack_packages_path" : "scripts/spack/packages"
}
19 changes: 19 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
Version vYYYY-MM-DD -- Release date YYYY-MM-DD
==============================================

This release contains ...

* Important Notes:

Notable changes include:

* New features/ API changes:

* Build changes / improvements:
* toss_4_x86_64_ib system compatibility.
* Updated spack version to v0.19.1
* `--debug` and `--no-spec` options added to tpl-manager.py for outputing debug and skipping `spack spec` step.

* Bug Fixes / improvements:
* r-path for additional TPLs can be propogated to Spheral libraries with `SPHERAL_ADDITIONAL_RPATHS`.

Version v2023.03.0 -- Release date 2023-03-29
==============================================

Expand Down
4 changes: 2 additions & 2 deletions cmake/spheral/SpheralAddLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function(spheral_add_cxx_library

# Set the r-path of the C++ lib such that it is independent of the build dir when installed
set_target_properties(Spheral_${package_name} PROPERTIES
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${conduit_DIR}/lib;${axom_DIR}/lib;${boost_DIR}/lib;${hdf5_DIR}/lib"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${conduit_DIR}/lib;${axom_DIR}/lib;${boost_DIR}/lib;${hdf5_DIR}/lib;${SPHERAL_ADDITIONAL_RPATHS}"
)
endfunction()

Expand Down Expand Up @@ -161,7 +161,7 @@ function(spheral_add_pybind11_library package_name)

# Set the r-path of the C++ lib such that it is independent of the build dir when installed
set_target_properties(${MODULE_NAME} PROPERTIES
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${conduit_DIR}/lib;${axom_DIR}/lib;${boost_DIR}/lib;${python_DIR}/lib;${hdf5_DIR}/lib"
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${conduit_DIR}/lib;${axom_DIR}/lib;${boost_DIR}/lib;${python_DIR}/lib;${hdf5_DIR}/lib;${SPHERAL_ADDITIONAL_RPATHS}"
)

endfunction()
4 changes: 2 additions & 2 deletions docs/build_guide/include/tpls.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Above we are telling ``tpl-manager`` to build our TPLs with the ``gcc`` that is
By default we have ``python`` bindings enabled (``+python``) and docs disabled (``~docs``). Therefore the spec ``gcc+mpi+python~docs`` will build the same TPL set as just ``gcc``.For more information on ``spec`` syntax please see the spack documentation on `specs-dependencies <https://spack.readthedocs.io/en/latest/basic_usage.html#specs-dependencies>`_.

.. note::
Spheral minimally requires a C++11 compliant compiler.
Spheral minimally requires a C++14 compliant compiler.

[ex_running_tpl_manager-end]

Expand Down Expand Up @@ -96,7 +96,7 @@ Above we are telling ``tpl-manager`` to build our TPLs with ``gcc`` at version `
By default we have ``python`` bindings enabled (``+python``) and docs disabled (``~docs``). Therefore the spec ``gcc@8.3.1+mpi+python~docs`` will build the same TPL set as just ``gcc@8.3.1``.For more information on ``spec`` syntax please see the spack documentation on `specs-dependencies <https://spack.readthedocs.io/en/latest/basic_usage.html#specs-dependencies>`_.

.. note::
``gcc@8.3.1`` is the recommended compiler for building Spheral on LC (Livermore Computing). Spheral minimally requires a C++11 compliant compiler.
``gcc@8.3.1`` is the recommended compiler for building Spheral on LC (Livermore Computing). Spheral minimally requires a C++14 compliant compiler.

CUDA Support
------------
Expand Down
20 changes: 17 additions & 3 deletions scripts/devtools/tpl-manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,18 @@ def parse_args():
parser.add_argument('--spack-url', type=str, default="",
help='URL of spack to use.')

parser.add_argument('--no-clean', type=bool, default=False,
parser.add_argument('--no-clean', action='store_true',
help='Do not clean spack generated log files.')

parser.add_argument('--debug', action='store_true',
help='Run spack commands with -d debug output.')

parser.add_argument('--verbose', action='store_true',
help='Run spack install with -v for tpl build output.')

parser.add_argument('--no-spec', action='store_true',
help='Skip output of the dependency graph.')

return parser.parse_args()


Expand Down Expand Up @@ -120,6 +129,10 @@ def build_deps(args):
os.environ["SPACK_DISABLE_LOCAL_CONFIG"] = "1"
spack_cmd=os.path.join(args.spheral_spack_dir, "spack/bin/spack")

# Add -d to spack command when requesting debug output
if args.debug:
spack_cmd += " -d"

with open(uberenv_project_json) as f:
package_name=json.loads(f.read())["package_name"]

Expand All @@ -128,8 +141,9 @@ def build_deps(args):
print("** Building TPL's and generating host-config for {0}%{1} ...".format(package_name,s))
os.environ["SPEC"] = s
os.environ["LC_ALL"] = "en_US.UTF-8"
if sexe("{0} spec -I {1}@develop%{2}".format(spack_cmd, package_name, s), echo=True) : sys.exit(1)
if sexe("{0} dev-build --deprecated --quiet -d {1} -u initconfig {2}@develop%{3} 2>&1 | tee -a \"dev-build-{3}-out.txt\"".format(spack_cmd, os.getcwd(), package_name, s), echo=True) : sys.exit(1)
if not args.no_spec:
if sexe("{0} spec --fresh -I {1}@develop%{2}".format(spack_cmd, package_name, s), echo=True) : sys.exit(1)
if sexe("{0} dev-build --fresh --quiet --deprecated -u initconfig {2}@develop%{3} 2>&1 | tee -a \"dev-build-{3}-out.txt\"".format(spack_cmd, os.getcwd(), package_name, s), echo=True) : sys.exit(1)

if not args.no_clean:
sexe("rm dev-build-* spack-build-* spack-configure-args.txt")
Expand Down
5 changes: 0 additions & 5 deletions scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,3 @@ packages:
- spec: hwloc@5.7.5
prefix: /usr
buildable: false
netlib-lapack:
buildable: false
externals:
- spec: netlib-lapack@3.9.0
prefix: /usr/gapps/bdiv/blueos_3_ppc64le_ib_p9/gcc-8-cuda-10/lapack/3.9.0
5 changes: 0 additions & 5 deletions scripts/spack/configs/toss_3_x86_64_ib/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,3 @@ packages:
- spec: hwloc@5.7.5
prefix: /usr
buildable: false
netlib-lapack:
buildable: false
externals:
- spec: netlib-lapack@3.9.0
prefix: /usr/gapps/bdiv/toss_3_x86_64_ib/clang-10-mvapich2-2.3/lapack/3.9.0
27 changes: 27 additions & 0 deletions scripts/spack/configs/toss_4_x86_64_ib/compilers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
compilers:
- compiler:
spec: clang@14.0.6
paths:
cc: /usr/tce/packages/clang/clang-14.0.6/bin/clang
cxx: /usr/tce/packages/clang/clang-14.0.6/bin/clang++
f77: /usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran
fc: /usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran
flags: {}
operating_system: rhel8
target: x86_64
modules: []
environment: {}
extra_rpaths: []
- compiler:
spec: gcc@10.3.1
paths:
cc: /usr/tce/packages/gcc/gcc-10.3.1/bin/gcc
cxx: /usr/tce/packages/gcc/gcc-10.3.1/bin/g++
f77: /usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran
fc: /usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran
flags: {}
operating_system: rhel8
target: x86_64
modules: []
environment: {}
extra_rpaths: []
114 changes: 114 additions & 0 deletions scripts/spack/configs/toss_4_x86_64_ib/packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
packages:
all:
# This defaults us to machine specific flags of ivybridge which allows
# us to run on broadwell as well
target: [ivybridge]
compiler: [gcc, clang]
cmake:
version: [3.23.1]
buildable: false
externals:
- spec: cmake@3.23.1
prefix: /usr/tce/packages/cmake/cmake-3.23.1

mvapich2:
externals:
- spec: mvapich2@2.3.6%gcc@10.3.1~cuda~debug~regcache~wrapperrpath ch3_rank_bits=32
file_systems=lustre,nfs,ufs process_managers=slurm
prefix: /usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1
buildable: false

# ------ SYSTEM LIBS -------
ncurses:
externals:
- spec: ncurses@5.9
prefix: /usr
buildable: false
readline:
externals:
- spec: readline@7.0
prefix: /usr
buildable: false
autoconf:
externals:
- spec: autoconf@2.69
prefix: /usr
buildable: false
automake:
externals:
- spec: automake@1.13.4
prefix: /usr
buildable: false
libtool:
externals:
- spec: libtool@2.4.2
prefix: /usr
buildable: false
bzip2:
externals:
- spec: bzip2@1.0.6
prefix: /usr
buildable: false
expat:
externals:
- spec: expat@2.4.1
prefix: /usr
buildable: false
gdbm:
externals:
- spec: gdbm@1.19
prefix: /usr
buildable: false
gettext:
externals:
- spec: gettext@0.19
prefix: /usr
buildable: false
libffi:
externals:
- spec: libffi@3.3
prefix: /usr
buildable: false
openssl:
externals:
- spec: openssl@1.1.1
prefix: /usr
buildable: false
ossp-uuid:
externals:
- spec: ossp-uuid@1.62
prefix: /usr
buildable: false
sqlite:
externals:
- spec: sqlite@3.36.0
prefix: /usr
buildable: false
pkg-config:
externals:
- spec: pkg-config@0.27.1
prefix: /usr
buildable: false
tar:
externals:
- spec: tar@1.26
prefix: /usr
buildable: false
elfutils:
externals:
- spec: elfutils@0.176
prefix: /usr
buildable: false

#---- Extension Dependencies

hwloc:
externals:
- spec: hwloc@5.7.5
prefix: /usr
buildable: false
netlib-lapack:
buildable: false
externals:
- spec: netlib-lapack@3.9.0
prefix: /usr
1 change: 1 addition & 0 deletions scripts/spack/packages/py-numpy-stl/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ class PyNumpyStl(PythonPackage):
version('2.11.2', sha256='192556df794b9ef0c1333fd5f034e4a3905d63f52345a0cc1e359045670e34b6')

extends('python@2.7:2.8', type=['build', 'run'])
depends_on('py-setuptools', type='build')
depends_on('py-enum34', type='build')
depends_on('py-python-utils@2.4.0', type='build')
Loading

0 comments on commit 688a7b1

Please sign in to comment.