Skip to content

Commit

Permalink
v3.4 (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed May 11, 2024
1 parent 7717e0e commit aad3482
Show file tree
Hide file tree
Showing 448 changed files with 28,791 additions and 14,979 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/application_execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

***The application officially distributed requires AVX support. Please make sure your CPU supports AVX.***
***The application officially distributed requires AVX2 support. Please make sure your CPU supports AVX2.***

***If possible, please try to compile the application locally first to see if it executes.***

Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/dev-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
fi
go build Checker/updater.go
mkdir build && cd build
cmake -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_Fortran_COMPILER=${{ matrix.compiler.fortran }} -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DTEST_COVERAGE=${{ env.COVERAGE }} -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=$MT -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=${{ env.IOMP }} -DCMAKE_INSTALL_PREFIX=dist ..
cmake -DCMAKE_C_COMPILER=${{ matrix.compiler.c }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }} -DCMAKE_Fortran_COMPILER=${{ matrix.compiler.fortran }} -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DTEST_COVERAGE=${{ env.COVERAGE }} -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=$MT -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=${{ env.IOMP }} -DCMAKE_INSTALL_PREFIX=dist ..
make install -j"$(nproc)" && make package
- name: Pack
run: |
Expand Down Expand Up @@ -124,12 +124,14 @@ jobs:
for SRC in `find . | egrep '\.o'`; do gcov -n $SRC > /dev/null; done
- name: Report
if: env.COVERAGE == 'ON'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
gcov: true
plugin: gcov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
macos-dev:
if: ${{ !contains(github.event.head_commit.message, '[skip]') }}
runs-on: macos-11
runs-on: macos-13
timeout-minutes: 100
strategy:
matrix:
Expand All @@ -142,10 +144,6 @@ jobs:
steps:
- name: Clone
uses: actions/checkout@v4
- name: Golang
uses: actions/setup-go@v5
with:
cache: false
- name: VTK
if: matrix.vtk == 'ON'
run: |
Expand All @@ -154,17 +152,18 @@ jobs:
brew install glfw glew
- name: Compile
run: |
brew install go libomp
go build Checker/updater.go
mkdir build && cd build
export CXXFLAGS="-Wl,-ld_classic"
export FC=gfortran-11
if [ "${{ matrix.compiler }}" == "clang" ]; then
export CC=$(brew --prefix llvm@15)/bin/clang
export CXX=$(brew --prefix llvm@15)/bin/clang++
export FC=gfortran-11
cmake -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_Fortran_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
else
export CC=gcc-11
export CXX=g++-11
export FC=gfortran-11
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
fi
make install -j4
Expand Down Expand Up @@ -219,7 +218,7 @@ jobs:
run: |
go build Checker/updater.go
mkdir build && cd build
cmake -G "${{ matrix.compiler }}" -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_AVX=${{ matrix.avx }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
cmake -G "${{ matrix.compiler }}" -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DUSE_AVX2=${{ matrix.avx }} -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
cmake --build . --target install --config ${{ matrix.build }} -j 4
- name: Pack
shell: bash
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/master-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
go build Checker/updater.go
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=OFF -DCMAKE_INSTALL_PREFIX=dist ..
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=/home/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DUSE_MKL=${{ matrix.mkl }} -DMKLROOT=/opt/intel/oneapi/mkl/latest/ -DLINK_DYNAMIC_MKL=OFF -DUSE_INTEL_OPENMP=OFF -DCMAKE_INSTALL_PREFIX=dist ..
make install -j"$(nproc)" && make package
- name: Pack
run: |
Expand Down Expand Up @@ -76,18 +76,14 @@ jobs:
prerelease: true
overwrite: true
macos-master:
runs-on: macos-11
runs-on: macos-13
timeout-minutes: 100
strategy:
matrix:
vtk: [ ON, OFF ]
steps:
- name: Clone
uses: actions/checkout@v4
- name: Golang
uses: actions/setup-go@v5
with:
cache: false
- name: Prepare
run: |
echo "SP_TIME=daily-$(date +''%y%m%d'')" >> $GITHUB_ENV
Expand All @@ -99,11 +95,13 @@ jobs:
brew install glfw glew
- name: Compile
run: |
brew install go libomp
go build Checker/updater.go
mkdir build && cd build
export CC=$(brew --prefix llvm@15)/bin/clang
export CXX=$(brew --prefix llvm@15)/bin/clang++
export FC=gfortran-11
export CXXFLAGS="-Wl,-ld_classic"
cmake -DCMAKE_C_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_Fortran_STANDARD_INCLUDE_DIRECTORIES=$(brew --prefix libomp)/include -DCMAKE_BUILD_TYPE=Release -DUSE_VTK=${{ matrix.vtk }} -DBUILD_MULTITHREAD=ON -DVTK_DIR=/Users/runner/work/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
make install -j4
- name: Pack
Expand Down Expand Up @@ -156,7 +154,7 @@ jobs:
run: |
go build Checker/updater.go
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_AVX2=${{ matrix.avx }} -DBUILD_MULTITHREAD=ON -DUSE_VTK=${{ matrix.vtk }} -DVTK_DIR=D:/a/suanPan/suanPan/lib/cmake/vtk-9.2/ -DCMAKE_INSTALL_PREFIX=dist ..
cmake --build . --target install --config Release -j 4
- name: Pack
shell: bash
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Stale
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
days-before-issue-stale: 30
days-before-pr-stale: 60
days-before-issue-close: 5
days-before-pr-close: 10
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@

1. The `MKL` includes outdated `FEAST`, the external names in `FEAST` library are modified to avoid linking error.
2. The `SPIKE` solver may occasionally freeze, to circumvent, try to avoid mixing compilers from different vendors.
3. The `MUMPS` solver throws segfaults with large matrices.
3. The `MUMPS` solver throws segfaults with large matrices, appears to be quite slow.
4. The `FGMRES` solver requires refinements.

## version 3.4

1. update `Armadillo` to version `12.8.2` [#193](https://github.com/TLCFEM/suanPan/pull/193)
2. plane strain Duncan-Selig soil model [#195](https://github.com/TLCFEM/suanPan/pull/195)
3. update `Catch2` to version `3.5.4`
4. update `TBB` to version `2021.12.0` [#199](https://github.com/TLCFEM/suanPan/pull/199)
5. update `MUMPS` to version `5.7.1` [#202](https://github.com/TLCFEM/suanPan/pull/202)

## version 3.3

1. (breaking) revise syntax for `ConcreteTsai`, `Concrete21` and `Concrete22` using a more consistent definition
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ keywords:
- IGA
- Solid Mechanics
license: GPL-3.0
version: '3.2'
date-released: '2024-01-24'
version: '3.4'
date-released: '2024-05-11'
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CPACK_PACKAGE_ICON ${ROOT}/Resource/suanPan-ua.svg)
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_VENDOR "tlcfem")
set(CPACK_PACKAGE_VERSION "3.3.0")
set(CPACK_PACKAGE_VERSION "3.4.0")
set(CPACK_PACKAGE_DESCRIPTION "An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/TLCFEM/suanPan")

Expand Down
4 changes: 2 additions & 2 deletions Checker/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ func downloadLatestVersion(versionString string) error {
fmt.Printf(" If performance degradation is spotted on your platform, consider switch to `openblas` version.\n")
fmt.Printf(" `vtk` uses VTK for visualisation.\n")
fmt.Printf(" Visualisation may be useful when it comes to post-processing, but it requires OpenGL support. Please make sure the corresponding packages are installed.\n")
fmt.Printf(" `no-avx` disables AVX.\n")
fmt.Printf(" For CPUs that do not support AVX, please use this version.\n")
fmt.Printf(" `no-avx` disables AVX2.\n")
fmt.Printf(" For CPUs that do not support AVX2, please use this version.\n")
fmt.Printf("\nDownload the new version:\n")

var package_array []string
Expand Down
36 changes: 24 additions & 12 deletions Domain/Factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ template<sp_d T> class Factory final {
SolverType solver = SolverType::LAPACK;
SolverSetting<T> setting{};

SolverType sub_solver = SolverType::LAPACK;

T error = T(0); // error produced by certain solvers

Col<T> ninja; // the result from A*X=B
Expand Down Expand Up @@ -204,7 +206,10 @@ template<sp_d T> class Factory final {
[[nodiscard]] bool is_nonviscous() const;

void set_solver_type(SolverType);
[[nodiscard]] SolverType get_solver_type() const;
[[nodiscard]] bool contain_solver_type(SolverType) const;

void set_sub_solver_type(SolverType);
[[nodiscard]] bool contain_sub_solver_type(SolverType) const;

void set_solver_setting(const SolverSetting<double>&);
[[nodiscard]] const SolverSetting<double>& get_solver_setting() const;
Expand Down Expand Up @@ -726,7 +731,11 @@ template<sp_d T> bool Factory<T>::is_nonviscous() const { return nonviscous; }

template<sp_d T> void Factory<T>::set_solver_type(const SolverType E) { solver = E; }

template<sp_d T> SolverType Factory<T>::get_solver_type() const { return solver; }
template<sp_d T> void Factory<T>::set_sub_solver_type(const SolverType E) { sub_solver = E; }

template<sp_d T> bool Factory<T>::contain_solver_type(const SolverType ST) const { return ST == solver; }

template<sp_d T> bool Factory<T>::contain_sub_solver_type(const SolverType ST) const { return ST == sub_solver; }

template<sp_d T> void Factory<T>::set_solver_setting(const SolverSetting<double>& SS) { setting = SS; }

Expand Down Expand Up @@ -1475,34 +1484,37 @@ template<sp_d T> unique_ptr<MetaMat<T>> Factory<T>::get_basic_container() {
switch(storage_type) {
case StorageScheme::FULL:
#ifdef SUANPAN_CUDA
if(SolverType::CUDA == solver) return std::make_unique<FullMatCUDA<T>>(n_size, n_size);
if(contain_solver_type(SolverType::CUDA)) return std::make_unique<FullMatCUDA<T>>(n_size, n_size);
#endif
return std::make_unique<FullMat<T>>(n_size, n_size);
case StorageScheme::BAND:
if(SolverType::SPIKE == solver) return std::make_unique<BandMatSpike<T>>(n_size, n_lobw, n_upbw);
if(contain_solver_type(SolverType::SPIKE)) return std::make_unique<BandMatSpike<T>>(n_size, n_lobw, n_upbw);
#ifdef SUANPAN_MAGMA
if(contain_solver_type(SolverType::MAGMA)) return std::make_unique<BandMatMAGMA<T>>(n_size, n_lobw, n_upbw);
#endif
return std::make_unique<BandMat<T>>(n_size, n_lobw, n_upbw);
case StorageScheme::BANDSYMM:
return std::make_unique<BandSymmMat<T>>(n_size, n_lobw);
case StorageScheme::SYMMPACK:
return std::make_unique<SymmPackMat<T>>(n_size);
case StorageScheme::SPARSE:
if(SolverType::MUMPS == solver) return std::make_unique<SparseMatMUMPS<T>>(n_size, n_size, n_elem);
if(SolverType::LIS == solver) return std::make_unique<SparseMatLis<T>>(n_size, n_size, n_elem);
if(SolverType::SUPERLU == solver) return std::make_unique<SparseMatSuperLU<T>>(n_size, n_size, n_elem);
if(contain_solver_type(SolverType::MUMPS)) return std::make_unique<SparseMatMUMPS<T>>(n_size, n_size, n_elem);
if(contain_solver_type(SolverType::LIS)) return std::make_unique<SparseMatLis<T>>(n_size, n_size, n_elem);
if(contain_solver_type(SolverType::SUPERLU)) return std::make_unique<SparseMatSuperLU<T>>(n_size, n_size, n_elem);
#ifdef SUANPAN_MKL
if(SolverType::PARDISO == solver) return std::make_unique<SparseMatPARDISO<T>>(n_size, n_size, n_elem);
if(SolverType::FGMRES == solver) return std::make_unique<SparseMatFGMRES<T>>(n_size, n_size, n_elem);
if(contain_solver_type(SolverType::PARDISO)) return std::make_unique<SparseMatPARDISO<T>>(n_size, n_size, n_elem);
if(contain_solver_type(SolverType::FGMRES)) return std::make_unique<SparseMatFGMRES<T>>(n_size, n_size, n_elem);
#endif
#ifdef SUANPAN_CUDA
if(SolverType::CUDA == solver) return std::make_unique<SparseMatCUDA<T>>(n_size, n_size, n_elem);
if(contain_solver_type(SolverType::CUDA)) return std::make_unique<SparseMatCUDA<T>>(n_size, n_size, n_elem);
#ifdef SUANPAN_MAGMA
if(SolverType::MAGMA == solver) return std::make_unique<SparseMatMAGMA<T>>(n_size, n_size, magma_setting);
if(contain_solver_type(SolverType::MAGMA)) return std::make_unique<SparseMatMAGMA<T>>(n_size, n_size, magma_setting);
#endif
#endif
return std::make_unique<SparseMatSuperLU<T>>(n_size, n_size, n_elem);
case StorageScheme::SPARSESYMM:
#ifdef SUANPAN_MKL
if(SolverType::FGMRES == solver) return std::make_unique<SparseSymmMatFGMRES<T>>(n_size, n_size, n_elem);
if(contain_solver_type(SolverType::FGMRES)) return std::make_unique<SparseSymmMatFGMRES<T>>(n_size, n_size, n_elem);
#endif
return std::make_unique<SparseSymmMatMUMPS<T>>(n_size, n_size, n_elem);
default:
Expand Down
3 changes: 2 additions & 1 deletion Domain/MetaMat/BandMat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ template<sp_d T> class BandMat : public DenseMat<T> {
static T bin;

const uword s_band;
const uword m_rows; // memory block layout

int solve_trs(Mat<T>&, Mat<T>&&);

protected:
const uword m_rows; // memory block layout

const uword l_band;
const uword u_band;

Expand Down
Loading

0 comments on commit aad3482

Please sign in to comment.