Skip to content

Commit

Permalink
Fixed conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Mateevitsi committed Oct 10, 2024
2 parents fa07548 + c6d5e2e commit d069266
Show file tree
Hide file tree
Showing 42 changed files with 3,448 additions and 176 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ and this project aspires to adhere to [Semantic Versioning](https://semver.org/s
### Added
- Added support for unstructured topologies with mixed elements types (for example, hexs and tets).
- Added support for `pyramid` and `wedge` elements.
- Added `sphere`, `cylinder`, `box`, and `plane` options to the slice filter.
- Added a `topologies` option to the relay extract. This allows you to select which topologies are saved. This option can be used with the existing `fields` option, the result is the union of the selected topologies and fields.
- Added `near_plane` and `far_plane` to the camera details provided in Ascent::info()
- Added `add_mpi_ranks` and `add_domain_ids` filters for adding rank and domain fields to a mesh

### Changed
- Changed the replay utility's binary names such that `replay_ser` is now `ascent_replay` and `raplay_mpi` is now `ascent_replay_mpi`. This will help prevent potential name collisions with other tools that also have replay utilities.

### Fixed
- Resolved a few cases where MPI_COMM_WORLD was used instead instead of the selected MPI communicator.
Expand Down
55 changes: 49 additions & 6 deletions scripts/build_ascent/build_ascent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ enable_fortran="${enable_fortran:=OFF}"
enable_python="${enable_python:=OFF}"
enable_openmp="${enable_openmp:=OFF}"
enable_mpi="${enable_mpi:=OFF}"
enable_mpicc="${enable_mpicc:=OFF}"
enable_find_mpi="${enable_find_mpi:=ON}"
enable_tests="${enable_tests:=OFF}"
enable_verbose="${enable_verbose:=ON}"
Expand Down Expand Up @@ -187,6 +188,12 @@ if [ ! -z ${FTN+x} ]; then
cmake_compiler_settings="${cmake_compiler_settings} -DCMAKE_Fortran_COMPILER:PATH=${FTN}"
fi

############################
# mpi related vars
############################
mpicc_exe="${mpicc_exe:=mpicc}"
mpicxx_exe="${mpicxx_exe:=mpic++}"

################
# print all build_ZZZ and enable_ZZZ options
################
Expand Down Expand Up @@ -359,6 +366,11 @@ else
echo "**** Skipping Python venv build, install found at: ${venv_install_dir}"
fi # build_pyvenv

if ${build_pyvenv}; then
venv_python_ver=`${venv_python_exe} -c "import sys;print('{0}.{1}'.format(sys.version_info.major, sys.version_info.minor))"`
venv_python_site_pkgs_dir=${venv_install_dir}/lib/python${venv_python_ver}/site-packages
fi

################
# Caliper
################
Expand Down Expand Up @@ -391,21 +403,35 @@ fi
# -DWITH_CUPTI=ON -DWITH_NVTX=ON -DCUDA_TOOLKIT_ROOT_DIR={path} -DCUPTI_PREFIX={path}
# -DWITH_ROCTRACER=ON -DWITH_ROCTX=ON -DROCM_PREFIX={path}

caliper_windows_cmake_flags="-DCMAKE_CXX_STANDARD=17 -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON"
caliper_windows_cmake_flags="-DCMAKE_CXX_STANDARD=17 -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DWITH_TOOLS=OFF"

caliper_extra_cmake_args=""
if [[ "$build_windows" == "ON" ]]; then
caliper_extra_cmake_args="${caliper_windows_cmake_flags}"
fi

# TODO enable_cuda

if [[ "$enable_hip" == "ON" ]]; then
caliper_extra_cmake_args="${caliper_extra_cmake_args} -DWITH_ROCTRACER=ON"
caliper_extra_cmake_args="${caliper_extra_cmake_args} -DWITH_ROCTX=ON"
caliper_extra_cmake_args="${caliper_extra_cmake_args} -DROCM_PREFIX:PATH=${ROCM_PATH}"
caliper_extra_cmake_args="${caliper_extra_cmake_args} -DROCM_ROOT_DIR:PATH=${ROCM_PATH}"
fi

if [[ "$enable_mpicc" == "ON" ]]; then
caliper_extra_cmake_args="${caliper_extra_cmake_args} -DMPI_C_COMPILER=${mpicc_exe}"
caliper_extra_cmake_args="${caliper_extra_cmake_args} -DMPI_CXX_COMPILER=${mpicxx_exe}"
fi


echo "**** Configuring Caliper ${caliper_version}"
cmake -S ${caliper_src_dir} -B ${caliper_build_dir} ${cmake_compiler_settings} \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=${enable_verbose} \
-DCMAKE_BUILD_TYPE=${build_config} \
-DBUILD_SHARED_LIBS=${build_shared_libs} \
-DCMAKE_INSTALL_PREFIX=${caliper_install_dir} \
-DWITH_TOOLS=OFF \
-DWITH_MPI=${enable_mpi} ${caliper_windows_cmake_flags}
-DWITH_MPI=${enable_mpi} ${caliper_extra_cmake_args}

echo "**** Building Caliper ${caliper_version}"
cmake --build ${caliper_build_dir} --config ${build_config} -j${build_jobs}
Expand Down Expand Up @@ -452,6 +478,7 @@ conduit_extra_cmake_opts=-DENABLE_PYTHON=${enable_python}
if ${build_pyvenv}; then
conduit_extra_cmake_opts="${conduit_extra_cmake_opts} -DPYTHON_EXECUTABLE=${venv_python_exe}"
conduit_extra_cmake_opts="${conduit_extra_cmake_opts} -DSPHINX_EXECUTABLE=${venv_sphinx_exe}"
conduit_extra_cmake_opts="${conduit_extra_cmake_opts} -DPYTHON_MODULE_INSTALL_PREFIX=${venv_python_site_pkgs_dir}"
fi

if ${build_caliper}; then
Expand All @@ -462,6 +489,11 @@ if ${build_silo}; then
conduit_extra_cmake_opts="${conduit_extra_cmake_opts} -DSILO_DIR=${silo_install_dir}"
fi

if [[ "$enable_mpicc" == "ON" ]]; then
conduit_extra_cmake_opts="${conduit_extra_cmake_opts} -DMPI_C_COMPILER=${mpicc_exe}"
conduit_extra_cmake_opts="${conduit_extra_cmake_opts} -DMPI_CXX_COMPILER=${mpicxx_exe}"
fi

echo "**** Configuring Conduit ${conduit_version}"
cmake -S ${conduit_src_dir}/src -B ${conduit_build_dir} ${cmake_compiler_settings} \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=${enable_verbose} \
Expand Down Expand Up @@ -492,7 +524,7 @@ fi # build_conduit
#########################
kokkos_version=3.7.02
kokkos_src_dir=$(ospath ${source_dir}/kokkos-${kokkos_version})
kokkos_build_dir=$(ospath ${build_dir}kokkos-${kokkos_version})
kokkos_build_dir=$(ospath ${build_dir}/kokkos-${kokkos_version})
kokkos_install_dir=$(ospath ${install_dir}/kokkos-${kokkos_version}/)
kokkos_tarball=$(ospath ${source_dir}/kokkos-${kokkos_version}.tar.gz)

Expand Down Expand Up @@ -575,13 +607,13 @@ fi

vtkm_extra_cmake_args=""
if [[ "$enable_cuda" == "ON" ]]; then
vtkm_extra_cmake_args="-DVTKm_ENABLE_CUDA=ON"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DVTKm_ENABLE_CUDA=ON"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DCMAKE_CUDA_HOST_COMPILER=${CXX}"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCH}"
fi

