Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for OpenACC #416

Merged
merged 11 commits into from
Jun 30, 2022
1 change: 1 addition & 0 deletions packages/taucmdr/cf/software/libelf_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(self, sources, target_arch, target_os, compilers):
def configure(self, flags):
flags.extend(['--disable-debuginfod'])
cc = None
# Libelf's configure script requires CC to be a GNU compiler, so we have to set the environment variable before running the configure script
if 'CC' in os.environ :
cc = os.environ['CC']
zbeekman marked this conversation as resolved.
Show resolved Hide resolved
os.environ['CC'] = GNU.installation()[CC].unwrap().info.command
nchaimov marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 1 addition & 1 deletion packages/taucmdr/cf/software/scorep_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _get_flags(self):
flags = ['--enable-shared', '--without-otf2', '--without-opari2', '--without-cube',
'--without-gui', '--disable-gcc-plugin', '--disable-dependency-tracking']
if self.target_arch in (X86_64, IBM64, PPC64, PPC64LE):
suites = {host.INTEL: 'intel', host.IBM: 'ibm', host.PGI: 'pgi', host.NVHPC: 'nvhpc', host.GNU: 'gcc'}
suites = {host.INTEL: 'intel', host.IBM: 'ibm', host.PGI: 'pgi', host.GNU: 'gcc'}
suite = suites.get(self.compilers[host.CC].unwrap().info.family)
flags.append('--with-nocross-compiler-suite' + ('='+suite if suite else ''))
if self.use_mpi:
Expand Down
2 changes: 1 addition & 1 deletion packages/taucmdr/cf/software/tau_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def check_env_compat(cls):
"Unload the darshan module and try again.")
if os.environ.get('PE_ENV', '').lower() == 'cray':
raise ConfigurationError("TAU Commander cannot be used with Cray compilers. ",
"Replace PrgEnv-cray with PrgEnv-intel, PrgEnv-gnu, PrgEnv-nvhpc, or PrgEnv-pgi and try again.")
"Replace PrgEnv-cray with PrgEnv-intel, PrgEnv-gnu, PrgEnv-nvidia, or PrgEnv-pgi and try again.")

def uid_items(self):
uid_parts = [self.target_arch.name, self.target_os.name]
Expand Down
7 changes: 4 additions & 3 deletions packages/taucmdr/cli/commands/trial/tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import tempfile
from taucmdr import tests
from taucmdr.cf.platforms import HOST_ARCH, HOST_OS, DARWIN
from taucmdr.cf.compiler.host import CC
from taucmdr.cf.compiler.host import CC, NVHPC
from taucmdr.cli.commands.select import COMMAND as select_cmd
from taucmdr.cli.commands.trial.list import COMMAND as trial_list_cmd
from taucmdr.cli.commands.trial.create import COMMAND as trial_create_cmd
Expand Down Expand Up @@ -92,7 +92,8 @@ def test_heap_usage_memory_alloc_sample(self):
self.assertIn("Selected experiment 'targ1-app1-sample'", stdout)
self.assertFalse(stderr)
ccflags = ['-g']
if (not util.which('nvc')) :
# The NVHPC compilers do not accept the -no-pie option
if (not (util.which('nvc') and self.assertCompiler(CC) == util.which('nvc'))) :
zbeekman marked this conversation as resolved.
Show resolved Hide resolved
ccflags.append('-no-pie')
self.assertManagedBuild(0, CC, ccflags, 'matmult.c')
stdout, stderr = self.assertCommandReturnValue(0, trial_create_cmd, ['./a.out'])
Expand Down Expand Up @@ -280,4 +281,4 @@ def test_run_openacc(self):
self.assertManagedBuild(0, CC, ['-acc', '-g', '-o', 'jacobi'], 'jacobi.c')
stdout, stderr = self.assertCommandReturnValue(0, trial_create_cmd, [os.path.join(test_dir, 'jacobi')])
self.assertIn('Trial 0 produced 2 profile files', stdout)
self.assertFalse(stderr)
self.assertFalse(stderr)
4 changes: 2 additions & 2 deletions packages/taucmdr/cli/commands/trial/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_export_tau_profile(self):
export_file = expr['name'] + '.trial0.ppk'
self.assertTrue(os.path.exists(export_file))

@tests.skipIf(util.which('nvc'), "NVHPC compilers do not work with sqlite")
@tests.skipIf(util.which('nvc'), "NVHPC compilers do not work with sqlite (due to a compiler bug in NVHPC)")
zbeekman marked this conversation as resolved.
Show resolved Hide resolved
def test_export_sqlite_profile(self):
self.reset_project_storage(['--profile', 'sqlite', '--trace', 'none'])
util.mkdirp(os.getcwd())
Expand Down Expand Up @@ -82,7 +82,7 @@ def test_export_merged_profile(self):
self.assertTrue(os.path.exists(export_file))

@tests.skipUnlessHaveCompiler(MPI_CC)
@tests.skipIf(util.which('nvc'), "This test cannot be run with NVHPC compilers")
@tests.skipIf(util.which('nvc'), "This test cannot be run with NVHPC compilers (ScoreP cannot be configured with NVHPC compilers)")
def test_export_cubex(self):
self.reset_project_storage(['--mpi', '--profile', 'cubex', '--trace', 'none'])
expr = Project.selected().experiment()
Expand Down
1 change: 1 addition & 0 deletions packages/taucmdr/model/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ def compilers(self):
InstalledCompilerSet: Collection of installed compilers used by this target.
"""
if not self._compilers:
# We use the paths to the compilers as unique identifiers since the EIDs for the records may come from different tables, and so may not be unique
paths = []
nchaimov marked this conversation as resolved.
Show resolved Hide resolved
compilers = {}
for role in Knowledgebase.all_roles():
Expand Down
1 change: 0 additions & 1 deletion packages/taucmdr/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ def reset_project_storage(self, init_args=None):
prefix = PROJECT_STORAGE.prefix
except StorageError:
pass

PROJECT_STORAGE.destroy(ignore_errors=False)
try:
prefix = PROJECT_STORAGE.prefix
Expand Down