Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed Oct 16, 2020
2 parents 8154234 + 1f8f4f7 commit ca2a20c
Show file tree
Hide file tree
Showing 341 changed files with 14,782 additions and 5,624 deletions.
61 changes: 61 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# -*- mode: yaml -*-

pool:
vmImage: 'ubuntu-latest'

variables:
WARPX_CI_CCACHE: 'TRUE'
WARPX_CI_OPENPMD: 'TRUE'
FFTW_HOME: '/usr/'
BLASPP_HOME: '/usr/local/'
LAPACKPP_HOME: '/usr/local/'
OMP_NUM_THREADS: 1

strategy:
matrix:
cartesian:
WARPX_CI_REGULAR_CARTESIAN: 'TRUE'
psatd:
WARPX_CI_PSATD: 'TRUE'
python:
WARPX_CI_PYTHON_MAIN: 'TRUE'
single_precision:
WARPX_CI_SINGLE_PRECISION: 'TRUE'
rz_or_nompi:
WARPX_CI_RZ_OR_NOMPI: 'TRUE'
qed:
WARPX_CI_QED: 'TRUE'

steps:
- script: |
cat /proc/cpuinfo | grep "model name" | sort -u
sudo apt-get update
sudo apt-get install -y ccache gcc gfortran g++ openmpi-bin libopenmpi-dev \
libfftw3-dev libfftw3-mpi-dev libhdf5-openmpi-dev pkg-config make \
python3 python3-pip python3-setuptools libblas-dev liblapack-dev
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
sudo update-alternatives --set python /usr/bin/python3
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade cmake matplotlib==3.2.2 mpi4py numpy scipy yt
export CEI_CMAKE="$HOME/.local/bin/cmake"
export CEI_SUDO="sudo"
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://git.io/JvLxY
sudo chmod a+x /usr/local/bin/cmake-easyinstall
if [ "${WARPX_CI_OPENPMD:-FALSE}" == "TRUE" ]; then
cmake-easyinstall --prefix=/usr/local git+https://github.com/openPMD/openPMD-api.git \
-DopenPMD_USE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
fi
if [ "${WARPX_CI_RZ_OR_NOMPI:-FALSE}" == "TRUE" ]; then
cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/blaspp.git \
-Duse_openmp=OFF -Dbuild_tests=OFF
cmake-easyinstall --prefix=/usr/local git+https://bitbucket.org/icl/lapackpp.git \
-DBUILD_LAPACKPP_TESTS=OFF
fi
displayName: 'Install dependencies'

- script: |
export WARPX_TEST_COMMIT=$BUILD_SOURCEVERSION
./run_test.sh
timeoutInMinutes: 360
displayName: 'Build & test'
32 changes: 32 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# http://EditorConfig.org
#
# precedence of rules is bottom to top

# this is the top-most EditorConfig file
root = true


[*]
# 4 space indentation
indent_style = space
indent_size = 4

# no end of line whitespaces
trim_trailing_whitespace = true

# unix-style newlines
end_of_line = lf

# newline ending in files
insert_final_newline = true


[*.md]
# two end of line whitespaces are newlines without a paragraph
trim_trailing_whitespace = false


[Makefile]
# TABs are part of its syntax
indent_style = tab
indent_size = unset
10 changes: 4 additions & 6 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
sudo wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-key add 7fa2af80.pub
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/nvidia-ml.list
sudo apt-get update
sudo apt-get install -y cuda-command-line-tools-11-0 cuda-compiler-11-0 cuda-cupti-dev-11-0 cuda-minimal-build-11-0 cuda-nvml-dev-11-0 cuda-nvtx-11-0 libcurand-dev-11-0
sudo ln -s cuda-11.0 /usr/local/cuda
Expand Down Expand Up @@ -54,7 +53,7 @@ jobs:
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install -y intel-oneapi-icc intel-oneapi-ifort
sudo apt-get install -y intel-oneapi-dpcpp-cpp-compiler-pro
set +e
source /opt/intel/oneapi/setvars.sh
set -e
Expand All @@ -80,10 +79,7 @@ jobs:
cmake .. -DCMAKE_VERBOSE_MAKEFILE=ON -DWarpX_MPI=OFF -DWarpX_OPENPMD=ON -DWarpX_openpmd_internal=OFF -DWarpX_PRECISION=single
make -j 2
# broken in beta08
# https://github.com/intel/llvm/issues/2187
build_dpcc:
if: false
name: oneAPI DPC++ SP [Linux]
runs-on: ubuntu-latest
steps:
Expand All @@ -101,9 +97,10 @@ jobs:
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install -y intel-oneapi-dpcpp-compiler intel-oneapi-mkl
sudo apt-get install -y intel-oneapi-dpcpp-cpp-compiler intel-oneapi-mkl-devel
set +e
source /opt/intel/oneapi/setvars.sh
source /opt/intel/oneapi/compiler/2021.1-beta08/env/vars.sh
set -e
git clone https://github.com/openPMD/openPMD-api.git
mkdir openPMD-api/build
Expand All @@ -116,6 +113,7 @@ jobs:
run: |
set +e
source /opt/intel/oneapi/setvars.sh
source /opt/intel/oneapi/compiler/2021.1-beta08/env/vars.sh
set -e
export CXX=$(which dpcpp)
export CC=$(which clang)
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Python/pywarpx/libwarpx*.so
d/
f/
o/
build/
tmp_build_dir/
test_dir
test_dir/
Expand Down Expand Up @@ -34,6 +35,14 @@ Docs/doxyhtml/
Docs/doxyxml/
Docs/source/_static/

