Skip to content

Commit

Permalink
Import next changes SHA[f8d3e7523e, a053b57fbd]
Browse files Browse the repository at this point in the history
  • Loading branch information
stgeke committed Oct 1, 2024
1 parent c6a366d commit dc8679e
Show file tree
Hide file tree
Showing 69 changed files with 1,078 additions and 985 deletions.
228 changes: 33 additions & 195 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
CC=mpicc CXX=mpic++ FC=mpif77 ./build.sh -DENABLE_CVODE=OFF -DNEKRS_CXX_FLAGS=${{ env.NEKRS_COMPILER_FLAGS }} -DNEKRS_C_FLAGS=${{ env.NEKRS_COMPILER_FLAGS }} -DNEKRS_Fortran_FLAGS=${{ env.NEKRS_COMPILER_FLAGS }} -DCMAKE_INSTALL_PREFIX=${{ env.NEKRS_HOME }} -DOCCA_CXXFLAGS=${{ env.NEKRS_COMPILER_FLAGS }}
cmake --build build --target install -j 4
- name: config tests
working-directory: ${{ env.NEKRS_EXAMPLES }}
run: cmake -S . -B build

- name: Upload install dir
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -78,96 +82,12 @@ jobs:
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'ethier build-only'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: |
NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --build-only
- name: 'ethier default'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: |
NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --cimode 1
- name: 'ethier subcycle'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 2

- name: 'ethier velocity and pressure using SEMFEM with projection'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 3

- name: 'ethier (block) velocity and pressure and projection with subcycling'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 4

- name: 'ethier default + moving mesh'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_ethier 2 --cimode 5

- name: 'ethier subcycle + moving mesh + subcycling'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_ethier 2 --cimode 6

- name: 'ethier gmres + jacobi'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 7

- name: 'ethier variable dt'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 8
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R ethier-buildOnly

- name: 'ethier no dealiasing and subcycling'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 9

- name: 'ethier no dealiasing'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 10

- name: 'ethier Chebyshev+Jacobi'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 11

- name: 'ethier skip solving temperature'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 12

- name: 'ethier solve single scalar only'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethierScalar 2 --cimode 13

- name: 'ethier additive V-cycle'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 2 --cimode 14

- name: 'ethier linAlg + point interp + surface integral'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: |
NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --cimode 15
# - name: 'ethier cvode, both scalars'
# working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
# run: |
# NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --cimode 16

# - name: 'ethier mixed elliptic/cvode'
# working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
# run: |
# NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --cimode 17

# - name: 'ethier cvode, both scalars, no dealiasing, hpfrt'
# working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
# run: |
# NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --cimode 18

- name: 'ethier sub-stepping'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: |
NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --cimode 19
- name: 'ethier FP32 cimode 2'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ethier
run: |
FP32=1 NEKRS_CACHE_DIR=${{ env.NEKRS_EXAMPLES }}/ethier/custom-cache-dir ${{ env.NEKRS_HOME }}/bin/nrsmpi ethier 1 --cimode 22
- name: 'ethier'
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R ethier

lowMach:
needs: install
Expand All @@ -192,14 +112,9 @@ jobs:
- name: Set install dir permissions
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'lowMach default single rank'
working-directory: ${{ env.NEKRS_EXAMPLES }}/lowMach
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi lowMach 1 --cimode 1

# - name: 'lowMach + CVODE'
# working-directory: ${{ env.NEKRS_EXAMPLES }}/lowMach
# run: ${{ env.NEKRS_HOME }}/bin/nrsmpi lowMach 2 --cimode 3

- name: 'lowMach'
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R lowMach

mv_cyl:
needs: install
Expand All @@ -225,53 +140,12 @@ jobs:
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'mv_cyl'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl 2 --cimode 1

- name: 'mv_cyl + subcycling'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl 2 --cimode 2

- name: 'mv_cyl + subcycling + elasticity solve + projection'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl 2 --cimode 3

