################################################################################
# Parse command line input parameters
PREFIX=~/deal.ii-candi
-PROCS=1
+JOBS=1
CMD_PACKAGES=""
SKIP_READ=false
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"
#####################################
# 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}"
;;
#####################################
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
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
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
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
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 "-------------------------------------------------------------------------------"
# WARNING: do not overwrite this variables!
ORIG_INSTALL_PATH=${INSTALL_PATH}
ORIG_CONFIGURATION_PATH=${CONFIGURATION_PATH}
-ORIG_PROCS=${PROCS}
+ORIG_JOBS=${JOBS}
guess_architecture
unset CONFIG_FILE
unset CHERRYPICKCOMMITS
TARGETS=('' install)
- PROCS=${ORIG_PROCS}
+ JOBS=${ORIG_JOBS}
INSTALL_PATH=${ORIG_INSTALL_PATH}
CONFIGURATION_PATH=${ORIG_CONFIGURATION_PATH}
--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"
--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"