Skip to content

Commit

Permalink
Robust against empty data sections in time and/or data variables
Browse files Browse the repository at this point in the history
  • Loading branch information
h-dh committed Sep 18, 2015
1 parent a95bc97 commit 4a40336
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 190 deletions.
8 changes: 8 additions & 0 deletions include/qa_CMIP5.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,17 @@ class QA : public IObj
std::string fail;
std::string fileStr;
std::string notAvailable;
std::string blank;
std::string no_blank;
std::string s_colon;
std::string s_empty;
std::string s_mismatch;
std::string s_upper;
std::string s_lower;

void appendToHistory(size_t);
std::string getCurrentTableSubst(void);
bool getExit(void);
std::string getSubjectsIntroDim(VariableMetaData &vMD,
struct DimensionMetaData &nc_entry,
struct DimensionMetaData &tbl_entry);
Expand Down
2 changes: 2 additions & 0 deletions include/qa_NONE.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class QA : public IObj

void applyOptions(bool isPost=false);

bool checkDataBody(void);

//! Checks meta-data
void checkMetaData(InFile &) ;

Expand Down
4 changes: 2 additions & 2 deletions scripts/qa-config
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ setDefaults()
# you should not leave this unchanged in the config file
test ! ${QA_RESULTS} && setKWL QA_RESULTS=${QA_WORK}/results

setKWL QA_MANAGER_HOST=$HOSTNAME
setKWL QA_HOST=$HOSTNAME

setKWL QA_BIN=${HOSTNAME}:${QA_PATH}/bin

Expand Down Expand Up @@ -546,7 +546,7 @@ getConfPriority()
# the first two items of array 'task_priority' would have been
# set while performing getops().

test "${PROJECT}" = NONE && return
# test "${PROJECT}" = NONE && return

local i item qaResults swp sz1 sz

Expand Down
19 changes: 6 additions & 13 deletions scripts/qa-dkrz
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ callQaExecutor()
PROJECT_TABLE \
QA \
QA_CHECK_LIST \
QA_MANAGER_HOST \
QA_HOST \
QA_NCFILE_FLAGS \
QA_RESULTS \
QA_PATH \
Expand Down Expand Up @@ -1816,13 +1816,6 @@ getNextVariable()

local nFsSz=${#nextFile[*]}

if [ ${status} -gt 49 ] ; then
status=$((status - 50))
isPost=t
else
isPost=f
fi

# up-to-date
if [ ${status} -eq 1 ] ; then
# if [ ${PROGRESS_BAR} ] ; then
Expand Down Expand Up @@ -3228,11 +3221,11 @@ log()

s_out="${s_out} - date: $( date +'%FT%T' )"

# if [ ${QA_MANAGER_HOST} = $HOSTNAME ] ; then
# if [ ${QA_HOST} = $HOSTNAME ] ; then
# test ${ix} -lt 2 && \
# echo "${sp[ix]}date: $( date +'%FT%T' )" >> $out
# else
# tryRemote ssh ${QA_MANAGER_HOST} \
# tryRemote ssh ${QA_HOST} \
# echo -e ${str} >> $out
# fi

Expand Down Expand Up @@ -3311,11 +3304,11 @@ log_expMessage()
str="\n$( date +'%F %T' ) "
str="$str""$1"

# if [ ${QA_MANAGER_HOST} = $HOSTNAME ] ; then
# if [ ${QA_HOST} = $HOSTNAME ] ; then
tryCom \
echo -e "${str}" >> $EXP_LOGDIR/${CURR_EXP_NAME}.log
# else
# tryRemote ssh ${QA_MANAGER_HOST} \
# tryRemote ssh ${QA_HOST} \
# echo -e ${str} >> $EXP_LOGDIR/${CURR_EXP_NAME}.log
# fi

Expand Down Expand Up @@ -3630,7 +3623,7 @@ operatePipes()
FILE_SEQUENCE=s
fi

if [ ${isPost:-f} = t -a ${#p_nF[*]} -eq 1 ] ; then
if [ ${#p_nF[*]} -eq 1 ] ; then
POST_PROC=t
else
POST_PROC=
Expand Down
14 changes: 7 additions & 7 deletions scripts/qa-exec-check
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ clearProcPool()
if [ ${DISTRIBUTED_FS:-f} = f ] ; then
tryCom mv $PROC_POOL/$PROC_FILE.lock $PROC_POOL/$PROC_FILE.closed
else
tryRemote ssh ${QA_MANAGER_HOST} \
tryRemote ssh ${QA_HOST} \
mv $PROC_POOL/$PROC_FILE.lock $PROC_POOL/$PROC_FILE.closed
fi
fi
Expand Down Expand Up @@ -285,7 +285,7 @@ fi

# Be nice: check, whether load is lower than two of the three limits.
if [ "${WORK_AT_LOW_LOAD:-f}" = 't' ] ; then
if [ ${QA_MANAGER_HOST} != $HOSTNAME ] ; then
if [ ${QA_HOST} != $HOSTNAME ] ; then
while : ; do
upTime=( $(uptime) )
# for linux and solaris identical
Expand Down Expand Up @@ -612,7 +612,7 @@ init()
if [ ${DISTRIBUTED_FS:-f} = f ] ; then
tryCom mv $PROC_POOL/$PROC_FILE $PROC_POOL/$PROC_FILE.lock
else
tryRemote ssh ${QA_MANAGER_HOST} \
tryRemote ssh ${QA_HOST} \
mv $PROC_POOL/$PROC_FILE $PROC_POOL/$PROC_FILE.lock
fi

Expand All @@ -637,7 +637,7 @@ init()

# Distributed file system?This is the qa-DKRZ host.
if [ ${DISTRIBUTED_FS:-f} = t ] ; then
test ${QA_MANAGER_HOST} = $HOSTNAME && DISTRIBUTED_FS=f
test ${QA_HOST} = $HOSTNAME && DISTRIBUTED_FS=f
fi

# path to the netCDF file
Expand Down Expand Up @@ -1536,10 +1536,10 @@ signalParent()
return
fi

if [ "${HOSTNAME}" = "${QA_MANAGER_HOST}" ] ; then
if [ "${HOSTNAME}" = "${QA_HOST}" ] ; then
kill -${1} $PAR_PID &> /dev/null
else
ssh ${QA_MANAGER_HOST} kill -${1} $PAR_PID &> /dev/null
ssh ${QA_HOST} kill -${1} $PAR_PID &> /dev/null
fi
}

Expand Down Expand Up @@ -1896,7 +1896,7 @@ tryRemote()
fi

# wait until host is reachable
while ! callPing ${QA_MANAGER_HOST} ; do
while ! callPing ${QA_HOST} ; do
sleep $(( ++mySleep ))
done

Expand Down

0 comments on commit 4a40336

Please sign in to comment.