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

CMake Refactor for LC Builds #2

Merged
merged 4 commits into from
Mar 3, 2023
Merged

CMake Refactor for LC Builds #2

merged 4 commits into from
Mar 3, 2023

Conversation

jamesETsmith
Copy link

@jamesETsmith jamesETsmith commented Mar 1, 2023

General

This PR refactors the cmake build system of LAGraph so we can link to LC builds of LucataGraphBLAS. Many of these changes are intended as temporary patches to help developers build LAGraph against LucataGraphBLAS until GraphBLAS#161 is resolved.

Details

The refactoring involved a couple of things:

  1. Removing support for dynamic libraries (this was the main problem, I proposed a more elegant solution in Turning off dynamic (or static) library target GraphBLAS/LAGraph#161)
  2. Turning off compilation of experimental/benchmarks when performing an LC build (this was due to stack frame size limits). See emusolutions/llvm-cilk#969. This is already fixed in the development versions of the toolchain and will become unnecessary after the next major toolchain release.
  3. Turning off all rpath flags when performing an LC build (because our compiler doesn't support rpath flags)

Using These Changes

My hope is that people who already have scripts to build LAGraph against LucataGraphBLAS should see no change in behavior. With that said we encourage devs to use the simplified approach made possible by this PR. See the first section of README.md for details. The quick version is below:

Linking against x86 LucataGraphBLAS

cmake -B build -DGRAPHBLAS_ROOT=/path/to/LucataGraphBLAS/build/install
cmake --build build --parallel 16

Linking against LC LucataGraphBLAS

If you want to compile with the Lucata toolchain (i.e. emu-cc.sh) then you MUST point cmake to an LC build of LucataGraphBLAS AND tell cmake to use emu-cc.sh as your compilers. For example:

cmake -B build_lc -DGRAPHBLAS_ROOT=/path/to/LucataGraphBLAS/build_lc/install \
    -DCMAKE_C_COMPILER=/tools/lucata/bin/emu-cc.sh \
    -DCMAKE_CXX_COMPILER=/tools/lucata/bin/emu-cc.sh
cmake --build build_lc --parallel 16

@jamesETsmith jamesETsmith added bug Something isn't working enhancement New feature or request labels Mar 1, 2023
@jamesETsmith jamesETsmith self-assigned this Mar 1, 2023
@jamesETsmith
Copy link
Author

@moonwatcher let me know if you think this needs more documentation. I added more defaults to our build system so users should only have to specify 1-3 cmake args making build scripts unnecessary (IMHO).

CMakeLists.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link

@mcordery mcordery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok, just one spelling thing and something that looks like a duplication

@jamesETsmith jamesETsmith merged commit a86711e into lgb_dev Mar 3, 2023
@jamesETsmith jamesETsmith deleted the cmake_refactor branch March 3, 2023 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants