blob: c6017985977194d359fe07045d1b64ac851d725d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
from spack import *
class Lustre(Package):
"""Lustre is a type of parallel distributed file system,
generally used for large-scale cluster computing."""
homepage = 'http://lustre.org/'
has_code = False
executables = [r'^lfs$']
version('2.12')
@classmethod
def determine_version(cls, exe):
output = Executable(exe)('--version', output=str, error=str)
match = re.search(r'lfs (\d\S*)', output)
return match.group(1) if match else None
# Lustre is filesystem and needs to be installed on system.
# To have it as external package in SPACK, follow below:
# config file packages.yaml needs to be adjusted:
#
# packages:
# lustre:
# buildable: False
# externals:
# - spec: lustre@2.12
# prefix: /usr (Usual Lustre library path)
def install(self, spec, prefix):
raise InstallError(
self.spec.format('{name} is not installable, you need to specify '
'it as an external package in packages.yaml'))
|