if [[ "$enable_hip" == "ON" ]]; then
vtkm_extra_cmake_args="-DVTKm_ENABLE_KOKKOS=ON"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DVTKm_ENABLE_KOKKOS=ON"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DCMAKE_PREFIX_PATH=${kokkos_install_dir}"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DCMAKE_HIP_ARCHITECTURES=${ROCM_ARCH}"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DVTKm_ENABLE_KOKKOS_THRUST=OFF"
Expand All @@ -593,6 +625,11 @@ if [[ "$enable_sycl" == "ON" ]]; then
vtkm_extra_cmake_args="-DCMAKE_CXX_FLAGS=-fPIC -fp-model=precise -Wno-unused-command-line-argument -Wno-deprecated-declarations -fsycl-device-code-split=per_kernel -fsycl-max-parallel-link-jobs=128"
fi

if [[ "$enable_mpicc" == "ON" ]]; then
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DMPI_C_COMPILER=${mpicc_exe}"
vtkm_extra_cmake_args="${vtkm_extra_cmake_args} -DMPI_CXX_COMPILER=${mpicxx_exe}"
fi

echo "**** Configuring VTK-m ${vtkm_version}"
cmake -S ${vtkm_src_dir} -B ${vtkm_build_dir} ${cmake_compiler_settings} \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=${enable_verbose}\
Expand Down Expand Up @@ -925,6 +962,11 @@ if [ ! -z ${FFLAGS+x} ]; then
echo 'set(CMAKE_F_FLAGS "' ${FFLAGS} '" CACHE PATH "")' >> ${root_dir}/ascent-config.cmake
fi

