sub initialise_globals { # RSD: Remote Software Deployment: Initialise all global variables. # Contact: N. West, Oxford. # Parameters:- # ========== # None # Specification:- # ============= # o Initialise all global variables use Cwd; use strict; ### CMD: Command variables (see parse_command). # Command $CMD::CMD = ""; $CMD::ARGV = "@ARGV"; # Command options. @CMD::cmd_opts = (); # Command args. @CMD::cmd_args = (); ### BCT: Build Configuration Table # File holding table $BCT::FILE_NAME = "$SYS::RSD_HOME/libs_and_builds/build_config_table.dat"; # Look-up table: application-name:application-version -> space separated list of library-name:library-version %BCT::APPLICATION_TO_LIB_LIST = (); ### GRID Grid Configuration # Currently assigned automatically - and very crudely # simply by seeing if lcg-ManageVOTag runs! # # Grid type $GRID::TYPE = "None"; # Computing Element for tag management. $GRID::CE_TAG = ""; if ( not system("lcg-ManageVOTag > /dev/null 2>&1") ) { $GRID::TYPE = "lcg"; $GRID::CE_TAG = ""; # see get_grid_ce_name. } ### JBS: Job submission # Directory hold job tickets (Just a default here; defined in set_local_config) $JBS::TICKET_DIR = cwd() . "/rsd_job_tickets"; # Job arguments (set by --arguments option) $JBS::ARGUMENTS = ""; # Job input directory (set by --input_sandbox option) $JBS::INPUT_SANDBOX = ""; # Job input directory (set by --output_dir option) $JBS::OUTPUT_DIR = ""; # Job output directory (set by --output_sandbox option) $JBS::OUTPUT_SANDBOX = ""; # Verbose flag (set by --separate_stderror option) $JBS::SEPARATE_STDERROR = 0; # Verbose flag (set by --verbose option) $JBS::VERBOSE = 0; # Simulate edg-job command. Used to test without running jobs $JBS::SIMULATE_EDG_JOB = ""; # Current ticket values (read from $JBS::TICKET_DIR/$JBS::CTK_NAME.ticket and updated by edg-job commands) $JBS::CTK_NAME = ""; # Ticket name $JBS::CTK_JDL_FILE = ""; # JDL file $JBS::CTK_STATUS = ""; # One of: "Running", "Output_ready", "Complete", "Failed" $JBS::CTK_REASON = ""; # Test qualifying reason for status. $JBS::CTK_OUTPUT_DIR = ""; # Output directory (if any) specified when submitting $JBS::CTK_SUBMIT_DATE = ""; # Date job submitted $JBS::CTK_URL = ""; # URL for job retrieval ### SYS: System. (also $SYS::SRC_DIR - see rsd.pm) # Software version $SYS::VER = "2.10"; # Debug level $SYS::DEBUG = 0; # HOST $SYS::HOST = "unknown"; if ( open(HOSTNAME,"hostname |") ) { $SYS::HOST = ; chomp $SYS::HOST; close HOSTNAME; } # Log file/device. $SYS::LOG = "/dev/stdout"; # Site (use for local configuration) $SYS::SITE_NAME = ""; set_site(); # Directory into which tempory directories can be written # (Just a default here; defined in set_local_config) $SYS::WORK_DIR_PARENT =cwd(); # Work dir (erased at end of job). $SYS::WORK_DIR = "$SYS::WORK_DIR_PARENT/rsd_tmp_$$"; ### TST: Running in test mode $TST::MODE = 0; ### WEB: Web directory variables. # Temporary hack $WEB::DIR = "/userdisk/west/public_html/minos/remote_software_deployment"; $WEB::URL = "http://www-pnp.physics.ox.ac.uk/~west/minos/remote_software_deployment"; $WEB::ACCOUNT = "west\@ppslgen.physics.ox.ac.uk"; $WEB::DIR = "/afs/fnal.gov/files/expwww/numi/html/computing/remote_software_deployment"; $WEB::URL = "http://www-numi.fnal.gov/computing/remote_software_deployment"; $WEB::ACCOUNT = "nwest\@minos-mysql1.fnal.gov"; $WEB::UPLOAD_METHOD = "scp"; $WEB::DOWNLOAD_METHOD = "wget"; $WEB::HTTP_PROXY = ""; } 1; # Return O.K. from module loading.