]> https://gitweb.dealii.org/ - candi.git/commitdiff
Replace option --PROCS by --jobs 197/head
authorFabian Castelli <fabian.castelli@kit.edu>
Mon, 7 Jun 2021 17:20:42 +0000 (19:20 +0200)
committerFabian Castelli <fabian.castelli@kit.edu>
Mon, 21 Jun 2021 18:17:17 +0000 (20:17 +0200)
README.md
candi.sh
deal.II-toolchain/packages/astyle.package
deal.II-toolchain/packages/boost.package
deal.II-toolchain/packages/openblas.package
deal.II-toolchain/packages/p4est.package
deal.II-toolchain/packages/parmetis.package

index 6961364908bea389dc4b742791b5c07ec8b3fa76..46c1b8a8f6ecdef22df232126777b75beb5be9e2 100644 (file)
--- a/README.md
+++ b/README.md
@@ -100,9 +100,11 @@ You can combine the command line options given below.
   ./candi.sh --prefix=Your/Prefix/Path
 ```
 
-#### Multiple build processes: ``[-j <N>]``, ``[--PROCS=<N>]``
+#### Multiple build processes: ``[-j<N>]``, ``[-j <N>]``, ``[--jobs=<N>]``
 ```bash
+  ./candi.sh -j<N>
   ./candi.sh -j <N>
