7 static int myvalue = 0;
8 static void test_opts(int argc, char* const argv[])
11 static struct option long_options[] = {
12 {(char*)"long", no_argument, 0, 0 },
16 int ret = getopt_long_only(argc, argv, "s", long_options, NULL);
26 printf("option %s", long_options[0].name);
31 printf("(smpi_)getopt_long_only failed ! \n");
34 int main(int argc, char **argv)
38 MPI_Init(&argc, &argv);
39 /* test getopt_long function */
40 test_opts(argc, argv);
42 MPI_Comm_rank(MPI_COMM_WORLD, &me);
44 MPI_Barrier(MPI_COMM_WORLD);
48 MPI_Barrier(MPI_COMM_WORLD);
51 printf("Privatization error - %d != %d\n", myvalue, me);