run GW using container with spack-stack 1.9.2#3964
Conversation
…into download-subset-fix-data
Download subset fix data
WalterKolczynski-NOAA
left a comment
There was a problem hiding this comment.
This still doesn't address a lot of the concerns about containing the containerization code. Please consider if this can all be done modifying only things run up-front before the j-job is called (*.env script, modulefiles), without using alternate scripts or altering the main flow of scripts.
| # | ||
| ############################################################################### | ||
| # | ||
| source "${HOMEgfs}/dev/ush/load_gw_run_modules.sh" |
There was a problem hiding this comment.
You should not be loading modules in the middle of a job here or in the ush scripts like you have added in many places. All modules need to be loaded up front before the j-job begins.
There was a problem hiding this comment.
So far, I have not think of a better way to handle this.
So, there are quite few scripts are doing this.
I was thinking add this to preamble.sh, what do you think?
| # overwrite MACHINE_ID if in container | ||
| if [[ -v SINGULARITY_CONTAINER ]]; then | ||
| # We are in a container | ||
| MACHINE_ID=container |
There was a problem hiding this comment.
I still think you are going to be more successful if container is just a separate setting and not a MACHINE_ID. There are times we will still need to know what hardware we are on when running from container.
There was a problem hiding this comment.
I need more time to think about this. Please update if you have something to share.
| echo "${nm} ${line}" >> "${mpmd_cmdfile}" | ||
| ((nm=nm+1)) | ||
| done < "${cmdfile}" | ||
| # Redirect output from each process to its own stdout |
There was a problem hiding this comment.
Why are there such drastic changes here? It is designed to detect the scheduler type so it can form the MPMD script properly. This removes all that.
There was a problem hiding this comment.
run_mpmd.sh is little complicated. Need more time to think and re-check.
| if [[ "${RUN_WITH_CONTAINER}" == "YES" ]]; then | ||
| "${HOMEgfs}/exec/run_python.sh" "${GLOBALARCHIVESH:-${SCRgfs}/exglobal_archive_vrfy.py}" -c -v | ||
| else | ||
| ${GLOBALARCHIVESH:-${SCRgfs}/exglobal_archive_vrfy.py} | ||
| fi |
There was a problem hiding this comment.
Really do not want to add blocks like this all over the code.
There was a problem hiding this comment.
Tried a different way. Please check and comment.
| chmod +x "${exec_python_script}" | ||
| chmod +x "${run_python_script}" | ||
|
|
||
| for item in JGLOBAL_WAVE_INIT |
Check warning
Code scanning / shellcheck
This loop will only ever run once. Bad quoting or missing glob/expansion? Warning
|
Since there are lots of concerns need to address, and we won't get this ready for EMC to review soon. Close it for now. |
Description
Make GW be able to run with container has spack-stack 1.9.2 inside.
change includes:
Add new module files, make detect-machine, module-setup can detect and setup for container.
Add new scripts to shell-in container compiling GW,
Add new scripts to generate run cases using container.
Add wrapper and other scripts to run GW with container.
Resolves #3963
Type of change
Change characteristics
How has this been tested?
Checklist