+ /* Do not intercept the main when run from SMPI: it will initialize the simulation properly */
+ for (int i = 0; envp[i] != nullptr; i++)
+ if (strncmp(envp[i], "SMPI_GLOBAL_SIZE", strlen("SMPI_GLOBAL_SIZE")) == 0)
+ return raw_main(argc, argv, envp);
+
+ /* If not in SMPI, the old main becomes an actor in a newly created simulation */