Skip to content

Commit

Permalink
Merge branch 'develop' of gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
mccoys committed Nov 20, 2023
2 parents 9c2c0f6 + ae41599 commit 4f145b3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
12 changes: 12 additions & 0 deletions doc/Sphinx/Overview/material.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ As of November 2021, 90 papers have been published covering a broad range of top
`Electron acceleration by laser plasma wedge interaction`,
`Phys. Rev. Research 5, 013115 (2023) <http://dx.doi.org/10.1103/PhysRevResearch.5.013115>`_
.. [Yan2022]
X. Yan, Y. Wu, X. Geng, H. Zhang, B. Shen and L. Ji,
`Generation of polarized proton beams with gaseous targets from CO2-laser-driven collisionless shock acceleration`,
`Physics of Plasmas 29, 053101 (2022) <https://doi.org/10.1063/5.0084870>`_
.. [Chen2022]
Q. Chen, D. Maslarova, J. Wang, S. X. Lee, V. Horný and D. Umstadter,
`Transient Relativistic Plasma Grating to Tailor High-Power Laser Fields, Wakefield Plasma Waves, and Electron Injection`,
`Physical Review Letters 128, 164801 (2022) <https://doi.org/10.1103/PhysRevLett.128.164801>`_
.. [Glek2022b]
P. B. Glek and A. M. Zheltikov,
Expand Down
23 changes: 14 additions & 9 deletions scripts/compile_tools/machine/adastra
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Note:
#
# You'll want to compile smilei with the "gpu_amd" config flag enabled:
# $ make machine="adastra_gpu" config="amd_gpu" -j
# $ make machine="adastra" config="amd_gpu" -j
#
# Each node has 4 MI250X accelerators. An MI250X is made of 2 GCDs which are to
# be used as if it was an individual GPU.
Expand All @@ -15,7 +15,8 @@
# module purge
# module load craype-accel-amd-gfx90a craype-x86-trento
# module load PrgEnv-cray/8.3.3
# module load cray-mpich/8.1.21 cray-hdf5-parallel/1.12.2.1 cray-python/3.9.13.1
# module load cpe/23.02
# module load cray-mpich/8.1.24 cray-hdf5-parallel/1.12.2.1 cray-python/3.9.13.1
# module load amd-mixed/5.2.3
# module list
#
Expand Down Expand Up @@ -54,7 +55,7 @@ endif
# Warning flags
################################################################################

ADASTRA_WARNING_FLAGS := #-Wextra -pedantic -fdiagnostics-show-option -fstrict-aliasing -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-aliasing -Wsuggest-override -Wswitch-default -Wswitch-enum -Wtautological-compare -Wundef -Wunreachable-code
# ADASTRA_WARNING_FLAGS := -Wextra -pedantic -fdiagnostics-show-option -fstrict-aliasing -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-aliasing -Wsuggest-override -Wswitch-default -Wswitch-enum -Wtautological-compare -Wundef -Wunreachable-code
# ADASTRA_WARNING_FLAGS += -Wno-unused-variable -Wno-unused-parameter -Wno-unknown-pragmas

################################################################################
Expand All @@ -76,7 +77,7 @@ ADASTRA_OPTIMIZATION_FLAGS := -O3 $(ADASTRA_OPTIMIZATION_LTO_FLAGS) $(ADAS
# To check for leaks, use this feature
# ADASTRA_DEBUG_SANITIZER_FLAGS := -fsanitize=address # -fsanitize=undefined
# -g and -ggdb have no know runtime overhead expect for program size
ADASTRA_DEBUG_FLAGS := #-g -ggdb $(ADASTRA_DEBUG_SANITIZER_FLAGS) -v # --cray-print-opts=all -craype-verbose
ADASTRA_DEBUG_FLAGS := -g -ggdb $(ADASTRA_DEBUG_SANITIZER_FLAGS) -v # --cray-print-opts=all -craype-verbose

################################################################################
# Omp flags
Expand Down Expand Up @@ -142,7 +143,11 @@ ADASTRA_INCLUDES := $(ADASTRA_INCLUDES_MPI) $(ADASTRA_INCLUDES_HIP)
# libamdhip64. In addition, libmpi_gtl_hsa.so has libamdhip64 as a dependency so
# the resulting executable will depend on libamdhip64 wether we like it or not.

ADASTRA_LIBRARIES_HIP := -L$(ROCM_PATH)/lib -lamdhip64

ifneq (,$(call parse_config,gpu_amd))
# Use C++14 as required by rocThrust
ADASTRA_LIBRARIES_HIP := -L$(ROCM_PATH)/lib -lamdhip64
endif

ADASTRA_LIBRARIES := $(ADASTRA_LIBRARIES_OMP_STATIC) $(ADASTRA_LIBRARIES_MPI) $(ADASTRA_LIBRARIES_HIP)

Expand All @@ -154,19 +159,19 @@ ADASTRA_LIBRARIES := $(ADASTRA_LIBRARIES_OMP_STATIC) $(ADASTRA_LIBRARIES_MPI) $(
# ACCELERATOR_GPU_KERNEL_FLAGS := $(CXXFLAGS) # This command is soo weird, it doesn't work as expected
ACCELERATOR_GPU_KERNEL_FLAGS += $(shell $(PYTHONCONFIG) --includes) $(DIRS:%=-I%)
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_FEATURE_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += #$(ADASTRA_WARNING_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_WARNING_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_OPTIMIZATION_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += #$(ADASTRA_DEBUG_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_DEBUG_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_OMP_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_ACCELERATOR_GPU_OMP_DEFINE_FLAGS)
# ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_ACCELERATOR_GPU_OMP_FLAGS) # Disabled due to unsupported option '-fopenmp-targets=' for language mode 'HIP'
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_ACCELERATOR_GPU_KERNEL_FLAGS)
ACCELERATOR_GPU_KERNEL_FLAGS += $(ADASTRA_INCLUDES)

CXXFLAGS += $(ADASTRA_FEATURE_FLAGS)
CXXFLAGS += #$(ADASTRA_WARNING_FLAGS)
CXXFLAGS += $(ADASTRA_WARNING_FLAGS)
CXXFLAGS += $(ADASTRA_OPTIMIZATION_FLAGS)
CXXFLAGS += #$(ADASTRA_DEBUG_FLAGS)
CXXFLAGS += $(ADASTRA_DEBUG_FLAGS)
CXXFLAGS += $(ADASTRA_OMP_FLAGS)
CXXFLAGS += $(ADASTRA_ACCELERATOR_GPU_OMP_DEFINE_FLAGS)
CXXFLAGS += $(ADASTRA_ACCELERATOR_GPU_OMP_FLAGS) # if gpu_amd is set, adds the appropriate flags, else nothing is added
Expand Down
2 changes: 2 additions & 0 deletions src/ElectroMagnBC/ElectroMagnBC2D_SM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ void ElectroMagnBC2D_SM::save_fields( Field *my_field, Patch *patch )
xyz = 1;
} else if( field2D->name=="Bz" ) {
xyz = 2;
} else {
return;
}

if( axis0_ == 0 ) {
Expand Down
4 changes: 3 additions & 1 deletion src/ElectroMagnBC/ElectroMagnBC3D_SM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ void ElectroMagnBC3D_SM::save_fields( Field *my_field, Patch *patch )
xyz = 1;
} else if( field3D->name=="Bz" ) {
xyz = 2;
}
} else {
return;
}

if( axis0_ == 0 ) {
field3D->extract_slice_yz( iB_[xyz], B_val[xyz] );
Expand Down

0 comments on commit 4f145b3

Please sign in to comment.