[Swift-commit] r7268 - in tags/swift-0.94.2-RC2/tests/sites: . multiple_coaster_pools
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Mon Nov 4 10:10:42 CST 2013
Author: davidk
Date: 2013-11-04 10:10:41 -0600 (Mon, 04 Nov 2013)
New Revision: 7268
Added:
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/hostsnsleep.sh
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/sites.template.xml
tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/tc.template.data
Log:
Automated test for multiple coaster pools
Added: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/hostsnsleep.sh
===================================================================
--- tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/hostsnsleep.sh (rev 0)
+++ tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/hostsnsleep.sh 2013-11-04 16:10:41 UTC (rev 7268)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+hostname -f
+ps --forest -f
+sleep $1
Property changes on: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/hostsnsleep.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh
===================================================================
--- tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh (rev 0)
+++ tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh 2013-11-04 16:10:41 UTC (rev 7268)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+count_procs()
+{
+ file=$1
+ if [ ! -f "$file" ]; then
+ echo "File $file does not exist!"
+ exit 1
+ fi
+ count=$( grep "/bin/bash hostsnsleep.sh" $file |grep -v "/usr/bin/time" |wc -l )
+ echo $count
+}
+
+get_maximum_jobs_single()
+{
+ for file in output/output.single*.log
+ do
+ echo $( count_procs $file )
+ done | sort -n |tail -1
+}
+
+get_maximum_jobs_multiple()
+{
+ for file in output/output.multiple*.log
+ do
+ echo $( count_procs $file )
+ done |sort -n | tail -1
+}
+
+if [ $( get_maximum_jobs_single ) -ne 1 ]; then
+ echo Incorrect number of jobs detected on a pool with jobspernode=1
+ exit 1
+fi
+
+if [ $( get_maximum_jobs_multiple ) -le 1 ]; then
+ echo Incorrect number of jobs detected on a pool with jobspernode=16
+ exit 1
+fi
+
+exit 0
Property changes on: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh
===================================================================
--- tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh (rev 0)
+++ tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh 2013-11-04 16:10:41 UTC (rev 7268)
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cp -v ${GROUP}/hostsnsleep.sh . || exit 1
+exit 0
Property changes on: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift
===================================================================
--- tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift (rev 0)
+++ tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift 2013-11-04 16:10:41 UTC (rev 7268)
@@ -0,0 +1,21 @@
+type file;
+
+app (file o) sleep_single (file s, int delay)
+{
+ bash_single @s delay stdout=@o;
+}
+
+app (file o) sleep_multiple (file s, int delay)
+{
+ bash_multiple @s delay stdout=@o;
+}
+
+file sleepscript <"hostsnsleep.sh">;
+
+foreach i in [1:@toInt(@arg("n","50"))] {
+ file out_single <single_file_mapper; file=@strcat("output/output.single.", i, ".log")>;
+ out_single = sleep_single(sleepscript, 1);
+
+ file out_multiple <single_file_mapper; file=@strcat("output/output.multiple.", i, ".log")>;
+ out_multiple = sleep_multiple(sleepscript, 16);
+}
Added: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout
===================================================================
--- tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout (rev 0)
+++ tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout 2013-11-04 16:10:41 UTC (rev 7268)
@@ -0,0 +1 @@
+600
Added: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/sites.template.xml
===================================================================
--- tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/sites.template.xml (rev 0)
+++ tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/sites.template.xml 2013-11-04 16:10:41 UTC (rev 7268)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config xmlns="http://www.ci.uchicago.edu/swift/SwiftSites">
+
+ <pool handle="midway_single">
+ <execution provider="coaster" jobmanager="local:slurm" url="localhost:1"/>
+ <profile namespace="globus" key="jobsPerNode">1</profile>
+ <profile namespace="globus" key="highOverAllocation">100</profile>
+ <profile namespace="globus" key="lowOverAllocation">100</profile>
+ <profile namespace="globus" key="queue">sandyb</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <profile namespace="globus" key="slots">1</profile>
+ <profile namespace="globus" key="nodeGranularity">1</profile>
+ <profile namespace="globus" key="maxNodes">1</profile>
+ <filesystem provider="local"/>
+ <workdirectory>/scratch/midway/{env.USER}</workdirectory>
+ </pool>
+
+ <pool handle="midway_multiple">
+ <execution provider="coaster" jobmanager="local:slurm" url="localhost:2"/>
+ <profile namespace="globus" key="jobsPerNode">16</profile>
+ <profile namespace="globus" key="highOverAllocation">100</profile>
+ <profile namespace="globus" key="lowOverAllocation">100</profile>
+ <profile namespace="globus" key="queue">sandyb</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <profile namespace="globus" key="slots">1</profile>
+ <profile namespace="globus" key="maxNodes">1</profile>
+ <profile namespace="globus" key="nodeGranularity">1</profile>
+ <filesystem provider="local"/>
+ <workdirectory>/scratch/midway/{env.USER}</workdirectory>
+ </pool>
+
+</config>
Added: tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/tc.template.data
===================================================================
--- tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/tc.template.data (rev 0)
+++ tags/swift-0.94.2-RC2/tests/sites/multiple_coaster_pools/tc.template.data 2013-11-04 16:10:41 UTC (rev 7268)
@@ -0,0 +1,2 @@
+midway_single bash_single /bin/bash
+midway_multiple bash_multiple /bin/bash
More information about the Swift-commit
mailing list