Commit b4d33529 authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

add spack

parent 80fbdfb6
......@@ -10,7 +10,7 @@ Documentation: [https://spack.readthedocs.io/en/latest/](https://spack.readthedo
```console
~]$ ml av Spack
$ ml av Spack
---------------------- /apps/modules/devel ------------------------------
Spack/default
......@@ -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
```console
~]$ ml Spack
$ ml Spack
== Settings for first use
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
......@@ -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:
1) Spack/default => Spack/0.10.0
~]$ spack --version
$ spack --version
0.10.0
```
## Usage Module Spack/default
```console
~]$ ml Spack
$ ml Spack
The following have been reloaded with a version change:
1) Spack/default => Spack/0.10.0
~]$ spack --version
$ spack --version
0.10.0
```
## 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
To install software with Spack, you need to know what software is available. Using the `spack list` command.
```console
~]$ spack list
$ spack list
==> 1114 packages.
abinit font-bh-100dpi libffi npm py-ply r-maptools tetgen
ack font-bh-75dpi libfontenc numdiff py-pmw r-markdown tethex
......@@ -106,7 +108,7 @@ apr font-ibm-type1 libmesh op
To see more available versions of a package, run `spack versions`.
```console
~]$ spack versions git
$ spack versions git
==> 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
==> Remote versions (not yet checksummed):
......@@ -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.
```console
~]$ spack graph git
$ spack graph git
o git
|\
| |\
......@@ -174,7 +176,7 @@ o bzip2
To get more information on a particular package from `spack list`, use `spack info`.
```console
~]$ spack info git
$ spack info git
Package: git
Homepage: http://git-scm.com
......@@ -223,7 +225,7 @@ Description:
Use `spack install git` for default version or `spack install git@version`.
```console
~]$ spack install git@2.11.0
$ spack install git@2.11.0
==> Installing git
==> Installing pcre
==> 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`.
### Edit Rule
```console
~]$ spack edit git
$ spack edit git
```
!!! note
......@@ -245,7 +247,7 @@ Use `spack install git` for default version or `spack install git@version`.
**Example**
```console
~]$ spack install git
$ spack install git
==> Installing git
==> Installing pcre
==> 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
==> 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
==> Found 2 versions of pcre:
......@@ -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
==> Created template for pcre package
==> 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 pcre
==> 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
**Spack colorizes output**
```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.
......@@ -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.
```console
~]$ spack load git
$ spack load git
==> This command requires spack's shell integration.
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
**First usage**
```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
~]$ git version 1.7.1
~]$ spack load git
~]$ git --version
$ git version 1.7.1
$ spack load git
$ git --version
git version 2.11.0
~]$ spack unload git
~]$ git --version
$ spack unload git
$ git --version
git version 1.7.1
```
......@@ -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
```console
~]$ spack uninstall git
$ spack uninstall git
==> The following packages will be uninstalled :
-- linux-centos6-x86_64 / gcc@4.4.7 -----------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment