8000 Ir by greole · Pull Request #1 · hpsim/OGL · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ir #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Apr 7, 2021
Merged

Ir #1

merged 40 commits into from
Apr 7, 2021

Conversation

greole
Copy link
Collaborator
@greole greole commented Apr 7, 2021

This PR features a major overhaul of OGL. The following things have been added

  • an asymmetric solver base class
  • options to leave system matrix in memory on the device
  • leave matrix sorting indices in memory
  • add OpenFOAM compatible stopping criterion and residual norm computation
  • improved benchmark script

@greole greole marked this pull request as ready for review April 7, 2021 07:48
@greole greole merged commit 10f5111 into dev Apr 7, 2021
greole added a commit that referenced this pull request Apr 20, 2021
* Ir (#1)

* update script, needs refactoring

* update

* fix benchmark

* run at least for 10 ts

* rename GKOBase to GKOlduBase

* create ldu and Ldu matrices

* add ldu GKOCG and GKOBiCGStab

* add Ldu matrix

* add asymetric solver

* clean up

* start implementing of stopping criteria

* add common file

* update common

* inject c++14

* update

* use modified boxTurb16 case

* update benchmark

* keep CF constant

* start reuse sorting idx

* add IR solver, make sorting optional

* add line buffering, further cli args

* Add basic implementation of storing sorting idxs

* add IR implementation

* make sorting default

* store gkomatrix

* add common.C

* make executor an IOPtr

* prepare for forHLR test

* fix block clean for different block start syntax

* transfer to desktop

* hardcoded stored omp executor

* load different executor

* fix min/maxIter bug

* debug reference executor issue

* add clang format to keep formating constant

* fix cuda executor

* clean up

* clean up

* remove unneeded bash benchmark script

* format + prepare preconditioner

* run omp benchmarks for different number of threads

* make pressure solver settings compatible with OF8

* changed size of cases

* fix benchmarking folders

* set dns case boundaries to walls

* Fix several compiler warnings, reordering issues,

* create additional executor to force eager copy

* log succes state of run, keep retrying on failure at least for now

* move OpenFoam stopping criterion to separate file

* Use Foam switches to read dictionary entries

* Make export system a free function, clean logger and imports

* Move IterationLogger to common.H

* Fix execution if sysMatrix is not stored

if sysMatrix is not stored and thus the gkomatrix_ptr==NULL the system
matrix is recreated

* fix loop ctr

* Fix IR solver

- initialize IR with CG
- remove BJ for now

* Add Solver classes to distinguish between OF and GKO solvers, set time out for runs, fix log files

* fix formating

* Fix typos in smoothSolver class

* Fix int to unsingned long conversion

* Add initial CMakeLists file

* Add basic cmake files

* Fix return type warning

* move setting device_exec to separate function

* add third_party folder

* Update README.md

* Update README.md

* Use FOAM_ enviromental variables

* install libginkgo.so files along with libOGL.so if no external ginkgo is used

* Create a initial cmake.yml file

* clone and source OpenFOAM

* Fix non ascii symbol

* display OpenFOAM folder content

* show content of OpenFOAM-8 folder

* Update cmake.yml

* set OpenFOAM env variables manually

* add build badge

* Update Readme file

* remove Test folder since it is no longer needed

* re-enable exporting the system matrix, rhs and initial guess

* Read maxBlockSize from dictionary

* Rename controlDict_ member variable to dictionary_

* Make BiCGStabFactory consistent with CGFactory

* Clean unneeded comment

* Fix sorting bounds of sorting_idxs

* Update cmake.yml

* add basic travis file

* remove github actions file

* update .travis.yml

* fix OpenFOAM path

* update travis file

* compile full OpenFOAM for now

* install openmpi-dev

* install flexc++

* add OpenFOAM-dev to build matrix

* add fl dev

* install openfoam from the repository

* for now just test if OGL builds

* add build badge

* fix sourcing depending on of version

* switch to ubuntu 20.04

* make OGL_USE_EXTERNAL_GINKGO an option

* use --no-check-certificate since importing the key fails regularily

* pass --no-check-certificate to wget

* fix type of tmp_col_idxs and tmp_row_idxs

* sort the system matrix to avoid  cuda convergence issue

* add preconditioner to path

* remove benchmark script to separate repository

* fix find_package

* Fix find_package execution after external ginkgo was included #5

Co-authored-by: tcojean <terry.cojean@kit.edu>

* Add OpenFOAM version shields

Co-authored-by: tcojean <terry.cojean@kit.edu>
@greole greole deleted the IR branch April 20, 2021 19:32
greole added a commit that referenced this pull request May 2, 2021
* Ir (#1)

* update script, needs refactoring

* update

* fix benchmark

* run at least for 10 ts

* rename GKOBase to GKOlduBase

* create ldu and Ldu matrices

* add ldu GKOCG and GKOBiCGStab

* add Ldu matrix

* add asymetric solver

* clean up

* start implementing of stopping criteria

* add common file

* update common

* inject c++14

* update

* use modified boxTurb16 case

* update benchmark

* keep CF constant

* start reuse sorting idx

* add IR solver, make sorting optional

* add line buffering, further cli args

* Add basic implementation of storing sorting idxs

* add IR implementation

* make sorting default

* store gkomatrix

* add common.C

* make executor an IOPtr

* prepare for forHLR test

* fix block clean for different block start syntax

* transfer to desktop

* hardcoded stored omp executor

* load different executor

* fix min/maxIter bug

* debug reference executor issue

* add clang format to keep formating constant

* fix cuda executor

* clean up

* clean up

* remove unneeded bash benchmark script

* format + prepare preconditioner

* run omp benchmarks for different number of threads

* make pressure solver settings compatible with OF8

* changed size of cases

* fix benchmarking folders

* set dns case boundaries to walls

* Fix several compiler warnings, reordering issues,

* create additional executor to force eager copy

* log succes state of run, keep retrying on failure at least for now

* move OpenFoam stopping criterion to separate file

* Use Foam switches to read dictionary entries

* Make export system a free function, clean logger and imports

* Move IterationLogger to common.H

* Fix execution if sysMatrix is not stored

if sysMatrix is not stored and thus the gkomatrix_ptr==NULL the system
matrix is recreated

* fix loop ctr

* Fix IR solver

- initialize IR with CG
- remove BJ for now

* Add Solver classes to distinguish between OF and GKO solvers, set time out for runs, fix log files

* fix formating

* Fix typos in smoothSolver class

* Fix int to unsingned long conversion

* Add initial CMakeLists file

* Add basic cmake files

* Fix return type warning

* move setting device_exec to separate function

* add third_party folder

* Update README.md

* Update README.md

* Use FOAM_ enviromental variables

* install libginkgo.so files along with libOGL.so if no external ginkgo is used

* Create a initial cmake.yml file

* clone and source OpenFOAM

* Fix non ascii symbol

* display OpenFOAM folder content

* show content of OpenFOAM-8 folder

* Update cmake.yml

* set OpenFOAM env variables manually

* add build badge

* Update Readme file

* remove Test folder since it is no longer needed

* re-enable exporting the system matrix, rhs and initial guess

* Read maxBlockSize from dictionary

* Rename controlDict_ member variable to dictionary_

* Make BiCGStabFactory consistent with CGFactory

* Clean unneeded comment

* Fix sorting bounds of sorting_idxs

* Update cmake.yml

* add basic travis file

* remove github actions file

* update .travis.yml

* fix OpenFOAM path

* update travis file

* compile full OpenFOAM for now

* install openmpi-dev

* install flexc++

* add OpenFOAM-dev to build matrix

* add fl dev

* install openfoam from the repository

* for now just test if OGL builds

* add build badge

* fix sourcing depending on of version

* switch to ubuntu 20.04

* make OGL_USE_EXTERNAL_GINKGO an option

* use --no-check-certificate since importing the key fails regularily

* pass --no-check-certificate to wget

* fix type of tmp_col_idxs and tmp_row_idxs

* sort the system matrix to avoid  cuda convergence issue

* add preconditioner to path

* remove benchmark script to separate repository

* fix find_package

* Fix find_package execution after external ginkgo was included #5

Co-authored-by: tcojean <terry.cojean@kit.edu>

* Add OpenFOAM version shields

* Travis external ginkgo (#9)

* add external ginkgo flag to ci/cd matrix

* fix ci/cd matrix + test conditional job

* add a test script for external ginkgo build

* fix external ginkgo build flags to speedup build

* Add missing sudo to install ginkgo to system.

* fix cmake build arguments

* Clean ldu ldu base (#13)

* create separate IOExecutorHandler class

* add IOExecutorHandler files

* fix compilation issue

* create separate IOSortingIdxHandler class

* Implement separate IOGKOMatrixHandler class

* move host matrix handling to separate class

* fix matrix sorting/updating host matrix

* Fix #10 remove deprecated wmake folder

* This PR cleans the common lduLduBase class (#16)

* create separate IOExecutorHandler class

* add IOExecutorHandler files

* fix compilation issue

* create separate IOSortingIdxHandler class

* Implement separate IOGKOMatrixHandler class

* move host matrix handling to separate class

* fix matrix sorting/updating host matrix

* Reuse init guess (#19)

* create separate IOExecutorHandler class

* add IOExecutorHandler files

* fix compilation issue

* create separate IOSortingIdxHandler class

* Implement separate IOGKOMatrixHandler class

* move host matrix handling to separate class

* fix matrix sorting/updating host matrix

* implement reusable initial guess

* fix host executor call

* fix device_x size, IR improvements

* Split init and update of host matrix from sparsity pattern (#21)

Co-authored-by: tcojean <terry.cojean@kit.edu>
greole added a commit that referenced this pull request Nov 29, 2021
* Ir (#1)

* update script, needs refactoring

* update

* fix benchmark

* run at least for 10 ts

* rename GKOBase to GKOlduBase

* create ldu and Ldu matrices

* add ldu GKOCG and GKOBiCGStab

* add Ldu matrix

* add asymetric solver

* clean up

* start implementing of stopping criteria

* add common file

* update common

* inject c++14

* update

* use modified boxTurb16 case

* update benchmark

* keep CF constant

* start reuse sorting idx

* add IR solver, make sorting optional

* add line buffering, further cli args

* Add basic implementation of storing sorting idxs

* add IR implementation

* make sorting default

* store gkomatrix

* add common.C

* make executor an IOPtr

* prepare for forHLR test

* fix block clean for different block start syntax

* transfer to desktop

* hardcoded stored omp executor

* load different executor

* fix min/maxIter bug

* debug reference executor issue

* add clang format to keep formating constant

* fix cuda executor

* clean up

* clean up

* remove unneeded bash benchmark script

* format + prepare preconditioner

* run omp benchmarks for different number of threads

* make pressure solver settings compatible with OF8

* changed size of cases

* fix benchmarking folders

* set dns case boundaries to walls

* Fix several compiler warnings, reordering issues,

* create additional executor to force eager copy

* log succes state of run, keep retrying on failure at least for now

* move OpenFoam stopping criterion to separate file

* Use Foam switches to read dictionary entries

* Make export system a free function, clean logger and imports

* Move IterationLogger to common.H

* Fix execution if sysMatrix is not stored

if sysMatrix is not stored and thus the gkomatrix_ptr==NULL the system
matrix is recreated

* fix loop ctr

* Fix IR solver

- initialize IR with CG
- remove BJ for now

* Add Solver classes to distinguish between OF and GKO solvers, set time out for runs, fix log files

* fix formating

* Fix typos in smoothSolver class

* Fix int to unsingned long conversion

* Add initial CMakeLists file

* Add basic cmake files

* Fix return type warning

* move setting device_exec to separate function

* add third_party folder

* Update README.md

* Update README.md

* Use FOAM_ enviromental variables

* install libginkgo.so files along with libOGL.so if no external ginkgo is used

* Create a initial cmake.yml file

* clone and source OpenFOAM

* Fix non ascii symbol

* display OpenFOAM folder content

* show content of OpenFOAM-8 folder

* Update cmake.yml

* set OpenFOAM env variables manually

* add build badge

* Update Readme file

* remove Test folder since it is no longer needed

* re-enable exporting the system matrix, rhs and initial guess

* Read maxBlockSize from dictionary

* Rename controlDict_ member variable to dictionary_

* Make BiCGStabFactory consistent with CGFactory

* Clean unneeded comment

* Fix sorting bounds of sorting_idxs

* Update cmake.yml

* add basic travis file

* remove github actions file

* update .travis.yml

* fix OpenFOAM path

* update travis file

* compile full OpenFOAM for now

* install openmpi-dev

* install flexc++

* add OpenFOAM-dev to build matrix

* add fl dev

* install openfoam from the repository

* for now just test if OGL builds

* add build badge

* fix sourcing depending on of version

* switch to ubuntu 20.04

* make OGL_USE_EXTERNAL_GINKGO an option

* use --no-check-certificate since importing the key fails regularily

* pass --no-check-certificate to wget

* fix type of tmp_col_idxs and tmp_row_idxs

* sort the system matrix to avoid  cuda convergence issue

* add preconditioner to path

* remove benchmark script to separate repository

* fix find_package

* Fix find_package execution after external ginkgo was included #5

Co-authored-by: tcojean <terry.cojean@kit.edu>

* Add OpenFOAM version shields

* Travis external ginkgo (#9)

* add external ginkgo flag to ci/cd matrix

* fix ci/cd matrix + test conditional job

* add a test script for external ginkgo build

* fix external ginkgo build flags to speedup build

* Add missing sudo to install ginkgo to system.

* fix cmake build arguments

* Clean ldu ldu base (#13)

* create separate IOExecutorHandler class

* add IOExecutorHandler files

* fix compilation issue

* create separate IOSortingIdxHandler class

* Implement separate IOGKOMatrixHandler class

* move host matrix handling to separate class

* fix matrix sorting/updating host matrix

* Fix #10 remove deprecated wmake folder

* This PR cleans the common lduLduBase class (#16)

* create separate IOExecutorHandler class

* add IOExecutorHandler files

* fix compilation issue

* create separate IOSortingIdxHandler class

* Implement separate IOGKOMatrixHandler class

* move host matrix handling to separate class

* fix matrix sorting/updating host matrix

* Reuse init guess (#19)

* create separate IOExecutorHandler class

* add IOExecutorHandler files

* fix compilation issue

* create separate IOSortingIdxHandler class

* Implement separate IOGKOMatrixHandler class

* move host matrix handling to separate class

* fix matrix sorting/updating host matrix

* implement reusable initial guess

* fix host executor call

* fix device_x size, IR improvements

* Split init and update of host matrix from sparsity pattern (#21)

* This commit changes the calculation of sorting_idxs

- sorting_idxs are now calculated based on linearized idxs,
  which is needed for reusing the preconditioner

* Unify lduLdu Base (#23)

* implement a unified lduLduBase

* change location of lduMatrix based solvers

* Wrap rhs and initial guesses in vectors

* prepare init_initial_guess_vector

* unify solve_impl_ member functions

* prepare independent preconditioner generation

* add basic implementation for reusable preconditioner

* Add separate preconditioner class

* Add IOPreconditioner files

* remove missing folder

* Fix formating, minor fixes

* fix overflow issue for sorting

* Use csr matrix as default matrix format (#25)

* basic test if csr has any impact

* use csr matrix as matrix type

* use cached residual norm for solverPerf

* document optional arguments

* Update README.md

* Fix typos

* Travis build stages (#26)

* wrap build into a stage

* fix missing ws

* change order of stages

* add test stages, test env matrix for build stage

* move build stage to top level

* fix parsing

* fix indentatio
6DB6
n

* fix indentation

* fix indentation

* fix indentation

* change stage names

* use variables

* remove build matrix from top level

* build current develop and a specific (last known to work) version of ginkgo

* fix enviromental variables

* expand run stage

* remove OF Version 6 from CI/CD pipeline

* Create include folder

* Fix install paths

* Fix install dir for third_party ginkgo install

* fix ginkgo install dir for OF

* Revert changes

Use previous install prefix otherwise the find_package will not work properly.

* Raise minimum Cmake version

* create missing include directory

* Copy include folder

* Fix missing parentheses

* create include folder at generate step

* Fix install path of third_party ginkgo

* Let third party install handle ginkgo installation

* install in system default folder

* Install Openfoam via travis addons, cache ginkgo build

* OF is installed from extra repo

* Create missing build folder, clone OBR

* Setup travis workspaces to share data between stages

* Add test runs to pipeline

* Fix indentation

* Check content of cache

* Create cache folder if not present

* Update .travis.yml

* Don't put OBR into cache folder

* Update .travis.yml

* pip install docopt

* Fix not working line cont

* use workspaces for openFOAM installation

* Install ipython for owls

* Merge workspaces into single openfoam_env workspace

* get owls from develop branch, split solver runs

* Add IR and BJ to the CI/CD pipeline

* Only run tests with external ginkgo on dev branch

* Add validation stage

* Add script to validate test runs

* fix data workspace path

* run data validation script

* Add validate stage name

* Change workspaces

* Create $HOME/data directory

* Raise tolerance, fix report file name

* Validate only case where OF results exists

* Update README.md

add shield referring to the OGL_DATA repo.

* reuse unit_t for L1 norm calculation

* Update README.md

change travis-ci badge url after moving ownership to hpsim

* Add timestep to matrix name when exporting

* Add executor name to solver output

* Add solver name to ldu solver output

* Change order of executor and preconditioner in output

* add/correct missing header

* clean up trailing ws

* clean linebreaks

* move lduLduBase

* remove small casses flag

* read case description

* fix reading of results

* account for BiCGStab calling StoppingCritirion twice per iteration

* fix maxIter bounds

* Fix travis builds (#27)

* move lduLduBase

* remove small casses flag

* read case description

* fix reading of results

* account for BiCGStab calling StoppingCritirion twice per iteration

* fix maxIter bounds

* make logging output optional

* run poisson only at first

* fix json location

* fix relTol criterion and initial residual norm

* Update README.md

* add absolut res norm check

* use compute dot instead of apply

* check iteration count

* Update README.md

* Add dpcpp executor

* Forward GINKGO_BUILD_ flags to ginkgo build (#29)

- update README.md

* add dpcppIOPtr typename definition

* Adapt to new OBR version

* Test against OF version 8 and 9

* Fix workspaces and builds

* Add missing dependency packaging

* L1 norm (#31)

* initial ic commit

* Use LinOp to pass around pregenerated preconditioner

* use ILU instead of IC

* add further preconditioners

* use exact ilu instead of parilu

* use l1norm over dot product

* Remove extra get cells

* add basic implementation for normfactor computation

* Compute normfactor using dot product

* switch of OF normfactor

* reuse variable

* reuse variable

* clean up

* Move normfactor implementation to stopping criterion

* Fix residual norm computation

* create b directly on the device, remove OF normfactor

* compile with column_vector_sum support if requested

* switch to micro seconds

* clean up

* add creating b vector to logging

* add frequency check for res norm

* dont evaluate residual if below min iters

* Clean up

* store previous number of iters

* Store prev iters

* Gko normfactor (#32)

* add basic implementation for normfactor computation

* Compute normfactor using dot product

* switch of OF normfactor

* reuse variable

* reuse variable

* clean up

* Move normfactor implementation to stopping criterion

* Fix residual norm computation

* create b directly on the device, remove OF normfactor

* compile with column_vector_sum support if requested

* switch to micro seconds

* clean up

* add creating b vector to logging

* add frequency check for res norm

* dont evaluate residual if below min iters

* Clean up

* store previous number of iters

* Store prev iters

* Update Readme and default values of StoppingCriterion

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Build on ogl branch of ginkgo

* base all build tests on the gingko ogl branch

* use ogl branch

* use OF types

* Consistent iteration logging and stopping criterion (#33)

* add multigrid to cmakelists

* add initial multigrid implementation

* propagate logger to create solver methods

* propagate stopping criterion to solver creation

* Move stopping criterion and iteration to solver

* store and retrieve prev iters

* switch to local norm1 vec

* reimplement scalar jacobi as inner solver

* Add initial multigrid implementation

* Clean up

* clean up

* Add skip sorting and further config

* adapt reduce add to new gko version

* Export res norm (#35)

* Multigrid precond (#36)

* adapt reduce add to new gko version

* export res norm

* export res norm

* Skip sorting for ILU factory

- reformat
- fix IC

* Create norms_array from std::vector

* Move exporting up

* propagate export flag

* return residual norms from stopping criterion

* Fixup

* Propagate residual norms

* if exporting residual norms write every for each iteration

* add multigrid to preconditioner

* fix exec name

* Update the README

Add the following experimental preconditioner
 - multigrid
 - isai

* Store sparsity (#37)

* Store system matrix in any case on device and allow update

* FIX init sparsity pattern if not stored

* Add resorting of host matrix

* add timings and verbosity

* Fix number of iterations

* update preconditioner on default

* rename controlDict to solverControls

* Ordered data copy (#39)

* First implementation of ordering while copying

* write consecutive

* Use gko::Array over std::vector to avoid inits

* use gko arrays instead of std::vector

* refac host data update

* add a list based implementation

* use std::vectors to store lower elements

* Compute sorting at spartity init

* fix parens

* fix sorting

* further fixes

* Fix formating

* Further formating fixes

* Init csr once (#40)

* adapt reduce add to new gko version

* Copy values to existing csr matrix using view

* Remove unneeded if/else branch

* Avoid relying on case sensitivity

Co-authored-by: tcojean <terry.cojean@kit.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0