16 int init(
int argc,
char *argv[]);
17 int (*application_init)(
int argc,
char *argv[]) = &init;
18 int fin(
int argc,
char *argv[]);
19 int (*application_fin)(
int argc,
char *argv[]) = &fin;
22 init(
int argc,
char *argv[])
24 printf(
"testdp:init() called.\n");
30 fin(
int argc,
char *argv[])
32 printf(
"testdp:fin() called.\n");
41 MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
42 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
44 int n = (int)
sizeof(xargs);
46 for (
int i = 0; i < argc; i++) {
47 int cc = snprintf(&xargs[p], (n - p),
" %s", argv[i]);
54 char *cs = ctime(&ct);
57 snprintf(clock,
sizeof(clock),
"%s", &cs[11]);
60 snprintf(clock,
sizeof(clock),
"(time unknown)");
62 printf(
"Starting application on rank %04d (creates a file %s) %s...\n" 63 "Args:%s\n", rank, argv[7], clock, xargs);
68 snprintf(buf, 256,
"touch %s", argv[7]);
int application(int argc, char *argv[])
Application Code Entry.