From 14ee5296e94b7f062751fa3f9f68c8b2f91bcb53 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 6 Nov 2024 22:57:24 +0100 Subject: [PATCH 1/4] Squashed commit of the following: commit 4b5ce3efa798aad5d426879360806c8e155201bf Author: Patrick Gartung Date: Wed Nov 6 22:52:53 2024 +0100 Use cd since pushd/popd does not work they way expected commit 2361e05a8f1c127ee83292fdbe7661daf429716a Author: Patrick Gartung Date: Wed Nov 6 21:30:16 2024 +0100 export RUNALLSTEPS commit fafb1d70254e4f5ae3faa0dfa2d941df3bec4869 Author: Patrick Gartung Date: Wed Nov 6 19:43:54 2024 +0100 Leave environment set to get CMSSW_VERSION commit 7df6c16840bd1ce08d92f36f91f310d586ad49d4 Author: Patrick Gartung Date: Wed Nov 6 19:20:54 2024 +0100 Use correct project command commit a47d72b3a788734a37ebf098b6ee84f16fabe34c Author: Patrick Gartung Date: Wed Nov 6 18:46:40 2024 +0100 Use full project command commit 18d00f5c97a09299f0039317142481c1aa5b7307 Author: Patrick Gartung Date: Wed Nov 6 18:23:29 2024 +0100 Set the IB environment before running the profiling for IB commit 325b8e2af495ff640e479b39909f01f85825fbe6 Author: Patrick Gartung Date: Wed Nov 6 17:56:53 2024 +0100 Make sure scram environment for IB+PR is not set when running IB profiling commit 198bd08d9ccdf11f1a0530f00344a5c00403c1da Author: Patrick Gartung Date: Wed Nov 6 17:44:23 2024 +0100 close doe done loop commit e7c90b737bf94f52105063d4122cdb613f1b42ab Author: Patrick Gartung Date: Wed Nov 6 17:18:26 2024 +0100 Black formatting commit 83f7db479735439c70fd279bf1c5b92c2eb7f342 Author: Patrick Gartung Date: Wed Nov 6 17:12:55 2024 +0100 Run the profiling on the IB before running on the IB+PR commit 8261056fcecb8b32f85813f992671b6e8f053b9b Merge: e2d70cdd 04a7d994 Author: Patrick Gartung Date: Wed Nov 6 17:05:41 2024 +0100 Merge remote-tracking branch 'upstream/master' commit e2d70cdd2fb57ecf704a2008050a12400b0b51ce Author: Patrick Gartung Date: Wed Nov 6 02:01:11 2024 +0100 Rename input->prdata output->ibdata. Accumulate metrics by module type. commit 35565ba369bf33613271d9b430691169475e721e Author: Patrick Gartung Date: Tue Nov 5 22:24:26 2024 +0100 Black formatting commit 3b8921b5652da9a05ca9bd0c401aa1a402f0b3ad Merge: bb81d17a 0cbd3d07 Author: Patrick Gartung Date: Tue Nov 5 22:23:12 2024 +0100 Merge remote-tracking branch 'upstream/master' commit bb81d17a48bd7834fcf160673fb21de642180b1d Author: Patrick Gartung Date: Tue Nov 5 22:21:21 2024 +0100 Black formatting commit 28e277cea01c1885e909e50c9a2ade8b53ca9181 Author: Patrick Gartung Date: Tue Nov 5 22:17:55 2024 +0100 Use fraction of total time for comparison. Some total time at top of table commit b07729045398efdfc81e4854008f5d1ed3c024db Author: Patrick Gartung Date: Tue Nov 5 18:53:34 2024 +0100 Try with scaled diffs commit e6b9d86524f8dd4b6c203eca945a8aeb4de7af50 Author: Patrick Gartung Date: Tue Nov 5 20:16:37 2024 +0100 Put IB fast timer json in a directory where it will be copied back commit 0c3667039e8b964bc29379c56bbee9c8cbc0230a Author: Patrick Gartung Date: Mon Nov 4 23:56:34 2024 +0100 Copy step2.root to correct directory commit 8f7c787989f7182ad946c09aa89f6eefc31527f3 Author: Patrick Gartung Date: Mon Nov 4 19:57:59 2024 +0100 Copy step2.root from IB profiling --- pr_testing/run-pr-profiling.sh | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pr_testing/run-pr-profiling.sh b/pr_testing/run-pr-profiling.sh index 0cdb5db144f..8e2294dbbcc 100755 --- a/pr_testing/run-pr-profiling.sh +++ b/pr_testing/run-pr-profiling.sh @@ -31,7 +31,27 @@ for PROFILING_WORKFLOW in $WORKFLOWS;do export LOCALRT=${WORKSPACE}/${CMSSW_VERSION} PROF_RES="OK" export PROFILING_WORKFLOW + mkdir -p $WORKSPACE/IB + cd $WORKSPACE/IB + scram project ${CMSSW_VERSION} + cd $CMSSW_VERSION + eval `scram run -sh` + cd $WORKSPACE/IB $WORKSPACE/profiling/Gen_tool/Gen.sh $CMSSW_VERSION || true + export RUNALLSTEPS=1 + $WORKSPACE/profiling/Gen_tool/runall.sh $CMSSW_VERSION || true + unset RUNALLSTEPS + cd $CMSSW_VERSION + eval `scram unsetenv -sh` + cd $WORKSPACE/$CMSSW_VERSION + eval `scram run -sh` + cd $WORKSPACE + $WORKSPACE/profiling/Gen_tool/Gen.sh $CMSSW_VERSION || true + cp -v $WORKSPACE/IB/$CMSSW_VERSION/$PROFILING_WORKFLOW/step2.root $WORKSPACE/$CMSSW_VERSION/$PROFILING_WORKFLOW || true + for f in $(find $WORKSPACE/IB/$CMSSW_VERSION/$PROFILING_WORKFLOW -name step*.json);do + b=$(basename $f) + cp -v $f $WORKSPACE/$CMSSW_VERSION/$PROFILING_WORKFLOW/$CMSSW_VERSION-$b || true + done $WORKSPACE/profiling/Gen_tool/runall.sh $CMSSW_VERSION || true $WORKSPACE/profiling/Gen_tool/runall_cpu.sh $CMSSW_VERSION || true $WORKSPACE/profiling/Gen_tool/runall_mem_GC.sh $CMSSW_VERSION || true @@ -95,8 +115,7 @@ for PROFILING_WORKFLOW in $WORKFLOWS;do ls -l $LOCALREL/profiling/${CMSSW_VERSION}/${SCRAM_ARCH}/${PROFILING_WORKFLOW}/${UPLOAD_UNIQ_ID}/$BASENAME || true AMP="&" echo "
  • $BASENAME
  • " >> $WORKSPACE/upload/profiling/index-$PROFILING_WORKFLOW.html - get_jenkins_artifacts profiling/${CMSSW_VERSION}/${SCRAM_ARCH}/$f $CMSSW_VERSION-$BASENAME - $CMS_BOT_DIR/comparisons/resources-diff.py $f $CMSSW_VERSION-$BASENAME >$f.log || true + $CMS_BOT_DIR/comparisons/resources-diff.py $f $PROFILING_WORKFLOW/$CMSSW_VERSION-$BASENAME >$f.log || true echo "
  • diff-$BASENAME
  • " >> $WORKSPACE/upload/profiling/index-$PROFILING_WORKFLOW.html || true done for f in $(find $PROFILING_WORKFLOW -type f -name '*.log' -o -name '*.txt' -o -name '*.tmp' -o -name '*.heap*' -o -name '*.json' -o -name '*.html') ; do From 6f73215972bec504e6f076a9da9cbedb36d74735 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 6 Nov 2024 23:47:14 +0100 Subject: [PATCH 2/4] Get the environment setting correct --- pr_testing/run-pr-profiling.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pr_testing/run-pr-profiling.sh b/pr_testing/run-pr-profiling.sh index 8e2294dbbcc..2ec9acc5a06 100755 --- a/pr_testing/run-pr-profiling.sh +++ b/pr_testing/run-pr-profiling.sh @@ -36,19 +36,16 @@ for PROFILING_WORKFLOW in $WORKFLOWS;do scram project ${CMSSW_VERSION} cd $CMSSW_VERSION eval `scram run -sh` - cd $WORKSPACE/IB $WORKSPACE/profiling/Gen_tool/Gen.sh $CMSSW_VERSION || true export RUNALLSTEPS=1 $WORKSPACE/profiling/Gen_tool/runall.sh $CMSSW_VERSION || true unset RUNALLSTEPS - cd $CMSSW_VERSION eval `scram unsetenv -sh` - cd $WORKSPACE/$CMSSW_VERSION + cd $LOCALRT eval `scram run -sh` cd $WORKSPACE $WORKSPACE/profiling/Gen_tool/Gen.sh $CMSSW_VERSION || true - cp -v $WORKSPACE/IB/$CMSSW_VERSION/$PROFILING_WORKFLOW/step2.root $WORKSPACE/$CMSSW_VERSION/$PROFILING_WORKFLOW || true - for f in $(find $WORKSPACE/IB/$CMSSW_VERSION/$PROFILING_WORKFLOW -name step*.json);do + for f in $(find $WORKSPACE/$CMSSW_VERSION/$PROFILING_WORKFLOW -name step*.json);do b=$(basename $f) cp -v $f $WORKSPACE/$CMSSW_VERSION/$PROFILING_WORKFLOW/$CMSSW_VERSION-$b || true done From 6be906f2f8f0d219fdd1cf974f16934e148035d4 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Wed, 6 Nov 2024 23:54:33 +0100 Subject: [PATCH 3/4] Use variable scram won't unset --- pr_testing/run-pr-profiling.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pr_testing/run-pr-profiling.sh b/pr_testing/run-pr-profiling.sh index 2ec9acc5a06..2e81feafc21 100755 --- a/pr_testing/run-pr-profiling.sh +++ b/pr_testing/run-pr-profiling.sh @@ -29,6 +29,7 @@ for PROFILING_WORKFLOW in $WORKFLOWS;do echo "Profiling wf $PROFILING_WORKFLOW' results
      " > $WORKSPACE/upload/profiling/index-$PROFILING_WORKFLOW.html LOCALREL=${WORKSPACE}/${CMSSW_VERSION} export LOCALRT=${WORKSPACE}/${CMSSW_VERSION} + export WORKING_DIR=${WORKSPACE}/${CMSSW_VERSION} PROF_RES="OK" export PROFILING_WORKFLOW mkdir -p $WORKSPACE/IB @@ -41,7 +42,7 @@ for PROFILING_WORKFLOW in $WORKFLOWS;do $WORKSPACE/profiling/Gen_tool/runall.sh $CMSSW_VERSION || true unset RUNALLSTEPS eval `scram unsetenv -sh` - cd $LOCALRT + cd $WORKING_DIR eval `scram run -sh` cd $WORKSPACE $WORKSPACE/profiling/Gen_tool/Gen.sh $CMSSW_VERSION || true From 91866127ae9a429c9fe4ad6844356d166544c4e0 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Mon, 11 Nov 2024 18:33:09 +0100 Subject: [PATCH 4/4] Don't need second config generation --- pr_testing/run-pr-profiling.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/pr_testing/run-pr-profiling.sh b/pr_testing/run-pr-profiling.sh index 2e81feafc21..b6e39840ff0 100755 --- a/pr_testing/run-pr-profiling.sh +++ b/pr_testing/run-pr-profiling.sh @@ -45,7 +45,6 @@ for PROFILING_WORKFLOW in $WORKFLOWS;do cd $WORKING_DIR eval `scram run -sh` cd $WORKSPACE - $WORKSPACE/profiling/Gen_tool/Gen.sh $CMSSW_VERSION || true for f in $(find $WORKSPACE/$CMSSW_VERSION/$PROFILING_WORKFLOW -name step*.json);do b=$(basename $f) cp -v $f $WORKSPACE/$CMSSW_VERSION/$PROFILING_WORKFLOW/$CMSSW_VERSION-$b || true