scr: require dtcmp, switch from /tmp to /dev/shm (#22073)
This commit is contained in:
parent
8395df6b5b
commit
d6fbf8ad57
@ -7,6 +7,9 @@
|
||||
|
||||
import os
|
||||
|
||||
# to get system platform type
|
||||
import sys
|
||||
|
||||
|
||||
class Scr(CMakePackage):
|
||||
"""SCR caches checkpoint data in storage on the compute nodes of a
|
||||
@ -43,10 +46,15 @@ class Scr(CMakePackage):
|
||||
depends_on('filo', when="@3:")
|
||||
depends_on('spath', when="@3:")
|
||||
|
||||
# DTCMP is an optional dependency up until 3.x
|
||||
variant('dtcmp', default=True,
|
||||
description="Build with DTCMP. "
|
||||
"Necessary to enable user directory naming at runtime")
|
||||
depends_on('dtcmp', when="+dtcmp")
|
||||
depends_on('dtcmp', when="@:2.999 +dtcmp")
|
||||
|
||||
# DTCMP is a required dependency with 3.x and later
|
||||
conflicts('~dtcmp', when="@3:", msg="<SCR> DTCMP required for versions >=3")
|
||||
depends_on('dtcmp', when="@3:")
|
||||
|
||||
variant('libyogrt', default=True,
|
||||
description="Build SCR with libyogrt for get_time_remaining.")
|
||||
@ -83,9 +91,13 @@ class Scr(CMakePackage):
|
||||
multi=False,
|
||||
description='File locking style for SCR.')
|
||||
|
||||
variant('cache_base', default='/tmp',
|
||||
description='Compile time default location for checkpoint cache.')
|
||||
variant('cntl_base', default='/tmp',
|
||||
# The default cache and control directories should be placed in tmpfs if available.
|
||||
# On Linux, /dev/shm is a common tmpfs location. Other platforms, like macOS,
|
||||
# do not define a common tmpfs location, so /tmp is the next best option.
|
||||
platform_tmp_default = '/dev/shm' if sys.platform == 'linux' else '/tmp'
|
||||
variant('cache_base', default=platform_tmp_default,
|
||||
description='Compile time default location for cache directory.')
|
||||
variant('cntl_base', default=platform_tmp_default,
|
||||
description='Compile time default location for control directory.')
|
||||
|
||||
def get_abs_path_rel_prefix(self, path):
|
||||
|
Loading…
Reference in New Issue
Block a user