####################
# Package Managers #
####################
# anonymous Spack environments
# https://spack.readthedocs.io/en/latest/environments.html#anonymous-environments
.spack-env/
spack.lock

#######
# IDE #
#######
Expand Down
60 changes: 0 additions & 60 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ if(NOT WarpX_COMPUTE IN_LIST WarpX_COMPUTE_VALUES)
message(FATAL_ERROR "WarpX_PRECISION (${WarpX_COMPUTE}) must be one of ${WarpX_COMPUTE_VALUES}")
endif()

option(WarpX_MPI_THREAD_MULTIPLE "MPI thread-multiple support, i.e. for async_io" ON)
mark_as_advanced(WarpX_MPI_THREAD_MULTIPLE)

set(WarpX_PARSER_DEPTH 24 CACHE STRING
"Maximum parser depth for input file functions")
mark_as_advanced(WarpX_PARSER_DEPTH)

option(WarpX_amrex_internal "Download & build AMReX" ON)

# change the default build type to RelWithDebInfo (or Release) instead of Debug
Expand Down Expand Up @@ -222,6 +229,9 @@ if(WarpX_PSATD)
target_compile_definitions(WarpX PRIVATE WARPX_USE_PSATD)
endif()

target_compile_definitions(WarpX PRIVATE
WARPX_PARSER_DEPTH=${WarpX_PARSER_DEPTH})


# Warnings ####################################################################
#
Expand Down
3 changes: 3 additions & 0 deletions Docs/source/building/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ options are:
* ``USE_GPU=TRUE`` or ``FALSE``: Whether to compile for Nvidia GPUs (requires CUDA).
* ``USE_OPENPMD=TRUE`` or ``FALSE``: Whether to support openPMD for I/O (requires openPMD-api).
* ``MPI_THREAD_MULTIPLE=TRUE`` or ``FALSE``: Whether to initialize MPI with thread multiple support. Required to use asynchronous IO with more than ``amrex.async_out_nfiles`` (by default, 64) MPI tasks. Please see :doc:`../visualization/visualization` for more information.
* ``PRECISION=FLOAT USE_SINGLE_PRECISION_PARTICLES=TRUE``: Switch from default double precision to single precision (experimental).

For a description of these different options, see the `corresponding page <https://amrex-codes.github.io/amrex/docs_html/BuildingAMReX.html>`__ in the AMReX documentation.

Expand Down Expand Up @@ -104,3 +105,5 @@ Building for specific platforms
cori
summit
juwels
lassen
quartz
51 changes: 31 additions & 20 deletions Docs/source/building/cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ Until we have transitioned our documentation and functionality completely, pleas

Progress status: `see on GitHub <https://github.com/ECP-WarpX/WarpX/projects/10>`_

Introduction to CMake
=====================

If you are new to CMake, `this short tutorial <https://hsf-training.github.io/hsf-training-cmake-webpage/>`_ from the HEP Software foundation is the perfect place to get started with it.

If you just want to use CMake to build the project, jump into sections *1. Introduction*, *2. Building with CMake* and *9. Finding Packages*.

Dependencies
============

Expand All @@ -25,7 +32,7 @@ Optional dependencies include:
- `OpenMP 3.1+ <https://www.openmp.org>`_: for threaded CPU execution (currently not fully accelerated)
- `FFTW3 <http://www.fftw.org>`_: for spectral solver (PSATD) support
- `Boost 1.66.0+ <https://www.boost.org/>`_: for QED support
- `openPMD-api 0.11.1+ <https://github.com/openPMD/openPMD-api>`_: we automatically download and compile a copy of openPMD-api for openPMD I/O support
- `openPMD-api 0.12.0+ <https://github.com/openPMD/openPMD-api>`_: we automatically download and compile a copy of openPMD-api for openPMD I/O support

