Skip to content

Commit

Permalink
Merge pull request #735 from gonuke/update_jobs_var
Browse files Browse the repository at this point in the history
Change name of var for make file parallelization
  • Loading branch information
pshriwise authored Mar 28, 2021
2 parents 1a8fb79 + 2685f37 commit adb7ef3
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CI/circleci/build_dagmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function build_dagmc() {
-DCMAKE_INSTALL_PREFIX=${install_dir} \
-DDOUBLE_DOWN=${double_down} \
-Ddd_ROOT=${double_down_install_dir}
make -j${jobs}
make -j${ci_jobs}
make install
}

Expand Down
2 changes: 1 addition & 1 deletion CI/circleci/build_double_down.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ ln -snf double-down src
cd ${double_down_build_dir}/bld
cmake ${double_down_build_dir}/src -DCMAKE_INSTALL_PREFIX=${double_down_install_dir} \
-DMOAB_DIR=${moab_install_dir} -DEMBREE_DIR=$HOME/EMBREE/
make -j${jobs}
make -j${ci_jobs}
make install
cd
16 changes: 9 additions & 7 deletions CI/docker/build_geant4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,33 @@
set -ex

# Geant version and corresponding SHASUM
export geant4_version=10.05
export geant4_shasum=4b05b4f7d50945459f8dbe287333b9efb772bd23d50920630d5454ec570b782d
export geant4_version=10.5.1
export geant4_basename=geant4-v${geant4_version}
export geant4_tarball=${geant4_basename}.tar.gz
export geant4_shasum=2397eb859dc4de095ff66059d8bda9f060fdc42e10469dd7890946293eeb0e39

source ${docker_env}

rm -rf ${geant4_build_dir}/bld ${geant4_install_dir}
mkdir -p ${geant4_build_dir}/bld
cd ${geant4_build_dir}
wget https://geant4.cern.ch/support/source/geant4.${geant4_version}.tar.gz --no-check-certificate
tar_chashum=$(sha256sum ${geant4_version}.tar.gz | cut -d' ' -f1)
wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${geant4_version}/${geant4_tarball} --no-check-certificate
tar_chashum=$(sha256sum ${geant4_tarball} | cut -d' ' -f1)
if [ $geant4_shasum != $tar_chashum ]; then
echo "Bad shasum for Geant4 tar!"
exit 1
fi

tar -xzf geant4.${geant4_version}.tar.gz
tar -xzf ${geant4_tarball}
cd bld
cmake ../geant4.${geant4_version} -DBUILD_STATIC_LIBS=ON \
cmake ../${geant4_basename} -DBUILD_STATIC_LIBS=ON \
-DGEANT4_USE_SYSTEM_EXPAT=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-DCMAKE_INSTALL_RPATH=${geant4_install_dir}/lib \
-DCMAKE_INSTALL_PREFIX=${geant4_install_dir}
make -j${jobs}
make -j${ci_jobs}
make install
cd
rm -rf ${geant4_build_dir}
2 changes: 1 addition & 1 deletion CI/docker/build_hdf5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cd bld
../hdf5-${HDF5_VERSION}/configure --enable-shared \
--prefix=${hdf5_install_dir} \
CC=${CC} CXX=${CXX}
make -j${jobs}
make -j${ci_jobs}
make install
cd
rm -rf ${hdf5_build_dir}
2 changes: 1 addition & 1 deletion CI/docker/build_moab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd ../bld
--with-hdf5=${hdf5_install_dir} \
--prefix=${moab_install_dir} \
CC=${CC} CXX=${CXX}
make -j${jobs}
make -j${ci_jobs}
make install
cd
rm -rf ${moab_build_dir}
4 changes: 2 additions & 2 deletions CI/env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

export jobs=`grep -c processor /proc/cpuinfo`
export ci_jobs=`grep -c processor /proc/cpuinfo`

export CTEST_OUTPUT_ON_FAILURE=1

Expand All @@ -20,7 +20,7 @@ export FC=`which gfortran`
if [ "$COMPILER" == "gcc" ]; then
export CC=`which gcc`
export CXX=`which g++`
export jobs="4"
export ci_jobs="4"
elif [ "$COMPILER" == "clang" ]; then
export CC=`which clang`
export CXX=`which clang++`
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
option(GIT_SUBMODULE "Check submodules during build" ON)
if(GIT_SUBMODULE)
message(STATUS "Submodule update")
set(ENV{jobs} "")
execute_process(COMMAND ${GIT_EXECUTABLE} "submodule" "update" "--init" "--recursive"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
Expand Down
15 changes: 15 additions & 0 deletions news/PR-0735.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**Added:** None

**Changed:** None

- updated location & checksum of GEANT4 tarball

**Deprecated:** None

**Removed:** None

**Fixed:**

- Renamed `jobs` variable CI build system to avoid undocumented conflict with `git submodule`

**Security:** None

0 comments on commit adb7ef3

Please sign in to comment.