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

Improve GOMC Build Process and Related Documentation #492

Open
LSchwiebert opened this issue Apr 28, 2023 · 2 comments · May be fixed by #507
Open

Improve GOMC Build Process and Related Documentation #492

LSchwiebert opened this issue Apr 28, 2023 · 2 comments · May be fixed by #507
Assignees

Comments

@LSchwiebert
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

No. Things work correctly, but resolving this issue would upgrade the build process to generate more efficient code, make alternate builds easier to achieve, and address some minor non-functional issues.

Describe the solution you'd like

Updating the CMake implementation and some documentation.

Describe alternatives you've considered

None.

Additional context

I created a branch, called build-issues, that incorporates all patches for this. Here is a summary of what has been done:

  1. The Readme.md file has been changed to add DOI's for the references, clarify some of the explanation, and update the information that has changed with recent releases.
  2. Code in the lib folder that is no longer being used is no longer compiled.
  3. Rename the Difference() function on the GPU to Difference3() so we can compile with CUDA 12.
  4. Copyright notices are added to some 3rd party files that didn't have their copyright notices. Usually the header file did but not the source file or vice versa.
  5. Copyright notices are added to a few GOMC source files that were missing them.
  6. Update the CMake build process to
    a. Add a -t flag to build with clang-tidy. Should be run before submitting code.
    b. Add a -a flag to build with address sanitizer. More convenient for run-time dynamic analysis of illegal memory accesses.
    c. Update the error message that is printed if an invalid option is used.
    d. Set optimization flags for compiling with the Intel or Gnu compilers. Can turn off the optimizations with the -n flag.
    e. Add support for the new Intel compiler based on LLVM.
    f. Better error handling when incompatible options, like using the Intel compiler with address sanitizer, are specified.
@LSchwiebert
Copy link
Collaborator Author

There are a few outstanding issues with the code in the build-issues branch.

  1. It has been tested with only Intel and GNU compilers. Needs to be tested with Clang, MSVC, or whatever other compilers we want to support.
  2. CMake doesn't seem to support the use of nvcc link-time optimization with setting multiple CUDA architectures. The only current work-around is to specify all the --gencode and code options explicitly, which requires manual updating for new architectures, etc.
  3. The C++ compiler optimizations aren't being passed to the nvcc compiler to optimize the C++ compilation after nvcc processes the code. There should be some way to get -Xcompiler=<C++ flags>. This was tested with CMake 3.21, so this might be fixed in a later CMake version.

@LSchwiebert
Copy link
Collaborator Author

I tested it with Clang on Linux and it is working now.

@LSchwiebert LSchwiebert linked a pull request Aug 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant