2021年6月25日金曜日

Compile spack packages for generic X86_64

 It seems that Spack automatically generates very optimized binaries (probably with something like gcc -march=native).

This is usually a good thing, but if a cluster consists of several generations of CPUs, this would cause a problem. In my case, the front node is newer than compute nodes, and the spack modules die on compute nodes.

To avoid this, you may want to add the following in ./etc/spack/defaults/packages.yaml.

Then the compiled binaries are for generic x86_64.

packages:
  all:
    target: [x86_64]

Appended on 30/July/2021
It should be better to have a user level configuration rather than changing the global file 
(the global config file will be overwritten with git pull or you will be complained).
$ cat ~/.spack/packages.yaml
packages:
  all:
    target: [x86_64]
https://spack.readthedocs.io/en/latest/configuration.html

0 件のコメント:

コメントを投稿