This file is indexed.

/usr/share/pegasus/examples/grid-montage/submit is in pegasus-wms 4.4.0+dfsg-7.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/bin/bash

set -e

# note - this requires Montage 3.2beta6 or higher

#######################################################################
#
#  Settings
#

DEGREES=2.0

LOCAL_MONTAGE_LOCATION="/ccg/software/montage/Montage_v3.2_beta6_mats"
LOCAL_GLOBUS_TCP_PORT_RANGE="40000,50000"

CLUSTER_NAME="CCG"
CLUSTER_HOSTNAME="obelix.isi.edu"
CLUSTER_GATEKEEPER_TYPE="gt5"
CLUSTER_GATEKEEPER_PORT="2119"
CLUSTER_SCHEDULER="condor"
CLUSTER_WORK_DIR="/nfs/ccg4/scratch-6-months-purge"
CLUSTER_PEGASUS_HOME="/ccg/software/pegasus/dev/trunk"
CLUSTER_GLOBUS_LOCATION="/ccg/software/globus/default"
CLUSTER_MONTAGE_LOCATION="/ccg/software/montage/Montage_v3.2_beta6_mats"

# this will bundle N jobs togehter
JOB_CLUSTERS_SIZE="25"

#######################################################################

TOP_DIR=`pwd`
LOCAL_HOSTNAME=`hostname -f`

export PATH=$LOCAL_MONTAGE_LOCATION/bin:$PATH

# unique directory for this run
RUN_ID=`/bin/date +'%F_%H%M%S'`
RUN_DIR=`pwd`/work/$RUN_ID

echo "Work directory: $RUN_DIR"

mkdir -p $RUN_DIR
cd $RUN_DIR

cp $TOP_DIR/pegasusrc .

# create the transformation catalogue (tc)
echo
echo "Creating the transformation catalog..."
for BINARY in `(cd $LOCAL_MONTAGE_LOCATION/bin && ls)`; do
    cat >>tc <<EOF
tr $BINARY:3.0 {
    site $CLUSTER_NAME {
        pfn "$CLUSTER_MONTAGE_LOCATION/bin/$BINARY"
        arch "x86_64"
        os "linux"
        type "INSTALLED"
        profile pegasus "clusters.size" "$JOB_CLUSTERS_SIZE" 
    }
}
EOF
done
#        <directory type="shared-scratch" path="$TOP_DIR/work">
#            <file-server operation="all" url="file://$TOP_DIR/work"/>
#        </directory>

# site catalog
echo
echo "Creating the site catalog..."
cat >sites.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<sitecatalog xmlns="http://pegasus.isi.edu/schema/sitecatalog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pegasus.isi.edu/schema/sitecatalog http://pegasus.isi.edu/schema/sc-4.0.xsd" version="4.0">

    <site  handle="local" arch="x86_64" os="LINUX">
        <directory type="local-storage" path="$TOP_DIR/outputs">
            <file-server operation="all" url="file://$TOP_DIR/outputs"/>
        </directory>
        <profile namespace="env" key="GLOBUS_LOCATION" >$GLOBUS_LOCATION</profile>
        <profile namespace="env" key="GLOBUS_TCP_PORT_RANGE" >$LOCAL_GLOBUS_TCP_PORT_RANGE</profile>
    </site>

    <site  handle="$CLUSTER_NAME" arch="x86_64" os="LINUX">
        <grid  type="$CLUSTER_GATEKEEPER_TYPE" contact="$CLUSTER_HOSTNAME:$CLUSTER_GATEKEEPER_PORT/jobmanager-fork" scheduler="Fork" jobtype="auxillary"/>
        <grid  type="$CLUSTER_GATEKEEPER_TYPE" contact="$CLUSTER_HOSTNAME:$CLUSTER_GATEKEEPER_PORT/jobmanager-$CLUSTER_SCHEDULER" scheduler="unknown" jobtype="compute"/>
        <directory type="shared-scratch" path="$CLUSTER_WORK_DIR">
            <file-server operation="all" url="gsiftp://$CLUSTER_HOSTNAME/$CLUSTER_WORK_DIR"/>
        </directory>
        <profile namespace="env" key="PEGASUS_HOME" >$CLUSTER_PEGASUS_HOME</profile>
        <profile namespace="env" key="GLOBUS_LOCATION" >$CLUSTER_GLOBUS_LOCATION</profile>
        <profile namespace="env" key="MONTAGE_HOME" >$CLUSTER_MONTAGE_LOCATION</profile>
    </site>

</sitecatalog>
EOF

echo
echo "Running mDAG (finding input images, generating DAX, ...)..."
mDAG 2mass j M17 $DEGREES $DEGREES 0.0002777778 . "gsiftp://$LOCAL_HOSTNAME$RUN_DIR" "gsiftp://$LOCAL_HOSTNAME$RUN_DIR/inputs"

echo
echo "Adding input images to the replica catalog..."
echo "  " `cat cache.list | wc -l` "images found"
cat cache.list | grep -v ".fits " >rc
cat url.list | sed 's/ http:.*ref=/ http:\/\/obelix.isi.edu\/irsa-cache/' >>rc

echo
echo "Planning and submitting the workflow..."
pegasus-plan \
    --conf pegasusrc \
    --sites $CLUSTER_NAME \
    --output-site local \
    --cluster horizontal \
    --dir work \
    --dax dag.xml \
    --submit \
    2>&1 | tee pegasus-plan.out