if [[ "$enable_mpicc" == "ON" ]]; then
echo 'set(MPI_C_COMPILER ' ${mpicc_exe} ' CACHE PATH "")' >> ${root_dir}/ascent-config.cmake
echo 'set(MPI_CXX_COMPILER ' ${mpicxx_exe} ' CACHE PATH "")' >> ${root_dir}/ascent-config.cmake
fi

echo 'set(CMAKE_VERBOSE_MAKEFILE ' ${enable_verbose} ' CACHE BOOL "")' >> ${root_dir}/ascent-config.cmake
echo 'set(CMAKE_BUILD_TYPE ' ${build_config} ' CACHE STRING "")' >> ${root_dir}/ascent-config.cmake
echo 'set(BUILD_SHARED_LIBS ' ${build_shared_libs} ' CACHE STRING "")' >> ${root_dir}/ascent-config.cmake
Expand All @@ -936,6 +978,7 @@ echo 'set(ENABLE_FORTRAN ' ${enable_fortran} ' CACHE BOOL "")' >> ${root_dir}/as
echo 'set(ENABLE_PYTHON ' ${enable_python} ' CACHE BOOL "")' >> ${root_dir}/ascent-config.cmake
if ${build_pyvenv}; then
echo 'set(PYTHON_EXECUTABLE ' ${venv_python_exe} ' CACHE PATH "")' >> ${root_dir}/ascent-config.cmake
echo 'set(PYTHON_MODULE_INSTALL_PREFIX ' ${venv_python_site_pkgs_dir} ' CACHE PATH "")' >> ${root_dir}/ascent-config.cmake
echo 'set(ENABLE_DOCS ON CACHE BOOL "")' >> ${root_dir}/ascent-config.cmake
echo 'set(SPHINX_EXECUTABLE ' ${venv_sphinx_exe} ' CACHE PATH "")' >> ${root_dir}/ascent-config.cmake
fi
Expand Down
18 changes: 10 additions & 8 deletions scripts/build_ascent/build_ascent_hip_frontier.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
module load cmake #3.23.2
module load PrgEnv-cray
module load craype-accel-amd-gfx90a
module load rocm/5.2.0 #wait for 5.5
module load cray-mpich/8.1.23
module load cce/15.0.1
module load rocm/5.7.1
module load cray-mpich/8.1.28
module load cce/17.0.0
module load cray-python/3.11.5


export MPICH_GPU_SUPPORT_ENABLED=1
export ROCM_ARCH=gfx90a
export CC=$(which cc)
export CXX=$(which CC)
export FTN=$(which ftn)
export CFLAGS="-I${ROCM_PATH}/include"
export CXXFLAGS="-I${ROCM_PATH}/include -Wno-pass-failed"
export LDFLAGS="-L${ROCM_PATH}/lib -lamdhip64"
export HIPFLAGS="-I/opt/cray/pe/mpich/default/ofi/rocm-compiler/5.0/include/"
env enable_mpi=ON enable_find_mpi=OFF ./build_ascent_hip.sh
export CFLAGS="${CRAY_ROCM_INCLUDE_OPTS} -I/opt/cray/pe/mpich/8.1.28/ofi/crayclang/17.0/include/"
export CXXFLAGS="${CRAY_ROCM_INCLUDE_OPTS} -I/opt/cray/pe/mpich/8.1.28/ofi/crayclang/17.0/include/ -Wno-pass-failed"
export LDFLAGS="${CRAY_ROCM_POST_LINK_OPTS}"
#export HIPFLAGS="-I/opt/cray/pe/mpich/default/ofi/rocm-compiler/5.0/include/"
env enable_mpi=ON enable_find_mpi=OFF build_pyvenv=true ENABLE_PYTHON=ON ./build_ascent_hip.sh


