Skip to content

find_modules can sometimes find the same module twice #2296

@akesandgren

Description

@akesandgren

This lmod output shows the situation when it happens:

b-an01 [~]$ ml load foss/2020b
b-an01 [~]$ ml avail SciPy-bundle

------------------------------------ /home/a/ake/easybuild/modules/all/MPI/GCC/10.2.0/OpenMPI/4.0.5 -------------------------------------
   SciPy-bundle/2020.11-Python-2.7.18

------------------------------------------ /hpc2n/eb/modules/all/MPI/GCC/10.2.0/OpenMPI/4.0.5 -------------------------------------------
   SciPy-bundle/2020.11-Python-2.7.18    SciPy-bundle/2020.11 (D)

I.e. I have both the system installed SciPy-bundle/2020.11-Python-2.7.18 and one in my own tree.

The end result is that I get:

ESC[33m/hpc2n/eb/software/ReFrame/3.9.1/bin/reframe: skipping test file '/afs/hpc2n.umu.se/home/a/ake/Projects/git-repos/reframe/hpc2n-checks/apps/python/numpy_check.py': name conflict error: test 'hpc2n_numpy_test___kebnekaise_bdw____foss_2020b____SciPy_bundle_2020_11_Python_2_7_18__' from '/afs/hpc2n.umu.se/home/a/ake/Projects/git-repos/reframe/hpc2n-checks/apps/python/numpy_check.py' is already defined in '/afs/hpc2n.umu.se/home/a/ake/Projects/git-repos/reframe/hpc2n-checks/apps/python/numpy_check.py' (rerun with '-v' for more information)ESC[0m
Traceback (most recent call last):
  File "/hpc2n/eb/software/ReFrame/3.9.1/lib/python3.8/site-packages/reframe/frontend/loader.py", line 236, in load_from_file
    return self.load_from_module(
  File "/hpc2n/eb/software/ReFrame/3.9.1/lib/python3.8/site-packages/reframe/frontend/loader.py", line 223, in load_from_module
    raise NameConflictError(
reframe.core.exceptions.NameConflictError: test 'hpc2n_numpy_test___kebnekaise_bdw____foss_2020b____SciPy_bundle_2020_11_Python_2_7_18__' from '/afs/hpc2n.umu.se/home/a/ake/Projects/git-repos/reframe/hpc2n-checks/apps/python/numpy_check.py' is already defined in '/afs/hpc2n.umu.se/home/a/ake/Projects/git-repos/reframe/hpc2n-checks/apps/python/numpy_check.py'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions