Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[S(A)MPI] Add copyright header
[simgrid.git] / src / smpi / plugins / ampi / ampi.cpp
index bf579e4..c88fce7 100644 (file)
@@ -1,3 +1,8 @@
+/* Copyright (c) 2018.      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. */
+
 #include <simgrid/plugins/load_balancer.h>
 #include <simgrid/s4u/Actor.hpp>
 #include <src/smpi/include/smpi_comm.hpp>
@@ -10,8 +15,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(plugin_pampi, smpi, "Logging specific to the AMP
 
 static std::vector<size_t> memory_size(500, 0); // FIXME cheinrich This needs to be dynamic
 static std::map</*address*/ void*, size_t> alloc_table; // Keep track of all allocations
-extern "C" void* _sampi_malloc(size_t);
-extern "C" void _sampi_free(void* ptr);
+extern "C" XBT_PUBLIC void* _sampi_malloc(size_t);
+extern "C" XBT_PUBLIC void _sampi_free(void* ptr);
 extern "C" void* _sampi_malloc(size_t size)
 {
   void* result = malloc (size); // We need the space here to prevent recursive substitution
@@ -30,6 +35,7 @@ extern "C" void _sampi_free(void* ptr)
   free(ptr);
 }
 
+#include "ampi.hpp"
 #include <smpi/sampi.h>
 namespace simgrid {
 namespace smpi {