Project

General

Profile

Feature #7865

Ability to source an arbitrary script prior to execution of primary executable

Added by Dominick Rocco over 4 years ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
02/14/2015
Due date:
% Done:

0%

Estimated time:
Stakeholders:

Nova

Duration:

Description

Users typically need to set up a particular environment in order run their executable. A basic example would be a Python executable which imports modules which come from some UPS product. As of now, this requires a shell wrapper to set up the environment. The ability to source an arbitrary script prior to execution of the primary executable would enable the user run without a wrapper. The idea for this feature comes from art_sam_wrap.sh in the ifdh_art UPS product, where it is an indispensable tool. Sadly, art_sam_wrap.sh doesn't handle every use case.

It looks like Condor supports something similar through +PreCmd, although I believe I've played around with it in the past to no avail. Perhaps it was that it only works in the DAG case. I also seem to recall that it doesn't export variables to the environment, i.e. sh instead of source.

The simplest solution might be to build this functionality into the wrap file that jobsub_client creates.

I describe the feature as "an arbitrary script", but see no reason why it shouldn't allow one or more to be supplied and run in the order which they are listed on the command line.

Ideally, the feature would also support an arbitrary number of arguments to the script. This can be complicated from the perspective command line argument parsing. In art_sam_wrap.sh this was handled by replacing spaces with a colon (:) character.

History

#1 Updated by Parag Mhashilkar about 4 years ago

  • Stakeholders updated (diff)

#2 Updated by Dennis Box 6 days ago

  • Target version set to v1.4


Also available in: Atom PDF