@@ -7,37 +7,59 @@ REPO_DIR=$(cd "${SCRIPT_DIR}/../.." && pwd)
77TMP_DIR=$( mktemp -d)
88trap ' rm -rf "${TMP_DIR}"' EXIT
99
10- mkdir -p " ${TMP_DIR} /project"
11- ln -s " ${REPO_DIR} /config" " ${TMP_DIR} /project/config"
12- ln -s " ${REPO_DIR} /programs" " ${TMP_DIR} /project/programs"
10+ mkdir -p " ${TMP_DIR} /project/config" " ${TMP_DIR} /project/programs/filterapp"
1311ln -s " ${REPO_DIR} /scripts" " ${TMP_DIR} /project/scripts"
1412
13+ cat > " ${TMP_DIR} /project/config/system.csv" << 'EOF '
14+ system,mode,tag_build,tag_run,queue,queue_group
15+ FilterSystem,cross,build-tag,run-tag,SLURM_TEST,debug
16+ EOF
17+
18+ cat > " ${TMP_DIR} /project/config/queue.csv" << 'EOF '
19+ queue,submit_cmd,template
20+ SLURM_TEST,sbatch,"-p ${queue_group} -t ${elapse} -N ${nodes} --ntasks-per-node=${numproc_node} --cpus-per-task=${nthreads}"
21+ EOF
22+
23+ cat > " ${TMP_DIR} /project/config/system_info.csv" << 'EOF '
24+ system,name,cpu_name,cpu_per_node,cpu_cores,gpu_name,gpu_per_node,memory,display_order
25+ FilterSystem,FilterSystem,CPU,1,32,GPU,1,64 GB,1
26+ EOF
27+
28+ cat > " ${TMP_DIR} /project/programs/filterapp/list.csv" << 'EOF '
29+ system,enable,nodes,numproc_node,nthreads,elapse
30+ FilterSystem,yes,1,2,3,0:10:00
31+ FilterSystem,yes,2,2,3,0:10:00
32+ FilterSystem,yes,4,2,3,0:10:00
33+ EOF
34+ printf ' #!/bin/bash\n' > " ${TMP_DIR} /project/programs/filterapp/build.sh"
35+ printf ' #!/bin/bash\n' > " ${TMP_DIR} /project/programs/filterapp/run.sh"
36+
1537pushd " ${TMP_DIR} /project" > /dev/null
1638
17- bash scripts/matrix_generate.sh code=sbd system=RIKYU nodes=1
18- grep -q ' ^sbd_RIKYU_N1_P4_T32_run :' .gitlab-ci.generated.yml
39+ bash scripts/matrix_generate.sh code=filterapp system=FilterSystem nodes=1
40+ grep -q ' ^filterapp_FilterSystem_N1_P2_T3_run :' .gitlab-ci.generated.yml
1941grep -q ' name: $CI_COMMIT_BRANCH' .gitlab-ci.generated.yml
20- if grep -q ' ^sbd_RIKYU_N2_P4_T32_run :' .gitlab-ci.generated.yml; then
21- echo " nodes=1 filter must not emit the SBD RIKYU 2-node job" >&2
42+ if grep -q ' ^filterapp_FilterSystem_N2_P2_T3_run :' .gitlab-ci.generated.yml; then
43+ echo " nodes=1 filter must not emit the 2-node fixture job" >&2
2244 exit 1
2345fi
24- if grep -q ' ^sbd_RIKYU_N4_P4_T32_run :' .gitlab-ci.generated.yml; then
25- echo " nodes=1 filter must not emit the SBD RIKYU 4-node job" >&2
46+ if grep -q ' ^filterapp_FilterSystem_N4_P2_T3_run :' .gitlab-ci.generated.yml; then
47+ echo " nodes=1 filter must not emit the 4-node fixture job" >&2
2648 exit 1
2749fi
2850
29- bash scripts/matrix_generate.sh code=sbd system=RIKYU nodes=' 2, 4'
30- if grep -q ' ^sbd_RIKYU_N1_P4_T32_run :' .gitlab-ci.generated.yml; then
31- echo " nodes=2,4 filter must not emit the SBD RIKYU 1-node job" >&2
51+ bash scripts/matrix_generate.sh code=filterapp system=FilterSystem nodes=' 2, 4'
52+ if grep -q ' ^filterapp_FilterSystem_N1_P2_T3_run :' .gitlab-ci.generated.yml; then
53+ echo " nodes=2,4 filter must not emit the 1-node fixture job" >&2
3254 exit 1
3355fi
34- grep -q ' ^sbd_RIKYU_N2_P4_T32_run :' .gitlab-ci.generated.yml
35- grep -q ' ^sbd_RIKYU_N4_P4_T32_run :' .gitlab-ci.generated.yml
56+ grep -q ' ^filterapp_FilterSystem_N2_P2_T3_run :' .gitlab-ci.generated.yml
57+ grep -q ' ^filterapp_FilterSystem_N4_P2_T3_run :' .gitlab-ci.generated.yml
3658
37- BK_GITLAB_ENVIRONMENT=develop bash scripts/matrix_generate.sh code=sbd system=RIKYU nodes=1
59+ BK_GITLAB_ENVIRONMENT=develop bash scripts/matrix_generate.sh code=filterapp system=FilterSystem nodes=1
3860grep -q ' name: "develop"' .gitlab-ci.generated.yml
3961
40- if BK_GITLAB_ENVIRONMENT=' bad scope' bash scripts/matrix_generate.sh code=sbd system=RIKYU nodes=1 > /dev/null 2>&1 ; then
62+ if BK_GITLAB_ENVIRONMENT=' bad scope' bash scripts/matrix_generate.sh code=filterapp system=FilterSystem nodes=1 > /dev/null 2>&1 ; then
4163 echo " invalid BK_GITLAB_ENVIRONMENT must fail matrix generation" >&2
4264 exit 1
4365fi
0 commit comments