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
[SMPI] Added 2 FIXME's for PMPI_Is_thread_main()
[simgrid.git]
/
src
/
smpi
/
bindings
/
smpi_pmpi.cpp
diff --git
a/src/smpi/bindings/smpi_pmpi.cpp
b/src/smpi/bindings/smpi_pmpi.cpp
index
d76cad3
..
c8129b9
100644
(file)
--- a/
src/smpi/bindings/smpi_pmpi.cpp
+++ b/
src/smpi/bindings/smpi_pmpi.cpp
@@
-84,7
+84,7
@@
int PMPI_Get_library_version (char *version,int *len){
return MPI_SUCCESS;
}
return MPI_SUCCESS;
}
-int PMPI_Init_thread(int
*argc, char ***argv, int required, int *
provided)
+int PMPI_Init_thread(int
* argc, char*** argv, int /*required*/, int*
provided)
{
if (provided != nullptr) {
*provided = MPI_THREAD_SINGLE;
{
if (provided != nullptr) {
*provided = MPI_THREAD_SINGLE;
@@
-104,15
+104,18
@@
int PMPI_Query_thread(int *provided)
int PMPI_Is_thread_main(int *flag)
{
int PMPI_Is_thread_main(int *flag)
{
+ // FIXME: The MPI standard seems to say that fatal errors need to be triggered
+ // if MPI has been finalized or not yet been initialized
if (flag == nullptr) {
return MPI_ERR_ARG;
} else {
if (flag == nullptr) {
return MPI_ERR_ARG;
} else {
- *flag = smpi_process()->index() == 0;
+ *flag = smpi_process()->index() == 0; // FIXME: I don't think this is correct: This just returns true if the process ID is 1,
+ // regardless of whether this process called MPI_Thread_Init() or not.
return MPI_SUCCESS;
}
}
return MPI_SUCCESS;
}
}
-int PMPI_Abort(MPI_Comm
comm, int errorcode
)
+int PMPI_Abort(MPI_Comm
/*comm*/, int /*errorcode*/
)
{
smpi_bench_end();
// FIXME: should kill all processes in comm instead
{
smpi_bench_end();
// FIXME: should kill all processes in comm instead
@@
-182,7
+185,8
@@
int PMPI_Initialized(int* flag) {
return MPI_SUCCESS;
}
return MPI_SUCCESS;
}
-int PMPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr){
+int PMPI_Alloc_mem(MPI_Aint size, MPI_Info /*info*/, void* baseptr)
+{
void *ptr = xbt_malloc(size);
if(ptr==nullptr)
return MPI_ERR_NO_MEM;
void *ptr = xbt_malloc(size);
if(ptr==nullptr)
return MPI_ERR_NO_MEM;