Skip to content

Commit

Permalink
Use pdebug queue for quartz allocation, print host in build_src.py sc…
Browse files Browse the repository at this point in the history
…ript (#1098)
  • Loading branch information
bmhan12 committed May 30, 2023
1 parent 8cbf7b1 commit b1c06e2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stages:
.src_build_script:
script:
# Use pre-existing allocation if any
- JOBID=$(if [[ "$SYS_TYPE" == "toss_3_x86_64_ib" ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi)
- export JOBID=$(if [[ "$SYS_TYPE" == "toss_4_x86_64_ib" ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi)
- ASSIGN_ID=$(if [[ -n "${JOBID}" ]]; then echo "--jobid=${JOBID}"; fi)
# BUILD + TEST
- echo -e "\e[0Ksection_start:$(date +%s):src_build_and_test\r\e[0KSource Build and Test ${CI_PROJECT_NAME}"
Expand Down
6 changes: 3 additions & 3 deletions .gitlab/build_quartz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ quartz_allocate:
script:
# Use when ellastic ci is on quartz or we go back to ruby
#- salloc --reservation=ci --qos=ci_ruby -N 1 -c 36 -t 60 --no-shell --job-name=${PROJECT_ALLOC_NAME}
- salloc -N 1 -c 36 -t 60 --no-shell --job-name=${PROJECT_ALLOC_NAME}
- salloc -N 1 -c 36 -t 60 -p pdebug --no-shell --job-name=${PROJECT_ALLOC_NAME}
needs: []

####
Expand All @@ -50,7 +50,7 @@ quartz_release:
variables:
# Use when ellastic ci is on quartz or we go back to ruby
# ALLOC_COMMAND: "srun --reservation=ci --qos=ci_ruby -t 60 -N 1 "
ALLOC_COMMAND: "srun -t 60 -N 1 "
ALLOC_COMMAND: "srun -t 60 -N 1 -p pdebug"
extends: [.src_build_script, .on_quartz, .src_workflow]
needs: [quartz_allocate]

Expand All @@ -59,7 +59,7 @@ quartz_release:
variables:
# Use when ellastic ci is on quartz or we go back to ruby
# ALLOC_COMMAND: "srun --reservation=ci --qos=ci_ruby -t 60 -N 1 "
ALLOC_COMMAND: "srun -t 60 -N 1 "
ALLOC_COMMAND: "srun -t 60 -N 1 -p pdebug"
extends: [.full_build_script, .on_quartz, .full_workflow]
needs: []

Expand Down
4 changes: 4 additions & 0 deletions scripts/llnl_scripts/build_src.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ def main():
print("[ERROR: Could not find any host-configs in any known path. Try giving fully qualified path.]")
return 1

print("[build info]")
binfo_str = json.dumps(build_info(),indent=2)
print(binfo_str)

test_root = get_build_and_test_root(repo_dir, timestamp)
test_root = "{0}_{1}".format(test_root, hostconfig.replace(".cmake", "").replace("@","_"))
os.mkdir(test_root)
Expand Down
5 changes: 5 additions & 0 deletions scripts/llnl_scripts/llnl_lc_build_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def build_info():
res["built_from_branch"] = "unknown"
res["built_from_sha1"] = "unknown"
res["platform"] = get_platform()
res["hostname"] = "unknown"
rc, out = sexe('git branch -a | grep \"*\"',ret_output=True,error_prefix="WARNING:")
out = out.strip()
if rc == 0 and out != "":
Expand All @@ -79,6 +80,10 @@ def build_info():
out = out.strip()
if rc == 0 and out != "":
res["built_from_sha1"] = out
rc, out = sexe('hostname',ret_output=True,error_prefix="WARNING:")
out = out.strip()
if rc == 0 and out != "":
res["hostname"] = out
return res


Expand Down

0 comments on commit b1c06e2

Please sign in to comment.