19 changes: 19 additions & 0 deletions scripts/build_ascent/build_ascent_hip_rzadams.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module load cmake/3.24.2
module load craype-accel-amd-gfx940
module load rocmcc/6.1.2-magic

export MPICH_GPU_SUPPORT_ENABLED=1
export ROCM_ARCH=gfx942

export CC=/usr/tce/packages/rocmcc/rocmcc-6.1.2-magic/bin/amdclang
export CXX=/usr/tce/packages/rocmcc/rocmcc-6.1.2-magic/bin/amdclang++
export ROCM_PATH=/usr/tce/packages/rocmcc/rocmcc-6.1.2-magic/

export enable_mpi="${enable_mpi:=ON}"
export enable_python="${enable_python:=ON}"
export build_caliper="${build_caliper:=true}"
export build_pyvenv="${bbuild_pyvenv:=true}"

./build_ascent_hip.sh


20 changes: 10 additions & 10 deletions scripts/build_ascent/build_ascent_hip_rzvernal.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module load cmake/3.24.2
module load craype-accel-amd-gfx90a
module load rocm/5.2.3
module load cray-mpich
module load rocmcc/6.1.2-magic

export MPICH_GPU_SUPPORT_ENABLED=1
export ROCM_ARCH=gfx90a
#export CC=$(which cc)
#export CXX=$(which CC)
#export FTN=$(which ftn)

export CC=/opt/rocm-5.2.3/llvm/bin/amdclang
export CXX=/opt/rocm-5.2.3/llvm/bin/amdclang++
export CFLAGS="-I${ROCM_PATH}/include"
export CXXFLAGS="-I${ROCM_PATH}/include -Wno-pass-failed"
export LDFLAGS="-L${ROCM_PATH}/lib -lamdhip64"
export CC=/usr/tce/packages/rocmcc/rocmcc-6.1.2-magic/bin/amdclang
export CXX=/usr/tce/packages/rocmcc/rocmcc-6.1.2-magic/bin/amdclang++
export ROCM_PATH=/usr/tce/packages/rocmcc/rocmcc-6.1.2-magic/

export enable_mpi="${enable_mpi:=ON}"
export enable_python="${enable_python:=ON}"
export build_caliper="${build_caliper:=true}"
export build_pyvenv="${bbuild_pyvenv:=true}"

./build_ascent_hip.sh


