Set TAU_MAKEFILE env variable (#2210)

* In order to use TAU module, we have to set TAU_MAKEFILE env variable.

* updated with suggestions from @citibeth
This commit is contained in:
Pramod Kumbhar 2016-11-02 21:05:47 +01:00 committed by Todd Gamblin
parent b304387308
commit b706da1109

View file

@ -24,7 +24,7 @@
############################################################################## ##############################################################################
from spack import * from spack import *
import os import os
import os.path import glob
from llnl.util.filesystem import join_path from llnl.util.filesystem import join_path
@ -146,3 +146,8 @@ def link_tau_arch_dirs(self):
dest = join_path(self.prefix, d) dest = join_path(self.prefix, d)
if os.path.isdir(src) and not os.path.exists(dest): if os.path.isdir(src) and not os.path.exists(dest):
os.symlink(join_path(subdir, d), dest) os.symlink(join_path(subdir, d), dest)
def setup_environment(self, spack_env, run_env):
pattern = join_path(self.prefix.lib, 'Makefile.*')
files = glob.glob(pattern)
run_env.set('TAU_MAKEFILE', files[0])