reframe-hpc / reframe

A powerful Python framework for writing and running portable regression tests and benchmarks for HPC systems.
https://reframe-hpc.readthedocs.org
BSD 3-Clause "New" or "Revised" License
224 stars 104 forks source link

Configuration option `purge_environment` not working in ReFrame 4.3.3 #3200

Closed gkaf89 closed 6 months ago

gkaf89 commented 6 months ago

We are using in our systems ReFrame 4.3.3, installed with EasyBuild 4.9.1 as a module. We set the purge_environment general configuration option to True to ensure that any modules loaded when ReFrame is launched are removed during the compilation and run phases. However, we noticed that modules remain loaded. This does not happen if we set the command line option --purge-env.

Is this known behavior?

Our relevant configuration options:

site_configuration = {                                                                                                                                        
    'general' : [                                                                                                                                             
        {                                                                                                                                                     
            'use_login_shell': True,                                                                                                                          
            'purge_environment': True,                                                                                                                        
        },                                                                                                                                                    
    ],                                                                                                                                                        
}
vkarak commented 6 months ago

Hi @gkaf89, which modules system do you use? Also what's the output of reframe -C path/to/your/config.py --show-config=general/0/purge_environment?

vkarak commented 6 months ago

Ok, I was able to confirm the bug:

$ reframe -C /path/to/config.py --show-config=general/0/purge_environment
false
$ reframe -C /path/to/config.py --purge-env --show-config=general/0/purge_environment
true