Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[SMPI/INSTR] Header cleanup.
[simgrid.git] / src / smpi / smpi_f77.cpp
index 21e10ec..09cb210 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <limits.h>
 #include <stdio.h>
-
+#include "smpi_mpi_dt_private.h"
 #include "private.h"
 #include "xbt.h"
 
@@ -96,7 +96,7 @@ static void smpi_init_fortran_types(){
      smpi_type_c2f(MPI_UINT64_T);//MPI_LOGICAL8
      smpi_type_c2f(MPI_2FLOAT);//MPI_2REAL
      smpi_type_c2f(MPI_2DOUBLE);//MPI_2DOUBLE_PRECISION
-     smpi_type_c2f(MPI_UINT64_T);//MPI_AINT
+     smpi_type_c2f(MPI_PTR);//MPI_AINT
      smpi_type_c2f(MPI_UINT64_T);//MPI_OFFSET
      smpi_type_c2f(MPI_UINT64_T);//MPI_COUNT
      smpi_type_c2f(MPI_DATATYPE_NULL);//MPI_REAL16
@@ -284,6 +284,7 @@ void mpi_finalize_(int* ierr) {
      xbt_dict_free(&group_lookup);
      xbt_dict_free(&comm_lookup);
      xbt_dict_free(&win_lookup);
+     xbt_dict_free(&info_lookup);
    }
 }
 
@@ -786,9 +787,15 @@ void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, i
  tkey[keylen]='\0';
  *ierr = MPI_Info_get(smpi_info_f2c(*info),tkey,*valuelen, value, flag);
  xbt_free(tkey);
- int i = 0;
- for (i=strlen(value); i<*valuelen; i++)
- value[i]=' ';
+ if(*flag==true){
+   int replace=0, i=0;
+   for (i=0; i<*valuelen; i++){
+     if(value[i]=='\0')
+       replace=1;
+     if(replace)
+       value[i]=' ';
+   }
+ } 
 }
 
 void mpi_info_free_(int* info, int* ierr){