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);
28 printf("option %s", long_options[0].name);
33 printf("(smpi_)getopt_long_only failed ! \n");
36 int main(int argc, char **argv)
40 MPI_Init(&argc, &argv);
41 /* test getopt_long function */
42 test_opts(argc, argv);
44 MPI_Comm_rank(MPI_COMM_WORLD, &me);
46 MPI_Barrier(MPI_COMM_WORLD);
50 MPI_Barrier(MPI_COMM_WORLD);
53 printf("Privatization error - %d != %d\n", myvalue, me);