remove wrapper ecg
This commit is contained in:
parent
20c7238581
commit
d8d2a2e8e2
@ -79,8 +79,7 @@ rule run_ecg:
|
|||||||
input:
|
input:
|
||||||
"flake.nix",
|
"flake.nix",
|
||||||
"flake.lock",
|
"flake.lock",
|
||||||
ecg="ecg.py",
|
ecg="ecg/app/ecg.py",
|
||||||
ecg_wrapper="workflow/scripts/ecg_wrapper.sh",
|
|
||||||
execo_wrapper="workflow/scripts/submission_g5k.py",
|
execo_wrapper="workflow/scripts/submission_g5k.py",
|
||||||
oar_wrapper="workflow/scripts/ecg_oar_wrapper.oar.bash",
|
oar_wrapper="workflow/scripts/ecg_oar_wrapper.oar.bash",
|
||||||
artifact=f"{ARTIFACTS_FOLDER_JSON}/{{artifact}}.{EXTENSION}"
|
artifact=f"{ARTIFACTS_FOLDER_JSON}/{{artifact}}.{EXTENSION}"
|
||||||
@ -90,7 +89,20 @@ rule run_ecg:
|
|||||||
build_status = f"{PREFIX}/build_status/{{artifact}}/{{date}}.csv",
|
build_status = f"{PREFIX}/build_status/{{artifact}}/{{date}}.csv",
|
||||||
artifact_hash = f"{PREFIX}/artifact_hash/{{artifact}}/{{date}}.csv",
|
artifact_hash = f"{PREFIX}/artifact_hash/{{artifact}}/{{date}}.csv",
|
||||||
shell:
|
shell:
|
||||||
(SHELLS_ECG["g5k"] if SYSTEM == "g5k" else "") + SHELLS_ECG["local"] + ("'" if SYSTEM == "g5k" else "")
|
(f"python3 {{input.execo_wrapper}} --path {os.getcwd()} \
|
||||||
|
--script {{input.oar_wrapper}} \
|
||||||
|
--site {config['site']} \
|
||||||
|
--cluster {config['cluster']} \
|
||||||
|
--max-duration {config['max_duration']} \
|
||||||
|
--checkpoint {config['checkpoint']} \
|
||||||
|
{'--besteffort' if config['besteffort'] else ''} \
|
||||||
|
--sleep_time {config['sleep_time']} \
|
||||||
|
--build_status_file {{output.build_status}} \
|
||||||
|
--artifact {{wildcards.artifact}} -- '" if SYSTEM == "g5k" else "") + \
|
||||||
|
"""
|
||||||
|
nix develop .#ecg-shell --command ecg -p {output.pkg} -b {output.build_status} -a {output.artifact_hash} {output.artifact} &> {output.log} || echo "{input.artifact}, `date +%s.%N`, script_crash" > {output.build_status}
|
||||||
|
""" + \
|
||||||
|
("'" if SYSTEM == "g5k" else "")
|
||||||
|
|
||||||
rule update_blacklist:
|
rule update_blacklist:
|
||||||
input:
|
input:
|
||||||
|
@ -17,7 +17,7 @@ export PATH=~/.local/bin:$PATH
|
|||||||
g5k-setup-docker -t
|
g5k-setup-docker -t
|
||||||
|
|
||||||
handler() {
|
handler() {
|
||||||
echo "${ARTIFACT_FILE}, `date +%s.%N`, job_time_exceeded" >> ${BUILD_STATUS_FILE}; exit 0;
|
echo "${ARTIFACT_FILE}, `date +%s.%N`, job_time_exceeded" > ${BUILD_STATUS_FILE}; exit 0;
|
||||||
}
|
}
|
||||||
trap handler SIGUSR2
|
trap handler SIGUSR2
|
||||||
|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ECG=$1
|
|
||||||
CONFIG=$2
|
|
||||||
PKGLIST=$3
|
|
||||||
BUILD_STATUS=$4
|
|
||||||
ARTHASH_LOG=$5
|
|
||||||
OUTPUT_LOG=$6
|
|
||||||
|
|
||||||
python3 $ECG -p $PKGLIST -b $BUILD_STATUS -a $ARTHASH_LOG $CONFIG > $OUTPUT_LOG 2> $OUTPUT_LOG
|
|
||||||
if [ $? -ne 0 ]
|
|
||||||
then
|
|
||||||
echo "${CONFIG}, `date +%s.%N`, script_crash" >> ${BUILD_STATUS}; exit 0;
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user