1 change: 0 additions & 1 deletion src/cmake/thirdparty/SetupCaliper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ find_package(caliper REQUIRED


set(CALIPER_FOUND TRUE)
set(CONDUIT_USE_CALIPER TRUE)
47 changes: 47 additions & 0 deletions src/docs/sphinx/Actions/Pipelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,53 @@ The output field of the MIR Filter will be the name of the material set and can
params["iterations"] = 8; //default: 0
params["max_error"] = 0.00001; //default: 0.00001

Add MPI Ranks as Field Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ascent provides a filter to add MPI rank information to a mesh.
If the input data has multiple topolgies, the user must specify which topology to add the new field to.
The user also has the option of specifying the output name for the new field.

.. code-block:: c++

conduit::Node pipelines;
// pipeline 1
pipelines["pl1/f1/type"] = "add_mpi_ranks";
//params optional
conduit::Node &params = pipelines["pl1/f1/params"];
params["output"] = "ranks";//default: "mpi_ranks"
params["topology"] = "topo"; //required if data has multiple topologies

.. _addmpiranks:

.. figure:: ../images/add_mpi_ranks.png
:scale: 50 %
:align: center

An example of creating a pseudocolor plot of MPI ranks.

Add Domain IDs as Field Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ascent provides a filter to add domain ID information to a mesh.
If the input data has multiple topolgies, the user must specify which topology to add the new field to.
The user also has the option of specifying the output name for the new field.

.. code-block:: c++

conduit::Node pipelines;
// pipeline 1
pipelines["pl1/f1/type"] = "add_domain_ids";
//params optional
conduit::Node &params = pipelines["pl1/f1/params"];
params["output"] = "domain_ids";//default: "domain_ids"
params["topology"] = "topo"; //required if data has multiple topologies

.. _adddomainids:

.. figure:: ../images/add_domain_ids.png
:scale: 50 %
:align: center

An example of creating a pseudocolor plot of domain IDs.

Partitioning
~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion src/docs/sphinx/Tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Tutorial Overview
==================

`Latest Ascent Tutorial Intro Slides [pdf] <https://www.ascent-dav.org/tutorial/2024_08_05_ascent_intro.pdf>`_
`Latest Ascent Tutorial Intro Slides [pdf] <https://www.ascent-dav.org/tutorial/2024_08_20_ascent_tutorial.pdf>`_


This tutorial introduces how to use Ascent, including basics about:
Expand Down
18 changes: 9 additions & 9 deletions src/docs/sphinx/Utilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ How Do I Use It?
Replay executables are created in the ``utilities/replay`` directory of the installation or build.
There are two versions of replay:

* ``replay_ser``: a serial (non-MPI) version
* ``replay_mpi``: an MPI version
* ``ascent_replay``: a serial (non-MPI) version
* ``ascent_replay_mpi``: an MPI version

The options for replay are:

Expand All @@ -114,9 +114,9 @@ Example launches:

.. code:: bash
./replay_ser --root=clover.cycle_000060.root --actions=my_actions.json
srun -n 8 ./replay_mpi --root=clover.cycle_000060.root --actions=my_actions.json
srun -n 8 ./replay_mpi --cycles=cycles_list.txt --actions=my_actions.json
./ascent_replay --root=clover.cycle_000060.root --actions=my_actions.json
srun -n 8 ./ascent_replay_mpi --root=clover.cycle_000060.root --actions=my_actions.json
srun -n 8 ./ascent_replay_mpi --cycles=cycles_list.txt --actions=my_actions.json
The cycles files list is a text file containing one root file per line:

Expand All @@ -132,7 +132,7 @@ Replay will loop over these files in the order in which they appear in the file.

Domain Overloading
^^^^^^^^^^^^^^^^^^
Each root file can point to any number of domains. When launching ``replay_mpi``,
Each root file can point to any number of domains. When launching ``ascent_replay_mpi``,
you can specify any number of ranks less than or equal to the number of domains.
Replay will automatically domain overload. For example if there were 100 domains and
replay is launched with 50 ranks, then each rank will load 2 domains.
Expand Down Expand Up @@ -266,8 +266,8 @@ paste your yaml into the site and validate if the syntax is correct.
Running Replay
^^^^^^^^^^^^^^
We have created an actions file and now we want to run it.
We have two choices: use the mpi version ``replay_mpi`` or the serial
version ``replay_ser``. What you use depends on the data set, but since our
We have two choices: use the mpi version ``ascent_replay_mpi`` or the serial
version ``ascent_replay``. What you use depends on the data set, but since our
sample data size is small, the serial version will work just fine.


Expand All @@ -277,7 +277,7 @@ yaml actions file is called ``ascent_actions.yaml``.

.. code:: bash
./replay_ser --cycles=clover_cycles --actions=ascent_actions.yaml
./ascent_replay --cycles=clover_cycles --actions=ascent_actions.yaml
The result produces 20 images, but Ascent emits warnings:

Expand Down
Binary file added src/docs/sphinx/images/add_domain_ids.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/docs/sphinx/images/add_mpi_ranks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/libs/ascent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ set(ASCENT_PYTHON_ENABLED ${PYTHON_FOUND})
set(ASCENT_PYTHON_EXECUTABLE ${PYTHON_FOUND})

set(ASCENT_LOGGING_ENABLED ${ENABLE_LOGGING})
set(ASCENT_CALIPER_ENABLED ${CALIPER_FOUND})

set(ASCENT_SOURCE_WEB_CLIENT_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/web_clients)

Expand Down
2 changes: 1 addition & 1 deletion src/libs/ascent/ascent_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#cmakedefine ASCENT_PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@"

#cmakedefine ASCENT_LOGGING_ENABLED "@ENABLE_LOGGING@"
#cmakedefine ASCENT_CALIPER_ENABLED "@ASCENT_CALIPER_ENABLED@"
#cmakedefine ASCENT_CALIPER_ENABLED "@CALIPER_FOUND@"

// this path points to the web client js code tree
#cmakedefine ASCENT_SOURCE_WEB_CLIENT_ROOT "@ASCENT_SOURCE_WEB_CLIENT_ROOT@"
Expand Down
Loading

0 comments on commit d069266

Please sign in to comment.