Skip to content
Snippets Groups Projects
Commit 5cc63e30 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #2672: Updated paths to put all logfiles and parsets in the same...

Task #2672: Updated paths to put all logfiles and parsets in the same directory, and cleaned up variables and settings referring to unused paths.
parent 89ad033f
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,9 @@ source locations.sh
function start() {
set_psetinfo
# make sure the log dir exists
mkdir -p "$LOGDIR"
TMPDIR="`mktemp -d`"
PIDFILE="$TMPDIR/pid"
......@@ -12,7 +15,7 @@ function start() {
mkfifo "$PIDFILE"
(mpirun -mode VN -partition "$PARTITION" -env DCMF_COLLECTIVES=0 -env BG_MAPPING=XYZT -env LD_LIBRARY_PATH=/bgsys/drivers/ppcfloor/comm/lib:/bgsys/drivers/ppcfloor/runtime/SPI:/globalhome/romein/lib.bgp -cwd "$LOGSYMLINK" -exe "$CNPROC" 2>&1 &
echo $! > "$PIDFILE") | LOFAR/Logger.py $LOGPARAMS "$LOGSYMLINK/CNProc.log" &
echo $! > "$PIDFILE") | LOFAR/Logger.py $LOGPARAMS "$LOGDIR/CNProc.log" &
PID=`cat "$PIDFILE"`
rm -f "$PIDFILE"
......
......@@ -5,10 +5,8 @@ source locations.sh
function start() {
set_psetinfo
# create a new log dir
rm -f "$LOGSYMLINK" || true
# make sure the log dir exists
mkdir -p "$LOGDIR"
ln -s "$LOGDIR" "$LOGSYMLINK"
TMPDIR=`mktemp -d`
PIDFILE="$TMPDIR/pid"
......@@ -17,7 +15,7 @@ function start() {
mkfifo "$PIDFILE"
(/bgsys/LOFAR/openmpi-ion/bin/mpirun -host "$PSETS" --pernode -wd "$LOGDIR" "$IONPROC" "$ISPRODUCTION" 2>&1 &
echo $! > "$PIDFILE") | LOFAR/Logger.py $LOGPARAMS "$LOGSYMLINK/IONProc.log" &
echo $! > "$PIDFILE") | LOFAR/Logger.py $LOGPARAMS "$LOGDIR/IONProc.log" &
PID=`cat $PIDFILE`
rm -f "$PIDFILE"
......
......@@ -65,25 +65,14 @@ class Locations:
# the observation ID is included to allow parallel observations
# where to store logs
"logdir": "${BASEDIR}/D${TIMESTAMP}",
"logdir": "${BASEDIR}/log",
# where configuration files are kept
"configdir": ".",
"storage_configdir": ".",
# where to start the executables. rundir needs to be reachable
# for all sections.
"rundir": "${BASEDIR}/D${TIMESTAMP}",
# symlink to create to latest log dir
"logsymlink": "${BASEDIR}/log",
# symlink for each observation to relevant log dir
"obssymlink": "${BASEDIR}/D${YEAR}_${OBSID}",
# parset name mas
"parset": "${LOGSYMLINK}/L${OBSID}.parset", # for communication with Storage and offline pipelines
"parset-ion": "${LOGSYMLINK}/L${OBSID}.parset", # for communication with the I/O nodes
"parset": "${LOGDIR}/L${OBSID}.parset", # for communication with Storage and offline pipelines
"parset-ion": "${LOGDIR}/L${OBSID}.parset", # for communication with the I/O nodes
# location of the observation id counter
"nextmsnumber": "/globalhome/lofarsystem/log/nextMSNumber",
......@@ -100,24 +89,14 @@ class Locations:
# the locations of the main executables
"storage": "/opt/storage/current/bin/%s" % (self.executables["Storage"],),
# where to start the executables. rundir needs to be reachable
# for all sections.
"rundir": "${HOME}/log/L${TIMESTAMP}",
# where to store logs
"logdir": "${HOME}/log/L${TIMESTAMP}",
"logdir": "${HOME}/log",
# where to save the parset
"parset-ion": "/bghome0/lofarsys/parsets/RTCP-${OBSID}.parset", # for communication to the IO nodes
# where configuration files are kept
"configdir": "${BASEDIR}/bgfen/etc",
"storage_configdir": "/opt/storage/current/etc",
# symlink for each observation to relevant log dir
"obssymlink": "${HOME}/log/L${OBSID}",
"logsymlink": "${HOME}/log/latest",
# location of valgrind suppressions file
"ionsuppfile": "",
......@@ -130,7 +109,6 @@ class Locations:
# where configuration files are kept
"configdir": "${BASEDIR}/RTCP/Run/src",
"storage_configdir": "${BASEDIR}/installed/%s/etc" % (self.buildvars["Storage"],),
"storage": "${BASEDIR}/installed/%s/bin/%s" % (self.buildvars["Storage"],self.executables["Storage"]),
......
......@@ -6,4 +6,4 @@ set_psetinfo
echo "cancel all" > /dev/tcp/$FIRSTPSET/4000 2>/dev/null &&
echo "quit" > /dev/tcp/$FIRSTPSET/4000 2>/dev/null &&
sleep 5 # allow processes to quit
sleep 10 # allow processes to quit
......@@ -12,8 +12,7 @@ then
IONPROC=$HOME/production/lofar/bgp_ion/bin/ION_Processing
ETCDIR=/opt/lofar/etc
LOGDIR=$HOME/log/L$TIMESTAMP
LOGSYMLINK=$HOME/log/latest
LOGDIR=$HOME/log
LOGPARAMS="-s ccu001:24500"
else
ISPRODUCTION=0
......@@ -22,8 +21,7 @@ else
IONPROC=$HOME/projects/LOFAR/installed/bgpion_opt/bin/ION_Processing
ETCDIR=@CMAKE_INSTALL_PREFIX@/etc
LOGDIR=$HOME/projects/LOFAR/L$TIMESTAMP
LOGSYMLINK=$HOME/projects/LOFAR/log
LOGDIR=$HOME/projects/LOFAR/log
LOGPARAMS="-v"
fi
......
......@@ -102,6 +102,7 @@ if __name__ == "__main__":
parset.save()
if not options.norun:
"""
try:
obsDir = os.path.dirname( os.path.realpath( parset.filename ) )
symlinkName = Locations.resolvePath( Locations.files["obssymlink"], parset )
......@@ -112,6 +113,7 @@ if __name__ == "__main__":
warning( "Failed to create symlink %s -> %s" % (symlinkName,obsDir) )
except OSError,msg:
warning( "Failed to create symlink %s -> %s" % (symlinkName,obsDir) )
"""
# save in separate location for IO nodes, to prevent contention for NFS drives with other processes
parset.setFilename( Locations.resolvePath( Locations.files["parset-ion"], parset ) )
......
#!/bin/bash
source locations.sh
FLAGS="-n 10000"
# ----- find multitail
PATH=$PATH:/globalhome/broekema/bin
# ----- find the logging directory
# . = current directory, to check first
# $HOME/log/latest = default logging directory for production
# $HOME/projects/LOFAR/log = default logging directory for development
function set_logdir {
LOGDIR=$1
CNPROC=$LOGDIR/CNProc.log
IONPROC=$LOGDIR/IONProc.log
}
for d in . "$HOME/production/lofar/bgfen/log/latest" "$HOME/log/latest" "$HOME/projects/LOFAR/log"
do
set_logdir $d
if [ -e $IONPROC ]
then
break
fi
done
# ----- find the configuration for multitail
for c in `dirname $0` /opt/lofar/etc $HOME/projects/LOFAR/RTCP/Run/src
do
CONFDIR=$c
if [ -e $CONFDIR/multitail-olap.conf ]
then
break
fi
done
CNPROC_LOG=$LOGDIR/CNProc.log
IONPROC_LOG=$LOGDIR/IONProc.log
echo Reading logs from $LOGDIR
echo Reading multitail configuration from $CONFDIR
echo Reading multitail configuration from $ETCDIR
ERRORLOGS=
if [ "$USER" == "lofarsys" ]
if [ $ISPRODUCTION -eq 1 ]
then
for l in /opt/lofar/log/BlueGeneControl.log $HOME/log/run.runParset.py.log
for l in $LOGDIR/BlueGeneControl.log $LOGDIR/run.runParset.py.log
do
echo Reading additional error log $l
ERRORLOGS="$ERRORLOGS $FLAGS -cS olap -fr errors -I $l"
......@@ -51,11 +22,11 @@ then
fi
multitail --no-mark-change --follow-all --retry-all -m 10240 --basename -F $CONFDIR/multitail-olap.conf \
$FLAGS -t "-- FLAGS --" -fr flags -ks flags -i $IONPROC \
$FLAGS -t "-- ERRORS --" -fr errors -i $IONPROC \
$FLAGS -fr errors -I $CNPROC \
multitail --no-mark-change --follow-all --retry-all -m 10240 --basename -F $ETCDIR/multitail-olap.conf \
$FLAGS -t "-- FLAGS --" -fr flags -ks flags -i $IONPROC_LOG \
$FLAGS -t "-- ERRORS --" -fr errors -i $IONPROC_LOG \
$FLAGS -fr errors -I $CNPROC_LOG \
$ERRORLOGS \
$FLAGS -t "IONProc/Storage" -i $IONPROC \
$FLAGS -t "CNProc" -wh 5 -i $CNPROC
$FLAGS -t "IONProc/Storage" -i $IONPROC_LOG \
$FLAGS -t "CNProc" -wh 5 -i $CNPROC_LOG
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment