Building Albany using SPACK

Glen Hansen edited this page Jun 5, 2018 · 8 revisions

Spack is a package manager for supercomputers, Linux, and macOS. It makes installing scientific software easy. With Spack, you can build a package with multiple versions, configurations, platforms, and compilers, and all of these builds can coexist on the same machine.

Install SPACK

	git clone https://github.com/spack/spack
	. share/spack/setup-env.sh
	make install

Building Albany using SPACK

	spack install albany
  • Note: If you plan to run the Albany regression tests post-build, you should keep the build stage files. SPACK will default to removing the build files after the install. The following command will preserve the build stage files

      spack install --keep-stage albany
    

Determining the installed location of Albany

	spack location -i albany

Misc SPACK installation notes

  • Building some of the Albany dependencies might result in certificate errors. To ignore certificates, use the command

      spack --insecure install albany
    

    Note that ignoring ssh certificate issues can compromise your system's security.

  • To build Albany your current shell environment, instead of the SPACK environment

      spack install --dirty albany
    
  • To build Albany using 16 processors with verbose build output

      spack install -j 16 -v albany
    
  • To run the Albany regression tests post-build, change into the build stage directory and run them with CTest

      spack cd albany
      cd spack-build
      ctest
    

Compilers.yaml Examples

CEE-COMPUTE Machines at Sandia

	compilers:
	- compiler:
	    environment: {}
	    extra_rpaths: []
	    flags: {}
	    modules: []
	    operating_system: rhel6
	    paths:
	      cc: /sierra/sntools/SDK/compilers/clang/6.00-RHEL6/bin/clang
	      cxx: /sierra/sntools/SDK/compilers/clang/6.00-RHEL6/bin/clang++
	      f77: null
	      fc: null
	    spec: clang@6.0.0
	    target: x86_64
	- compiler:
	    environment:
	      set:
	        LD_LIBRARY_PATH : /sierra/sntools/SDK/compilers/gcc/5.4.0-RHEL6/lib:/sierra/sntools/SDK/compilers/gcc/5.4.0-RHEL6/lib64
	    extra_rpaths: []
	    flags: {}
	    modules: []
	    operating_system: rhel6
	    paths:
	      cc: /sierra/sntools/SDK/compilers/gcc/5.4.0-RHEL6/bin/gcc
	      cxx: /sierra/sntools/SDK/compilers/gcc/5.4.0-RHEL6/bin/g++
	      f77: /sierra/sntools/SDK/compilers/gcc/5.4.0-RHEL6/bin/gfortran
	      fc: /sierra/sntools/SDK/compilers/gcc/5.4.0-RHEL6/bin/gfortran
	    spec: gcc@5.4.0
	    target: x86_64
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.