init: initialize spack.store lazily
- spack.store was previously initialized at the spack.store module level, but this means the store has to be initialized on every spack call. - this moves the state in spack.store to a singleton so that the store is only initialized when needed.
This commit is contained in:
@@ -193,15 +193,16 @@ def set_CrayLoginNode_cmakeOptions(self, spec, cmakeOptions):
|
||||
# the login node components with this spack invocation. We
|
||||
# need these paths to be the ones created in the CNL
|
||||
# spack invocation.
|
||||
be_cbtf = spack.store.db.query_one('cbtf arch=cray-CNL-haswell')
|
||||
be_cbtfk = spack.store.db.query_one('cbtf-krell arch=cray-CNL-haswell')
|
||||
be_papi = spack.store.db.query_one('papi arch=cray-CNL-haswell')
|
||||
be_boost = spack.store.db.query_one('boost arch=cray-CNL-haswell')
|
||||
be_mont = spack.store.db.query_one('libmonitor arch=cray-CNL-haswell')
|
||||
be_unw = spack.store.db.query_one('libunwind arch=cray-CNL-haswell')
|
||||
be_xer = spack.store.db.query_one('xerces-c arch=cray-CNL-haswell')
|
||||
be_dyn = spack.store.db.query_one('dyninst arch=cray-CNL-haswell')
|
||||
be_mrnet = spack.store.db.query_one('mrnet arch=cray-CNL-haswell')
|
||||
store = spack.store.store()
|
||||
be_cbtf = store.db.query_one('cbtf arch=cray-CNL-haswell')
|
||||
be_cbtfk = store.db.query_one('cbtf-krell arch=cray-CNL-haswell')
|
||||
be_papi = store.db.query_one('papi arch=cray-CNL-haswell')
|
||||
be_boost = store.db.query_one('boost arch=cray-CNL-haswell')
|
||||
be_mont = store.db.query_one('libmonitor arch=cray-CNL-haswell')
|
||||
be_unw = store.db.query_one('libunwind arch=cray-CNL-haswell')
|
||||
be_xer = store.db.query_one('xerces-c arch=cray-CNL-haswell')
|
||||
be_dyn = store.db.query_one('dyninst arch=cray-CNL-haswell')
|
||||
be_mrnet = store.db.query_one('mrnet arch=cray-CNL-haswell')
|
||||
|
||||
CrayLoginNodeOptions.append('-DCN_RUNTIME_PLATFORM=%s'
|
||||
% rt_platform)
|
||||
|
Reference in New Issue
Block a user