- name: 'mv_cyl + unaligned SYM'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl 2 --cimode 5

- name: 'mv_cyl + unaligned SYM + mesh solver'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl 2 --cimode 6

# - name: 'mv_cyl + CVODE'
# working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
# run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl 2 --cimode 7

# - name: 'mv_cyl + CVODE + unaligned SYM + mesh solver'
# working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
# run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl 2 --cimode 8

- name: 'mv_cyl, derived bc'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl_derived_bc 2 --cimode 1

- name: 'mv_cyl + subcycling, derived bc'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl_derived_bc 2 --cimode 2

- name: 'mv_cyl + subcycling + elasticity solve, derived bc'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl_derived_bc 2 --cimode 3

- name: 'mv_cyl + unaligned SYM, derived bc'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl_derived_bc 2 --cimode 5

- name: 'mv_cyl + unaligned SYM + mesh solver, derived bc'
working-directory: ${{ env.NEKRS_EXAMPLES }}/mv_cyl
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi mv_cyl_derived_bc 2 --cimode 6
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R "^mv_cyl$"

- name: 'mv_cyl_derived_bc'
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R mv_cyl_derived_bc

conj_ht:
needs: install
Expand All @@ -297,19 +171,10 @@ jobs:
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'conj_ht'
working-directory: ${{ env.NEKRS_EXAMPLES }}/conj_ht
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi conj_ht 2 --cimode 1

- name: 'conj_ht + subcycling'
working-directory: ${{ env.NEKRS_EXAMPLES }}/conj_ht
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi conj_ht 2 --cimode 2

# - name: 'conj_ht + CVODE'
# working-directory: ${{ env.NEKRS_EXAMPLES }}/conj_ht
# run: ${{ env.NEKRS_HOME }}/bin/nrsmpi conj_ht 2 --cimode 3

working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R conj_ht

channelStress:
channel:
needs: install
runs-on: ubuntu-latest
steps:
Expand All @@ -332,15 +197,11 @@ jobs:
- name: Set install dir permissions
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'channelStress (no rotation)'
working-directory: ${{ env.NEKRS_EXAMPLES }}/channel
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi channel 2 --cimode 1
- name: 'channel'
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R channel

- name: 'channelStress (45 degree rotation)'
working-directory: ${{ env.NEKRS_EXAMPLES }}/channel
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi channel 2 --cimode 2

tractionBoundary:
shlChannel:
needs: install
runs-on: ubuntu-latest
steps:
Expand All @@ -363,13 +224,9 @@ jobs:
- name: Set install dir permissions
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'traction channel (no rotation)'
working-directory: ${{ env.NEKRS_EXAMPLES }}/shlChannel
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi channel 2 --cimode 1

- name: 'traction channel (45 degree rotation)'
working-directory: ${{ env.NEKRS_EXAMPLES }}/shlChannel
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi channel 2 --cimode 2
- name: 'shlChannel'
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest --output-on-failure -R shlChannel

eddyNekNek:
needs: install
Expand All @@ -395,31 +252,12 @@ jobs:
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'eddyNekNek'
working-directory: ${{ env.NEKRS_EXAMPLES }}/eddyNekNek
run: |
${{ env.NEKRS_HOME }}/bin/nrsmpi eddyNekNek.sess 2 --cimode 1
cat inside/logfile
cat outside/logfile
- name: 'eddyNekNekMv'
working-directory: ${{ env.NEKRS_EXAMPLES }}/eddyNekNek
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi eddyNekNekMv.sess 2 --cimode 2

- name: 'eddyNekNek, velocity:solver = none'
working-directory: ${{ env.NEKRS_EXAMPLES }}/eddyNekNek
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi eddyNekNek.sess 2 --cimode 3
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest -R "^eddyNekNek$" || (cat ${{ env.NEKRS_EXAMPLES }}/eddyNekNek/inside/logfile; exit 1)