- see `optional I/O backends <https://github.com/openPMD/openPMD-api#dependencies>`_
- `CCache <https://ccache.dev>`_: to speed up rebuilds (needs 3.7.9+ for CUDA)
Expand All @@ -39,11 +46,12 @@ macOS/Linux:
spack env create warpx-dev
spack env activate warpx-dev
spack add adios2
spack add ccache
spack add cmake
spack add fftw
spack add hdf5
spack add mpi
spack add openpmd-api
spack add pkgconfig # for fftw
# optional:
# spack add cuda
Expand All @@ -56,13 +64,14 @@ or macOS/Linux:
.. code-block:: bash
brew update
brew install adios2
brew install ccache
brew install cmake
brew install fftw
brew install hdf5-mpi
brew install libomp
brew install pkg-config # for fftw
brew install open-mpi
brew install openpmd-api
Now, ``cmake --version`` should be at version 3.14.0 or newer.

Expand Down Expand Up @@ -109,23 +118,25 @@ You can inspect and modify build options after running ``cmake ..`` with either
or by providing arguments to the CMake call: ``cmake .. -D<OPTION_A>=<VALUE_A> -D<OPTION_B>=<VALUE_B>``

=========================== ============================================ =======================================================
CMake Option Default & Values Description
=========================== ============================================ =======================================================
``CMAKE_BUILD_TYPE`` **RelWithDebInfo**/Release/Debug Type of build, symbols & optimizations
``WarpX_ASCENT`` ON/**OFF** Ascent in situ visualization
``WarpX_COMPUTE`` NOACC/**OMP**/CUDA/DPCPP On-node, accelerated computing backend
``WarpX_DIMS`` **3**/2/RZ Simulation dimensionality
``WarpX_MPI`` **ON**/OFF Multi-node support (message-passing)
``WarpX_OPENPMD`` ON/**OFF** openPMD I/O (HDF5, ADIOS)
``WarpX_PRECISION`` **double**/single Floating point precision (single/double)
``WarpX_PSATD`` ON/**OFF** Spectral solver
``WarpX_QED`` ON/**OFF** PICSAR QED (requires Boost and PICSAR)
``WarpX_amrex_repo`` ``https://github.com/AMReX-Codes/amrex.git`` Repository URI to pull and build AMReX from
``WarpX_amrex_branch`` ``development`` Repository branch for ``WarpX_amrex_repo``
``WarpX_amrex_internal`` **ON**/OFF Needs a pre-installed AMReX library if set to ``OFF``
``WarpX_openpmd_internal`` **ON**/OFF Needs a pre-installed openPMD library if set to ``OFF``
=========================== ============================================ =======================================================
============================= ============================================ =======================================================
CMake Option Default & Values Description
============================= ============================================ =======================================================
``CMAKE_BUILD_TYPE`` **RelWithDebInfo**/Release/Debug Type of build, symbols & optimizations
``WarpX_ASCENT`` ON/**OFF** Ascent in situ visualization
``WarpX_COMPUTE`` NOACC/**OMP**/CUDA/DPCPP On-node, accelerated computing backend
``WarpX_DIMS`` **3**/2/RZ Simulation dimensionality
``WarpX_MPI`` **ON**/OFF Multi-node support (message-passing)
``WarpX_MPI_THREAD_MULTIPLE`` **ON**/OFF MPI thread-multiple support, i.e. for ``async_io``
``WarpX_OPENPMD`` ON/**OFF** openPMD I/O (HDF5, ADIOS)
``WarpX_PARSER_DEPTH`` **24** Maximum parser depth for input file functions
``WarpX_PRECISION`` **double**/single Floating point precision (single/double)
``WarpX_PSATD`` ON/**OFF** Spectral solver
``WarpX_QED`` ON/**OFF** PICSAR QED (requires Boost and PICSAR)
``WarpX_amrex_repo`` ``https://github.com/AMReX-Codes/amrex.git`` Repository URI to pull and build AMReX from
``WarpX_amrex_branch`` ``development`` Repository branch for ``WarpX_amrex_repo``
``WarpX_amrex_internal`` **ON**/OFF Needs a pre-installed AMReX library if set to ``OFF``
``WarpX_openpmd_internal`` **ON**/OFF Needs a pre-installed openPMD library if set to ``OFF``
============================= ============================================ =======================================================

For example, one can also build against a local AMReX git repo.
Assuming AMReX' source is located in ``$HOME/src/amrex`` and changes are committed into a branch such as ``my-amrex-branch`` then pass to ``cmake`` the arguments: ``-DWarpX_amrex_repo=file://$HOME/src/amrex -DWarpX_amrex_branch=my-amrex-branch``.
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/building/juwels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Use the following commands to download the WarpX source code and switch to the c
cd ~/src
git clone https://github.com/ECP-WarpX/WarpX.git warpx
git clone --branch QED https://github.com/ECP-WarpX/picsar.git
git clone --branch development https://github.com/ECP-WarpX/picsar.git
git clone --branch development https://github.com/AMReX-Codes/amrex.git
We use the following modules and environments on the system.
Expand Down
Loading

0 comments on commit ca2a20c

Please sign in to comment.