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

Investigate PyNomad with OpenMP enabled #132

Open
ctribes opened this issue Feb 10, 2023 · 1 comment
Open

Investigate PyNomad with OpenMP enabled #132

ctribes opened this issue Feb 10, 2023 · 1 comment
Assignees
Labels
fix Issue fixed

Comments

@ctribes
Copy link
Contributor

ctribes commented Feb 10, 2023

In version 4.2 and above, PyNomad building requested to disable OpenMP. Weird crashes was observed. Maybe related to Gil releasing.
Look into Pyx code. Test again on all platforms with version > 4.3.1.

@ctribes ctribes added the fix Issue fixed label Feb 10, 2023
@ctribes ctribes self-assigned this Feb 10, 2023
@ctribes
Copy link
Contributor Author

ctribes commented Feb 14, 2023

On version 4.3.1, building and run tests work fine with OpenMP. More tests are required before putting this as a default for next release.

To enable OpenMP (if available), the root CMakeLists.txt needs to be modified (see below the commented lines).

#
# Choose to build the Python interface
#
option(BUILD_INTERFACE_PYTHON "Option to build Python interface to Nomad" OFF)
if(BUILD_INTERFACE_PYTHON MATCHES ON)
#   if(OpenMP_FOUND)
#       message(STATUS "  Warning: Cannot build Python interface with OpenMP enabled")
#   else()
       find_package(Python 3.6 QUIET REQUIRED)
       message(CHECK_START "  Configuring build for Python interface")
       add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/interfaces/PyNomad)
       message(CHECK_PASS " done")
#   endif()
else()
   message(STATUS "  Python interface to Nomad NOT built")
endif()

The build directory AND $NOMAD_HOME/interfaces/PyNomad/[build,PyNomad.....so] need to be removed.

Run the config command again and build.

cmake -DBUILD_INTERFACE_PYTHON=ON -S . -B build/release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Issue fixed
Projects
None yet
Development

No branches or pull requests

1 participant