Skip to content
Snippets Groups Projects
Commit b4d33529 authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

add spack

parent 80fbdfb6
No related branches found
No related tags found
6 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!196Master,!155New modules
...@@ -10,7 +10,7 @@ Documentation: [https://spack.readthedocs.io/en/latest/](https://spack.readthedo ...@@ -10,7 +10,7 @@ Documentation: [https://spack.readthedocs.io/en/latest/](https://spack.readthedo
```console ```console
~]$ ml av Spack $ ml av Spack
---------------------- /apps/modules/devel ------------------------------ ---------------------- /apps/modules/devel ------------------------------
Spack/default Spack/default
...@@ -26,7 +26,7 @@ Documentation: [https://spack.readthedocs.io/en/latest/](https://spack.readthedo ...@@ -26,7 +26,7 @@ Documentation: [https://spack.readthedocs.io/en/latest/](https://spack.readthedo
The Spack will be installed into your /home, create folder Spack for installing software and set the configuration into ~/.spack/configure.yml The Spack will be installed into your /home, create folder Spack for installing software and set the configuration into ~/.spack/configure.yml
```console ```console
~]$ ml Spack $ ml Spack
== Settings for first use == Settings for first use
Couldn't import dot_parser, loading of dot files will not be possible. Couldn't import dot_parser, loading of dot files will not be possible.
== temporary log file in case of crash /tmp/eb-wLh1RT/easybuild-54vEn3.log == temporary log file in case of crash /tmp/eb-wLh1RT/easybuild-54vEn3.log
...@@ -58,30 +58,32 @@ Couldn't import dot_parser, loading of dot files will not be possible. ...@@ -58,30 +58,32 @@ Couldn't import dot_parser, loading of dot files will not be possible.
The following have been reloaded with a version change: The following have been reloaded with a version change:
1) Spack/default => Spack/0.10.0 1) Spack/default => Spack/0.10.0
~]$ spack --version $ spack --version
0.10.0 0.10.0
``` ```
## Usage Module Spack/default ## Usage Module Spack/default
```console ```console
~]$ ml Spack $ ml Spack
The following have been reloaded with a version change: The following have been reloaded with a version change:
1) Spack/default => Spack/0.10.0 1) Spack/default => Spack/0.10.0
~]$ spack --version $ spack --version
0.10.0 0.10.0
``` ```
## Build Software Package ## Build Software Package
Packages in Spack are written in pure Python, so you can do anything in Spack that you can do in Python. Python was chosen as the implementation language for two reasons. First, Python is becoming ubiquitous in the scientific software community. Second, it’s a modern language and has many powerful features to help make package writing easy.
### Search For Available Software ### Search For Available Software
To install software with Spack, you need to know what software is available. Using the `spack list` command. To install software with Spack, you need to know what software is available. Using the `spack list` command.
```console ```console
~]$ spack list $ spack list
==> 1114 packages. ==> 1114 packages.
abinit font-bh-100dpi libffi npm py-ply r-maptools tetgen abinit font-bh-100dpi libffi npm py-ply r-maptools tetgen
ack font-bh-75dpi libfontenc numdiff py-pmw r-markdown tethex ack font-bh-75dpi libfontenc numdiff py-pmw r-markdown tethex
...@@ -106,7 +108,7 @@ apr font-ibm-type1 libmesh op ...@@ -106,7 +108,7 @@ apr font-ibm-type1 libmesh op
To see more available versions of a package, run `spack versions`. To see more available versions of a package, run `spack versions`.
```console ```console
~]$ spack versions git $ spack versions git
==> Safe versions (already checksummed): ==> Safe versions (already checksummed):
2.11.0 2.9.3 2.9.2 2.9.1 2.9.0 2.8.4 2.8.3 2.8.2 2.8.1 2.8.0 2.7.3 2.7.1 2.11.0 2.9.3 2.9.2 2.9.1 2.9.0 2.8.4 2.8.3 2.8.2 2.8.1 2.8.0 2.7.3 2.7.1
==> Remote versions (not yet checksummed): ==> Remote versions (not yet checksummed):
...@@ -118,7 +120,7 @@ To see more available versions of a package, run `spack versions`. ...@@ -118,7 +120,7 @@ To see more available versions of a package, run `spack versions`.
Spack provides the `spack graph` command for graphing dependencies. The command by default generates an ASCII rendering of a spec’s dependency graph. Spack provides the `spack graph` command for graphing dependencies. The command by default generates an ASCII rendering of a spec’s dependency graph.
```console ```console
~]$ spack graph git $ spack graph git
o git o git
|\ |\
| |\ | |\
...@@ -174,7 +176,7 @@ o bzip2 ...@@ -174,7 +176,7 @@ o bzip2
To get more information on a particular package from `spack list`, use `spack info`. To get more information on a particular package from `spack list`, use `spack info`.
```console ```console
~]$ spack info git $ spack info git
Package: git Package: git
Homepage: http://git-scm.com Homepage: http://git-scm.com
...@@ -223,7 +225,7 @@ Description: ...@@ -223,7 +225,7 @@ Description:
Use `spack install git` for default version or `spack install git@version`. Use `spack install git` for default version or `spack install git@version`.
```console ```console
~]$ spack install git@2.11.0 $ spack install git@2.11.0
==> Installing git ==> Installing git
==> Installing pcre ==> Installing pcre
==> Fetching http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.bz2 ==> Fetching http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.bz2
...@@ -236,7 +238,7 @@ Use `spack install git` for default version or `spack install git@version`. ...@@ -236,7 +238,7 @@ Use `spack install git` for default version or `spack install git@version`.
### Edit Rule ### Edit Rule
```console ```console
~]$ spack edit git $ spack edit git
``` ```
!!! note !!! note
...@@ -245,7 +247,7 @@ Use `spack install git` for default version or `spack install git@version`. ...@@ -245,7 +247,7 @@ Use `spack install git` for default version or `spack install git@version`.
**Example** **Example**
```console ```console
~]$ spack install git $ spack install git
==> Installing git ==> Installing git
==> Installing pcre ==> Installing pcre
==> Fetching ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.bz2 ==> Fetching ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.bz2
...@@ -254,7 +256,7 @@ curl: (7) couldn't connect to host ...@@ -254,7 +256,7 @@ curl: (7) couldn't connect to host
==> Error: FetchError: All fetchers failed for pcre-8.39-bm3lumpbghly2l7bkjsi4n2l3jyam6ax ==> Error: FetchError: All fetchers failed for pcre-8.39-bm3lumpbghly2l7bkjsi4n2l3jyam6ax
... ...
~]$ spack create http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.bz2 -f $ spack create http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.bz2 -f
==> This looks like a URL for pcre ==> This looks like a URL for pcre
==> Found 2 versions of pcre: ==> Found 2 versions of pcre:
...@@ -269,8 +271,8 @@ How many would you like to checksum? (default is 1, q to abort) 1 ...@@ -269,8 +271,8 @@ How many would you like to checksum? (default is 1, q to abort) 1
==> This package looks like it uses the cmake build system ==> This package looks like it uses the cmake build system
==> Created template for pcre package ==> Created template for pcre package
==> Created package file: ~/.local/easybuild/software/Spack/0.10.0/var/spack/repos/builtin/packages/pcre/package.py ==> Created package file: ~/.local/easybuild/software/Spack/0.10.0/var/spack/repos/builtin/packages/pcre/package.py
~]$ $
~]$ spack install git $ spack install git
==> Installing git ==> Installing git
==> Installing pcre ==> Installing pcre
==> Installing cmake ==> Installing cmake
...@@ -294,7 +296,7 @@ bzip2@1.0.6 curl@7.50.3 gettext@0.19.8.1 libiconv@1.14 libxml2@2.9.4 nc ...@@ -294,7 +296,7 @@ bzip2@1.0.6 curl@7.50.3 gettext@0.19.8.1 libiconv@1.14 libxml2@2.9.4 nc
**Spack colorizes output** **Spack colorizes output**
```console ```console
~]$ spack find | less -R $ spack find | less -R
``` ```
`spack find` shows the specs of installed packages. A spec is like a name, but it has a version, compiler, architecture, and build options associated with it. In spack, you can have many installations of the same package with different specs. `spack find` shows the specs of installed packages. A spec is like a name, but it has a version, compiler, architecture, and build options associated with it. In spack, you can have many installations of the same package with different specs.
...@@ -304,7 +306,7 @@ bzip2@1.0.6 curl@7.50.3 gettext@0.19.8.1 libiconv@1.14 libxml2@2.9.4 nc ...@@ -304,7 +306,7 @@ bzip2@1.0.6 curl@7.50.3 gettext@0.19.8.1 libiconv@1.14 libxml2@2.9.4 nc
Neither of these is particularly pretty, easy to remember, or easy to type. Luckily, Spack has its own interface for using modules and dotkits. Neither of these is particularly pretty, easy to remember, or easy to type. Luckily, Spack has its own interface for using modules and dotkits.
```console ```console
~]$ spack load git $ spack load git
==> This command requires spack's shell integration. ==> This command requires spack's shell integration.
To initialize spack's shell commands, you must run one of To initialize spack's shell commands, you must run one of
...@@ -321,16 +323,16 @@ Neither of these is particularly pretty, easy to remember, or easy to type. Luck ...@@ -321,16 +323,16 @@ Neither of these is particularly pretty, easy to remember, or easy to type. Luck
**First usage** **First usage**
```console ```console
~]$ . ~/.local/easybuild/software/Spack/0.10.0/share/spack/setup-env.sh $ . ~/.local/easybuild/software/Spack/0.10.0/share/spack/setup-env.sh
``` ```
```console ```console
~]$ git version 1.7.1 $ git version 1.7.1
~]$ spack load git $ spack load git
~]$ git --version $ git --version
git version 2.11.0 git version 2.11.0
~]$ spack unload git $ spack unload git
~]$ git --version $ git --version
git version 1.7.1 git version 1.7.1
``` ```
...@@ -341,7 +343,7 @@ Spack will ask you either to provide a version number to remove the ambiguity or ...@@ -341,7 +343,7 @@ Spack will ask you either to provide a version number to remove the ambiguity or
You may force uninstall a package with the `--force` option You may force uninstall a package with the `--force` option
```console ```console
~]$ spack uninstall git $ spack uninstall git
==> The following packages will be uninstalled : ==> The following packages will be uninstalled :
-- linux-centos6-x86_64 / gcc@4.4.7 ----------------------------- -- linux-centos6-x86_64 / gcc@4.4.7 -----------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment