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
make the C and Fortran interfaces of SMPI as extern C also in the code
[simgrid.git]
/
src
/
smpi
/
smpi_f77.cpp
diff --git
a/src/smpi/smpi_f77.cpp
b/src/smpi/smpi_f77.cpp
index
8e59d00
..
17ed153
100644
(file)
--- a/
src/smpi/smpi_f77.cpp
+++ b/
src/smpi/smpi_f77.cpp
@@
-10,7
+10,6
@@
#include "private.h"
#include "xbt.h"
#include "private.h"
#include "xbt.h"
-
//TODO : remove all this.
static xbt_dict_t comm_lookup = nullptr;
static xbt_dict_t group_lookup = nullptr;
//TODO : remove all this.
static xbt_dict_t comm_lookup = nullptr;
static xbt_dict_t group_lookup = nullptr;
@@
-252,6
+251,8
@@
type smpi_##name##_f2c(int id){\
return smpi_f2c<type>(id, name##_lookup);\
}
return smpi_f2c<type>(id, name##_lookup);\
}
+extern "C" { // This should really use the C linkage to be usable from Fortran
+
SMPI_F2C_C2F(MPI_Comm, comm)
SMPI_F2C_C2F(MPI_Group, group)
SMPI_F2C_C2F(MPI_Request, request)
SMPI_F2C_C2F(MPI_Comm, comm)
SMPI_F2C_C2F(MPI_Group, group)
SMPI_F2C_C2F(MPI_Request, request)
@@
-1770,3
+1771,4
@@
void mpi_file_write_ ( int* fh, void* buf, int* count, int* datatype, MPI_Status
*ierr= MPI_File_write(reinterpret_cast<MPI_File>(*fh), buf, *count, smpi_type_f2c(*datatype), status);
}
*ierr= MPI_File_write(reinterpret_cast<MPI_File>(*fh), buf, *count, smpi_type_f2c(*datatype), status);
}
+} // extern "C"