cniel-ud / BOWaves

0 stars 0 forks source link

Error module object: os.unsetenv('OMP_THREAD_LIMIT') doesn't work #1

Open IsabelCanoA opened 1 year ago

IsabelCanoA commented 1 year ago

In BOWaves/scripts/run_sikmeans.py code, there is a lineos.unsetenv('OMP_THREAD_LIMIT'). However, this line of code throws an error module 'os' has no attribute 'unsetenv'. As a result, the code cannot be executed correctly in my local environment.

I suggest replacing the line os.unsetenv('OMP_THREAD_LIMIT') with os.environ.pop('OMP_THREAD_LIMIT', None). It's another way to remove an environment variable in python and could help the code runs smoothly in different environments.

Environment Used:

Python Version: I tested it using python version 3.8.3 and 3.11.4 Operating System: Microsoft Windows 11 Home Single Language [10.0.22621]

Thanks for your attention and your contribution to this project!

chmendoza commented 12 months ago

@IsabelCanoA , please open a PR to merge your suggested change and add me as a reviewer. I think we also need to move that line before numpy is imported.