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

Issue with CMake when cuDecomp is used a subdirectory #25

Closed
ASKabalan opened this issue Mar 2, 2024 · 4 comments
Closed

Issue with CMake when cuDecomp is used a subdirectory #25

ASKabalan opened this issue Mar 2, 2024 · 4 comments

Comments

@ASKabalan
Copy link

First of all, thank you very much for adding a CMake build system in #15 .

I would like to point out that in your CMakeLists.txt you set the compilers name (nvc++) as the CXX compiler, while this works well when cuDecomp is the top project, it fails for us when we add cuDecomp as subdirectory with this error

"nvc++ " is not a full path and was not found in the PATH.

All you have to do is replace this code

# Use NVHPC compilers by default
set(CMAKE_CXX_COMPILER "nvc++")
set(CMAKE_Fortran_COMPILER "nvfortran")

# Locate and use NVHPC CMake configuration
find_program(NVHPC_CXX_BIN "nvc++")

With this one

# find NVHPC compilers
find_program(NVHPC_CXX_BIN "nvc++")
find_program(NVHPC_Fortran_BIN "nvfortran")
# Use NVHPC compilers by default
set(CMAKE_CXX_COMPILER ${NVHPC_CXX_BIN})
set(CMAKE_Fortran_COMPILER ${NVHPC_Fortran_BIN})

I would be happy to make PR if you want.

Thank you.

@romerojosh
Copy link
Collaborator

Hi @ASKabalan, thanks for reporting the issue and the suggestion. I've added this in #26 if you want to give it a try. Let me know if it works for your use case and I will merge the change.

By the way, I see this is part of a big PR to update jaxDecomp (DifferentiableUniverseInitiative/jaxDecomp#7). I am planning to cut a new release of cuDecomp soon so do let me know if there are any other changes that you'd like to be included before I make the release.

@ASKabalan
Copy link
Author

Everything is great on our end, I have some debugging to do but the PR should be ready to merge.
If I can make a request, it would be to just upgrade the CMake CXX compiler to C++20
It seems that I can use C++20 myself while your CMake is in C++14, but It will probably be better if we have the same standard.

@romerojosh
Copy link
Collaborator

Good to hear the change works for you! I'd prefer not to update the C++ standard for cuDecomp unless there is change to this codebase that requires it.

@ASKabalan
Copy link
Author

Good to hear the change works for you! I'd prefer not to update the C++ standard for cuDecomp unless there is change to this codebase that requires it.

Yes it makes sense,
I can link with a c++14 built Library anyway.

Thank you.

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

No branches or pull requests

2 participants