+  ./candi.sh --jobs=<N>
 ```
 
 * Example: to use 2 build processes type ``./candi.sh -j 2``.
index b1610218c0559d8240e8b08ccf952da7ed3182a2..7658a24800ef683ed7dcf0a8775976a8febca03f 100755 (executable)
--- a/candi.sh
+++ b/candi.sh
@@ -40,7 +40,7 @@ TIC_GLOBAL="$(${DATE_CMD} +%s)"
 ################################################################################
 # Parse command line input parameters
 PREFIX=~/deal.ii-candi
-PROCS=1
+JOBS=1
 CMD_PACKAGES=""
 SKIP_READ=false
 
@@ -54,7 +54,7 @@ while [ -n "$1" ]; do
            echo "Usage: $0 [options]"
            echo "Options:"
            echo "  -p <path>, --prefix=<path>  set a different prefix path (default $PREFIX)"
-           echo "  -j <N>, -j<N>, --PROCS=<N>  compile with N processes in parallel (default $PROCS)"
+           echo "  -j <N>, -j<N>, --jobs=<N>   compile with N processes in parallel (default ${JOBS})"
            echo "  --platform=<platform>       force usage of a particular platform file"
            echo "  --packages=\"pkg1 pkg2\"      install the given list of packages instead of the default set in candi.cfg"
            echo "  -y, --yes, --assume-yes     automatic yes to prompts"
@@ -83,18 +83,18 @@ while [ -n "$1" ]; do
 
         #####################################
         # Number of maximum processes to use
-        --PROCS=*)
-            PROCS="${param#*=}"
+        --jobs=*)
+            JOBS="${param#*=}"
         ;;
 
         # Make styled processes with or without space
        -j)
            shift
-            PROCS="${1}"
+            JOBS="${1}"
        ;;
 
         -j*)
-            PROCS="${param#*j}"
+            JOBS="${param#*j}"
         ;;
 
         #####################################
@@ -120,8 +120,8 @@ done
 PREFIX_PATH=${PREFIX/#~\//$HOME\/}
 
 RE='^[0-9]+$'
-if [[ ! "$PROCS" =~ $RE || $PROCS<1 ]] ; then
-  echo "ERROR: invalid number of build processes '$PROCS'"
+if [[ ! "${JOBS}" =~ ${RE} || ${JOBS}<1 ]] ; then
+  echo "ERROR: invalid number of build processes '${JOBS}'"
   exit 1
 fi
 
@@ -523,7 +523,7 @@ package_build() {
         fi
 
         for target in "${TARGETS[@]}"; do
-            echo make ${MAKEOPTS} -j ${PROCS} $target >>candi_build
+            echo make ${MAKEOPTS} -j ${JOBS} $target >>candi_build
         done
 
     elif [ ${BUILDCHAIN} = "cmake" ]; then
@@ -531,7 +531,7 @@ package_build() {
         rm -rf ${BUILDDIR}/CMakeFiles
         echo cmake ${CONFOPTS} -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} ${UNPACK_PATH}/${EXTRACTSTO} >>candi_configure
         for target in "${TARGETS[@]}"; do
-            echo make ${MAKEOPTS} -j ${PROCS} $target >>candi_build
+            echo make ${MAKEOPTS} -j ${JOBS} $target >>candi_build
         done
 
     elif [ ${BUILDCHAIN} = "python" ]; then
@@ -541,7 +541,7 @@ package_build() {
     elif [ ${BUILDCHAIN} = "scons" ]; then
         echo cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* . >>candi_configure
         for target in "${TARGETS[@]}"; do
-            echo scons -j ${PROCS} ${CONFOPTS} prefix=${INSTALL_PATH} $target >>candi_build
+            echo scons -j ${JOBS} ${CONFOPTS} prefix=${INSTALL_PATH} $target >>candi_build
         done
 
     elif [ ${BUILDCHAIN} = "custom" ]; then
@@ -885,7 +885,7 @@ cecho ${GOOD} "Package configuration in: $(prettify_dir ${CONFIGURATION_PATH})"
 echo
 
 echo "-------------------------------------------------------------------------------"
-cecho ${INFO} "Number of (at most) build processes to use: PROCS=${PROCS}"
+cecho ${INFO} "Number of (at most) build processes to use: JOBS=${JOBS}"
 echo
 
 echo "-------------------------------------------------------------------------------"
@@ -1047,7 +1047,7 @@ EOF
 # WARNING: do not overwrite this variables!
 ORIG_INSTALL_PATH=${INSTALL_PATH}
 ORIG_CONFIGURATION_PATH=${CONFIGURATION_PATH}
-ORIG_PROCS=${PROCS}
+ORIG_JOBS=${JOBS}
 
 guess_architecture
 
@@ -1098,7 +1098,7 @@ for PACKAGE in ${PACKAGES[@]}; do
     unset CONFIG_FILE
     unset CHERRYPICKCOMMITS
     TARGETS=('' install)
-    PROCS=${ORIG_PROCS}
+    JOBS=${ORIG_JOBS}
     INSTALL_PATH=${ORIG_INSTALL_PATH}
     CONFIGURATION_PATH=${ORIG_CONFIGURATION_PATH}
 
index 09784b915811392c64a33f1a64b278dfb1782d95..6160eadc8a87982a4501c3e2a3a1dfcd382cb3b6 100644 (file)
@@ -13,7 +13,7 @@ package_specific_setup () {
     cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
     cd build/gcc
     mkdir -p ${INSTALL_PATH}
-    make -j${PROCS} >> make.output || bdie "Error in make"
+    make -j${JOBS} >> make.output || bdie "Error in make"
     cp bin/astyle ${INSTALL_PATH}/
 }
 
index a8ee302b2fd67dd5ff1a8c3abfc80dfbf6691617..8611ad38b62b258e86aaa978b5986986972c365b 100644 (file)
@@ -16,7 +16,7 @@ package_specific_build () {
     quit_if_fail "boost build ./bootstrap.sh failed"
     
     echo "using mpi ;" > user-config.jam
-    ./b2 -j ${PROCS} --user-config=user-config.jam --build-dir=candi_build_dir link=shared install ${CONFOPTS}
+    ./b2 -j ${JOBS} --user-config=user-config.jam --build-dir=candi_build_dir link=shared install ${CONFOPTS}
     quit_if_fail "boost build ./b2 failed"
 }
 
index 00a343efd5c285cf54bea96d1053620a33d3be49..28ad34d38517380fa92d29c0ae086835b50b710f 100644 (file)
@@ -20,10 +20,10 @@ package_specific_build () {
     cd ${BUILDDIR}
     cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
 
-    make -j ${PROCS} PREFIX=${INSTALL_PATH}
+    make -j ${JOBS} PREFIX=${INSTALL_PATH}
     quit_if_fail "make failed"
 
-    make install -j ${PROCS} PREFIX=${INSTALL_PATH}
+    make install -j ${JOBS} PREFIX=${INSTALL_PATH}
     quit_if_fail "make install failed"
 }
 
index ecdfbd23c2b9ac05239a038be0a1545f97e5a1d7..e357a6026b7f8bb65a8971b3a99f18a207088f66 100644 (file)
@@ -83,8 +83,8 @@ package_specific_setup () {
         --prefix="$INSTALL_FAST" CFLAGS="$CFLAGS_FAST" \
         CPPFLAGS="-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL" F77="$FF" \
         "$@" > config.output || bdie "Error in configure"
-    make -C sc -j${PROCS} > make.output || bdie "Error in make sc"
-    make -j${PROCS} >> make.output || bdie "Error in make p4est"
+    make -C sc -j${JOBS} > make.output || bdie "Error in make sc"
+    make -j${JOBS} >> make.output || bdie "Error in make p4est"
     make install >> make.output || bdie "Error in make install"
     echo "FAST version installed in $INSTALL_FAST"
     
@@ -97,8 +97,8 @@ package_specific_setup () {
         --prefix="$INSTALL_DEBUG" CFLAGS="$CFLAGS_DEBUG" \
         CPPFLAGS="-DSC_LOG_PRIORITY=SC_LP_ESSENTIAL" F77="$FF" \
         "$@" > config.output || bdie "Error in configure"
-    make -C sc -j${PROCS} > make.output || bdie "Error in make sc"
-    make -j${PROCS} >> make.output || bdie "Error in make p4est"
+    make -C sc -j${JOBS} > make.output || bdie "Error in make sc"
+    make -j${JOBS} >> make.output || bdie "Error in make p4est"
     make install >> make.output || bdie "Error in make install"
     grep -q "#define P4EST_HAVE_ZLIB" $INSTALL_DEBUG/include/p4est_config.h || bdie "Error: p4est couldn't find zlib"
     echo "DEBUG version installed in $INSTALL_DEBUG"
index 2a4ec83f19a19ba37f34c96da30b7713f06b85d4..56bf695cb4fff28d31d1828e5bc3702c36bc6ef4 100644 (file)
@@ -16,7 +16,7 @@ package_specific_build() {
     make config prefix=${INSTALL_PATH} shared=1
     quit_if_fail "parmetis/metis make config failed"
     
-    make -j${PROCS}
+    make -j${JOBS}
     quit_if_fail "parmetis/metis make failed"
     
     make install
@@ -28,7 +28,7 @@ package_specific_build() {
     make config prefix=${INSTALL_PATH} shared=1 cc=$CC cxx=$CXX
     quit_if_fail "parmetis make config failed"
     
-    make -j${PROCS}
+    make -j${JOBS}
     quit_if_fail "parmetis make failed"
     
     make install

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.