Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-foam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- dev
- main
pull_request:
types: synchronize
types: [synchronize, opened, reopened]
schedule:
- cron: "* 0 * * 0"

Expand Down
28 changes: 1 addition & 27 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,14 @@ jobs:
key: ws-${{inputs.version}}-${{ github.sha }}
path: /home/runner/work/_temp/_github_home/integration


- name: Update OBR
working-directory: /github/home/
run: |
ls
python3 -m pip install --upgrade pip
pip install setuptools --upgrade
pip uninstall obr -y
pip uninstall owls -y
cd /root/OBR
git pull origin dev
pip install -e .
obr --version

- name: Generate test cases
working-directory: /github/home/
run: |
export PATH=$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/bin:$PATH
export LD_LIBRARY_PATH=$FOAM_USER_LIBBIN:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/sys-openmpi/:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/openmpi-system:$WM_PROJECT_DIR/platforms/linux64GccDPInt32Opt/lib/dummy/:$LD_LIBRARY_PATH
mkdir -p integration && cd integration
export CYCLIC_CASE=${{inputs.cyclic_case}}
obr init -g --config /__w/OGL/OGL/test/integration/lidDrivenCavity.yaml
obr init -gy --config /__w/OGL/OGL/test/integration/lidDrivenCavity.yaml
cat workspace/*/case/*log

setup_integration_matrix:
Expand Down Expand Up @@ -199,18 +185,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Update OBR
working-directory: /github/home/
run: |
ls
python3 -m pip install --upgrade pip
pip install setuptools --upgrade
pip uninstall obr -y
pip uninstall owls -y
cd /root/OBR
git pull origin dev
pip install -e .

- name: Archive workspace
uses: actions/cache@v4
with:
Expand Down
15 changes: 7 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ option(OGL_DATA_VALIDATION "Check if resulting matrix data is valid" FALSE)
option(OGL_USE_FOAM_FOUNDATION_VERSION "Build OGL for the OpenFOAM Foundation version" FALSE)
option(OGL_BUILD_UNITTEST "Build OGL unittests" FALSE)
option(OGL_CUDA_ARCHITECTURES "Which cuda architecture to build for" "native")
option(GINKGO_BUILD_REFERENCE "Build Ginkgo with reference backend" TRUE)
option(OGL_ALLOW_REFERENCE_ONLY "Enable builds of Ginkgo with reference backend only" FALSE)
option(OGL_ENABLE_SANITIZE_ADDRESS "Enable address sanitizer" FALSE)
option(OGL_ENABLE_SANITIZE_LEAK "Enable leak sanitizer" FALSE)
Expand All @@ -36,9 +35,9 @@ option(OGL_ENABLE_SANITIZE_THREAD "Enable thread sanitizer" FALSE)
option(OGL_ENABLE_SANITIZE_MEMORY "Enable memory sanitizer" FALSE)
option(OGL_DEVEL_TOOLS "Add development tools to the build system" FALSE)

option(GINKGO_BUILD_REFERENCE "Build Ginkgo with reference backend" TRUE)
option(GINKGO_WITH_OGL_EXTENSIONS "Whether ginkgo was build with OGL extension" FALSE)
option(GINKGO_BUILD_REFERENCE "Build Ginkgo with reference backend" TRUE)

option(GINKGO_FORCE_GPU_AWARE_MPI "Build Ginkgo using device aware MPI" TRUE)
option(GINKGO_BUILD_SYCL "Build Ginkgo with sycl backend" FALSE)
option(GINKGO_BUILD_OMP "Build Ginkgo with omp backend" FALSE)
Expand Down Expand Up @@ -75,7 +74,7 @@ to turn off this check")
endif()

set(GINKGO_CHECKOUT_VERSION
"ogl_0600_gko190"
"ogl_0600_gko190"
CACHE STRING "Use specific version of ginkgo")

if(OGL_DEVEL_TOOLS)
Expand Down Expand Up @@ -218,11 +217,11 @@ target_sources(
src/MatrixWrapper/Combination.cpp
src/Repartitioner.cpp
src/Solver/CG.cpp
src/Solver/PipeCG.cpp
src/Solver/BiCGStab.cpp
src/Solver/GMRES.cpp
src/Solver/Multigrid.cpp
# src/Solver/IR.cpp
src/Solver/PipeCG.cpp
src/Solver/BiCGStab.cpp
src/Solver/GMRES.cpp
src/Solver/Multigrid.cpp
# src/Solver/IR.cpp
)

enable_sanitizers(
Expand Down
19 changes: 12 additions & 7 deletions include/OGL/MatrixWrapper/Combination.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,18 @@ class CombinationMatrix
gko::dim<2> size,
std::vector<std::shared_ptr<gko::LinOp>> operators)
: gko::EnableLinOp<CombinationMatrix>(exec),
comb_(gko::share(gko::Combination<scalar>::create(exec, size)))
coeffs_([exec, operators]() {
auto ret = std::vector<std::shared_ptr<gko::LinOp>>();
for (int i = 0; i < operators.size(); i++) {
ret.push_back(gko::share(
gko::initialize<gko::matrix::Dense<scalar>>({1}, exec)));
}
return ret;
}()),
comb_(gko::share(gko::Combination<scalar>::create(
coeffs_.begin(), coeffs_.end(), operators.begin(),
operators.end())))
{
if (size[1] > 0) {
for (auto &op : operators) {
this->comb_->add_operators(
gko::initialize<gko::matrix::Dense<scalar>>({1}, exec), op);
}
}
this->set_size(size);
}

Expand Down Expand Up @@ -222,6 +226,7 @@ class CombinationMatrix
}

private:
std::vector<std::shared_ptr<gko::LinOp>> coeffs_; //
std::shared_ptr<gko::Combination<scalar>> comb_;
};

Expand Down
2 changes: 1 addition & 1 deletion include/OGL/MatrixWrapper/SparsityPattern.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ class SparsityPattern {

const std::vector<label> &get_id() const { return id_; }

std::vector<int> get_lengths()
std::vector<label> get_lengths()
{
std::vector<label> ret{};
for (auto &row : rows_) {
Expand Down
2 changes: 2 additions & 0 deletions include/OGL/Preconditioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ class Preconditioner {
DevicePersistentBase<gko::LinOp>>(precond_store_name)
.get_ptr();

#ifdef GINKGO_WITH_OGL_EXTENSION
if (name == "Multigrid") {
word msg = "Update Multigrid preconditioner";
MLOG_1(verbose_, msg)
Expand Down Expand Up @@ -621,6 +622,7 @@ class Preconditioner {
->update_matrix_value(gkodistmatrix);
}
}
#endif
return ret;
} else {
auto prev_precond = db_.template lookupObjectRef<
Expand Down
Loading