optind should be set to 1, not 0. GNU was just more resilient.
smpi_trace_call_location_t trace_call_loc_;
s4u::ActorPtr actor_ = nullptr;
smpi_privatization_region_t privatized_region_ = nullptr;
smpi_trace_call_location_t trace_call_loc_;
s4u::ActorPtr actor_ = nullptr;
smpi_privatization_region_t privatized_region_ = nullptr;
- int optind = 0; /*for getopt replacement */
+ int optind = 1; /*for getopt replacement */
std::string tracing_category_ = "";
#if HAVE_PAPI
std::string tracing_category_ = "";
#if HAVE_PAPI
#include <mpi.h>
static void test_opts(int* argc, char **argv[]){
#include <mpi.h>
static void test_opts(int* argc, char **argv[]){
int found = 0, ret;
while ((ret = getopt(*argc, *argv, "s")) >= 0)
{
int found = 0, ret;
while ((ret = getopt(*argc, *argv, "s")) >= 0)
{
if (found!=1){
printf("(smpi_)getopt failed ! \n");
}
if (found!=1){
printf("(smpi_)getopt failed ! \n");
}
}
int main(int argc, char *argv[])
}
int main(int argc, char *argv[])