diff --git a/cmake/Intel.cmake b/cmake/Intel.cmake index a18ff15fc2..73564f1783 100644 --- a/cmake/Intel.cmake +++ b/cmake/Intel.cmake @@ -7,6 +7,9 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 5462") # remark #7712: This variable has not been used. set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 7712") +# remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'. +set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 8291") + if(CMAKE_Platform STREQUAL "derecho.intel") set(CMAKE_Fortran_LINK_FLAGS "-Wl,--copy-dt-needed-entries") endif() diff --git a/tests/rt.sh b/tests/rt.sh index 5279f68ff8..622ea645aa 100755 --- a/tests/rt.sh +++ b/tests/rt.sh @@ -36,7 +36,7 @@ usage() { update_rtconf() { echo "rt.sh: Checking & Updating test configuration..." find_match() { - # This function finds if a test in $TESTS_FILE matches one + # This function finds if a test in $TESTS_FILE matches one # in our list of tests to be run. THIS_TEST_WITH_COMPILER=$1 shift @@ -78,7 +78,7 @@ update_rtconf() { [[ -n "${line}" ]] || continue [[ ${#line} == 0 ]] && continue [[ ${line} == \#* ]] && continue - + if [[ ${line} =~ COMPILE ]] ; then MACHINES=$(cut -d'|' -f5 <<< "${line}") MACHINES=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${MACHINES}") @@ -86,7 +86,7 @@ update_rtconf() { RT_COMPILER_IN=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${RT_COMPILER_IN}") if [[ ${MACHINES} == '' ]]; then compile_line=${line} - COMPILE_LINE_USED=false + COMPILE_LINE_USED=false elif [[ ${MACHINES} == -* ]]; then [[ ${MACHINES} =~ ${MACHINE_ID} ]] || compile_line=${line}; COMPILE_LINE_USED=false elif [[ ${MACHINES} == +* ]]; then @@ -110,10 +110,10 @@ update_rtconf() { fi if [[ ${to_run_test} == true ]]; then TEST_IDX=$(set -e; find_match "${tmp_test} ${RT_COMPILER_IN}" "${TEST_WITH_COMPILE[@]}") - + if [[ ${TEST_IDX} != -1 ]]; then if [[ ${COMPILE_LINE_USED} == false ]]; then - echo -en '\n' >> "${RT_TEMP_CONF}" + echo -en '\n' >> "${RT_TEMP_CONF}" echo "${compile_line}" >> "${RT_TEMP_CONF}" COMPILE_LINE_USED=true @@ -121,7 +121,7 @@ update_rtconf() { dep_test=$(grep -w "${tmp_test}" <<< "${line}") dep_test=$(cut -d'|' -f5 <<< "${dep_test}") dep_test=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${dep_test}") - + if [[ ${dep_test} != '' ]]; then find_match_result=$(set -e; find_match "${dep_test} ${RT_COMPILER_IN}" "${TEST_WITH_COMPILE[@]}") if [[ ${find_match_result} == -1 ]]; then @@ -131,7 +131,7 @@ update_rtconf() { dep_line=$(tr -d '\n' <<< "${dep_line}") CORRECT_LINE[1]=$(awk -F'RUN|RUN' '{print $2}' <<< "${dep_line}") CORRECT_LINE[2]=$(awk -F'RUN|RUN' '{print $3}' <<< "${dep_line}") - + if [[ ${RT_COMPILER_IN} == "intel" ]]; then echo "RUN ${CORRECT_LINE[1]}" >> "${RT_TEMP_CONF}" elif [[ ${RT_COMPILER_IN} == "gnu" ]]; then @@ -140,7 +140,7 @@ update_rtconf() { fi fi echo "${line}" >> "${RT_TEMP_CONF}" - fi + fi fi fi done < "${TESTS_FILE}" @@ -155,6 +155,7 @@ update_rtconf() { generate_log() { echo "rt.sh: Generating Regression Testing Log..." + set -x COMPILE_COUNTER=0 FAILED_COMPILES=() TEST_COUNTER=0 @@ -181,7 +182,7 @@ EOF fi echo; echo >> "${REGRESSIONTEST_LOG}" cd tests - + cat << EOF >> "${REGRESSIONTEST_LOG}" NOTES: @@ -222,10 +223,10 @@ EOF local valid_test=false if [[ ${line} == COMPILE* ]] ; then - + CMACHINES=$(cut -d'|' -f5 <<< "${line}") CMACHINES=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${CMACHINES}") - + COMPILER=$(cut -d'|' -f3 <<< "${line}") COMPILER=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${COMPILER}") @@ -233,7 +234,7 @@ EOF COMPILE_NAME=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${COMPILE_NAME}") COMPILE_ID=${COMPILE_NAME}_${COMPILER} - + if [[ ${CMACHINES} == '' ]]; then valid_compile=true elif [[ ${CMACHINES} == -* ]]; then @@ -249,6 +250,7 @@ EOF TIME_FILE="" COMPILE_TIME="" RT_COMPILE_TIME="" + COMPILE_WARNINGS="" if [[ ! -f "${LOG_DIR}/compile_${COMPILE_ID}.log" ]]; then COMPILE_RESULT="FAILED: UNABLE TO START COMPILE" FAIL_LOG="N/A" @@ -262,8 +264,18 @@ EOF COMPILE_RESULT="FAILED: TEST TIMED OUT" FAIL_LOG="${LOG_DIR}/compile_${COMPILE_ID}.log" fi - else + else COMPILE_RESULT="PASS" + if [[ ${COMPILER} == "intel" ]]; then + COMPILE_NUM_WARNINGS=$(grep -c ": warning #" "${RUNDIR_ROOT}/compile_${COMPILE_ID}/err" || true) + COMPILE_NUM_REMARKS=$(grep -c ": remark #" "${RUNDIR_ROOT}/compile_${COMPILE_ID}/err" || true) + if [[ ${COMPILE_NUM_WARNINGS} -gt 0 || ${COMPILE_NUM_REMARKS} -gt 0 ]]; then + COMPILE_WARNINGS+=" (" + [[ ${COMPILE_NUM_WARNINGS} -gt 0 ]] && COMPILE_WARNINGS+=" ${COMPILE_NUM_WARNINGS} warnings" + [[ ${COMPILE_NUM_REMARKS} -gt 0 ]] && COMPILE_WARNINGS+=" ${COMPILE_NUM_REMARKS} remarks" + COMPILE_WARNINGS+=" )" + fi + fi TIME_FILE="${LOG_DIR}/compile_${COMPILE_ID}_timestamp.txt" if [[ -f "${TIME_FILE}" ]]; then while read -r times || [[ -n "${times}" ]]; do @@ -278,11 +290,11 @@ EOF RT_COMPILE_TIME=$(date --date=@$((DATE4 - DATE1)) +'%M:%S') done < "${TIME_FILE}" - + fi fi echo >> "${REGRESSIONTEST_LOG}" - echo "${COMPILE_RESULT} -- COMPILE '${COMPILE_ID}' [${RT_COMPILE_TIME}, ${COMPILE_TIME}]" >> "${REGRESSIONTEST_LOG}" + echo "${COMPILE_RESULT} -- COMPILE '${COMPILE_ID}' [${RT_COMPILE_TIME}, ${COMPILE_TIME}]${COMPILE_WARNINGS}" >> "${REGRESSIONTEST_LOG}" [[ -n ${FAIL_LOG} ]] && FAILED_COMPILES+=("COMPILE ${COMPILE_ID}: ${COMPILE_RESULT}") [[ -n ${FAIL_LOG} ]] && FAILED_COMPILE_LOGS+=("${FAIL_LOG}") fi @@ -299,7 +311,7 @@ EOF TEST_NAME=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${TEST_NAME}") GEN_BASELINE=$(cut -d '|' -f4 <<< "${line}") GEN_BASELINE=$(sed -e 's/^ *//' -e 's/ *$//' <<< "${GEN_BASELINE}") - + if [[ ${RMACHINES} == '' ]]; then valid_test=true elif [[ ${RMACHINES} == -* ]]; then @@ -328,7 +340,7 @@ EOF TEST_RESULT="FAILED: UNABLE TO RUN COMPARISON" FAIL_LOG="${LOG_DIR}/run_${TEST_NAME}_${COMPILER}.log" # We need to catch a "PASS" in rt_*.log even if a fail_test_* files exists - # I'm not sure why this can happen. + # I am not sure why this can happen. elif grep -q "PASS" "${LOG_DIR}/rt_${TEST_NAME}_${COMPILER}.log"; then TEST_RESULT="PASS" else @@ -377,9 +389,9 @@ EOF fi fi done < "${TESTS_FILE}" - + elapsed_time=$( printf '%02dh:%02dm:%02ds\n' $((SECONDS%86400/3600)) $((SECONDS%3600/60)) $((SECONDS%60)) ) - + cat << EOF >> "${REGRESSIONTEST_LOG}" SYNOPSIS: @@ -397,18 +409,18 @@ EOF echo "-- LOG: ${FAILED_COMPILE_LOGS[${i}]}" >> "${REGRESSIONTEST_LOG}" done fi - + # PRINT FAILED TESTS if [[ "${#FAILED_TESTS[@]}" -ne "0" ]]; then - + echo "Failed Tests:" >> "${REGRESSIONTEST_LOG}" for j in "${!FAILED_TESTS[@]}"; do echo "* ${FAILED_TESTS[${j}]}" >> "${REGRESSIONTEST_LOG}" echo "-- LOG: ${FAILED_TEST_LOGS[${j}]}" >> "${REGRESSIONTEST_LOG}" done - + fi - + # WRITE FAILED_TEST_ID LIST TO TEST_CHANGES_LOG if [[ "${#FAILED_TESTS[@]}" -ne "0" ]]; then for item in "${FAILED_TEST_ID[@]}"; do @@ -721,7 +733,7 @@ case ${MACHINE_ID} in # ROCOTOCOMPLETE=$(command -v rocotocomplete) ROCOTO_SCHEDULER="slurm" fi - + export LD_PRELOAD=/opt/cray/pe/gcc/12.2.0/snos/lib64/libstdc++.so.6 module load PrgEnv-intel/8.3.3 module load intel-classic/2023.1.0 @@ -854,7 +866,7 @@ case ${MACHINE_ID} in echo "=======Please, move to Rocky8 node fe[5-8]=======" exit 1 fi - + if [[ "${ROCOTO:-false}" == true ]] ; then module load rocoto # ROCOTORUN=$(command -v rocotorun) @@ -955,7 +967,7 @@ case ${MACHINE_ID} in cp fv3_conf/fv3_qsub.IN_derecho fv3_conf/fv3_qsub.IN cp fv3_conf/compile_qsub.IN_derecho fv3_conf/compile_qsub.IN - + if [[ "${ROCOTO:-false}" == true ]] ; then # ROCOTORUN=$(command -v rocotorun) # ROCOTOSTAT=$(command -v rocotostat) @@ -1110,9 +1122,9 @@ rm -rf "${LOG_DIR}" mkdir -p "${LOG_DIR}" if [[ ${ROCOTO} == true ]]; then - + echo "rt.sh: Verifying ROCOTO support..." - + case ${MACHINE_ID} in wcoss2|acorn|expanse|stampede) die "Rocoto not supported on this machine, please do not use '-r'." @@ -1125,7 +1137,7 @@ if [[ ${ROCOTO} == true ]]; then ROCOTOSTAT="$(command -v rocotostat)" ROCOTOCOMPLETE="$(command -v rocotocomplete)" export ROCOTOCOMPLETE ROCOTOSTAT ROCOTORUN - + ROCOTO_XML=${PATHRT}/rocoto_workflow.xml ROCOTO_STATE=${PATHRT}/rocoto_workflow.state ROCOTO_DB=${PATHRT}/rocoto_workflow.db