Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
public:usage:spack [2020/05/04 12:40] – [Managing Modules] keilingpublic:usage:spack [2022/08/01 10:52] – [Using Packages] keiling
Line 26: Line 26:
 </code> </code>
  
-<note warning>By default spack stores the temporary files under ''/tmp''. This is shared with all users on the cluster and should not be used for your spack installation. In order to change the directory spack uses for its temporary files you have to set the new directory in the ''config.yaml''. This can be done by the following commands.</note>+<note warning>By default spack stores the temporary files under ''/tmp''. This is shared with all users on the cluster and should not be used for your spack installation. **Spack files in ''/tmp'' will be deleted on a regular base within 30 minutes after creation**. In order to change the directory spack uses for its temporary files you have to set the new directory in the ''config.yaml''. This can be done by the following commands.</note>
  
 First open your ''config.yaml'' located under ''~/spack/etc/spack/defaults/'' then change  First open your ''config.yaml'' located under ''~/spack/etc/spack/defaults/'' then change 
Line 119: Line 119:
 </code> </code>
 ++++ ++++
-Further details how to create your own flavor of modules.yaml files can be found here: [[https://spack-tutorial.readthedocs.io/en/latest/tutorial_modules.html|Module files]]+Further details how to create your own flavor of modules.yaml can be found here: [[https://spack-tutorial.readthedocs.io/en/latest/tutorial_modules.html|Module files]]
  
 The last step is to apply your "modules.yaml" setting by using The last step is to apply your "modules.yaml" setting by using
Line 183: Line 183:
     operating_system: rhel7     operating_system: rhel7
     paths:     paths:
-      cc: /cluster/intel/compilers_and_libraries_2019.1.144/linux/bin/intel64/icc +      cc: /cluster/intel/2020.0/compilers_and_libraries_2020.0.166/linux/bin/intel64/icc 
-      cxx: /cluster/intel/compilers_and_libraries_2019.1.144/linux/bin/intel64/icpc +      cxx: /cluster/intel/2020.0/compilers_and_libraries_2020.0.166/linux/bin/intel64/icpc 
-      f77: /cluster/intel/compilers_and_libraries_2019.1.144/linux/bin/intel64/ifort +      f77: /cluster/intel/2020.0/compilers_and_libraries_2020.0.166/linux/bin/intel64/ifort 
-      fc: /cluster/intel/compilers_and_libraries_2019.1.144/linux/bin/intel64/ifort +      fc: /cluster/intel/2020.0/compilers_and_libraries_2020.0.166/linux/bin/intel64/ifort 
-    spec: intel@19.0.1.144+    spec: intel@19.1.0.166
     target: x86_64     target: x86_64
 </code> </code>
Line 200: Line 200:
  
 although a simple load is very useful in some cases it comes with some drawbacks, if there are more then one version of the package you want to load the load will fail, unless you specify exactly which of the packages you want to use. For more information see [[https://spack.readthedocs.io/en/latest/workflows.html#spack-generated-modules|Spack-Generated Modules]]. For better ways to assemble a consistent set of packages for building application programs see [[https://spack.readthedocs.io/en/latest/workflows.html#generated-load-scripts|Generated Load Scripts]] although a simple load is very useful in some cases it comes with some drawbacks, if there are more then one version of the package you want to load the load will fail, unless you specify exactly which of the packages you want to use. For more information see [[https://spack.readthedocs.io/en/latest/workflows.html#spack-generated-modules|Spack-Generated Modules]]. For better ways to assemble a consistent set of packages for building application programs see [[https://spack.readthedocs.io/en/latest/workflows.html#generated-load-scripts|Generated Load Scripts]]
 +
 +===== Update spack =====
 +In some cases you do not find with ''spack info <package>'' what you are looking for. Than you might want to update spack.
 +Here are some steps how to do so.
 +
 +<code|update spack>
 +1. cd ~/spack              # Change into your spack directory
 +2. git pull                # If an error appears see next box
 +3. update your config.yaml # See top of the page
 +</code>
 +
 +Following error appeared <code|git pull error>
 +error: Your local changes to the following files would be overwritten by merge:
 +        etc/spack/defaults/config.yaml
 +Please, commit your changes or stash them before you can merge.
 +Aborting
 +</code> during the ''git pull'' process
 +Here you can find a whole discussion about it [[https://stackoverflow.com/questions/15745045/how-do-i-resolve-git-saying-commit-your-changes-or-stash-them-before-you-can-me|Link]] and how to solve it.
 +
 +<code|On possible way to go if you do not care about your old stuff>
 +1. cd ~/spack              # Previous step like above
 +2. git pull                # Error appears
 +3. git stash save ""       # New step to deal with the error
 +4. git pull                # Redo it again
 +5. cd ~/spack/etc/spack/defaults/
 +6. Edit your 'config.yaml' # See at the top how to alter
 +</code>
 +
 +Now you should be able so see the lastest packages which spack provides.
  
 ===== Remove spack ===== ===== Remove spack =====
public/usage/spack.txt · Last modified: 2024/04/29 09:43 by keiling
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0