Skip to content

Commit

Permalink
restore default install prefix for need scalapack
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 9, 2024
1 parent 2e315ad commit ed497d9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ env:
CTEST_NO_TESTS_ACTION: error
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 0
CMAKE_INSTALL_PREFIX: ~/libs
CMAKE_PREFIX_PATH: ~/libs

on:
push:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: ci_build

env:
CMAKE_GENERATOR: Ninja
CTEST_NO_TESTS_ACTION: error
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 0
CMAKE_INSTALL_PREFIX: ~/libs
CMAKE_PREFIX_PATH: ~/libs

on:
push:
Expand All @@ -21,10 +24,10 @@ jobs:
- name: Install prereqs
run: |
sudo apt update
sudo apt install --no-install-recommends ninja-build libopenmpi-dev openmpi-bin
sudo apt install --no-install-recommends libopenmpi-dev openmpi-bin
- name: configure
run: cmake --preset default --install-prefix=${{ runner.temp }}
run: cmake --preset default

- name: build, test release
run: cmake --workflow --preset default
Expand All @@ -33,7 +36,7 @@ jobs:

# builds fine on local machine
# - name: configure example
# run: cmake -S example -B example/build -DCMAKE_PREFIX_PATH:PATH=${{ runner.temp }} -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
# run: cmake -S example -B example/build -DBUILD_SHARED_LIBS:BOOL=${{ matrix.shared }}
# - name: build example
# run: cmake --build example/build
# - name: test example
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/oneapi-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ env:
FC: ifx
CMAKE_BUILD_TYPE: Release
CMAKE_BUILD_PARALLEL_LEVEL: 4
CMAKE_INSTALL_PREFIX: ~/libs
CMAKE_PREFIX_PATH: ~/libs

on:
push:
Expand Down Expand Up @@ -62,7 +64,6 @@ jobs:
run: >-
cmake --preset default
-Dintsize64=${{ matrix.int64 }}
-DCMAKE_INSTALL_PREFIX=${{ runner.temp }}
- name: print config log CMake
run: cat build/CMakeFiles/CMakeConfigureLog.yaml
Expand All @@ -82,7 +83,6 @@ jobs:
cmake
-S example
-B example/build
-DCMAKE_PREFIX_PATH=${{ runner.temp }}
- name: print config log
if: ${{ failure() }}
Expand Down
8 changes: 1 addition & 7 deletions Readme_oneapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
We require
[oneMKL >= 2021.3](https://www.intel.com/content/www/us/en/docs/onemkl/developer-guide-linux/2023-2/cmake-config-for-onemkl.html).

We recommend using Ninja generator with oneAPI (and any other) compiler:

```sh
cmake -G Ninja -B build
```

Do not try to build LAPACK and ScaLAPACK with oneAPI, the build will fail--use the oneMKL libraries that provide LAPACK and SCALAPACK.

## Linux
Expand All @@ -23,7 +17,7 @@ If the oneAPI compiler is not found by CMake, try hinting its location like:
export CC=$CMPLR_ROOT/bin/icx
export FC=$CMPLR_ROOT/bin/ifx

cmake -G Ninja -B build
cmake -B build
```

## Windows
Expand Down
7 changes: 6 additions & 1 deletion options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if(CMAKE_VERSION VERSION_LESS 3.21)
get_property(not_top DIRECTORY PROPERTY PARENT_DIRECTORY)
if(NOT not_top)
set(${PROJECT_NAME}_IS_TOP_LEVEL true)
endif()
endif()
endif()

option(${PROJECT_NAME}_BUILD_TESTING "Build tests" ${${PROJECT_NAME}_IS_TOP_LEVEL})
Expand Down Expand Up @@ -57,3 +57,8 @@ option(CMAKE_TLS_VERIFY "Verify TLS certificates" ON)
set_property(DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED true)

set(FETCHCONTENT_UPDATES_DISCONNECTED true)

# this is for convenience of those needing scalapaack, lapack built
if(${${PROJECT_NAME}_IS_TOP_LEVEL} AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${PROJECT_BINARY_DIR}/local")
endif()

0 comments on commit ed497d9

Please sign in to comment.