repastwrapper.sh

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

repastwrapper.sh

Maximiliano Colazo
the paramFile varibles and param_file are the same?



#!/bin/bash

cd $PBS_O_WORKDIR

totr=$1 # total runs
rpi=$2 # runs per instance
fin=$3 # first instance number
param_file=$4 # unrolled param file

instance=$((PBS_VNODENUM + fin))

instanceDir="instance_"$instance

begin=$(((instance * rpi) + 1))

if [ "$begin" -le "$totr" ]
    then
    end=$((begin + rpi - 1))
    if [ "$end" -gt "$totr" ]
        then
        end=$totr
    fi
    echo "Running lines $begin to $end"
    sed -n "$begin","$end"p "$paramFile" > localParamFile.txt
    mkdir $instanceDir
    cd $instanceDir
    ln -s "../data" data
    # echo $inputArg
    java -Xmx512m -cp "../lib/*" repast.simphony.batch.InstanceRunner \
        -pxml ../scenario.rs/batch_params.xml \
        -scenario ../scenario.rs \
        -id $instance \
        -pinput localParamFile.txt
fi


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|

Re: repastwrapper.sh

Ozik, Jonathan
How are you running this? Can you say a little more about what your question is?

On Oct 14, 2016, at 5:13 PM, Maximiliano Colazo <[hidden email]> wrote:

the paramFile varibles and param_file are the same?



#!/bin/bash

cd $PBS_O_WORKDIR

totr=$1 # total runs
rpi=$2 # runs per instance
fin=$3 # first instance number
param_file=$4 # unrolled param file

instance=$((PBS_VNODENUM + fin))

instanceDir="instance_"$instance

begin=$(((instance * rpi) + 1))

if [ "$begin" -le "$totr" ]
    then
    end=$((begin + rpi - 1))
    if [ "$end" -gt "$totr" ]
        then
        end=$totr
    fi
    echo "Running lines $begin to $end"
    sed -n "$begin","$end"p "$paramFile" > localParamFile.txt
    mkdir $instanceDir
    cd $instanceDir
    ln -s "../data" data
    # echo $inputArg
    java -Xmx512m -cp "../lib/*" repast.simphony.batch.InstanceRunner \
        -pxml ../scenario.rs/batch_params.xml \
        -scenario ../scenario.rs \
        -id $instance \
        -pinput localParamFile.txt
fi

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest