/* A simple example ping-pong program to test MPI_Send and MPI_Recv */
-/* Copyright (c) 2009-2019. The SimGrid Team.
+/* Copyright (c) 2009-2022. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <stdio.h>
#include <mpi.h>
-static void test_opts(int* argc, char **argv[]){
+static void test_opts(int argc, char* const argv[])
+{
int found = 0;
int ret;
- while ((ret = getopt(*argc, *argv, "s")) >= 0)
- {
+ while ((ret = getopt(argc, argv, "s")) >= 0) {
if (ret == 's')
found = 1;
}
int rank;
int msg = 99;
MPI_Status status;
-
int err = MPI_Init(&argc, &argv); /* Initialize MPI */
/* test getopt function */
- test_opts(&argc, &argv);
+ test_opts(argc, argv);
if (err != MPI_SUCCESS) {
printf("MPI initialization failed!\n");