diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index d94039d0..2b34a70f 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -15,13 +15,14 @@ jobs: #################### Unix: - name: ${{ matrix.name }} (${{ matrix.config }}) + name: ${{ matrix.name }} (${{ matrix.config }}, large_index=${{ matrix.large_index }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] config: [Debug, Release] + large_index: [ON, OFF] include: - os: macos-latest name: macOS @@ -57,8 +58,8 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.CACHE_PATH }} - key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache + key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache - name: Prepare ccache run: | @@ -71,6 +72,7 @@ jobs: cd build cmake .. \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DPOLYSOLVE_LARGE_INDEX=${{ matrix.large_index }} \ -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ - name: Build @@ -84,6 +86,7 @@ jobs: #################### Windows: + name: Windows (${{ matrix.config }}, large_index=${{ matrix.large_index }}) runs-on: windows-latest env: SCCACHE_IDLE_TIMEOUT: "12000" @@ -91,6 +94,7 @@ jobs: fail-fast: false matrix: config: [Debug, Release] + large_index: [ON, OFF] steps: - name: Checkout repository uses: actions/checkout@v6 @@ -106,8 +110,8 @@ jobs: uses: actions/cache@v5 with: path: ${{ env.appdata }}\Mozilla\sccache - key: ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.config }}-cache + key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.large_index }}-cache - name: Prepare sccache run: | @@ -130,6 +134,7 @@ jobs: -DCMAKE_C_COMPILER=cl.exe ^ -DCMAKE_CXX_COMPILER=cl.exe ^ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^ + -DPOLYSOLVE_LARGE_INDEX=${{ matrix.large_index }} ^ -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^ -B build ^ -S . diff --git a/src/polysolve/linear/CMakeLists.txt b/src/polysolve/linear/CMakeLists.txt index 0430402b..03916f9d 100644 --- a/src/polysolve/linear/CMakeLists.txt +++ b/src/polysolve/linear/CMakeLists.txt @@ -28,7 +28,7 @@ if(POLYSOLVE_WITH_CUDA) ) endif() -if(POLYSOLVE_WITH_MPI) +if(POLYSOLVE_WITH_MPI AND NOT POLYSOLVE_LARGE_INDEX) list(APPEND SOURCES CPUHybridSolver.cpp CPUHybridSolver.hpp diff --git a/src/polysolve/linear/SaddlePointSolver.cpp b/src/polysolve/linear/SaddlePointSolver.cpp index 6d974b25..b900108d 100644 --- a/src/polysolve/linear/SaddlePointSolver.cpp +++ b/src/polysolve/linear/SaddlePointSolver.cpp @@ -57,8 +57,13 @@ namespace polysolve::linear conv_tol_ = 1e-8; max_iter_ = 50; +#ifdef POLYSOLVE_LARGE_INDEX + asymmetric_solver_name_ = "Eigen::SparseLU"; + symmetric_solver_name_ = "Eigen::SimplicialLDLT"; +#else asymmetric_solver_name_ = "Eigen::GMRES"; symmetric_solver_name_ = "Eigen::GMRES"; +#endif asymmetric_solver_params_ = {"tolerance", 1e-4}; symmetric_solver_params_ = {"tolerance", 1e-4}; diff --git a/src/polysolve/linear/Solver.cpp b/src/polysolve/linear/Solver.cpp index 9bb5070c..f112b702 100644 --- a/src/polysolve/linear/Solver.cpp +++ b/src/polysolve/linear/Solver.cpp @@ -548,8 +548,10 @@ namespace polysolve::linear "Eigen::CholmodSimplicialLDLT", #endif #ifdef POLYSOLVE_WITH_UMFPACK +#ifndef POLYSOLVE_LARGE_INDEX "Eigen::UmfPackLU", #endif +#endif #ifdef POLYSOLVE_WITH_SUPERLU "Eigen::SuperLU", #endif @@ -594,10 +596,12 @@ namespace polysolve::linear "Eigen::DGMRES", #endif #endif +#ifndef POLYSOLVE_LARGE_INDEX "Eigen::ConjugateGradient", "Eigen::BiCGSTAB", "Eigen::GMRES", "Eigen::MINRES", +#endif "Eigen::PartialPivLU", "Eigen::FullPivLU", "Eigen::HouseholderQR",