Skip to content

Commit

Permalink
gpu makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Perez committed Feb 28, 2024
1 parent 165564c commit 38c3a9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion doc/Sphinx/Overview/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ You can find older, `unsupported versions here <https://github.com/SmileiPIC/Smi
Changes made in the repository (not released)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* GPU:

* Compilation simplified and better documented.

* Happi:

* In ``Scalar``, it is now possible to make an operation on scalars such as ``"Uelm+Ukin"``.
The list of available scalars can be obtained from ``getScalars()``.
* The list of available scalars can be obtained from ``getScalars()``.
* New arguments ``xoffset`` and ``yoffset`` to shift plot coordinates.
* New argument ``timestep_indices`` as an alternative to ``timesteps``.
* Changed coordinate reference for 2D probe in 3D or AM geometry
Expand Down
5 changes: 2 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ SMILEICXX ?= mpicxx
PYTHONEXE ?= python
HDF5_ROOT_DIR ?= $(HDF5_ROOT)
BOOST_ROOT_DIR ?= $(BOOST_ROOT)
GPU_COMPILER ?= $(CC)
TABLES_BUILD_DIR ?= tools/tables/build

#-----------------------------------------------------
Expand Down Expand Up @@ -202,10 +201,9 @@ ifneq (,$(call parse_config,gpu_nvidia))
override config += noopenmp # Prevent openmp for nvidia

CXXFLAGS += -DSMILEI_ACCELERATOR_MODE -DSMILEI_OPENACC_MODE
GPU_COMPILER = nvcc
GPU_COMPILER ?= nvcc
GPU_COMPILER_FLAGS += -x cu -DSMILEI_ACCELERATOR_MODE -DSMILEI_OPENACC_MODE
GPU_COMPILER_FLAGS += -I$(BUILD_DIR)/src/Python $(PY_CXXFLAGS)

GPU_KERNEL_SRCS := $(shell find src/* -name \*.cu)
GPU_KERNEL_OBJS := $(addprefix $(BUILD_DIR)/, $(GPU_KERNEL_SRCS:.cu=.o))

Expand All @@ -215,6 +213,7 @@ endif
# AMD GPUs
ifneq (,$(call parse_config,gpu_amd))
CXXFLAGS += -DSMILEI_ACCELERATOR_MODE
GPU_COMPILER ?= $(CC)
GPU_COMPILER_FLAGS += -x hip -DSMILEI_ACCELERATOR_MODE -std=c++14 $(DIRS:%=-I%) #$(PY_FLAGS)
GPU_COMPILER_FLAGS += -I$(BUILD_DIR)/src/Python $(PY_CXXFLAGS)
GPU_KERNEL_SRCS := $(shell find src/* -name \*.cu)
Expand Down
2 changes: 1 addition & 1 deletion smilei.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ for namelist in "${namelist_files[@]}"; do
cp $namelist $outdir
done
cd $outdir
$mpiexe -np $proc $smilei "${namelists[@]}"
$mpiexe --map-by ppr:$proc:socket:pe=$OMP_NUM_THREADS -np $proc $smilei "${namelists[@]}"
cd $H

0 comments on commit 38c3a9c

Please sign in to comment.