A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fortran-smpi was broken
[simgrid.git]
/
src
/
smpi
/
smpi_global.c
diff --git
a/src/smpi/smpi_global.c
b/src/smpi/smpi_global.c
index
f7c6132
..
1baf3ea
100644
(file)
--- a/
src/smpi/smpi_global.c
+++ b/
src/smpi/smpi_global.c
@@
-35,6
+35,10
@@
static int process_count = 0;
MPI_Comm MPI_COMM_WORLD = MPI_COMM_NULL;
MPI_Comm MPI_COMM_WORLD = MPI_COMM_NULL;
+MPI_Errhandler* MPI_ERRORS_RETURN = NULL;
+MPI_Errhandler* MPI_ERRORS_ARE_FATAL = NULL;
+MPI_Errhandler* MPI_ERRHANDLER_NULL = NULL;
+
#define MAILBOX_NAME_MAXLEN (5 + sizeof(int) * 2 + 1)
static char* get_mailbox_name(char* str, int index) {
#define MAILBOX_NAME_MAXLEN (5 + sizeof(int) * 2 + 1)
static char* get_mailbox_name(char* str, int index) {
@@
-89,6
+93,7
@@
void smpi_process_finalize(void)
}
}
}
}
+#ifdef SMPI_F2C
int smpi_process_argc(void) {
smpi_process_data_t data = smpi_process_data();
int smpi_process_argc(void) {
smpi_process_data_t data = smpi_process_data();
@@
-123,6
+128,7
@@
int smpi_global_size(void) {
}
return atoi(value);
}
}
return atoi(value);
}
+#endif
smpi_process_data_t smpi_process_data(void)
{
smpi_process_data_t smpi_process_data(void)
{
@@
-261,6
+267,7
@@
void smpi_global_destroy(void)
int i;
smpi_bench_destroy();
int i;
smpi_bench_destroy();
+ smpi_group_destroy(smpi_comm_group(MPI_COMM_WORLD));
smpi_comm_destroy(MPI_COMM_WORLD);
MPI_COMM_WORLD = MPI_COMM_NULL;
for (i = 0; i < count; i++) {
smpi_comm_destroy(MPI_COMM_WORLD);
MPI_COMM_WORLD = MPI_COMM_NULL;
for (i = 0; i < count; i++) {
@@
-279,16
+286,24
@@
void smpi_global_destroy(void)
/* Fortran specific stuff */
/* With smpicc, the following weak symbols are used */
/* With smpiff, the following weak symbols are replaced by those in libf2c */
/* Fortran specific stuff */
/* With smpicc, the following weak symbols are used */
/* With smpiff, the following weak symbols are replaced by those in libf2c */
+
int __attribute__((weak)) xargc;
char** __attribute__((weak)) xargv;
int __attribute__((weak)) xargc;
char** __attribute__((weak)) xargv;
+int __attribute__((weak)) smpi_simulated_main(int argc, char** argv) {
+ xbt_die("Should not be in this smpi_simulated_main");
+ return 1;
+}
+
int __attribute__((weak)) main(int argc, char** argv) {
int __attribute__((weak)) main(int argc, char** argv) {
- xargc = argc;
- xargv = argv;
- return MAIN__();
+ return smpi_main(smpi_simulated_main,argc,argv);
}
}
-int MAIN__(void)
+int __attribute__((weak)) MAIN__(){
+ return smpi_main(smpi_simulated_main,xargc, xargv);
+};
+
+int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[])
{
srand(SMPI_RAND_SEED);
{
srand(SMPI_RAND_SEED);
@@
-309,22
+324,23
@@
int MAIN__(void)
XBT_LOG_CONNECT(smpi_mpi);
XBT_LOG_CONNECT(smpi_mpi_dt);
XBT_LOG_CONNECT(smpi_pmpi);
XBT_LOG_CONNECT(smpi_mpi);
XBT_LOG_CONNECT(smpi_mpi_dt);
XBT_LOG_CONNECT(smpi_pmpi);
+ XBT_LOG_CONNECT(smpi_replay);
#ifdef HAVE_TRACING
#ifdef HAVE_TRACING
- TRACE_global_init(&
xargc, x
argv);
+ TRACE_global_init(&
argc,
argv);
#endif
#endif
- SIMIX_global_init(&
xargc, x
argv);
+ SIMIX_global_init(&
argc,
argv);
#ifdef HAVE_TRACING
TRACE_start();
#endif
// parse the platform file: get the host list
#ifdef HAVE_TRACING
TRACE_start();
#endif
// parse the platform file: get the host list
- SIMIX_create_environment(
x
argv[1]);
+ SIMIX_create_environment(argv[1]);
- SIMIX_function_register_default(
smpi_simulated_
main);
- SIMIX_launch_application(
x
argv[2]);
+ SIMIX_function_register_default(
real
main);
+ SIMIX_launch_application(argv[2]);
smpi_global_init();
smpi_global_init();
@@
-337,7
+353,7
@@
int MAIN__(void)
else
SIMIX_run();
else
SIMIX_run();
- if (
xbt_cfg_get_int(_surf_cfg_set,
"smpi/display_timing"))
+ if (
surf_cfg_get_int(
"smpi/display_timing"))
XBT_INFO("Simulation time: %g seconds.", SIMIX_get_clock());
smpi_global_destroy();
XBT_INFO("Simulation time: %g seconds.", SIMIX_get_clock());
smpi_global_destroy();