[Bio] / FigCommon / setup-sge.pl Repository:
ViewVC logotype

View of /FigCommon/setup-sge.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.2 - (download) (as text) (annotate)
Mon Dec 5 19:10:06 2005 UTC (14 years, 6 months ago) by olson
Branch: MAIN
CVS Tags: mgrast_dev_08112011, rast_rel_2009_05_18, mgrast_dev_08022011, rast_rel_2014_0912, rast_rel_2008_06_18, rast_rel_2008_06_16, mgrast_dev_05262011, rast_rel_2008_12_18, mgrast_dev_04082011, rast_rel_2008_07_21, rast_rel_2010_0928, rast_2008_0924, mgrast_version_3_2, mgrast_dev_12152011, rast_rel_2008_04_23, help, mgrast_dev_06072011, rast_rel_2008_09_30, rast_rel_2009_0925, rast_rel_2010_0526, rast_rel_2014_0729, mgrast_dev_02212011, rast_rel_2010_1206, caBIG-05Apr06-00, mgrast_release_3_0, mgrast_dev_03252011, rast_rel_2010_0118, mgrast_rel_2008_0924, mgrast_rel_2008_1110_v2, rast_rel_2009_02_05, rast_rel_2011_0119, mgrast_rel_2008_0625, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, mgrast_release_3_0_1, mgrast_dev_03312011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, rast_rel_2008_10_09, mgrast_dev_04012011, rast_release_2008_09_29, mgrast_rel_2008_0806, mgrast_rel_2008_0923, mgrast_rel_2008_0919, rast_rel_2009_07_09, rast_rel_2010_0827, mgrast_rel_2008_1110, myrast_33, rast_rel_2011_0928, rast_rel_2008_09_29, mgrast_rel_2008_0917, rast_rel_2008_10_29, mgrast_dev_04052011, mgrast_dev_02222011, caBIG-13Feb06-00, rast_rel_2009_03_26, mgrast_dev_10262011, rast_rel_2008_11_24, rast_rel_2008_08_07, HEAD
Changes since 1.1: +17 -0 lines
Added license words.

# Copyright (c) 2003-2006 University of Chicago and Fellowship
# for Interpretations of Genomes. All Rights Reserved.
# This file is part of the SEED Toolkit.
# The SEED Toolkit is free software. You can redistribute
# it and/or modify it under the terms of the SEED Toolkit
# Public License. 
# You should have received a copy of the SEED Toolkit Public License
# along with this program; if not write to the University of Chicago
# at info@ci.uchicago.edu or the Fellowship for Interpretation of
# Genomes at veronika@thefig.info or download a copy from
# http://www.theseed.org/LICENSE.TXT.

# Configure the SGE install for this machine.
# We copy the SGE directory from the common runtime
# directory to the directory FIGdisk/gendb/SGE so that
# we can have a custom installation as part of the build
# (this should help in the configuration of the system
# if one copies a figdisk from one machine to another).

use FIG_Config;
use FIG;

my $root = "$FIG_Config::fig_disk/gendb/SGE";

my $cell = "default";

if (-d "$root/$cell")
    die "It appears that SGE is already configured in $root.\n";

my $sge_src = "$FIG_Config::common_runtime/sge";
if (! -d $sge_src)
    die "Cannot find SGE source directory $sge_src\n";

my $rc = system("cd $sge_src; tar cf - . | (cd $root; tar xfp -)");
if ($rc != 0)
    die "Copy of sge from $FIG_Config::common_runtime/sge failed\n";

