Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computing
cbmroot
Commits
ce68b9c1
Commit
ce68b9c1
authored
10 months ago
by
Pierre-Alain Loizeau
Browse files
Options
Downloads
Patches
Plain Diff
[CI/CD/QA] Fix-improve Weekly-SLURM-job-End-time Finder script for Virgo3
parent
ae3c30b7
No related branches found
Branches containing commit
Tags
dev_2024_21
Tags containing commit
1 merge request
!1838
[CI/CD/QA] Fix-improve Weekly-SLURM-job-End-time Finder script for Virgo3
Pipeline
#29548
passed
10 months ago
Stage: package
Stage: verify
Stage: documentation
Stage: deploy
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/find_slurm_ctest_stop_time.sh
+30
-20
30 additions, 20 deletions
scripts/find_slurm_ctest_stop_time.sh
with
30 additions
and
20 deletions
scripts/find_slurm_ctest_stop_time.sh
+
30
−
20
View file @
ce68b9c1
...
...
@@ -19,28 +19,38 @@
#>> ./Dart.sh Weekly ./${DART_CFG} &> ${OUT_DIR}/Dart_weekly.log
# SLURM end time
END_TIME
=
`
squeue
-j
${
SLURM_JOB_ID
}
-h
--Format
EndTime
`
CET_CEST
=
`
date
+
"%Z"
`
echo
"SLURM Job end time
${
END_TIME
}
probably
${
CET_CEST
}
"
# 1. From SLURM env variables if possible (virgo3)
if
[[
-n
${
SLURM_JOB_END_TIME
}
]]
;
then
echo
"Env variable SLURM_JOB_END_TIME=
${
SLURM_JOB_END_TIME
}
"
SLURM_JOB_END_TIME_DATE
=
`
date
-d
"@
${
SLURM_JOB_END_TIME
}
"
`
echo
"SLURM_JOB_END_TIME in human format:
${
SLURM_JOB_END_TIME_DATE
}
"
CTEST_END_TIME_LIMIT
=
`
date
-d
"
${
SLURM_JOB_END_TIME_DATE
}
-5minutes"
+
"%H:%M:%S"
`
else
# 2. From what squeue return if not possible directly from environment (virgo2)
# ==> Broken from bare-metal submit nodes end May 2024, maybe bug?
END_TIME
=
`
squeue
-j
${
SLURM_JOB_ID
}
-h
--Format
EndTime
`
CET_CEST
=
`
date
+
"%Z"
`
echo
"SLURM Job end time
${
END_TIME
}
probably
${
CET_CEST
}
"
# Ctest end time = SLURM -5 minutes (should be enough for coverage and uploads)
# => Not working as ctest expects the "time point in hours-minutes-seconds within current day"
# + hardcode the day/year/month to the current day...
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Help/manual/ctest.1.rst#L440
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmCTest.cxx#L1991
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmCTest.cxx#L3012
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/CTest/cmCTestRunTest.cxx#L811
# => Does not work for long running tests close to end of the day
# CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%Y-%m-%d %H:%M:%S %z"`
# => But following should be ok for weeklies starting early in the morning
# => Does not work at least with cmake 3.22 and 3.24, seesm that timezone is breaking decoding
# (tried all timezone options of date, with and without space between time and timezone)
#CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%H:%M:%S %z"`
# => Working! but probably unsafe on day of Summer time swaps + if tests run close to midnight...
# => Fixed for summer time but will probably still fail on the day of the swap itself... so twice a year
CTEST_END_TIME_LIMIT
=
`
date
-d
"
${
END_TIME
}${
CET_CEST
}
-5minutes"
+
"%H:%M:%S"
`
echo
"Setting the job time limit for ctest to
${
CTEST_END_TIME_LIMIT
}
to make sure CDASH data is uploaded"
# Ctest end time = SLURM -5 minutes (should be enough for coverage and uploads)
# => Not working as ctest expects the "time point in hours-minutes-seconds within current day"
# + hardcode the day/year/month to the current day...
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Help/manual/ctest.1.rst#L440
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmCTest.cxx#L1991
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/cmCTest.cxx#L3012
# https://gitlab.kitware.com/cmake/cmake/-/blob/master/Source/CTest/cmCTestRunTest.cxx#L811
# => Does not work for long running tests close to end of the day
# CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%Y-%m-%d %H:%M:%S %z"`
# => But following should be ok for weeklies starting early in the morning
# => Does not work at least with cmake 3.22 and 3.24, seesm that timezone is breaking decoding
# (tried all timezone options of date, with and without space between time and timezone)
#CTEST_END_TIME_LIMIT=`date -d "${END_TIME}CET -5minutes" +"%H:%M:%S %z"`
# => Working! but probably unsafe on day of Summer time swaps + if tests run close to midnight...
# => Fixed for summer time but will probably still fail on the day of the swap itself... so twice a year
CTEST_END_TIME_LIMIT
=
`
date
-d
"
${
END_TIME
}${
CET_CEST
}
-5minutes"
+
"%H:%M:%S"
`
fi
echo
"Setting the job time limit for ctest to
${
CTEST_END_TIME_LIMIT
}
to make sure CDASH data is uploaded"
if
[[
$#
-eq
1
]]
;
then
# Set the export in the chosen Dart.cfg file
echo
"export CTEST_END_TIME_LIMIT=
\"
${
CTEST_END_TIME_LIMIT
}
\"
"
>>
$1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment