Giter Site home page Giter Site logo

Comments (9)

rljacob avatar rljacob commented on July 17, 2024

Details from @jayeshkrishna:

"In blues we use the PBS job scheduler and the "-V" option is used within the
job submission scripts. The "-V" imports environment from the caller
processes' environment. PBS modifies some environment variables (like PATH)
in the user's (caller process's) environment while retaining (if "-V" option is used)
the other environment variables from the user's environment.

When submitting a job, the submit script ($CASE.submit),
loads the environment (using ModuleLoader) before submitting the run script
($CASE.run) using the qsub command.

The job submission perl script in CIME loads the environment by running (it reads the env
set by env_mach_specific and explicitly sets its own env accordingly) env_mach_specific.
The module loader in CIME has optimizations to avoid reloading the environment if it is already
loaded (see "CIME_MODULES_LOADED" in ModuleLoader.pm).

Since variables like PATH are modified by PBS and the run script retains the
environment of the submit script, when the run script tries to load the machine specific env
the module loader skips it due to the optimization mentioned above. Hence the PATH
(and other required environment variables) is not set correctly in the run script.
i.e., In the run script PATH is not set correctly while CIME_MODULES_LOADED is set."

from cime.

rljacob avatar rljacob commented on July 17, 2024

Again from @jayeshkrishna:

"There are two possible fixes to the problem,

  • Remove the "-V" option passed to qsub (see settings for pbs in config_batch,xml)
<directive default="/bin/bash" > -S {{ shell }} -V </directive>
  • Disable the optimization in CIME that prevents reloading of the user environment (See ModuleLoader.pm)
if(defined $ENV{CIME_MODULES_LOADED}) {return $self};

"

from cime.

rljacob avatar rljacob commented on July 17, 2024

We've decided to disable the optimization in CIME that prevents reloading of the user environment. Does anyone know a good reason to keep that optimization?

from cime.

jedwards4b avatar jedwards4b commented on July 17, 2024

I do - the user environment sometimes causes errors that are difficult to
debug and/or testers set up environments and forget to tell other people
that they need them. We want to keep the cime environment self contained
to the extent possible.

On Thu, Feb 4, 2016 at 4:29 PM, Robert Jacob [email protected]
wrote:

We've decided to disable the optimization in CIME that prevents reloading
of the user environment. Does anyone know a good reason to keep that
optimization?


Reply to this email directly or view it on GitHub
#56 (comment).

Jim Edwards

CESM Software Engineer
National Center for Atmospheric Research
Boulder, CO

from cime.

rljacob avatar rljacob commented on July 17, 2024

So you'd be in favor of taking out the -V ?

from cime.

jedwards4b avatar jedwards4b commented on July 17, 2024

Yes - I think that we've seen this problem on several machines and the
solution has been to take out the -V.

On Thu, Feb 4, 2016 at 5:36 PM, Robert Jacob [email protected]
wrote:

So you'd be in favor of taking out the -V ?


Reply to this email directly or view it on GitHub
#56 (comment).

Jim Edwards

CESM Software Engineer
National Center for Atmospheric Research
Boulder, CO

from cime.

rljacob avatar rljacob commented on July 17, 2024

Thanks. But is that line to prevent reloading in ModuleLoader.pm necessary for any reason?

from cime.

jedwards4b avatar jedwards4b commented on July 17, 2024

It was intended to avoid repeating tasks that had already been done. But
it's not in the latest CESM-development or ESMCI master.

On Thu, Feb 4, 2016 at 7:26 PM, Robert Jacob [email protected]
wrote:

Thanks. But is that line to prevent reloading in ModuleLoader.pm necessary
for any reason?


Reply to this email directly or view it on GitHub
#56 (comment).

Jim Edwards

CESM Software Engineer
National Center for Atmospheric Research
Boulder, CO

from cime.

rljacob avatar rljacob commented on July 17, 2024

Fixed in ACME.

from cime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.