question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReFrame 3.3 and above broke support for Lmod < 8.2

See original GitHub issue

When using the latest revision of reframe OR v3.3 every test results in:

------------------------------------------------------------------------------
FAILURE INFO for HelloWorldTestSerial_cpp_dynamic
  * Test Description: C++ Hello World Serial Dynamic
  * System partition: ubelix:gpu
  * Environment: foss
  * Stage directory: ~/ReFrame/stage/ubelix/gpu/foss/HelloWorldTestSerial_cpp_dynamic
  * Node list: None
  * Job type: batch job (id=None)
  * Dependencies (conceptual): []
  * Dependencies (actual): []
  * Maintainers: ['VH', 'EK']
  * Failing phase: compile
  * Rerun with '-n HelloWorldTestSerial_cpp_dynamic -p foss --system ubelix:gpu'
  * Reason: name error: name 'os' is not defined
Traceback (most recent call last):
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/frontend/executors/__init__.py", line 250, in _safe_call
    return fn(*args, **kwargs)
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/pipeline.py", line 110, in _fn
    func(obj, *args, **kwargs)
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/pipeline.py", line 124, in _wrapped
    return fn(*args, **kwargs)
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/pipeline.py", line 1224, in compile
    trap_errors=True
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/schedulers/__init__.py", line 364, in prepare
    builder.write(runtime.emit_loadenv_commands(*environs))
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/runtime.py", line 235, in emit_loadenv_commands
    _, commands = loadenv(*environs)
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/runtime.py", line 216, in loadenv
    load_seq = modules_system.load_module(**mod, force=True)
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/modules.py", line 238, in load_module
    ret.append((m, self._load_module(m, force, collection)))
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/modules.py", line 252, in _load_module
    conflict_list = self._backend.conflicted_modules(module)
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/modules.py", line 850, in conflicted_modules
    output = self.execute('show', str(module))
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/modules.py", line 411, in execute
    exec_output = self._execute(cmd, *args)
  File "/gpfs/homefs/id/id-svcrsitsm_conn/tmp/reframe/reframe/core/modules.py", line 743, in _execute
    exec(completed.stdout, {}, namespace)
  File "<string>", line 1, in <module>
NameError: name 'os' is not defined

I build ReFrame using:

git clone https://github.com/eth-cscs/reframe.git
cd reframe
./bootstrap.sh

and tried running: ./bin/reframe -v -c ../prgenv/ -n HelloWorldTestSerial_cpp_dynamic -r -C ../settings.py where the test cases has import os:

head ../prgenv/helloworld.py
from datetime import datetime
import os
import reframe as rfm
import reframe.utility.sanity as sn


class HelloWorldBaseTest(rfm.RegressionTest):
    def __init__(self, variant, lang, linkage):
        self.linkage = linkage

I get the same effect when I rebuild as follow and rerun:

git checkout v3.3
rm -rf external/*
./bootstrap.sh

BUT if I go back to v3.2 with the same procedure, the test runs fine.

In my configuration this is using the system python, which seems to work fine with the os package:

$ head -n 1 ./bin/reframe
#!/usr/bin/env python3
$ /usr/bin/env python3
Python 3.6.8 (default, Apr  2 2020, 13:34:55)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.isdir('~')
True

In my defined environments:foss and intel, both results to the system python as above. Is there something I am missing?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mand35commented, Dec 10, 2020

@vkarak, yes, we are using lmod.

0reactions
mand35commented, Dec 11, 2020

Thanks a lot. Let me know if I can do something for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReFrame sprint 20.19 Milestone · GitHub
ReFrame sprint 20.19 Milestone · reframe-hpc/reframe. ... ReFrame 3.3 and above broke support for Lmod < 8.2 bug prio: important.
Read more >
Test API Reference — ReFrame 3.12.0 documentation
Test API Reference¶. This page provides a reference guide of the ReFrame API for writing regression tests covering all the relevant details.
Read more >
1777262 – Lmod upgrade to version 8.2 - Red Hat Bugzilla
Lmod -8.2.7-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this...
Read more >
ARCHER2 software environment - GitHub Pages
ARCHER2 software modules use the Lmod system to provide access to different software and versions on the system. The modules and versions available...
Read more >
Substance Use Disorder Treatment for People With Co ...
18 and older with any mental illness and co-occurring SUD received no treatment at all in 2018. About 41 percent received mental health...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found