- name: 'eddyNekNekNek'
working-directory: ${{ env.NEKRS_EXAMPLES }}/eddyNekNek
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi eddyNekNekNek.sess 3 --cimode 1

- name: 'eddyNekNekNekMv'
working-directory: ${{ env.NEKRS_EXAMPLES }}/eddyNekNek
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi eddyNekNekNekMv.sess 3 --cimode 2

- name: 'eddyNekNek, multirate timestepping'
working-directory: ${{ env.NEKRS_EXAMPLES }}/eddyNekNek
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi eddyNekNek.sess 2 --cimode 4
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest -R eddyNekNekNek || (cat ${{ env.NEKRS_EXAMPLES }}/eddyNekNek/middle/logfile; exit 1)

ktauChannel:
needs: install
Expand All @@ -445,5 +283,5 @@ jobs:
run: chmod -R 755 ${{ env.NEKRS_HOME }}

- name: 'ktauChannel'
working-directory: ${{ env.NEKRS_EXAMPLES }}/ktauChannel
run: ${{ env.NEKRS_HOME }}/bin/nrsmpi channel 2 --cimode 1
working-directory: ${{ env.NEKRS_EXAMPLES }}/build
run: ctest -R ktauChannel
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
build/
CMakeFiles
*.tgz
.vscode/
*.swp
# From AMGX
plugin_config.cu
*.swp
*.log
*.nek5000
*.f?????
*.bp
*.vtu
logfile
*.dat
.cache/
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.21)
project(NekRS LANGUAGES C CXX Fortran VERSION 24.0.2)
project(NekRS LANGUAGES C CXX Fortran VERSION 24.0.3)

set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

Expand Down Expand Up @@ -88,7 +88,6 @@ if(NOT USING_LLVM)
endif()
string(COMPARE EQUAL "${CMAKE_CXX_COMPILER_ID}" "AppleClang" USING_APPLE_LLVM)
string(COMPARE EQUAL "${CMAKE_CXX_COMPILER_ID}" "NVHPC" USING_NVHPC)
string(COMPARE EQUAL "${CMAKE_Fortran_COMPILER_ID}" "Flang" USING_FLANG)

if(USING_GNU OR USING_LLVM OR USING_APPLE_LLVM)
set(NEKRS_COMPILER_DEFAULT_FLAGS "-O2 -g -march=native -mtune=native -ftree-vectorize")
Expand Down
37 changes: 18 additions & 19 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@
This list provides an overview of the most significant changes in this release, although it may not encompass all modifications. We acknowledge that this release introduces several breaking changes. These adjustments were essential to enhance the stability of the user interface in future iterations. We apologize for any inconvenience this may cause.

