[C-MPI-commits] SF.net SVN: c-mpi:[64]
Status: Pre-Alpha
Brought to you by:
jmwozniak
|
From: <jmw...@us...> - 2010-04-29 21:55:56
|
Revision: 64
http://c-mpi.svn.sourceforge.net/c-mpi/?rev=64&view=rev
Author: jmwozniak
Date: 2010-04-29 21:55:50 +0000 (Thu, 29 Apr 2010)
Log Message:
-----------
Whitespace fixes.
Modified Paths:
--------------
include/cmpi-cp.h
src/cmpi/accessor.c
src/cmpi/client.c
src/cmpi/driver.c
src/cmpi-cp/cmpi-cp.c
src/cmpi-db/cmpi-db-fifo-quit.c
src/cmpi-db/cmpi-db-fifo.c
src/mpi_tools/io_tools.c
test/driver/test01.c
test/driver/test01.zsh
test/driver/test02.c
Modified: include/cmpi-cp.h
===================================================================
--- include/cmpi-cp.h 2010-04-29 21:42:41 UTC (rev 63)
+++ include/cmpi-cp.h 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,8 +1,8 @@
-#include <node.h>
-#include <accessor.h>
+#include <node.h>
+#include <accessor.h>
-#include <io_tools.h>
+#include <io_tools.h>
// #define CMPI_CP_CHUNK CMPI_VALUE_LENGTH
@@ -13,10 +13,9 @@
CMPI_CP_KEY,
CMPI_CP_FILE,
CMPI_CP_STREAM,
- CMPI_CP_TYPE_ERROR,
-} CMPI_CP_TYPE;
+ CMPI_CP_TYPE_ERROR,
+} CMPI_CP_TYPE;
-void printhelp(void);
+void printhelp(void);
-#define debug(x) x
-
+#define debug(x) x
Modified: src/cmpi/accessor.c
===================================================================
--- src/cmpi/accessor.c 2010-04-29 21:42:41 UTC (rev 63)
+++ src/cmpi/accessor.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,26 +1,26 @@
-#include <accessor.h>
+#include <accessor.h>
/**
- @return True iff successfully access to fifos is made.
+ @return True iff successfully access to fifos is made.
*/
-bool
+bool
driver_access_fifo()
{
char fifo_in[20] = "/tmp/cmpi.fifo.in";
char fifo_out[20] = "/tmp/cmpi.fifo.out";
-
+
to_cmpi = fopen(fifo_in, "w");
if (to_cmpi == NULL)
{
printf("Could not open: %s \n", fifo_in);
- return false;
+ return false;
}
from_cmpi = fopen(fifo_out, "r");
if (from_cmpi == NULL)
{
printf("Could not open: %s \n", fifo_out);
- return false;
+ return false;
}
- return true;
+ return true;
}
Modified: src/cmpi/client.c
===================================================================
--- src/cmpi/client.c 2010-04-29 21:42:41 UTC (rev 63)
+++ src/cmpi/client.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,17 +1,17 @@
/**
* Participant client for CMPI.
- * Only used in multiple communicator, MPI-2 case.
+ * Only used in multiple communicator, MPI-2 case.
*
- * Command-line arguments:
+ * Command-line arguments:
*
- * -s <ms> snooze_max in milliseconds.
+ * -s <ms> snooze_max in milliseconds.
* -t <tag> symbolic tag number
- */
+ */
#include "node.h"
-int nodes;
+int nodes;
void
options(int argc, char* argv[])
@@ -21,18 +21,18 @@
{"snooze", required_argument, NULL, 's'},
{"tag", required_argument, NULL, 't'},
{"nodes", required_argument, NULL, 'n'},
- {0, 0, 0, 0}
- };
-
+ {0, 0, 0, 0}
+ };
+
int c = 0;
int t = 0;
- while ((c = getopt_long(argc, argv, "f:s:t:n:c:", options, &c)) != -1)
+ while ((c = getopt_long(argc, argv, "f:s:t:n:c:", options, &c)) != -1)
{
switch (c)
{
case 's':
sscanf(optarg, "%i", &t);
- snooze_max = t*1000;
+ snooze_max = t*1000;
// printf("Snooze max: %i \n", snooze_max);
case 't':
sscanf(optarg, "%i", &t);
@@ -41,25 +41,25 @@
sscanf(optarg, "%i", &t);
nodes = t;
}
- c++;
+ c++;
}
}
int
main(int argc, char* argv[])
{
- options(argc, argv);
-
- MPI_Init(&argc, &argv);
+ options(argc, argv);
+ MPI_Init(&argc, &argv);
+
whoami();
if (mpi_rank == 0)
timestamp("START", NULL);
- cmpi_init_client();
- cmpi_client_code();
+ cmpi_init_client();
+ cmpi_client_code();
MPI_Finalize();
- return 0;
+ return 0;
}
Modified: src/cmpi/driver.c
===================================================================
--- src/cmpi/driver.c 2010-04-29 21:42:41 UTC (rev 63)
+++ src/cmpi/driver.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,38 +1,38 @@
/**
* Command-line client for CMPI.
- */
+ */
#include <errno.h>
-#include <signal.h>
-#include <stdio.h>
+#include <signal.h>
+#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <driver.h>
-char* filename = NULL;
+char* filename = NULL;
-bool driver_quitting = false;
+bool driver_quitting = false;
cmpi_driver*
driver_create(void)
{
cmpi_driver* driver = malloc(sizeof(cmpi_driver));
driver->quitting = false;
- return driver;
+ return driver;
}
-bool
+bool
driver_setup_file(cmpi_driver* driver, char* filename)
{
driver->source = fopen(filename, "r");
if (driver->source == NULL)
{
printf("Could not open: %s \n", filename);
- return false;
+ return false;
}
- return true;
+ return true;
}
bool
@@ -40,40 +40,40 @@
{
driver->source = stdin;
driver->sink = stdout;
- return true;
+ return true;
}
/**
- @return True iff the fifos were set up and opened correctly.
+ @return True iff the fifos were set up and opened correctly.
*/
bool
driver_setup_fifo(cmpi_driver* driver)
-{
+{
char fifo_in[20] = "/tmp/cmpi.fifo.in";
- char fifo_out[20] = "/tmp/cmpi.fifo.out";
+ char fifo_out[20] = "/tmp/cmpi.fifo.out";
- signal(SIGPIPE, SIG_IGN);
-
+ signal(SIGPIPE, SIG_IGN);
+
int error = mkfifo(fifo_in, S_IRUSR|S_IWUSR);
if (error != 0 &&
errno != EEXIST)
{
- printf("Could not create fifo: %s\n", fifo_in);
- return false;
+ printf("Could not create fifo: %s\n", fifo_in);
+ return false;
}
error = mkfifo(fifo_out, S_IRUSR|S_IWUSR);
if (error != 0 &&
errno != EEXIST)
{
- printf("Could not create fifo: %s\n", fifo_in);
- return false;
+ printf("Could not create fifo: %s\n", fifo_in);
+ return false;
}
driver->source = fopen(fifo_in, "r");
if (driver->source == NULL)
{
printf("Could not open: %s \n", fifo_in);
- return false;
+ return false;
}
driver->sink = fopen(fifo_out, "w");
@@ -83,7 +83,7 @@
return false;
}
- return true;
+ return true;
}
void
@@ -94,20 +94,20 @@
int length;
sscanf(tokens->head->next->next->data, "%i", &length);
- SHOW_FSI(key, length);
+ SHOW_FSI(key, length);
fprintf(driver->sink, "ok\n");
- fflush(driver->sink);
+ fflush(driver->sink);
- NOTE("reading to buffer");
+ NOTE("reading to buffer");
stream_to_buffer(value, length, driver->source);
- NOTE("got buffer");
+ NOTE("got buffer");
cmpi_put(key, value, length);
-
+
int error = fprintf(driver->sink, "ok\n");
- NOTE("said ok\n");
+ NOTE("said ok\n");
if (error == -1)
- printf("driver_put result error!\n");
- fflush(driver->sink);
+ printf("driver_put result error!\n");
+ fflush(driver->sink);
}
void
@@ -115,11 +115,11 @@
{
char* key = tokens->head->next->data;
- NOTE_FS(key);
-
+ NOTE_FS(key);
+
char* value;
int length;
- cmpi_get(key, &value, &length);
+ cmpi_get(key, &value, &length);
if (value == NULL)
{
@@ -128,11 +128,11 @@
else
{
fprintf(driver->sink, "%i\n", length);
- fflush(driver->sink);
- buffer_to_stream(value, length, driver->sink);
+ fflush(driver->sink);
+ buffer_to_stream(value, length, driver->sink);
}
fflush(driver->sink);
- DONE;
+ DONE;
}
void
@@ -140,16 +140,16 @@
{
char* p = tokens->head->next->data;
int i;
- sscanf(p, "%i", &i);
+ sscanf(p, "%i", &i);
char* result = cmpi_info(i);
- printf(result);
+ printf(result);
}
void
driver_lookup(struct list* tokens)
{
char* p = tokens->head->next->data;
- cmpi_lookup(p);
+ cmpi_lookup(p);
}
void
@@ -157,11 +157,11 @@
{
char* p = tokens->head->next->data;
int i;
- SHOW_I(i);
- sscanf(p, "%i", &i);
+ SHOW_I(i);
+ sscanf(p, "%i", &i);
sleep(i);
fprintf(driver->sink, "ok\n");
- fflush(driver->sink);
+ fflush(driver->sink);
}
void
@@ -170,54 +170,54 @@
driver->quitting = true;
fprintf(driver->sink, "ok\n");
- fflush(driver->sink);
+ fflush(driver->sink);
cmpi_shutdown();
- DONE;
+ DONE;
}
void
-driver_execute(cmpi_driver* driver)
+driver_execute(cmpi_driver* driver)
{
- SHOW_FS(driver->command);
-
- struct list* tokens = list_parse(driver->command);
-
+ SHOW_FS(driver->command);
+
+ struct list* tokens = list_parse(driver->command);
+
gossip_ldebug(MASK_DRIVER, "got tokens: \n");
- gossip_do(MASK_DRIVER, list_printf("%s", tokens));
-
+ gossip_do(MASK_DRIVER, list_printf("%s", tokens));
+
if (tokens->size == 0)
- return;
+ return;
char* optoken = tokens->head->data;
if (strncmp(optoken, "#", 1) == 0)
{
- ; // This is a comment.
+ ; // This is a comment.
}
else if (strncmp(optoken, "put", 3) == 0)
{
- driver_put(driver, tokens);
+ driver_put(driver, tokens);
}
else if (strncmp(optoken, "get", 3) == 0)
{
- driver_get(driver, tokens);
+ driver_get(driver, tokens);
}
else if (strncmp(optoken, "lookup", 6) == 0)
{
- driver_lookup(tokens);
+ driver_lookup(tokens);
}
else if (strncmp(optoken, "info", 4) == 0)
{
- driver_info(tokens);
+ driver_info(tokens);
}
else if (strncmp(optoken, "sleep", 5) == 0)
{
- printf("sleep\n");
+ printf("sleep\n");
driver_sleep(driver, tokens);
}
else if (strncmp(optoken, "quit", 4) == 0)
{
- driver_quit(driver);
+ driver_quit(driver);
}
list_destroy(tokens);
}
@@ -226,23 +226,23 @@
driver_process(cmpi_driver* driver)
{
gossip_ldebug(MASK_DRIVER, "driver_process()...\n");
- while (! driver->quitting)
+ while (! driver->quitting)
{
char* result =
fgets(driver->command, CMPI_DRIVER_MAX_COMMAND, driver->source);
if (!result)
{
- gossip_ldebug(MASK_DRIVER, "Resetting driver...\n");
+ gossip_ldebug(MASK_DRIVER, "Resetting driver...\n");
fclose(driver->source);
fclose(driver->sink);
- driver_setup_fifo(driver);
+ driver_setup_fifo(driver);
continue;
}
char* s = strchr(driver->command, '\n');
- *s = '\0';
+ *s = '\0';
driver_execute(driver);
}
- gossip_ldebug(MASK_DRIVER, "Closing driver...\n");
+ gossip_ldebug(MASK_DRIVER, "Closing driver...\n");
fclose(driver->source);
fclose(driver->sink);
}
@@ -257,13 +257,11 @@
printf("file error: %s \n", filename);
return;
}
-
+
for (i = 1; i < mpi_size; i++)
{
char* t = cmpi_info(i);
- fprintf(f, "%s\n", t);
+ fprintf(f, "%s\n", t);
}
- fclose(f);
+ fclose(f);
}
-
-
Modified: src/cmpi-cp/cmpi-cp.c
===================================================================
--- src/cmpi-cp/cmpi-cp.c 2010-04-29 21:42:41 UTC (rev 63)
+++ src/cmpi-cp/cmpi-cp.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,10 +1,10 @@
-#include <cmpi-cp.h>
+#include <cmpi-cp.h>
char* target1;
char* target2;
-int value_size;
+int value_size;
void
cmpi_cp_args(int argc, char* argv[])
@@ -12,10 +12,10 @@
if (argc == 1)
{
printhelp();
- exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
target1 = argv[1];
- target2 = argv[2];
+ target2 = argv[2];
}
void
@@ -23,7 +23,7 @@
{
printf("usage: cmpi [OPTION] target1 target2 \n");
printf(" each target is a file path \n");
- printf(" or a standard stream - \n");
+ printf(" or a standard stream - \n");
printf(" or a DHT key formatted as dht://<key> \n\n");
printf("options: \n");
printf(" -h print this message \n");
@@ -32,12 +32,12 @@
}
/**
- Determine the type of this target, file or key.
+ Determine the type of this target, file or key.
*/
CMPI_CP_TYPE
cmpi_cp_extract_type(char* target, char* value)
{
- CMPI_CP_TYPE result;
+ CMPI_CP_TYPE result;
if (strstr(target, "dht://"))
{
strcpy(value, target+6);
@@ -48,59 +48,59 @@
strcpy(value, target);
result = CMPI_CP_STREAM;
}
- else
+ else
{
strcpy(value, target);
result = CMPI_CP_FILE;
}
- return result;
+ return result;
}
CMPI_RETURN
cmpi_cp_put(FILE* file, char* object)
{
- char key[CMPI_KEY_LENGTH+10];
+ char key[CMPI_KEY_LENGTH+10];
char data[value_size];
- char msg[100];
- int count = 0;
+ char msg[100];
+ int count = 0;
while (! feof(file))
{
- int total = 0;
- while (!feof(file) &&
+ int total = 0;
+ while (!feof(file) &&
total < value_size)
{
int chunk = value_size-total;
int actual = fread(data+total, 1, chunk, file);
- data[total+actual] = '\0';
+ data[total+actual] = '\0';
total += actual;
}
if (total == 0)
- break;
+ break;
sprintf(key, "%s[%i]", object, count++);
- // printf("put: %s\n", key);
+ // printf("put: %s\n", key);
fprintf(to_cmpi, "put %s %i\n", key, total);
- fflush(to_cmpi);
+ fflush(to_cmpi);
fscanf(from_cmpi, "%s", msg);
if (strcmp(msg, "ok") != 0)
- return CMPI_ERROR_UNKNOWN;
+ return CMPI_ERROR_UNKNOWN;
buffer_to_stream(data, total, to_cmpi);
- fflush(to_cmpi);
- }
+ fflush(to_cmpi);
+ }
- sprintf(data, "DHT: %i", count);
+ sprintf(data, "DHT: %i", count);
fprintf(to_cmpi, "put %s %i\n", object, (int) strlen(data));
- fflush(to_cmpi);
+ fflush(to_cmpi);
fprintf(to_cmpi, "%s", data);
- fflush(to_cmpi);
+ fflush(to_cmpi);
- char result[32];
- fscanf(from_cmpi, "%s\n", result);
+ char result[32];
+ fscanf(from_cmpi, "%s\n", result);
if (strncmp(result, "ok", 2) != 0)
return CMPI_ERROR_UNKNOWN;
-
- return CMPI_SUCCESS;
+
+ return CMPI_SUCCESS;
}
CMPI_RETURN
@@ -108,59 +108,62 @@
{
char data[value_size];
int count, c;
- int length;
+ int length;
fprintf(to_cmpi, "get %s\n", object);
- fflush(to_cmpi);
+ fflush(to_cmpi);
- fscanf(from_cmpi, "%i", &length);
- fgetc(from_cmpi);
+ fscanf(from_cmpi, "%i", &length);
+ fgetc(from_cmpi);
if (length == -1)
- return CMPI_DOESNT_EXIST;
+ return CMPI_DOESNT_EXIST;
stream_to_buffer(data, length, from_cmpi);
sscanf(data, "DHT: %i", &count);
- // printf("count: %i\n", count);
-
+ // printf("count: %i\n", count);
+
for (c = 0; c < count; c++)
{
fprintf(to_cmpi, "get %s[%i]\n", object, c);
- fflush(to_cmpi);
+ fflush(to_cmpi);
fscanf(from_cmpi, "%i", &length);
- fgetc(from_cmpi);
+ fgetc(from_cmpi);
if (length == -1)
{
- printf("not found: %s[%i]\n", object, c);
+ printf("not found: %s[%i]\n", object, c);
return CMPI_DOESNT_EXIST;
}
- stream_to_buffer(data, length, from_cmpi);
- buffer_to_stream(data, length, file);
- }
- return CMPI_SUCCESS;
+ stream_to_buffer(data, length, from_cmpi);
+ buffer_to_stream(data, length, file);
+ }
+ return CMPI_SUCCESS;
}
void
bad_file(char* filename)
{
printf("Could not open: %s\n", filename);
- exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
+/**
+ Case logic for different uses
+*/
CMPI_RETURN
cmpi_cp_case(CMPI_CP_TYPE type1, char* object1,
CMPI_CP_TYPE type2, char* object2)
{
- CMPI_RETURN result = CMPI_SUCCESS;
+ CMPI_RETURN result = CMPI_SUCCESS;
if (type1 == CMPI_CP_FILE &&
type2 == CMPI_CP_KEY)
{
- // FILE -> DHT
+ // FILE -> DHT
FILE* file = fopen(object1, "r");
if (!file)
- bad_file(object1);
+ bad_file(object1);
result = cmpi_cp_put(file, object2);
- fclose(file);
+ fclose(file);
}
else if (type1 == CMPI_CP_KEY &&
type2 == CMPI_CP_FILE)
@@ -168,30 +171,30 @@
// DHT -> FILE
FILE* file = fopen(object2, "w");
if (!file)
- bad_file(object2);
+ bad_file(object2);
result = cmpi_cp_get(object1, file);
- fclose(file);
+ fclose(file);
}
else if (type1 == CMPI_CP_KEY &&
type2 == CMPI_CP_KEY)
{
- // DHT -> DHT
+ // DHT -> DHT
}
else if (type1 == CMPI_CP_STREAM &&
type2 == CMPI_CP_KEY)
{
// STREAM -> DHT
- result = cmpi_cp_put(stdin, object2);
+ result = cmpi_cp_put(stdin, object2);
}
else if (type1 == CMPI_CP_KEY &&
type2 == CMPI_CP_STREAM)
{
// DHT -> STREAM
- result = cmpi_cp_get(object1, stdout);
+ result = cmpi_cp_get(object1, stdout);
}
- return result;
+ return result;
}
-
+
int
main(int argc, char* argv[])
{
@@ -201,9 +204,9 @@
char object1[CMPI_KEY_LENGTH+10];
char object2[CMPI_KEY_LENGTH+10];
- value_size = CMPI_CP_CHUNK;
-
- cmpi_cp_args(argc, argv);
+ value_size = CMPI_CP_CHUNK;
+
+ cmpi_cp_args(argc, argv);
target1_type = cmpi_cp_extract_type(target1, object1);
target2_type = cmpi_cp_extract_type(target2, object2);
@@ -211,24 +214,24 @@
target2_type == CMPI_CP_FILE)
{
printf("cmpi-cp: given two files!\n");
- exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
- driver_access_fifo();
+ driver_access_fifo();
CMPI_RETURN result =
- cmpi_cp_case(target1_type, object1, target2_type, object2);
-
+ cmpi_cp_case(target1_type, object1, target2_type, object2);
+
if (result == CMPI_DOESNT_EXIST)
{
- // cmpi_get could not find the dht:// target
- printf("does not exist: %s\n", target1);
- return EXIT_FAILURE;
+ // cmpi_get could not find the dht:// target
+ printf("does not exist: %s\n", target1);
+ return EXIT_FAILURE;
}
- else if (result != CMPI_SUCCESS)
+ else if (result != CMPI_SUCCESS)
{
- printf("error\n");
- return EXIT_FAILURE;
+ printf("error\n");
+ return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
Modified: src/cmpi-db/cmpi-db-fifo-quit.c
===================================================================
--- src/cmpi-db/cmpi-db-fifo-quit.c 2010-04-29 21:42:41 UTC (rev 63)
+++ src/cmpi-db/cmpi-db-fifo-quit.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,26 +1,26 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-#include <accessor.h>
+#include <accessor.h>
int
main(int argc, char* argv[])
{
- char msg[100];
-
+ char msg[100];
+
driver_access_fifo();
-
+
fprintf(to_cmpi, "quit\n");
- fflush(to_cmpi);
+ fflush(to_cmpi);
fscanf(from_cmpi, "%s\n", msg);
if (strcmp(msg, "ok") != 0)
{
printf("error\n");
- return EXIT_FAILURE;
+ return EXIT_FAILURE;
}
-
- return EXIT_SUCCESS;
+
+ return EXIT_SUCCESS;
}
Modified: src/cmpi-db/cmpi-db-fifo.c
===================================================================
--- src/cmpi-db/cmpi-db-fifo.c 2010-04-29 21:42:41 UTC (rev 63)
+++ src/cmpi-db/cmpi-db-fifo.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -31,7 +31,7 @@
void
cmpi_client_code()
{
- char hostname[100];
+ char hostname[128];
wait_for_notification();
notify_next();
Modified: src/mpi_tools/io_tools.c
===================================================================
--- src/mpi_tools/io_tools.c 2010-04-29 21:42:41 UTC (rev 63)
+++ src/mpi_tools/io_tools.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,7 +1,7 @@
-#include <io_tools.h>
+#include <io_tools.h>
-#include <unistd.h>
+#include <unistd.h>
void
stream_to_buffer(char* buffer, int length, FILE* stream)
@@ -25,17 +25,17 @@
{
int chunk = length-total;
int actual = fwrite(buffer+total, 1, chunk, stream);
- total += actual;
+ total += actual;
}
}
void
eat_whitespace(FILE* stream)
{
- char c;
+ char c;
do
{
c = fgetc(stream);
} while (c == ' ' || c == '\n');
- ungetc(c, stream);
+ ungetc(c, stream);
}
Modified: test/driver/test01.c
===================================================================
--- test/driver/test01.c 2010-04-29 21:42:41 UTC (rev 63)
+++ test/driver/test01.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,21 +1,21 @@
-#include <stdio.h>
-#include <stdlib.h>
+#include <stdio.h>
+#include <stdlib.h>
-#include <accessor.h>
+#include <accessor.h>
int
main(int argc, char* argv[])
{
- driver_access_fifo();
-
+ driver_access_fifo();
+
fprintf(to_cmpi, "sleep 3\n");
- fflush(to_cmpi);
+ fflush(to_cmpi);
char output[30];
fscanf(from_cmpi, "output: %s", output);
printf("%s\n", output);
- return 0;
+ return 0;
}
Modified: test/driver/test01.zsh
===================================================================
--- test/driver/test01.zsh 2010-04-29 21:42:41 UTC (rev 63)
+++ test/driver/test01.zsh 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,18 +1,18 @@
-#!/bin/zsh
+#!/bin/zsh
make -j 3 D=1 test/driver/test01.x test/driver/test02.x \
- test/driver/test_driver.x
+ test/driver/test_driver.x
-mpiexec -n 5 test/driver/test_driver.x -n 4 &
+mpiexec -n 5 test/driver/test_driver.x -n 4 &
DRIVER_PID=${!}
-sleep 5
+sleep 5
print "Launching tool 01..."
-test/driver/test01.x
+test/driver/test01.x
print "Launching tool 02..."
-test/driver/test02.x
+test/driver/test02.x
-wait
+wait
Modified: test/driver/test02.c
===================================================================
--- test/driver/test02.c 2010-04-29 21:42:41 UTC (rev 63)
+++ test/driver/test02.c 2010-04-29 21:55:50 UTC (rev 64)
@@ -1,20 +1,20 @@
-#include <stdio.h>
-#include <stdlib.h>
+#include <stdio.h>
+#include <stdlib.h>
-#include <accessor.h>
+#include <accessor.h>
int
main(int argc, char* argv[])
{
driver_access_fifo();
-
+
fprintf(to_cmpi, "quit\n");
- fflush(to_cmpi);
+ fflush(to_cmpi);
char output[30];
fscanf(from_cmpi, "output: %s", output);
printf("%s\n", output);
- return 0;
+ return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|