# Just use these defaults for now.
my %replacements = (ROOT => $root,
		    QMASTER_PORT => 10111,
		    EXECD_PORT => 10112,
		    CELL_NAME => $cell,
		    GID_RANGE=> '20000-20100',
		    ADMIN_HOSTS => "localhost",
		    SUBMIT_HOSTS => "localhost",
		    EXEC_HOSTS => "localhost",

my $conf = "$root/SGE_Config";
open(CONF, ">$conf") or die "Cannot open $conf for writing: $!\n";

while (<DATA>)
    my $k, $v;
    while (($k, $v) = each(%replacements))
    print CONF $_;

chdir($root) or die "Cannot chdir $root: $!\n";

my $inst = "$root/inst_sge";

-x $inst or die "Cannot execute $inst\n";

$rc = system($inst, qw(-m -x -auto ./SGE_Config));

if ($rc != 0)
    die "$inst failed\n";
print "SGE setup to $root succeeded\n";
# SGE default configuration file

# Use always fully qualified pathnames, please

# SGE_ROOT Path, this is basic information
#(mandatory for qmaster and execd installation)

# SGE_QMASTER_PORT is used by qmaster for communication
# Please enter the port in this way: 1300
# Please do not this: 1300/tcp
#(mandatory for qmaster installation)

# SGE_EXECD_PORT is used by execd for communication
# Please enter the port in this way: 1300
# Please do not this: 1300/tcp
#(mandatory for qmaster installation)

# CELL_NAME, will be a dir in SGE_ROOT, contains the common dir
# Please enter only the name of the cell. No path, please
#(mandatory for qmaster and execd installation)

# The dir, where qmaster spools this parts, which are not spooled by DB
#(mandatory for qmaster installation)

# The dir, where the execd spools (active jobs)
# This entry is needed, even if your are going to use
# berkeley db spooling. Only cluster configuration and jobs will
# be spooled in the database. The execution daemon still needs a spool
# directory  
#(mandatory for qmaster installation)

# For monitoring and accounting of jobs, every job will get
# unique GID. So you have to enter a free GID Range, which
# is assigned to each job running on a machine.
# If you want to run 100 Jobs at the same time on one host you
# have to enter a GID-Range like that: 16000-16100
#(mandatory for qmaster installation)

# If SGE is compiled with -spool-dynamic, you have to enter here, which
# spooling method should be used. (classic or berkeleydb)
#(mandatory for qmaster installation)

# Name of the Server, where the Spooling DB is running on
# if spooling methode is berkeleydb, it must be "none", when
# using no spooling server and it must containe the servername
# if a server should be used. In case of "classic" spooling,
# can be left out

# The dir, where the DB spools
# If berkeley db spooling is used, it must contain the path to
# the spooling db. Please enter the full path. (eg. /tmp/data/spooldb)
# Remember, this directory must be local on the qmaster host or on the
# Berkeley DB Server host. No NSF mount, please

# A List of Host which should become admin hosts
# If you do not enter any host here, you have to add all of your hosts
# by hand, after the installation. The autoinstallation works without
# any entry

# A List of Host which should become submit hosts
# If you do not enter any host here, you have to add all of your hosts
# by hand, after the installation. The autoinstallation works without
# any entry

# A List of Host which should become exec hosts
# If you do not enter any host here, you have to add all of your hosts
# by hand, after the installation. The autoinstallation works without
# any entry
# (mandatory for execution host installation)

# The dir, where the execd spools (local configuration)
# If you want configure your execution daemons to spool in
# a local directory, you have to enter this directory here.
# If you do not want to configure a local execution host spool directory
# please leave this empty

# If true, the domainnames will be ignored, during the hostname resolving
# if false, the fully qualified domain name will be used for name resolving

# Shell, which should be used for remote installation (rsh/ssh)
# This is only supported, if your hosts and rshd/sshd is configured,
# not to ask for a password, or promting any message.

# Enter your default domain, if you are using /etc/hosts or NIS configuration

# If a job stops, fails, finnish, you can send a mail to this adress

# If true, the rc scripts (sgemaster, sgeexecd, sgebdb) will be added,
# to start automatically during boottime

#If this is "true" the file permissions of executables will be set to 755
#and of ordenary file to 644.  

# This option is not implemented, yet.
# When a exechost should be uninstalled, the running jobs will be rescheduled

# Enter a one of the three distributed scheduler tuning configuration sets
# (1=normal, 2=high, 3=max)

# The name of the shadow host. This host must have read/write permission
# to the qmaster spool directory
# If you want to setup a shadow host, you must enter the servername
# (mandatory for shadowhost installation)

# Remove this execution hosts in automatic mode
# (mandatory for unistallation of execution hosts)

# This option is used for startup script removing. 
# If true, all rc startup scripts will be removed during
# automatic deinstallation. If false, the scripts won't
# be touched.
# (mandatory for unistallation of execution/qmaster hosts)

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3