Skip to content

Commit

Permalink
Merge pull request #36 from TACC/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
Lucas A. Wilson committed Jul 31, 2017
2 parents bfa3404 + 2e6eb77 commit fd340d3
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 23 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
@@ -0,0 +1,8 @@
language: bash

os:
- linux
- osx

script:
- bash .travis_test_file
30 changes: 30 additions & 0 deletions .travis_test_file
@@ -0,0 +1,30 @@
#!/bin/bash

if [ "x$1" == "x" ]
then
export LAUNCHER_DIR=`pwd`
else
export LAUNCHER_DIR=$1
fi

export LAUNCHER_JOB_FILE=$LAUNCHER_DIR/tests/default_work_file
export LAUNCHER_SCHED=block
export LAUNCHER_WORKDIR=`pwd`
$LAUNCHER_DIR/paramrun

export LAUNCHER_PPN=15
$LAUNCHER_DIR/paramrun

export LAUNCHER_PPN=1
export LAUNCHER_SCHED=interleaved
$LAUNCHER_DIR/paramrun

export LAUNCHER_PPN=20
$LAUNCHER_DIR/paramrun

export LAUNCHER_PPN=1
export LAUNCHER_SCHED=dynamic
$LAUNCHER_DIR/paramrun

export LAUNCHER_PPN=20
$LAUNCHER_DIR/paramrun
1 change: 1 addition & 0 deletions README.md
@@ -1,4 +1,5 @@
# Launcher
[![Build Status](https://travis-ci.org/marshalllerner/launcher.svg?branch=master)](https://travis-ci.org/marshalllerner/launcher)
[![status](http://joss.theoj.org/papers/7b5df63cd8a40f557d66051695d300a7/status.svg)](http://joss.theoj.org/papers/7b5df63cd8a40f557d66051695d300a7)

Launcher is a utility for performing simple, data parallel, high throughput computing (HTC) workflows on clusters, massively parallel processor (MPP) systems, workgroups of computers, and personal machines.
Expand Down
50 changes: 39 additions & 11 deletions paramrun
Expand Up @@ -19,6 +19,13 @@ function lexit {
exit
}

#check if the program is running on a windows machine
if grep -qE "(Microsoft|WSL)" /proc/version &> /dev/null ; then
windowsP=true
else
windowsP=false
fi

if [ -z $LAUNCHER_DIR ]
then
lwarn ERROR "Launcher base directory LAUNCHER_DIR not set. Exiting."
Expand Down Expand Up @@ -159,10 +166,17 @@ if [ "$LAUNCHER_SCHED" == "dynamic" ]; then
RETRY=0
while [ $RUNNING == "false" ]
do
$LAUNCHER_DIR/tskserver $LAUNCHER_NJOBS $HOSTNAME 9471 2>/dev/null &
LAUNCHER_DYN_PID=$!
disown $LAUNCHER_DYN_PID
sleep 1s
if [ $windowsP==true ]; then
$LAUNCHER_DIR/tskserver $LAUNCHER_NJOBS localhost 9471 2>/dev/null &
LAUNCHER_DYN_PID=$!
disown $LAUNCHER_DYN_PID
sleep 1s
else
$LAUNCHER_DIR/tskserver $LAUNCHER_NJOBS $HOSTNAME 9471 2>/dev/null &
LAUNCHER_DYN_PID=$!
disown $LAUNCHER_DYN_PID
sleep 1s
fi
if ! ps -p $! >/dev/null 2>/dev/null
then
if [ $RETRY -ne 10 ]
Expand All @@ -179,16 +193,30 @@ if [ "$LAUNCHER_SCHED" == "dynamic" ]; then
fi
done

export LAUNCHER_DYN_COUNT="$HOSTNAME"

if [ $windowsP==true ]; then
export LAUNCHER_DYN_COUNT=localhost
else
export LAUNCHER_DYN_COUNT="$HOSTNAME"
fi
export LAUNCHER_DYN_COUNT_PORT=9471

if [ $LAUNCHER_USE_PHI -ne "0" ]; then
#Start another tskserver for the Intel Xeon Phi cards
$LAUNCHER_DIR/tskserver `wc -l $PHI_WORKDIR/$PHI_CONTROL_FILE` $HOSTNAME 9472 2>/dev/null &
LAUNCHER_PHI_DYN_PID=$1
disown $LAUNCHER_PHI_DYN_PID
export LAUNCHER_PHI_DYN_COUNT="$HOSTNAME"
export LAUNCHER_PHI_DYN_COUNT_PORT=9472
if [ $windowsP==true ]; then
#Start another tskserver for the Intel Xeon Phi cards
$LAUNCHER_DIR/tskserver `wc -l $PHI_WORKDIR/$PHI_CONTROL_FILE` localhost 9472 2>/dev/null &
LAUNCHER_PHI_DYN_PID=$1
disown $LAUNCHER_PHI_DYN_PID
export LAUNCHER_PHI_DYN_COUNT=localhost
export LAUNCHER_PHI_DYN_COUNT_PORT=9472
else
#Start another tskserver for the Intel Xeon Phi cards
$LAUNCHER_DIR/tskserver `wc -l $PHI_WORKDIR/$PHI_CONTROL_FILE` $HOSTNAME 9472 2>/dev/null &
LAUNCHER_PHI_DYN_PID=$1
disown $LAUNCHER_PHI_DYN_PID
export LAUNCHER_PHI_DYN_COUNT="$HOSTNAME"
export LAUNCHER_PHI_DYN_COUNT_PORT=9472
fi
fi
fi

Expand Down
18 changes: 18 additions & 0 deletions tests/quicktest2
@@ -0,0 +1,18 @@
#!/bin/bash

if [ "x$1" == "x" ]
then
export LAUNCHER_DIR=../
else
export LAUNCHER_DIR=$1
fi

export LAUNCHER_JOB_FILE=$LAUNCHER_DIR/extras/examples/helloworldshort
export LAUNCHER_SCHED=block
export LAUNCHER_WORKDIR=`pwd`

$LAUNCHER_DIR/paramrun

export LAUNCHER_SCHED=interleaved

$LAUNCHER_DIR/paramrun
21 changes: 9 additions & 12 deletions tests/walkthrough
Expand Up @@ -258,22 +258,19 @@ echo "Launcher will now be launched"
if [ "$allSched" == true ]; then
export LAUNCHER_SCHED=block
$LAUNCHER_DIR/paramrun
echo "block worked!"
echo
echo
echo
echo
echo
echo
export LAUNCHER_SCHED=interleaved
$LAUNCHER_DIR/paramrun
echo "interleaved worked!"
echo
echo
echo
echo
echo
echo
export LAUNCHER_SCHED=dynamic
$LAUNCHER_DIR/paramrun
echo "dynamic worked!"
echo
echo
echo
echo
echo
echo
else
$LAUNCHER_DIR/paramrun
fi
Expand Down

0 comments on commit fd340d3

Please sign in to comment.