7 static int myvalue = 0;
8 static void test_opts(int* argc, char **argv[]){
11 static struct option long_options[] = {
12 {"long", no_argument, 0, 0 },
16 ret = getopt_long_only(*argc, *argv, "s",
29 printf("option %s", long_options[0].name);
34 printf("(smpi_)getopt_long_only failed ! \n");
37 int main(int argc, char **argv)
41 MPI_Init(&argc, &argv);
42 /* test getopt_long function */
43 test_opts(&argc, &argv);
45 MPI_Comm_rank(MPI_COMM_WORLD, &me);
47 MPI_Barrier(MPI_COMM_WORLD);
51 MPI_Barrier(MPI_COMM_WORLD);
54 printf("Privatization error - %d != %d\n", myvalue, me);