Skip to content

How to build Proteus using Spack

burgreen edited this page Jul 28, 2018 · 37 revisions

Useful information before beginning

Warning: This is a work in progress. Expect changes. We are in the final stages of testing. A full set of files will be uploaded soon.

Spack works only on Linux and MacOS platforms. Windows is not supported.

Before installing Spack, make sure your system supports Environment Modules package. It can be easily installed.

Ensure your system has the minimum Spack prerequisites.

Install Proteus in Five Easy Steps

The 5 steps involve only a total of 10 commands, 6 of which are standard Unix commands.

The beauty of this approach is that only one Proteus stack is needed to support any number of independent Proteus builds (all on one computer system, of course). Also, if one has different variants of Proteus stacks, any Proteus installation can build against any Proteus stack at any time. Like the HashDist approach, there will be consistency in Proteus builds on any system.

Direct any questions to: [email protected]

Step 1. Download the spack-setup.tar installation package

$ wget <url>/spack-setup.tar

where <url> = ftp://ftp.hpc.msstate.edu/outgoing/burgreen/spack-proteus/0.1/

$ tar xfv spack-setup.tar

  • This will inflate to:
rw-r----- user/group 3020 2018-07-28 13:14 spack-setup-0-README.txt
rwxr-x--- user/group  810 2018-07-28 13:14 spack-setup-1-names-proteus.sh
rwxr-x--- user/group 1177 2018-07-28 13:15 spack-setup-2-transfer-archives.sh
rwxr-x--- user/group 2153 2018-07-28 13:15 spack-setup-3-install-spack.sh

Step 2. Transfer the required archives to the target host

  • Optionally, modify spack-setup-1-names-proteus.sh to reflect which specific archives you want to use and how to transfer them. By default, it will wget the archives from the <url> defined in Step 1.

$ ./spack-setup-2-transfer-archives.sh transfer

  • This will transfer 7 archive files:
-rw-r----- 1 user group   6685201 Jul 17 20:24 spack-develop-2018.07.10.zip
-rw-r----- 1 user group     61440 Jul 27 23:45 spack-scripts.tar
-rw-r----- 1 user group    317440 Jul 20 14:43 thirdparty-gcc-7.3.0-packages.tar
-rw-r----- 1 user group 171550720 Jul 20 12:26 thirdparty-gcc-7.3.0-sources.tar
-rw-r----- 1 user group    153600 Jul 27 15:14 thirdparty-libelf.tar
-rw-r----- 1 user group   1095680 Jul 23 13:59 thirdparty-proteus-stack-packages.tar
-rw-r----- 1 user group 364257280 Jul 23 16:13 thirdparty-proteus-stack-sources.tar

Step 3. Install the Spack software

$ ./spack-setup-3-install-spack.sh <spack_dir>

where <spack_dir> is the directory where the Proteus stack software will reside.

Step 4. Install the Proteus stack software into the Spack repository

$ cd <stack_dir>

  • Setup the compiler that is known to successfully install Spack packages. Instructions on how to do this are found in Appendix A.
  • A typical work flow for gcc-4.9.3 will look like:

$ module load gcc/4.9.3

  • It is important to confirm that the compiler you wanted is actually loaded.

$ gcc --version

  • Now, install the packages needed to build Proteus.

$ ./scripts/0-install-gcc-proteus-stack.sh [email protected]

Step 5. Build the Proteus software using a Proteus stack

$ cd <proteus_dir>

  • where <proteus_dir> is the root direction of Proteus software
  • This directory can be located anywhere.
  • There can be multiple of these directories.

$ <stack_dir>/scripts/0-build-proteus.sh

  • This will build Proteus and install the following files and directories into <proteus_dir>:
rwxr-x---  1 user group   100 Jul 28 11:55 0-README.txt
rwxr-x---  1 user group  3590 Jul 28 11:55 1-setup-proteus.sh*
rw-r-----  1 user group   605 Jul 28 11:54 2-makefile
rwxr-x---  1 user group   365 Jul 28 11:56 make.sh*
drwxr-x--- 2 user group  4096 Jul 28 11:56 bin/
drwxr-x--- 4 user group  4096 Jul 28 11:55 python/

To rebuild this version of Proteus:

$ source <proteus_dir>/1-setup-proteus.sh # needed only once per session

  • Revise the source code.

$ ./make.sh

To rebuild this version of Proteus against a different Proteus stack:

$ source <proteus_dir>/1-setup-proteus.sh # needed only once per session

$ ./make.sh clean

$ <different_stack_dir>/scripts/0-build-proteus.sh

To execute this version of Proteus:

$ source <proteus_dir>/1-setup-proteus.sh # needed only once per session

$ cd <case_dir>

$ which parun # just for confirmation

$ parun ...

Appendix A: Finding suitable compilers that install Spack packages

  • In my limited experience, many compilers cannot fully install the Proteus stack.

  • Below is a typical work flow.

$ cd <stack_dir>

$ ./scripts/1-add-compiler.sh 
$ ./scripts/2-try-compiler.sh 
$ ./scripts/2-try-compiler.sh [email protected]

$ module load gcc/4.9.3
$ ./scripts/1-add-compiler.sh 
$ ./scripts/2-try-compiler.sh [email protected]

$ module load gcc/7.3.0
$ ./scripts/1-add-compiler.sh 
$ ./scripts/2-try-compiler.sh [email protected]

Clone this wiki locally