* run `build.sh` instead of `nrsconfig` to build the code
* change par section `TEMPERATURE` to `SCALAR00` in case it does not represent indeed a physical temperature (e.g. lowMach or CHT)
* `scalarDirichletConditions` -> `codedFixedValueVelocity` (same for scalars)
* `scalarNeumannConditions` -> `codedFixedGradientVelocity` (same for scalars)
* `useric` of nek5000 is no longer automatically called, instead call it in `UDF_Setup` (see e.g. lowMach example)
* use `nrs->o_U` instead of `nrs->U` (host version was removed)
* use `cds->o_S` instead of `cds->S` (host version was removed)
* use `mesh->o_x` instead of `mesh->x` (host version was removed, same for other components)
* change par section `TEMPERATURE` to `SCALAR00` in case it does not represent indeed a physical temperature
* `velocityDirichletConditions` -> `codedFixedValueVelocity` (same for scalars)
* `velocityNeumannConditions` -> `codedFixedGradientVelocity` (same for scalars)
* `nek::useric` is no longer automatically called, if needed call it in `UDF_Setup` (see e.g. lowMach example)
* `nek::userchk` is no longer called automatically
* use temporary instead of `nrs->U` and copy to `nrs->o_U`
* use temporary instead of `cds->S` and copy to `cds->o_S`
* use `auto [x, y, z] = mesh->xyzHost()` instead of `mesh->x` (same for other components)
* `nrs->meshV` -> `nrs->mesh`
* `nrs->_mesh` -> `cds->mesh[0]`
* `nek::userchk` is no longer called automatically during setup
* `nek::copyToNek` -> `nrs->copyToNek` (same for all other variants)
* send signal (defined in env-var `NEKRS_SIGNUM_UPD`) to process trigger file `nekrs.upd` (no automatic check every N steps)
* use `auto foo = platform->o_memPool.reserve<T>(nWords)` instead of preallocated slices of `occa::memory::o_mempool`
* `nek::ocopyToNek` -> `nrs->copyToNek`
* `nek::ocopyFromNek` -> `nek::copyFromNek`
* send signal (defined in env-var `NEKRS_SIGNUM_UPD`) to process trigger file `nekrs.upd`
* use `auto foo = platform->o_memPool.reserve<T>(nWords)` instead of e.g. `platform->o_mempool.slice0`
* change count argument of `occa::memory::slice, occa::memory::copyFrom, occa::memory::copyTo` to number of words instead of bytes
* define `time` as double (instead of defloat) in all UDF functions
* remove `nrs_t` argument from UDF API functions (nrs object is now globally accessible within udf if the Navier Stokes solver is enabled)
Expand All @@ -54,22 +55,20 @@ This list provides an overview of the most significant changes in this release,
* `nrs_t::userDivergence = std::function<void(double)>` -> `udf::udfdif = std::function<void(nrs_t *, dfloat, occa::memory)>`
* `tavg::setup(dlong fieldOffset, const fields& fields)` -> `tavg::setup(nrs_t*)`
* `planarAvg(mesh_t*, const std::string&, int, int, int, int, dlong, occa::memory o_avg)` -> `postProcessing::planarAvg(nrs_t*, const std::string&, int, int, int, int, occa::memory)`
* `nrs->o_NLT` -> `nrs->o_FU`
* `cds->o_NLT` -> `cds->o_FS`
* `nrs->o_FU` -> `nrs->o_NLT`
* `cds->o_FS` -> `cds->o_NLT`
* `::postProcessing` functions are now members of `nrs_t` (except planarAvg)
* use `nekrs_registerPtr` instead of common blocks NRSSCPTR / SCNRS in usr file and access them using `nek::ptr` in udf (see e.g. channel example)
* `occaKernel` -> `deviceKernel`
* `occaProperties` > `deviceKernelProperties`
* `occa::memory` -> `deviceMemory`
* remove `nrs_t` argument from `<plugin>::setup`
* `nrs->isOutputStep` -> `nrs->isCheckpointStep`
* `nrs->isOutputStep` -> `nrs->checkpointStep`
* `pointInterpolation_t::setPoints(int, dfloat*, dfloat*, dfloat*)` -> `pointInterpolation_t::setPoints(const std::vector<dfloat>&, const std::vector<dfloat>&, const std::vector<dfloat>&)`
* use `iofld` class instead of `writeFld`
* use `iofld` instead of `writeFld`
* `nrs->usrwrk` was removed (it's a user variable not used anywhere in the code)
* field file extension start with 0-index
* `nek::copyToNek` -> `nrs->copyToNek`
* `nek::copyFromNek` -> `nrs->copyFromNek`
* `nek::ocopyFromNek` and `nek::ocopyToNek` was removed
* field file extension starts with 0-index


## Known Bugs / Restrictions

Expand Down
2 changes: 1 addition & 1 deletion cmake/adios.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function(add_adios)

if(NOT "${ADIOS2_INSTALL_DIR}" STREQUAL "")
find_package(adios2 HINTS ${ADIOS2_INSTALL_DIR})
find_package(adios2 PATHS ${ADIOS2_INSTALL_DIR} NO_DEFAULT_PATH)
endif()

if (NOT ADIOS2_FOUND)
Expand Down
Loading

0 comments on commit dc8679e

Please sign in to comment.