Spack CheatSheet

spack environment

# For fish
$ . spack/share/spack/setup-env.fish

spack commands

spack install -j (nproc) -vvvv  eccodes # spack 安装(或验证某包)并输出详细信息
spack find --path <packages> # 特定包的路径
spack clean -a # 完全清除,包括下载缓存

spack edits

Environment

def setup_build_environment(self, env):
        spec = self.spec

        # Please specify the location of python
        env.set('PYTHON_BIN_PATH', spec['python'].command.path)

def build(self, env): 
        # get build_dir
        # only works at build stage
        os.environ["RRTMGP_ROOT"] = os.getcwd()
        
comments powered by Disqus