Commit 407909d5 authored by David Cameron's avatar David Cameron

set joboption_dir after RTE 0 and set corecount for accounting

parent 16030cfe
Pipeline #5981 canceled with stage
......@@ -27,20 +27,21 @@ basedir=`cd $basedir > /dev/null && pwd` || exit $?
# * set common variables
common_init
joboption_directory_orig=$joboption_directory
joboption_directory='`pwd`'
joboption_stdout='`pwd`/'`basename $joboption_stdout`
joboption_stderr='`pwd`/'`basename $joboption_stderr`
# make sure session is world-writable
chmod 777 $joboption_directory_orig
RUNTIME_NODE_SEES_FRONTEND=yes
##############################################################
# Zero stage of runtime environments
##############################################################
RTE_stage0
joboption_directory_orig=$joboption_directory
joboption_directory='`pwd`'
# make sure session is world-writable
chmod 777 $joboption_directory_orig
echo "project_root=$PROJECT_ROOT" 1>&2
cd $PROJECT_ROOT
......@@ -136,13 +137,14 @@ echo "echo \"runtimeenvironments=\$runtimeenvironments\" >> \"\$RUNTIME_JOB_DIAG
#####################################################
cd_and_run
## print nodename
## add nodename username@hostname and fix core count for accounting
cat >> $LRMS_JOB_SCRIPT <<"FMARK"
sed -i -e '/nodename=/d' $RUNTIME_JOB_DIAG
hostname=` grep domain_name init_data.xml |awk -F '>' '{print $2}'|awk -F "<" '{print $1}'|sed -e "s# #_#g"`
username=` grep user_name init_data.xml |awk -F '>' '{print $2}'|awk -F "<" '{print $1}'|sed -e "s# #_#g"`
nodename=$username@$hostname
echo "nodename=$nodename" >> "$RUNTIME_JOB_DIAG"
[ -n "$ATHENA_PROC_NUMBER" ] && sed -i -e 's/Processors=1/Processors='"$ATHENA_PROC_NUMBER"'/' $RUNTIME_JOB_DIAG
FMARK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment