Loading include/config.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -81,8 +81,8 @@ constexpr auto dir = "metadata"; // which metadata should be considered apart from size and mode constexpr auto use_atime = false; constexpr auto use_ctime = false; constexpr auto use_mtime = false; constexpr auto use_ctime = true; constexpr auto use_mtime = true; constexpr auto use_link_cnt = false; constexpr auto use_blocks = false; /* Loading scripts/profiles/0.9.1/mogon2.specs +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ clonedeps=( ["margo"]="v0.9.6" ["syscall_intercept"]="2c8765fa292bc9c28a22624c528580d54658813d" ["date"]="e7e1482087f58913b80a20b04d5c58d9d6d90155" ["parallax"]="c130decd7a71c60c20b98d6a23924f05f754c3cd" #["parallax"]="c130decd7a71c60c20b98d6a23924f05f754c3cd" ) # Extra arguments for git clone Loading @@ -67,7 +67,7 @@ clonedeps_patches=( # Ordering that MUST be followed when downloading order=( "lz4" "capstone" "json-c" "psm2" "libfabric" "mercury" "argobots" "margo" "rocksdb" "syscall_intercept" "date" "parallax" "lz4" "capstone" "json-c" "psm2" "libfabric" "mercury" "argobots" "margo" "rocksdb" "syscall_intercept" "date" #"parallax" ) # Extra arguments passed to the installation script. As such, they can Loading scripts/run/gkfs +52 −24 Original line number Diff line number Diff line #!/bin/bash # colors and shell styles # check for color support and set variables if [ "$(tput colors)" -gt 2 ]; then C_GREEN='\033[0;32m' # green C_BYELLOW='\033[1;33m' # Bold yellow C_BRED='\033[1;31m' # Bold red C_NONE='\033[0m' # No color else C_GREEN='' C_BYELLOW='' C_BRED='' C_NONE='' fi C_AST_GREEN="${C_GREEN}*${C_NONE} [gkfs] " C_AST_YELLOW="${C_BYELLOW}*${C_NONE} [gkfs] " C_AST_RED="${C_BRED}*${C_NONE} [gkfs] " ####################################### # Poll GekkoFS hostsfile until all daemons are started. # Exits with 1 if daemons cannot be started. Loading @@ -23,7 +39,7 @@ wait_for_gkfs_daemons() { sleep 2 server_wait_cnt=$((server_wait_cnt+1)) if [ ${server_wait_cnt} -gt 600 ]; then echo "Server failed to start. Exiting ..." echo -e "${C_AST_RED}Server failed to start. Exiting ..." exit 1 fi done Loading @@ -43,7 +59,7 @@ create_pid_file() { local pid_file=${DAEMON_PID_FILE} local pid=${1} if [[ ${VERBOSE} == true ]]; then echo "Creating pid file at ${pid_file} with pid ${pid} ..." echo -e "${C_AST_GREEN}Creating pid file at ${pid_file} with pid ${pid} ..." fi # if PID file exists another daemon could run if [[ -e ${pid_file} ]]; then Loading Loading @@ -93,17 +109,19 @@ start_daemon() { fi # Setting up base srun cmd srun_cmd="srun --disable-status -N ${NODE_NUM} --ntasks=${NODE_NUM} --cpus-per-task=${CPUS_PER_TASK} ${SRUN_ARGS} " else NODE_NUM=1 fi if [[ ${VERBOSE} == true ]]; then echo "### mountdir: ${MOUNTDIR}" echo "### rootdir: ${ROOTDIR}" echo "### node_num: ${NODE_NUM}" echo "### additional daemon args: ${ARGS}" echo "### cpus_per_task: ${CPUS_PER_TASK}" echo -e "${C_AST_GREEN}mountdir: ${MOUNTDIR}" echo -e "${C_AST_GREEN}rootdir: ${ROOTDIR}" echo -e "${C_AST_GREEN}node_num: ${NODE_NUM}" echo -e "${C_AST_GREEN}additional daemon args: ${ARGS}" echo -e "${C_AST_GREEN}cpus_per_task: ${CPUS_PER_TASK}" fi if [[ ${VERBOSE} == true ]]; then echo "# Cleaning host file ..." echo -e "${C_AST_GREEN}Cleaning host file ..." fi rm "${HOSTSFILE}" 2> /dev/null # Setting up base daemon cmd Loading @@ -116,30 +134,38 @@ start_daemon() { daemon_execute="${srun_cmd}${daemon_cmd}" if [[ ${VERBOSE} == true ]]; then echo "### Full execute DAEMON command:" echo "##### $daemon_execute" echo -e "${C_AST_GREEN}Full execute DAEMON command:" echo -e "${C_AST_GREEN}# $daemon_execute" fi # setup environment variables export GKFS_DAEMON_LOG_PATH=$GKFS_DAEMON_LOG_PATH export GKFS_DAEMON_LOG_LEVEL=$GKFS_DAEMON_LOG_LEVEL echo "Starting daemons ..." echo -e "${C_AST_GREEN}Starting GekkoFS daemons (${NODE_NUM} nodes) ..." start_time="$(date -u +%s.%3N)" ${daemon_execute} & local daemon_pid=$! wait_for_gkfs_daemons echo "Running ..." stop_time="$(date -u +%s.%3N)" elapsed="$(bc <<<"$stop_time-$start_time")" echo -e "${C_AST_GREEN}GekkoFS daemons running" echo -e "${C_AST_GREEN}Startup time: ${elapsed} seconds" if [[ ${RUN_FOREGROUND} == true ]]; then echo "Press 'q' to exit" while : ; do read -n 1 k <&1 if [[ $k = q ]] ; then start_time="$(date -u +%s.%3N)" echo echo "Shutting down ..." echo -e "${C_AST_GREEN}Shutting down GekkoFS daemons ..." if [[ -n ${daemon_pid} ]]; then kill -s SIGINT ${daemon_pid} & wait ${daemon_pid} fi stop_time="$(date -u +%s.%3N)" elapsed="$(bc <<<"$stop_time-$start_time")" echo -e "${C_AST_GREEN}Shutdown time: ${elapsed} seconds" break else echo "Press 'q' to exit" Loading @@ -163,20 +189,22 @@ stop_daemons() { while IFS= read -r line do if ps -p "${line}" > /dev/null; then if [[ ${VERBOSE} == true ]]; then echo "Stopping daemon with pid ${line}" fi echo -e "${C_AST_GREEN}Stopping daemon with pid ${line}" start_time="$(date -u +%s.%3N)" kill -s SIGINT "${line}" & # poll pid until it stopped if [[ ${VERBOSE} == true ]]; then echo "Waiting for daemons to exit ..." echo -e "${C_AST_GREEN}Waiting for daemons to exit ..." fi timeout 1 tail --pid=${line} -f /dev/null fi done < "${pid_file}" rm "${pid_file}" stop_time="$(date -u +%s.%3N)" elapsed="$(bc <<<"$stop_time-$start_time")" echo -e "${C_AST_GREEN}Shutdown time: ${elapsed} seconds" else echo "No pid file found -> no daemon running. Exiting ..." echo -e "${C_AST_RED}No pid file found -> no daemon running. Exiting ..." fi } ####################################### Loading Loading @@ -241,14 +269,14 @@ if [[ -z ${CONFIGPATH} ]]; then CONFIGPATH="${SCRIPTDIR}/gkfs.conf" fi if [[ ! -f ${CONFIGPATH} ]]; then >&2 echo ">> No config file found at '${CONFIGPATH}'." >&2 echo -e "${C_AST_RED}>> No config file found at '${CONFIGPATH}'." exit 1 fi # get variables from CONFIGPATH source "$CONFIGPATH" # more global variables which may be overwritten by user input VERBOSE=false NODE_NUM=1 NODE_NUM="" MOUNTDIR=${DAEMON_MOUNTDIR} ROOTDIR=${DAEMON_ROOTDIR} HOSTSFILE=${LIBGKFS_HOSTS_FILE} Loading Loading @@ -323,14 +351,14 @@ set -- "${POSITIONAL[@]}" # restore positional parameters # positional arguments if [[ -z ${1+x} ]]; then echo "ERROR: Positional arguments missing." echo -e "${C_AST_RED}ERROR: Positional arguments missing." usage_short exit 1 fi command="${1}" # checking input if [[ ${command} != *"start"* ]] && [[ ${command} != *"stop"* ]]; then echo "ERROR: command ${command} not supported" echo -e "${C_AST_RED}ERROR: command ${command} not supported" usage_short exit 1 fi Loading @@ -341,5 +369,5 @@ elif [[ ${command} == "stop" ]]; then stop_daemons fi if [[ ${VERBOSE} == true ]]; then echo "Nothing left to do. Exiting :)" echo -e "${C_AST_GREEN}Nothing left to do. Exiting :)" fi Loading
include/config.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -81,8 +81,8 @@ constexpr auto dir = "metadata"; // which metadata should be considered apart from size and mode constexpr auto use_atime = false; constexpr auto use_ctime = false; constexpr auto use_mtime = false; constexpr auto use_ctime = true; constexpr auto use_mtime = true; constexpr auto use_link_cnt = false; constexpr auto use_blocks = false; /* Loading
scripts/profiles/0.9.1/mogon2.specs +2 −2 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ clonedeps=( ["margo"]="v0.9.6" ["syscall_intercept"]="2c8765fa292bc9c28a22624c528580d54658813d" ["date"]="e7e1482087f58913b80a20b04d5c58d9d6d90155" ["parallax"]="c130decd7a71c60c20b98d6a23924f05f754c3cd" #["parallax"]="c130decd7a71c60c20b98d6a23924f05f754c3cd" ) # Extra arguments for git clone Loading @@ -67,7 +67,7 @@ clonedeps_patches=( # Ordering that MUST be followed when downloading order=( "lz4" "capstone" "json-c" "psm2" "libfabric" "mercury" "argobots" "margo" "rocksdb" "syscall_intercept" "date" "parallax" "lz4" "capstone" "json-c" "psm2" "libfabric" "mercury" "argobots" "margo" "rocksdb" "syscall_intercept" "date" #"parallax" ) # Extra arguments passed to the installation script. As such, they can Loading
scripts/run/gkfs +52 −24 Original line number Diff line number Diff line #!/bin/bash # colors and shell styles # check for color support and set variables if [ "$(tput colors)" -gt 2 ]; then C_GREEN='\033[0;32m' # green C_BYELLOW='\033[1;33m' # Bold yellow C_BRED='\033[1;31m' # Bold red C_NONE='\033[0m' # No color else C_GREEN='' C_BYELLOW='' C_BRED='' C_NONE='' fi C_AST_GREEN="${C_GREEN}*${C_NONE} [gkfs] " C_AST_YELLOW="${C_BYELLOW}*${C_NONE} [gkfs] " C_AST_RED="${C_BRED}*${C_NONE} [gkfs] " ####################################### # Poll GekkoFS hostsfile until all daemons are started. # Exits with 1 if daemons cannot be started. Loading @@ -23,7 +39,7 @@ wait_for_gkfs_daemons() { sleep 2 server_wait_cnt=$((server_wait_cnt+1)) if [ ${server_wait_cnt} -gt 600 ]; then echo "Server failed to start. Exiting ..." echo -e "${C_AST_RED}Server failed to start. Exiting ..." exit 1 fi done Loading @@ -43,7 +59,7 @@ create_pid_file() { local pid_file=${DAEMON_PID_FILE} local pid=${1} if [[ ${VERBOSE} == true ]]; then echo "Creating pid file at ${pid_file} with pid ${pid} ..." echo -e "${C_AST_GREEN}Creating pid file at ${pid_file} with pid ${pid} ..." fi # if PID file exists another daemon could run if [[ -e ${pid_file} ]]; then Loading Loading @@ -93,17 +109,19 @@ start_daemon() { fi # Setting up base srun cmd srun_cmd="srun --disable-status -N ${NODE_NUM} --ntasks=${NODE_NUM} --cpus-per-task=${CPUS_PER_TASK} ${SRUN_ARGS} " else NODE_NUM=1 fi if [[ ${VERBOSE} == true ]]; then echo "### mountdir: ${MOUNTDIR}" echo "### rootdir: ${ROOTDIR}" echo "### node_num: ${NODE_NUM}" echo "### additional daemon args: ${ARGS}" echo "### cpus_per_task: ${CPUS_PER_TASK}" echo -e "${C_AST_GREEN}mountdir: ${MOUNTDIR}" echo -e "${C_AST_GREEN}rootdir: ${ROOTDIR}" echo -e "${C_AST_GREEN}node_num: ${NODE_NUM}" echo -e "${C_AST_GREEN}additional daemon args: ${ARGS}" echo -e "${C_AST_GREEN}cpus_per_task: ${CPUS_PER_TASK}" fi if [[ ${VERBOSE} == true ]]; then echo "# Cleaning host file ..." echo -e "${C_AST_GREEN}Cleaning host file ..." fi rm "${HOSTSFILE}" 2> /dev/null # Setting up base daemon cmd Loading @@ -116,30 +134,38 @@ start_daemon() { daemon_execute="${srun_cmd}${daemon_cmd}" if [[ ${VERBOSE} == true ]]; then echo "### Full execute DAEMON command:" echo "##### $daemon_execute" echo -e "${C_AST_GREEN}Full execute DAEMON command:" echo -e "${C_AST_GREEN}# $daemon_execute" fi # setup environment variables export GKFS_DAEMON_LOG_PATH=$GKFS_DAEMON_LOG_PATH export GKFS_DAEMON_LOG_LEVEL=$GKFS_DAEMON_LOG_LEVEL echo "Starting daemons ..." echo -e "${C_AST_GREEN}Starting GekkoFS daemons (${NODE_NUM} nodes) ..." start_time="$(date -u +%s.%3N)" ${daemon_execute} & local daemon_pid=$! wait_for_gkfs_daemons echo "Running ..." stop_time="$(date -u +%s.%3N)" elapsed="$(bc <<<"$stop_time-$start_time")" echo -e "${C_AST_GREEN}GekkoFS daemons running" echo -e "${C_AST_GREEN}Startup time: ${elapsed} seconds" if [[ ${RUN_FOREGROUND} == true ]]; then echo "Press 'q' to exit" while : ; do read -n 1 k <&1 if [[ $k = q ]] ; then start_time="$(date -u +%s.%3N)" echo echo "Shutting down ..." echo -e "${C_AST_GREEN}Shutting down GekkoFS daemons ..." if [[ -n ${daemon_pid} ]]; then kill -s SIGINT ${daemon_pid} & wait ${daemon_pid} fi stop_time="$(date -u +%s.%3N)" elapsed="$(bc <<<"$stop_time-$start_time")" echo -e "${C_AST_GREEN}Shutdown time: ${elapsed} seconds" break else echo "Press 'q' to exit" Loading @@ -163,20 +189,22 @@ stop_daemons() { while IFS= read -r line do if ps -p "${line}" > /dev/null; then if [[ ${VERBOSE} == true ]]; then echo "Stopping daemon with pid ${line}" fi echo -e "${C_AST_GREEN}Stopping daemon with pid ${line}" start_time="$(date -u +%s.%3N)" kill -s SIGINT "${line}" & # poll pid until it stopped if [[ ${VERBOSE} == true ]]; then echo "Waiting for daemons to exit ..." echo -e "${C_AST_GREEN}Waiting for daemons to exit ..." fi timeout 1 tail --pid=${line} -f /dev/null fi done < "${pid_file}" rm "${pid_file}" stop_time="$(date -u +%s.%3N)" elapsed="$(bc <<<"$stop_time-$start_time")" echo -e "${C_AST_GREEN}Shutdown time: ${elapsed} seconds" else echo "No pid file found -> no daemon running. Exiting ..." echo -e "${C_AST_RED}No pid file found -> no daemon running. Exiting ..." fi } ####################################### Loading Loading @@ -241,14 +269,14 @@ if [[ -z ${CONFIGPATH} ]]; then CONFIGPATH="${SCRIPTDIR}/gkfs.conf" fi if [[ ! -f ${CONFIGPATH} ]]; then >&2 echo ">> No config file found at '${CONFIGPATH}'." >&2 echo -e "${C_AST_RED}>> No config file found at '${CONFIGPATH}'." exit 1 fi # get variables from CONFIGPATH source "$CONFIGPATH" # more global variables which may be overwritten by user input VERBOSE=false NODE_NUM=1 NODE_NUM="" MOUNTDIR=${DAEMON_MOUNTDIR} ROOTDIR=${DAEMON_ROOTDIR} HOSTSFILE=${LIBGKFS_HOSTS_FILE} Loading Loading @@ -323,14 +351,14 @@ set -- "${POSITIONAL[@]}" # restore positional parameters # positional arguments if [[ -z ${1+x} ]]; then echo "ERROR: Positional arguments missing." echo -e "${C_AST_RED}ERROR: Positional arguments missing." usage_short exit 1 fi command="${1}" # checking input if [[ ${command} != *"start"* ]] && [[ ${command} != *"stop"* ]]; then echo "ERROR: command ${command} not supported" echo -e "${C_AST_RED}ERROR: command ${command} not supported" usage_short exit 1 fi Loading @@ -341,5 +369,5 @@ elif [[ ${command} == "stop" ]]; then stop_daemons fi if [[ ${VERBOSE} == true ]]; then echo "Nothing left to do. Exiting :)" echo -e "${C_AST_GREEN}Nothing left to do. Exiting :)" fi