- Need to have access to a
Wire-Cell Toolkit
build and its dependencies. - Need to have access to a
Kokkos
build.
Within shifter container:
git clone https://github.com/WireCell/wire-cell-gen-kokkos.git
cd wire-cell-gen-kokkos
./configure /path/to/kokkos /path/to/install
./wcb install
To build on other machines, change the configure
to find the needed dependencies.
example configuration for using Kokkos-cuda on Cori:
KOKKOS_PATH=$1
INSTALL=$2
KOKKOS_INC=$KOKKOS_PATH/include
KOKKOS_LIB=$KOKKOS_PATH/lib64
./wcb configure --prefix=$INSTALL \
--with-tbb="$TBBROOT" \
--with-jsoncpp="$JSONCPP_FQ_DIR" \
--with-jsonnet="$JSONNET_FQ_DIR" \
--with-eigen-include="<path-to-eigen-3.3.7>" \
--with-root="$ROOTSYS" \
--with-fftw="$FFTW_FQ_DIR" \
--with-fftw-include="$FFTW_INC" \
--with-fftw-lib="$FFTW_LIBRARY" \
--with-fftwthreads="$FFTW_FQ_DIR" \
--boost-includes="$BOOST_INC" \
--boost-libs="$BOOST_LIB" \
--boost-mt \
--with-cuda="$CUDA_PATH/" \
--with-cuda-lib="$CUDA_PATH/lib64" \
--with-wct=$WIRECELL_FQ_DIR/ \
--with-wct-lib=$WIRECELL_LIB \
--with-kokkos=$KOKKOS_PATH/ \
--with-kokkos-include=$KOKKOS_INC/ \
--with-kokkos-lib=$KOKKOS_LIB/ \
--kokkos-options="cuda" \
--with-spdlog-lib=$SPDLOG_LIB \
--with-spdlog-include=$SPDLOG_INC \
note: Eigen 3.3.7 is needed to compile source code including Eigen with nvcc
run the kokkos unit test manually:
In the source folder (one level above build)
$./build/test_kokkos
Total size S = 4194304 N = 4096 M = 1024
Kokkos::OpenMP::initialize WARNING: OMP_PROC_BIND environment variable not set
In general, for best performance with OpenMP 4.0 or better set OMP_PROC_BIND=spread and OMP_PLACES=threads
For best performance with OpenMP 3.1 set OMP_PROC_BIND=true
For unit testing set OMP_PROC_BIND=false
Computed result for 4096 x 1024 is 4194304.000000
N( 4096 ) M( 1024 ) nrepeat ( 100 ) problem( 33.5954 MB ) time( 0.076382 s ) bandwidth( 43.9834 GB/s )
wire-cell-data
contains needed data files, e.g. geometry files, running full tests.
git clone https://github.com/WireCell/wire-cell-data.git
wire-cell
searches pathes in this env var for configuration and data files.
for bash, run something like this below:
export WIRECELL_PATH=$WIRECELL_FQ_DIR/wirecell-0.14.0/cfg # main cfg
export WIRECELL_PATH=$WIRECELL_DATA_PATH:$WIRECELL_PATH # data
export WIRECELL_PATH=$WIRECELL_GEN_KOKKOS_INSTALL_PATH/share/wirecell/cfg:$WIRECELL_PATH # gen-kokkos
Variable meaning:
$WIRECELL_FQ_DIR
is a variable defined developing in Kyle's container orsetup wirecell
in a Fermilab ups system, current version is0.14.0
, may upgrade in the future.WIRECELL_DATA_PATH
refer to the git repository cloned from the previous stepWIRECELL_GEN_KOKKOS_INSTALL_PATH
refer to the install path of thewire-cell-gen-kokkos
standalone package.
export LD_LIBRARY_PATH=$WIRECELL_GEN_KOKKOS_INSTALL_PATH/lib64/:$LD_LIBRARY_PATH
- input: a root file (refered to as
g4.root
below) containing Geant4 energy depo (sim::SimEnergyDeposits
) - in the example folder:
lar -n 1 -c sim.fcl g4.root