@@ -149,26 +149,46 @@ customize an installation in :ref:`sec-specs`.
149149``spack uninstall ``
150150~~~~~~~~~~~~~~~~~~~~~
151151
152- To uninstall a package, type ``spack uninstall <package> ``. This will
153- completely remove the directory in which the package was installed.
152+ To uninstall a package, type ``spack uninstall <package> ``. This will ask the user for
153+ confirmation, and in case will completely remove the directory in which the package was installed.
154154
155155.. code-block :: sh
156156
157157 spack uninstall mpich
158158
159159 If there are still installed packages that depend on the package to be
160- uninstalled, spack will refuse to uninstall it. You can override this
161- behavior with ``spack uninstall -f <package> ``, but you risk breaking
162- other installed packages. In general, it is safer to remove dependent
163- packages *before * removing their dependencies.
160+ uninstalled, spack will refuse to uninstall it.
164161
165- A line like ``spack uninstall mpich `` may be ambiguous, if multiple
166- ``mpich `` configurations are installed. For example, if both
162+ To uninstall a package and every package that depends on it, you may give the
163+ `--dependents ` option.
164+
165+ .. code-block :: sh
166+
167+ spack uninstall --dependents mpich
168+
169+ will display a list of all the packages that depends on `mpich ` and, upon confirmation,
170+ will uninstall them in the right order.
171+
172+ A line like
173+
174+ .. code-block :: sh
175+
176+ spack uninstall mpich
177+
178+ may be ambiguous, if multiple ``mpich `` configurations are installed. For example, if both
167179``mpich@3.0.2 `` and ``mpich@3.1 `` are installed, ``mpich `` could refer
168180to either one. Because it cannot determine which one to uninstall,
169- Spack will ask you to provide a version number to remove the
170- ambiguity. As an example, ``spack uninstall mpich@3.1 `` is
171- unambiguous in this scenario.
181+ Spack will ask you either to provide a version number to remove the
182+ ambiguity or use the ``--all `` option to uninstall all of the matching packages.
183+
184+ You may force uninstall a package with the `--force ` option
185+
186+ .. code-block :: sh
187+
188+ spack uninstall --force mpich
189+
190+ but you risk breaking other installed packages. In general, it is safer to remove dependent
191+ packages *before * removing their dependencies or use the `--dependents ` option.
172192
173193
174194Seeing installed packages
@@ -352,25 +372,32 @@ how this is done is in :ref:`sec-specs`.
352372``spack compiler add ``
353373~~~~~~~~~~~~~~~~~~~~~~~
354374
375+ An alias for ``spack compiler find ``.
376+
377+ .. _spack-compiler-find :
378+
379+ ``spack compiler find ``
380+ ~~~~~~~~~~~~~~~~~~~~~~~
381+
355382If you do not see a compiler in this list, but you want to use it with
356- Spack, you can simply run ``spack compiler add `` with the path to
383+ Spack, you can simply run ``spack compiler find `` with the path to
357384where the compiler is installed. For example::
358385
359- $ spack compiler add /usr/local/tools/ic-13.0.079
360- ==> Added 1 new compiler to /Users/gamblin2/.spackconfig
386+ $ spack compiler find /usr/local/tools/ic-13.0.079
387+ ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml
361388 intel@13.0.079
362389
363- Or you can run ``spack compiler add `` with no arguments to force
390+ Or you can run ``spack compiler find `` with no arguments to force
364391auto-detection. This is useful if you do not know where compilers are
365392installed, but you know that new compilers have been added to your
366393``PATH ``. For example, using dotkit, you might do this::
367394
368395 $ module load gcc-4.9.0
369- $ spack compiler add
370- ==> Added 1 new compiler to /Users/gamblin2/.spackconfig
396+ $ spack compiler find
397+ ==> Added 1 new compiler to /Users/gamblin2/.spack/compilers.yaml
371398 gcc@4.9.0
372399
373- This loads the environment module for gcc-4.9.0 to get it into the
400+ This loads the environment module for gcc-4.9.0 to add it to
374401``PATH ``, and then it adds the compiler to Spack.
375402
376403.. _spack-compiler-info :
@@ -398,27 +425,34 @@ Manual compiler configuration
398425~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
399426
400427If auto-detection fails, you can manually configure a compiler by
401- editing your ``~/.spackconfig `` file. You can do this by running
402- ``spack config edit ``, which will open the file in your ``$EDITOR ``.
428+ editing your ``~/.spack/compilers.yaml `` file. You can do this by running
429+ ``spack config edit compilers ``, which will open the file in your ``$EDITOR ``.
403430
404431Each compiler configuration in the file looks like this::
405432
406433 ...
407- [compiler "intel@15.0.0"]
408- cc = /usr/local/bin/icc-15.0.024-beta
409- cxx = /usr/local/bin/icpc-15.0.024-beta
410- f77 = /usr/local/bin/ifort-15.0.024-beta
411- fc = /usr/local/bin/ifort-15.0.024-beta
412- ...
434+ chaos_5_x86_64_ib:
435+ ...
436+ intel@15.0.0:
437+ cc: /usr/local/bin/icc-15.0.024-beta
438+ cxx: /usr/local/bin/icpc-15.0.024-beta
439+ f77: /usr/local/bin/ifort-15.0.024-beta
440+ fc: /usr/local/bin/ifort-15.0.024-beta
441+ ...
442+
443+ The chaos_5_x86_64_ib string is an architecture string, and multiple
444+ compilers can be listed underneath an architecture. The architecture
445+ string may be replaced with the string 'all' to signify compilers that
446+ work on all architectures.
413447
414448For compilers, like ``clang ``, that do not support Fortran, put
415449``None `` for ``f77 `` and ``fc ``::
416450
417- [compiler " clang@3.3svn"]
418- cc = /usr/bin/clang
419- cxx = /usr/bin/clang++
420- f77 = None
421- fc = None
451+ clang@3.3svn:
452+ cc: /usr/bin/clang
453+ cxx: /usr/bin/clang++
454+ f77: None
455+ fc: None
422456
423457Once you save the file, the configured compilers will show up in the
424458list displayed by ``spack compilers ``.
@@ -767,6 +801,39 @@ Environment modules
767801Spack provides some limited integration with environment module
768802systems to make it easier to use the packages it provides.
769803
804+
805+ Installing Environment Modules
806+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
807+
808+ In order to use Spack's generated environment modules, you must have
809+ installed the *Environment Modules * package. On many Linux
810+ distributions, this can be installed from the vendor's repository.
811+ For example: ```yum install environment-modules ``
812+ (Fedora/RHEL/CentOS). If your Linux distribution does not have
813+ Environment Modules, you can get it with Spack:
814+
815+ 1. Install with::
816+
817+ .. code-block :: sh
818+
819+ spack install environment-modules
820+
821+ 2. Activate with::
822+
823+ Add the following two lines to your ``.bashrc `` profile (or similar):
824+
825+ .. code-block :: sh
826+
827+ MODULES_HOME=` spack location -i environment-modules`
828+ source ${MODULES_HOME} /Modules/init/bash
829+
830+ In case you use a Unix shell other than bash, substitute ``bash `` by
831+ the appropriate file in ``${MODULES_HOME}/Modules/init/ ``.
832+
833+
834+ Spack and Environment Modules
835+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
836+
770837You can enable shell support by sourcing some files in the
771838``/share/spack `` directory.
772839
@@ -896,7 +963,7 @@ Or, similarly with modules, you could type:
896963 $ spack load mpich %gcc@4.4.7
897964
898965 These commands will add appropriate directories to your ``PATH ``,
899- ``MANPATH ``, and ``LD_LIBRARY_PATH ``. When you no longer want to use
966+ ``MANPATH ``, `` CPATH ``, and ``LD_LIBRARY_PATH ``. When you no longer want to use
900967a package, you can type unload or unuse similarly:
901968
902969.. code-block :: sh
0 commit comments