[Swift-commit] r7271 - in trunk/tests/sites: . multiple_coaster_pools

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Mon Nov 4 13:13:56 CST 2013


Author: davidk
Date: 2013-11-04 13:13:56 -0600 (Mon, 04 Nov 2013)
New Revision: 7271

Added:
   trunk/tests/sites/multiple_coaster_pools/
   trunk/tests/sites/multiple_coaster_pools/hostsnsleep.sh
   trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh
   trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh
   trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift
   trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout
   trunk/tests/sites/multiple_coaster_pools/sites.template.xml
   trunk/tests/sites/multiple_coaster_pools/sites.xml
   trunk/tests/sites/multiple_coaster_pools/tc.template.data
Log:
multiple coaster pool test for trunk


Added: trunk/tests/sites/multiple_coaster_pools/hostsnsleep.sh
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/hostsnsleep.sh	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/hostsnsleep.sh	2013-11-04 19:13:56 UTC (rev 7271)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+hostname -f
+ps --forest -f
+sleep $1 


Property changes on: trunk/tests/sites/multiple_coaster_pools/hostsnsleep.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh	2013-11-04 19:13:56 UTC (rev 7271)
@@ -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: trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.check.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh	2013-11-04 19:13:56 UTC (rev 7271)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+cp -v ${GROUP}/hostsnsleep.sh . || exit 1
+sed -i s/\{env.USER\}/$USER/g sites.xml
+exit 0


Property changes on: trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.setup.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.swift	2013-11-04 19:13:56 UTC (rev 7271)
@@ -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: trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/multiple_coaster_pools.timeout	2013-11-04 19:13:56 UTC (rev 7271)
@@ -0,0 +1 @@
+600

Added: trunk/tests/sites/multiple_coaster_pools/sites.template.xml
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/sites.template.xml	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/sites.template.xml	2013-11-04 19:13:56 UTC (rev 7271)
@@ -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: trunk/tests/sites/multiple_coaster_pools/sites.xml
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/sites.xml	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/sites.xml	2013-11-04 19:13:56 UTC (rev 7271)
@@ -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/davidkelly999</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/davidkelly999</workdirectory>
+  </pool>
+
+</config>

Added: trunk/tests/sites/multiple_coaster_pools/tc.template.data
===================================================================
--- trunk/tests/sites/multiple_coaster_pools/tc.template.data	                        (rev 0)
+++ trunk/tests/sites/multiple_coaster_pools/tc.template.data	2013-11-04 19:13:56 UTC (rev 7271)
@@ -0,0 +1,2 @@
+midway_single bash_single /bin/bash
+midway_multiple bash_multiple /bin/bash




More information about the Swift-commit mailing list