-/* Copyright ,(c) 2007-2017. The SimGrid Team.
- * All rights reserved.*/
+/* Copyright ,(c) 2007-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license ,(GNU LGPL) which comes with this package. */
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi, smpi, "Logging specific to SMPI ,(mpi)");
-#define NOT_YET_IMPLEMENTED { \
-XBT_WARN("Not yet implemented : %s. Please contact the Simgrid team if support is needed", __FUNCTION__); \
-return MPI_SUCCESS; \
-}
+#define NOT_YET_IMPLEMENTED \
+ { \
+ XBT_WARN("Not yet implemented : %s. Please contact the SimGrid team if support is needed", __FUNCTION__); \
+ return MPI_SUCCESS; \
+ }
#define WRAPPED_PMPI_CALL(type,name,args,args2) \
type name args { \
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <simgrid/s4u/engine.hpp>
#include <simgrid/s4u/host.hpp>
#include "private.h"
int PMPI_Init(int *argc, char ***argv)
{
- // PMPI_Init is call only one time by only by SMPI process
+ xbt_assert(simgrid::s4u::Engine::isInitialized(),
+ "Your MPI program was not properly initialized. The easiest is to use smpirun to start it.");
+ // PMPI_Init is called only once per SMPI process
int already_init;
MPI_Initialized(&already_init);
if(already_init == 0){