Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Generate error strings at the same time enum is generated.
[simgrid.git] / src / smpi / bindings / smpi_pmpi.cpp
index b6dfc7e..8939bbf 100644 (file)
@@ -208,6 +208,12 @@ int PMPI_Error_class(int errorcode, int* errorclass) {
   return MPI_SUCCESS;
 }
 
+int PMPI_Error_string(int errorcode, char* string, int* resultlen){
+  *resultlen = strlen(smpi_error_string[errorcode]);
+  strncpy(string, smpi_error_string[errorcode], *resultlen);
+  return MPI_SUCCESS;  
+}
+
 int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_fn, int* keyval, void* extra_state) {
   smpi_copy_fn _copy_fn={copy_fn,nullptr,nullptr};
   smpi_delete_fn _delete_fn={delete_fn,nullptr,nullptr};