Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added RAM folding to SMPI.
[simgrid.git] / include / smpi / smpi.h
index efdcace4e0212d27ab41afdd7d6f058440d99092..fc4e0873e75a105668018ef91154acb9327d0a53 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #ifndef SMPI_H
 #define SMPI_H
 
@@ -58,6 +64,7 @@ typedef struct {
   int MPI_SOURCE;
   int MPI_TAG;
   int MPI_ERROR;
+  int count;
 } MPI_Status;
 
 #define MPI_STATUS_IGNORE NULL
@@ -153,7 +160,7 @@ XBT_PUBLIC(double) MPI_Wtime(void);
 XBT_PUBLIC(int) MPI_Address(void *location, MPI_Aint *address);
 
 XBT_PUBLIC(int) MPI_Type_free(MPI_Datatype* datatype);
-XBT_PUBLIC(int) MPI_Type_size(MPI_Datatype datatype, size_t* size);
+XBT_PUBLIC(int) MPI_Type_size(MPI_Datatype datatype, int* size);
 XBT_PUBLIC(int) MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint* lb, MPI_Aint* extent);
 XBT_PUBLIC(int) MPI_Type_extent(MPI_Datatype datatype, MPI_Aint* extent);
 XBT_PUBLIC(int) MPI_Type_lb(MPI_Datatype datatype, MPI_Aint* disp);
@@ -178,6 +185,7 @@ XBT_PUBLIC(int) MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MP
 XBT_PUBLIC(int) MPI_Comm_rank(MPI_Comm comm, int* rank);
 XBT_PUBLIC(int) MPI_Comm_size(MPI_Comm comm, int* size);
 XBT_PUBLIC(int) MPI_Get_processor_name(char *name, int *resultlen);
+XBT_PUBLIC(int) MPI_Get_count(MPI_Status* status, MPI_Datatype datatype, int* count);
           
 XBT_PUBLIC(int) MPI_Comm_group(MPI_Comm comm, MPI_Group* group);
 XBT_PUBLIC(int) MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int* result);
@@ -243,5 +251,11 @@ XBT_PUBLIC(void) smpi_do_once_3(void);
 #define SMPI_DO_ONCE for (smpi_do_once_1(__FILE__, __LINE__); smpi_do_once_2(); smpi_do_once_3())
 */
 
+XBT_PUBLIC(void*) smpi_shared_malloc(size_t size, const char* file, int line);
+#define SMPI_SHARED_MALLOC(size) smpi_shared_malloc(size, __FILE__, __LINE__)
+
+XBT_PUBLIC(void) smpi_shared_free(void* data);
+#define SMPI_SHARED_FREE(data) smpi_shared_free(data)
+
 SG_END_DECL()
 #endif