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/run-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
flags: "FFLAGS_OPT=1 OPENMP=1 LIBS+=-lfftw3_threads"
fail-fast: false # ensures that jobs run in parallel
env:
SKIP_BUILD: ${{ inputs.compiler != 'GNU' && matrix.mode.name == 'opt-omp' && false }} # skipped combinations (disabled)
SKIP_BUILD: ${{ matrix.mode.name == 'opt-omp' }} # skipped combinations
name: build-${{ matrix.mode.name }}
steps:
- name: Checkout code
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ P. Costa. *A FFT-based finite-difference solver for massively-parallel direct nu
### _Major Update:_ `CaNS 3.0` _is out!_ :tada:
See the [Release Notes](https://github.com/CaNS-World/CaNS/releases/tag/v3.0.0) for more details.

**[11/08/2025]:** Support for an OpenMP GPU backend is available! See the updated `[docs/INFO_COMPILING.md](docs/INFO_COMPILING.md)` for more details. Note: OpenMP support for shared-memory parallelization on multiple CPUs is not supported anymore.

**[06/08/2025]:** Support for running on AMD-based supercomputers and new GPU communication backend available! CaNS has been ported using to other platforms using HIP and thanks to the recently developed [diezDecomp library](https://github.com/Rafael10Diez/diezDecomp). See the updated `[docs/INFO_COMPILING.md](docs/INFO_COMPILING.md)` for more details.

**[10/04/2025]:** The writing of checkpoint files has changed. To allow for more flexibility, CaNS now writes one file per scalar field, where each velocity component, pressure, and scalar fields is stored in a different checkpoint file.
Expand Down
23 changes: 20 additions & 3 deletions configs/defaults/flags-default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,33 @@ FFLAGS_MOD_DIR := -module # extra space
endif
ifeq ($(strip $(FCOMP)),NVIDIA)
FFLAGS_MOD_DIR := -module # extra space
override FFLAGS += -cuda -gpu=cc70,cc80,cc90
ifeq ($(strip $(GPU)),1)
override FFLAGS += -acc -cuda -Minfo=accel -gpu=cc60,cc70,cc80
ifneq ($(filter $(GPU_BACKEND),OACC OMP),$(GPU_BACKEND))
override FFLAGS += -acc -Minfo=accel
endif
ifeq ($(strip $(GPU_BACKEND)),OACC)
override FFLAGS += -acc -Minfo=accel
endif
ifeq ($(strip $(GPU_BACKEND)),OMP)
override FFLAGS += -mp=gpu -Minfo=mp
endif
endif
endif
ifeq ($(strip $(FCOMP)),CRAY)
FFLAGS_MOD_DIR := -I./build -ef -J
ifeq ($(strip $(GPU)),1)
override FFLAGS += -hacc
ifneq ($(filter $(GPU_BACKEND),OACC OMP),$(GPU_BACKEND))
override FFLAGS += -hacc -hnoomp
endif
ifeq ($(strip $(GPU_BACKEND)),OACC)
override FFLAGS += -hacc -hnoomp
endif
ifeq ($(strip $(GPU_BACKEND)),OMP)
override FFLAGS += -homp -hnoacc
endif
else
override FFLAGS += -hnoacc
override FFLAGS += -hnoacc -hnoomp
endif
endif
ifeq ($(strip $(FCOMP)),FUJITSU)
Expand Down
3 changes: 2 additions & 1 deletion docs/INFO_COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ In this file, `FCOMP` can be one of `GNU` (`gfortran`), `INTEL` (`ifort`), `NVID

* `SINGLE_PRECISION` : calculation will be carried out in single precision (the default precision is double)
* `GPU` : enable GPU accelerated runs
* `USE_DIEZDECOMP` : use [diezDecomp](https://github.com/Rafael10Diez/diezDecomp) as GPU communication backend instead of the default (cuDecomp), e.g., for portability in different accelerators. While diezDecomp supports CPU-CPU communication, this is not used in CaNS yet.
* `USE_DIEZDECOMP` : use [diezDecomp](https://github.com/Rafael10Diez/diezDecomp) as GPU communication backend instead of the default (cuDecomp), e.g., for portability in different accelerators; while diezDecomp supports CPU-CPU communication, this is not used in CaNS yet
* `GPU_BACKEND` : backend for directives-based GPU offloading: `OACC` for OpenACC (default), and `OMP` for OpenMP (OpenMP support for shared-memory parallelization on CPU is not supported anymore)

Typing `make libs` will build the 2DECOMP&FFT/cuDecomp/diezDecomp libraries; then typing `make` will compile the code and copy the executable `cans` to a `run/` folder; `make run` will also copy the default input files `*.in` under `src/` to the same `run/` folder.

Expand Down
Loading