[Swift-commit] r4993 - in trunk/tests/mpi: . local
wozniak at ci.uchicago.edu
wozniak at ci.uchicago.edu
Tue Aug 23 14:52:37 CDT 2011
Author: wozniak
Date: 2011-08-23 14:52:37 -0500 (Tue, 23 Aug 2011)
New Revision: 4993
Added:
trunk/tests/mpi/local/100-input.txt
trunk/tests/mpi/local/100-mci.check.sh
trunk/tests/mpi/local/100-mci.clean.sh
trunk/tests/mpi/local/100-mci.setup.sh
trunk/tests/mpi/local/100-mci.swift
trunk/tests/mpi/local/100-mpi-cp.c
trunk/tests/mpi/local/README.txt
trunk/tests/mpi/local/sites.template.xml
trunk/tests/mpi/local/tc.template.data
trunk/tests/mpi/local/title.txt
Removed:
trunk/tests/mpi/100-input.txt
trunk/tests/mpi/100-mci.check.sh
trunk/tests/mpi/100-mci.clean.sh
trunk/tests/mpi/100-mci.setup.sh
trunk/tests/mpi/100-mci.swift
trunk/tests/mpi/100-mpi-cp.c
trunk/tests/mpi/README.txt
trunk/tests/mpi/sites.template.xml
trunk/tests/mpi/tc.template.data
trunk/tests/mpi/title.txt
Log:
Put local MPI test in tests/mpi/local
Deleted: trunk/tests/mpi/100-input.txt
===================================================================
--- trunk/tests/mpi/100-input.txt 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/100-input.txt 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1 +0,0 @@
-hello
Deleted: trunk/tests/mpi/100-mci.check.sh
===================================================================
--- trunk/tests/mpi/100-mci.check.sh 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/100-mci.check.sh 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-set -x
-
-[ -f 100-output.txt ] || exit 1
-
-CONTENTS1=$( cat 100-input.txt )
-CONTENTS2=$( cat 100-output.txt )
-
-[[ $CONTENTS1 == $CONTENTS2 ]] || exit 1
-
-exit 0
Deleted: trunk/tests/mpi/100-mci.clean.sh
===================================================================
--- trunk/tests/mpi/100-mci.clean.sh 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/100-mci.clean.sh 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-set -x
-
-rm -v 100-input.txt || exit 1
-rm -v 100-output.txt || exit 1
-
-exit 0
Deleted: trunk/tests/mpi/100-mci.setup.sh
===================================================================
--- trunk/tests/mpi/100-mci.setup.sh 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/100-mci.setup.sh 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-set -x
-
-which mpicc || exit 1
-
-mpicc -std=gnu99 $GROUP/100-mpi-cp.c -o $GROUP/mpi-cp || exit 1
-
-cp -v $GROUP/100-input.txt . || exit 1
-
-exit 0
Deleted: trunk/tests/mpi/100-mci.swift
===================================================================
--- trunk/tests/mpi/100-mci.swift 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/100-mci.swift 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,12 +0,0 @@
-
-type file;
-
-app (file o) copy(file i)
-{
- mpi_cp @i @o;
-}
-
-file input<"100-input.txt">;
-file output<"100-output.txt">;
-
-output = copy(input);
Deleted: trunk/tests/mpi/100-mpi-cp.c
===================================================================
--- trunk/tests/mpi/100-mpi-cp.c 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/100-mpi-cp.c 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,155 +0,0 @@
-
-/**
- * Simple Hydra test
- *
- * usage: mpi-cp <input> <output>
- *
- * Rank 0 reads the input file and sends it to rank 1.
- * Rank 1 recvs the data and writes the output.
- */
-
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include <mpi.h>
-
-#define max(a, b) (((a) > (b)) ? (a) : (b))
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-
-void print_help(void);
-void read_input(const char *restrict filename, char** data, int* size);
-void write_output(const char *restrict filename, char* data, int size);
-void startup(void);
-
-const int chunk = 64*1024;
-
-int main(int argc, char* argv[])
-{
- int mpi_size, mpi_rank;
-
- MPI_Init(&argc, &argv);
-
- MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
- startup();
-
- // system("/bin/hostname");
- // printf("size: %i\n", mpi_size);
- // printf("rank: %i\n", mpi_rank);
-
- char* data;
- int size;
-
- if (argc != 3)
- {
- print_help();
- return 1;
- }
-
- if (mpi_rank == 0)
- {
- read_input(argv[1], &data, &size);
- printf("size: %i\n", size);
- MPI_Send(&size, 1, MPI_INT,
- 1, 1, MPI_COMM_WORLD);
- MPI_Send(data, size, MPI_CHAR,
- 1, 1, MPI_COMM_WORLD);
- }
- else
- {
- MPI_Status status;
-
- MPI_Recv(&size, 1, MPI_INT,
- 0, 1, MPI_COMM_WORLD, &status);
- printf("size: %i\n", size);
-
- data = malloc(size);
- assert(data);
- MPI_Recv(data, size, MPI_CHAR,
- 0, 1, MPI_COMM_WORLD, &status);
-
- write_output(argv[2], data, size);
- }
- free(data);
-
- MPI_Finalize();
- return EXIT_SUCCESS;
-}
-
-void startup()
-{
- // system("/bin/hostname");
- // printf("size: %i\n", mpi_size);
- // printf("rank: %i\n", mpi_rank);
- char* pwd = getenv("PWD");
- printf("PWD: %s\n", pwd);
- fflush(NULL);
-}
-
-/**
- Allocates memory for *data
-*/
-void read_input(const char* restrict filename, char** data, int* size)
-{
- char* result;
- FILE *file;
-
- printf("read: %s\n", filename);
-
- struct stat filestat;
-
- int error = stat(filename, &filestat);
- assert(error == 0);
- int s = filestat.st_size;
- int actual, c;
-
- result = malloc(s);
-
- file = fopen(filename, "r");
- assert(file);
-
- int count = 0;
- while (count < s)
- {
- c = min(chunk, s-count);
- actual = fread(result+count, 1, c, file);
- count += actual;
- }
-
- fclose(file);
-
- *size = s;
- *data = result;
-}
-
-void write_output(const char* restrict filename,
- char* data, int size)
-{
- FILE *file;
-
- int actual, c;
-
- printf("write: %s\n", filename);
-
- file = fopen(filename, "w");
- assert(file);
-
- int count = 0;
- while (count < size)
- {
- c = min(chunk, size-count);
- actual = fwrite(data+count, 1, c, file);
- count += actual;
- }
-
- fclose(file);
-}
-
-void print_help()
-{
- printf("usage: <input> <output>\n");
-}
Deleted: trunk/tests/mpi/README.txt
===================================================================
--- trunk/tests/mpi/README.txt 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/README.txt 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,6 +0,0 @@
-
-Test MPICH/Coasters integration
-
-Be sure the correct MPICH is in your PATH before running suite.sh
-
-See: http://www.ci.uchicago.edu/wiki/bin/view/SWFT/CoastersMpi
Copied: trunk/tests/mpi/local/100-input.txt (from rev 4991, trunk/tests/mpi/100-input.txt)
===================================================================
--- trunk/tests/mpi/local/100-input.txt (rev 0)
+++ trunk/tests/mpi/local/100-input.txt 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1 @@
+hello
Copied: trunk/tests/mpi/local/100-mci.check.sh (from rev 4991, trunk/tests/mpi/100-mci.check.sh)
===================================================================
--- trunk/tests/mpi/local/100-mci.check.sh (rev 0)
+++ trunk/tests/mpi/local/100-mci.check.sh 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -x
+
+[ -f 100-output.txt ] || exit 1
+
+CONTENTS1=$( cat 100-input.txt )
+CONTENTS2=$( cat 100-output.txt )
+
+[[ $CONTENTS1 == $CONTENTS2 ]] || exit 1
+
+exit 0
Copied: trunk/tests/mpi/local/100-mci.clean.sh (from rev 4991, trunk/tests/mpi/100-mci.clean.sh)
===================================================================
--- trunk/tests/mpi/local/100-mci.clean.sh (rev 0)
+++ trunk/tests/mpi/local/100-mci.clean.sh 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -x
+
+rm -v 100-input.txt || exit 1
+rm -v 100-output.txt || exit 1
+
+exit 0
Copied: trunk/tests/mpi/local/100-mci.setup.sh (from rev 4991, trunk/tests/mpi/100-mci.setup.sh)
===================================================================
--- trunk/tests/mpi/local/100-mci.setup.sh (rev 0)
+++ trunk/tests/mpi/local/100-mci.setup.sh 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -x
+
+which mpicc || exit 1
+
+mpicc -std=gnu99 $GROUP/100-mpi-cp.c -o $GROUP/mpi-cp || exit 1
+
+cp -v $GROUP/100-input.txt . || exit 1
+
+exit 0
Copied: trunk/tests/mpi/local/100-mci.swift (from rev 4991, trunk/tests/mpi/100-mci.swift)
===================================================================
--- trunk/tests/mpi/local/100-mci.swift (rev 0)
+++ trunk/tests/mpi/local/100-mci.swift 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,12 @@
+
+type file;
+
+app (file o) copy(file i)
+{
+ mpi_cp @i @o;
+}
+
+file input<"100-input.txt">;
+file output<"100-output.txt">;
+
+output = copy(input);
Copied: trunk/tests/mpi/local/100-mpi-cp.c (from rev 4991, trunk/tests/mpi/100-mpi-cp.c)
===================================================================
--- trunk/tests/mpi/local/100-mpi-cp.c (rev 0)
+++ trunk/tests/mpi/local/100-mpi-cp.c 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,155 @@
+
+/**
+ * Simple Hydra test
+ *
+ * usage: mpi-cp <input> <output>
+ *
+ * Rank 0 reads the input file and sends it to rank 1.
+ * Rank 1 recvs the data and writes the output.
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include <mpi.h>
+
+#define max(a, b) (((a) > (b)) ? (a) : (b))
+#define min(a, b) (((a) < (b)) ? (a) : (b))
+
+void print_help(void);
+void read_input(const char *restrict filename, char** data, int* size);
+void write_output(const char *restrict filename, char* data, int size);
+void startup(void);
+
+const int chunk = 64*1024;
+
+int main(int argc, char* argv[])
+{
+ int mpi_size, mpi_rank;
+
+ MPI_Init(&argc, &argv);
+
+ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ startup();
+
+ // system("/bin/hostname");
+ // printf("size: %i\n", mpi_size);
+ // printf("rank: %i\n", mpi_rank);
+
+ char* data;
+ int size;
+
+ if (argc != 3)
+ {
+ print_help();
+ return 1;
+ }
+
+ if (mpi_rank == 0)
+ {
+ read_input(argv[1], &data, &size);
+ printf("size: %i\n", size);
+ MPI_Send(&size, 1, MPI_INT,
+ 1, 1, MPI_COMM_WORLD);
+ MPI_Send(data, size, MPI_CHAR,
+ 1, 1, MPI_COMM_WORLD);
+ }
+ else
+ {
+ MPI_Status status;
+
+ MPI_Recv(&size, 1, MPI_INT,
+ 0, 1, MPI_COMM_WORLD, &status);
+ printf("size: %i\n", size);
+
+ data = malloc(size);
+ assert(data);
+ MPI_Recv(data, size, MPI_CHAR,
+ 0, 1, MPI_COMM_WORLD, &status);
+
+ write_output(argv[2], data, size);
+ }
+ free(data);
+
+ MPI_Finalize();
+ return EXIT_SUCCESS;
+}
+
+void startup()
+{
+ // system("/bin/hostname");
+ // printf("size: %i\n", mpi_size);
+ // printf("rank: %i\n", mpi_rank);
+ char* pwd = getenv("PWD");
+ printf("PWD: %s\n", pwd);
+ fflush(NULL);
+}
+
+/**
+ Allocates memory for *data
+*/
+void read_input(const char* restrict filename, char** data, int* size)
+{
+ char* result;
+ FILE *file;
+
+ printf("read: %s\n", filename);
+
+ struct stat filestat;
+
+ int error = stat(filename, &filestat);
+ assert(error == 0);
+ int s = filestat.st_size;
+ int actual, c;
+
+ result = malloc(s);
+
+ file = fopen(filename, "r");
+ assert(file);
+
+ int count = 0;
+ while (count < s)
+ {
+ c = min(chunk, s-count);
+ actual = fread(result+count, 1, c, file);
+ count += actual;
+ }
+
+ fclose(file);
+
+ *size = s;
+ *data = result;
+}
+
+void write_output(const char* restrict filename,
+ char* data, int size)
+{
+ FILE *file;
+
+ int actual, c;
+
+ printf("write: %s\n", filename);
+
+ file = fopen(filename, "w");
+ assert(file);
+
+ int count = 0;
+ while (count < size)
+ {
+ c = min(chunk, size-count);
+ actual = fwrite(data+count, 1, c, file);
+ count += actual;
+ }
+
+ fclose(file);
+}
+
+void print_help()
+{
+ printf("usage: <input> <output>\n");
+}
Copied: trunk/tests/mpi/local/README.txt (from rev 4991, trunk/tests/mpi/README.txt)
===================================================================
--- trunk/tests/mpi/local/README.txt (rev 0)
+++ trunk/tests/mpi/local/README.txt 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,6 @@
+
+Test MPICH/Coasters integration
+
+Be sure the correct MPICH is in your PATH before running suite.sh
+
+See: http://www.ci.uchicago.edu/wiki/bin/view/SWFT/CoastersMpi
Copied: trunk/tests/mpi/local/sites.template.xml (from rev 4991, trunk/tests/mpi/sites.template.xml)
===================================================================
--- trunk/tests/mpi/local/sites.template.xml (rev 0)
+++ trunk/tests/mpi/local/sites.template.xml 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,24 @@
+<config>
+
+ <pool handle="localhost" sysinfo="INTEL32::LINUX">
+ <gridftp url="local://localhost" />
+ <execution provider="local" url="none" />
+ <workdirectory>_WORK_</workdirectory>
+ <profile namespace="swift" key="stagingMethod">file</profile>
+ </pool>
+
+ <pool handle="coasterslocal">
+ <filesystem provider="local" />
+ <execution provider="coaster" jobmanager="local:local"/>
+ <profile namespace="globus" key="internalHostname">_HOST_</profile>
+ <profile namespace="karajan" key="jobthrottle">2.55</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <profile namespace="globus" key="jobsPerNode">4</profile>
+ <profile namespace="globus" key="slots">8</profile>
+ <profile namespace="globus" key="maxTime">1000</profile>
+ <profile namespace="globus" key="nodeGranularity">1</profile>
+ <profile namespace="globus" key="maxNodes">4</profile>
+ <workdirectory>_WORK_</workdirectory>
+ </pool>
+
+</config>
Copied: trunk/tests/mpi/local/tc.template.data (from rev 4991, trunk/tests/mpi/tc.template.data)
===================================================================
--- trunk/tests/mpi/local/tc.template.data (rev 0)
+++ trunk/tests/mpi/local/tc.template.data 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,22 @@
+#This is the transformation catalog.
+#
+#It comes pre-configured with a number of simple transformations with
+#paths that are likely to work on a linux box. However, on some systems,
+#the paths to these executables will be different (for example, sometimes
+#some of these programs are found in /usr/bin rather than in /bin)
+#
+#NOTE WELL: fields in this file must be separated by tabs, not spaces; and
+#there must be no trailing whitespace at the end of each line.
+#
+# sitename transformation path INSTALLED platform profiles
+localhost echo /bin/echo INSTALLED INTEL32::LINUX null
+localhost cat /bin/cat INSTALLED INTEL32::LINUX null
+localhost ls /bin/ls INSTALLED INTEL32::LINUX null
+localhost grep /bin/grep INSTALLED INTEL32::LINUX null
+localhost sort /bin/sort INSTALLED INTEL32::LINUX null
+localhost paste /bin/paste INSTALLED INTEL32::LINUX null
+localhost cp /bin/cp INSTALLED INTEL32::LINUX null
+
+# hydra-tests-2
+
+coasterslocal mpi_cp _DIR_/mpi-cp INSTALLED INTEL32::LINUX globus::hostCount=2
Copied: trunk/tests/mpi/local/title.txt (from rev 4991, trunk/tests/mpi/title.txt)
===================================================================
--- trunk/tests/mpi/local/title.txt (rev 0)
+++ trunk/tests/mpi/local/title.txt 2011-08-23 19:52:37 UTC (rev 4993)
@@ -0,0 +1,2 @@
+MPI Tests
+
Deleted: trunk/tests/mpi/sites.template.xml
===================================================================
--- trunk/tests/mpi/sites.template.xml 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/sites.template.xml 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,24 +0,0 @@
-<config>
-
- <pool handle="localhost" sysinfo="INTEL32::LINUX">
- <gridftp url="local://localhost" />
- <execution provider="local" url="none" />
- <workdirectory>_WORK_</workdirectory>
- <profile namespace="swift" key="stagingMethod">file</profile>
- </pool>
-
- <pool handle="coasterslocal">
- <filesystem provider="local" />
- <execution provider="coaster" jobmanager="local:local"/>
- <profile namespace="globus" key="internalHostname">_HOST_</profile>
- <profile namespace="karajan" key="jobthrottle">2.55</profile>
- <profile namespace="karajan" key="initialScore">10000</profile>
- <profile namespace="globus" key="jobsPerNode">4</profile>
- <profile namespace="globus" key="slots">8</profile>
- <profile namespace="globus" key="maxTime">1000</profile>
- <profile namespace="globus" key="nodeGranularity">1</profile>
- <profile namespace="globus" key="maxNodes">4</profile>
- <workdirectory>_WORK_</workdirectory>
- </pool>
-
-</config>
Deleted: trunk/tests/mpi/tc.template.data
===================================================================
--- trunk/tests/mpi/tc.template.data 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/tc.template.data 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,22 +0,0 @@
-#This is the transformation catalog.
-#
-#It comes pre-configured with a number of simple transformations with
-#paths that are likely to work on a linux box. However, on some systems,
-#the paths to these executables will be different (for example, sometimes
-#some of these programs are found in /usr/bin rather than in /bin)
-#
-#NOTE WELL: fields in this file must be separated by tabs, not spaces; and
-#there must be no trailing whitespace at the end of each line.
-#
-# sitename transformation path INSTALLED platform profiles
-localhost echo /bin/echo INSTALLED INTEL32::LINUX null
-localhost cat /bin/cat INSTALLED INTEL32::LINUX null
-localhost ls /bin/ls INSTALLED INTEL32::LINUX null
-localhost grep /bin/grep INSTALLED INTEL32::LINUX null
-localhost sort /bin/sort INSTALLED INTEL32::LINUX null
-localhost paste /bin/paste INSTALLED INTEL32::LINUX null
-localhost cp /bin/cp INSTALLED INTEL32::LINUX null
-
-# hydra-tests-2
-
-coasterslocal mpi_cp _DIR_/mpi-cp INSTALLED INTEL32::LINUX globus::hostCount=2
Deleted: trunk/tests/mpi/title.txt
===================================================================
--- trunk/tests/mpi/title.txt 2011-08-23 19:51:45 UTC (rev 4992)
+++ trunk/tests/mpi/title.txt 2011-08-23 19:52:37 UTC (rev 4993)
@@ -1,2 +0,0 @@
-MPI Tests
-
More information about the Swift-commit
mailing list