Skip to content

Commit da4e7fe

Browse files
authored
large index ci (#117)
* large index ci
1 parent 1983e44 commit da4e7fe

4 files changed

Lines changed: 20 additions & 6 deletions

File tree

‎.github/workflows/continuous.yml‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
####################
1616

1717
Unix:
18-
name: ${{ matrix.name }} (${{ matrix.config }})
18+
name: ${{ matrix.name }} (${{ matrix.config }}, large_index=${{ matrix.large_index }})
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
fail-fast: false
2222
matrix:
2323
os: [ubuntu-latest, macos-latest]
2424
config: [Debug, Release]
25+
large_index: [ON, OFF]
2526
include:
2627
- os: macos-latest
2728
name: macOS
@@ -57,8 +58,8 @@ jobs:
5758
uses: actions/cache@v5
5859
with:
5960
path: ${{ env.CACHE_PATH }}
60-
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
61-
restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache
61+
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache-${{ github.sha }}
62+
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache
6263

6364
- name: Prepare ccache
6465
run: |
@@ -71,6 +72,7 @@ jobs:
7172
cd build
7273
cmake .. \
7374
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
75+
-DPOLYSOLVE_LARGE_INDEX=${{ matrix.large_index }} \
7476
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
7577
7678
- name: Build
@@ -84,13 +86,15 @@ jobs:
8486
####################
8587

8688
Windows:
89+
name: Windows (${{ matrix.config }}, large_index=${{ matrix.large_index }})
8790
runs-on: windows-latest
8891
env:
8992
SCCACHE_IDLE_TIMEOUT: "12000"
9093
strategy:
9194
fail-fast: false
9295
matrix:
9396
config: [Debug, Release]
97+
large_index: [ON, OFF]
9498
steps:
9599
- name: Checkout repository
96100
uses: actions/checkout@v6
@@ -106,8 +110,8 @@ jobs:
106110
uses: actions/cache@v5
107111
with:
108112
path: ${{ env.appdata }}\Mozilla\sccache
109-
key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
110-
restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache
113+
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache-${{ github.sha }}
114+
restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache
111115

112116
- name: Prepare sccache
113117
run: |
@@ -130,6 +134,7 @@ jobs:
130134
-DCMAKE_C_COMPILER=cl.exe ^
131135
-DCMAKE_CXX_COMPILER=cl.exe ^
132136
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
137+
-DPOLYSOLVE_LARGE_INDEX=${{ matrix.large_index }} ^
133138
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
134139
-B build ^
135140
-S .

‎src/polysolve/linear/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if(POLYSOLVE_WITH_CUDA)
2828
)
2929
endif()
3030

31-
if(POLYSOLVE_WITH_MPI)
31+
if(POLYSOLVE_WITH_MPI AND NOT POLYSOLVE_LARGE_INDEX)
3232
list(APPEND SOURCES
3333
CPUHybridSolver.cpp
3434
CPUHybridSolver.hpp

‎src/polysolve/linear/SaddlePointSolver.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ namespace polysolve::linear
5757
conv_tol_ = 1e-8;
5858
max_iter_ = 50;
5959

60+
#ifdef POLYSOLVE_LARGE_INDEX
61+
asymmetric_solver_name_ = "Eigen::SparseLU";
62+
symmetric_solver_name_ = "Eigen::SimplicialLDLT";
63+
#else
6064
asymmetric_solver_name_ = "Eigen::GMRES";
6165
symmetric_solver_name_ = "Eigen::GMRES";
66+
#endif
6267

6368
asymmetric_solver_params_ = {"tolerance", 1e-4};
6469
symmetric_solver_params_ = {"tolerance", 1e-4};

‎src/polysolve/linear/Solver.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,10 @@ namespace polysolve::linear
548548
"Eigen::CholmodSimplicialLDLT",
549549
#endif
550550
#ifdef POLYSOLVE_WITH_UMFPACK
551+
#ifndef POLYSOLVE_LARGE_INDEX
551552
"Eigen::UmfPackLU",
552553
#endif
554+
#endif
553555
#ifdef POLYSOLVE_WITH_SUPERLU
554556
"Eigen::SuperLU",
555557
#endif
@@ -594,10 +596,12 @@ namespace polysolve::linear
594596
"Eigen::DGMRES",
595597
#endif
596598
#endif
599+
#ifndef POLYSOLVE_LARGE_INDEX
597600
"Eigen::ConjugateGradient",
598601
"Eigen::BiCGSTAB",
599602
"Eigen::GMRES",
600603
"Eigen::MINRES",
604+
#endif
601605
"Eigen::PartialPivLU",
602606
"Eigen::FullPivLU",
603607
"Eigen::HouseholderQR",

0 commit comments

Comments
 (0)