Stream: general

Topic: example casper batch script?


view this post on Zulip Christine Shields (Feb 14 2023 at 23:56):

Hi everyone. I am very new to the python ecosystem, so apologies if this is obvious, or an ill-formed question. Using a typical cshell batch script, I am trying to run a series of .py files that I originally developed as notebooks. I am now in production mode and would like to use the batch/qsub workflow outside of Jupyterhub, for efficiency-sake. I developed the scripts using the "NPL (conda) kernal from the Jupyterhub framework, so I would like to use the same python environment. I have checked https://arc.ucar.edu/knowledge_base/72581396#StartingCasperjobswithPBS-Fortcshusers and https://arc.ucar.edu/knowledge_base/83853599#UsingCondaandPython-UsingCondainbatchjobs, but I am still failing to execute the correct module and/or environment sequence. Does anyone have an example they would be willing to share? Thanks!

view this post on Zulip Stephen Yeager (Feb 15 2023 at 15:42):

@Christine Shields , here is a pretty old example that worked for me:
/glade/u/home/yeager/analysis/python/toshare/POPMOC.DPLE.sh
You need to 'conda activate' the environment you used for the .py files.

view this post on Zulip Michael Levy (Feb 15 2023 at 16:19):

@Christine Shields this sounds like a case where it's easiest to just hop on a call and watch you walk through the process. Do you have 15 or 20 minutes either today or tomorrow? [edit: or Friday? we're apparently not as close to the weekend as I thought.] I'm happy to sit with you on zoom -- my calendar is up-to-date if you want to send an invite, or we can figure out details in a private message

view this post on Zulip Christine Shields (Feb 15 2023 at 18:07):

Stephen Yeager said:

Christine Shields , here is a pretty old example that worked for me:
/glade/u/home/yeager/analysis/python/toshare/POPMOC.DPLE.sh
You need to 'conda activate' the environment you used for the .py files.

Thanks Steve, I'll give it a try!

view this post on Zulip Christine Shields (Feb 15 2023 at 18:08):

Michael Levy said:

Christine Shields this sounds like a case where it's easiest to just hop on a call and watch you walk through the process. Do you have 15 or 20 minutes either today or tomorrow? [edit: or Friday? we're apparently not as close to the weekend as I thought.] I'm happy to sit with you on zoom -- my calendar is up-to-date if you want to send an invite, or we can figure out details in a private message

Thanks Mike! Let me fiddle w/Steve's script this morning, but I will email you for a consult if needed! This afternoon works great for me, I'll be in touch.


Last updated: May 16 2025 at 17:14 UTC