7 static int myvalue = 0;
8 static void test_opts(int* argc, char **argv[]){
10 static struct option long_options[] = {
11 {(char*)"long", no_argument, 0, 0 },
15 int ret = getopt_long_only(*argc, *argv, "s", long_options, NULL);
27 printf("option %s", long_options[0].name);
32 printf("(smpi_)getopt_long_only failed ! \n");
35 int main(int argc, char **argv)
39 MPI_Init(&argc, &argv);
40 /* test getopt_long function */
41 test_opts(&argc, &argv);
43 MPI_Comm_rank(MPI_COMM_WORLD, &me);
45 MPI_Barrier(MPI_COMM_WORLD);
49 MPI_Barrier(MPI_COMM_WORLD);
52 printf("Privatization error - %d != %d\n", myvalue, me);