Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove extern "C" from cpp files (src/smpi/).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 28 Mar 2018 15:04:53 +0000 (17:04 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 28 Mar 2018 15:04:53 +0000 (17:04 +0200)
12 files changed:
src/smpi/bindings/smpi_mpi.cpp
src/smpi/bindings/smpi_pmpi.cpp
src/smpi/bindings/smpi_pmpi_coll.cpp
src/smpi/bindings/smpi_pmpi_comm.cpp
src/smpi/bindings/smpi_pmpi_group.cpp
src/smpi/bindings/smpi_pmpi_info.cpp
src/smpi/bindings/smpi_pmpi_op.cpp
src/smpi/bindings/smpi_pmpi_request.cpp
src/smpi/bindings/smpi_pmpi_topo.cpp
src/smpi/bindings/smpi_pmpi_type.cpp
src/smpi/bindings/smpi_pmpi_win.cpp
src/smpi/internals/smpi_bench.cpp

index bdcf2d5..b388f68 100644 (file)
@@ -52,7 +52,6 @@ return P##name args2 ; \
 
 
 /* MPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 WRAPPED_PMPI_CALL(double, MPI_Wtick,(void),())
 WRAPPED_PMPI_CALL(double, MPI_Wtime,(void),())
@@ -397,5 +396,3 @@ UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(int,MPI_Win_set_errhandler,(MPI_Win win,
 UNIMPLEMENTED_WRAPPED_PMPI_CALL(int,MPI_Win_test,(MPI_Win win, int *flag),(win, flag))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Errhandler, MPI_Errhandler_f2c,(MPI_Fint errhandler),(errhandler))
 UNIMPLEMENTED_WRAPPED_PMPI_CALL_NOFAIL(MPI_Fint, MPI_Errhandler_c2f,(MPI_Errhandler errhandler),(errhandler))
-
-} // extern "C"
index 6e635fa..7954c14 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -25,7 +25,6 @@ void TRACE_smpi_set_category(const char *category)
 }
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Init(int *argc, char ***argv)
 {
@@ -216,5 +215,3 @@ int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_f
 int PMPI_Keyval_free(int* keyval) {
   return simgrid::smpi::Keyval::keyval_free<simgrid::smpi::Comm>(keyval);
 }
-
-} // extern "C"
index 8904505..745d9d9 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -13,7 +13,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
 {
@@ -665,5 +664,3 @@ int PMPI_Alltoallv(void* sendbuf, int* sendcounts, int* senddisps, MPI_Datatype
   smpi_bench_begin();
   return retval;
 }
-
-}
index f886909..f0f2ed4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -12,7 +12,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Comm_rank(MPI_Comm comm, int *rank)
 {
@@ -265,5 +264,3 @@ int PMPI_Attr_put(MPI_Comm comm, int keyval, void* attr_value) {
   else
   return comm->attr_put<simgrid::smpi::Comm>(keyval, attr_value);
 }
-
-}
index 93f0cc6..8d0bee5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -14,7 +14,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Group_free(MPI_Group * group)
 {
@@ -190,6 +189,3 @@ MPI_Group PMPI_Group_f2c(MPI_Fint group){
 MPI_Fint PMPI_Group_c2f(MPI_Group group){
   return group->c2f();
 }
-
-
-}
index ed0c2b3..8986068 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -9,7 +9,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Info_create( MPI_Info *info){
   if (info == nullptr)
@@ -81,5 +80,3 @@ MPI_Info PMPI_Info_f2c(MPI_Fint info){
 MPI_Fint PMPI_Info_c2f(MPI_Info info){
   return info->c2f();
 }
-
-}
index 4ca50de..9b4a2e8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -9,7 +9,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Op_create(MPI_User_function * function, int commute, MPI_Op * op)
 {
@@ -52,5 +51,3 @@ MPI_Op PMPI_Op_f2c(MPI_Fint op){
 MPI_Fint PMPI_Op_c2f(MPI_Op op){
   return op->c2f();
 }
-
-}
index 82d2642..9f0d334 100644 (file)
@@ -19,7 +19,6 @@ static int getPid(MPI_Comm comm, int id)
 }
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Send_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm, MPI_Request * request)
 {
@@ -688,5 +687,3 @@ MPI_Request PMPI_Request_f2c(MPI_Fint request){
 MPI_Fint PMPI_Request_c2f(MPI_Request request) {
   return request->c2f();
 }
-
-}
index 0be7e5f..c428a8c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -9,7 +9,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 /* The topo part of MPI_COMM_WORLD should always be nullptr. When other topologies will be implemented, not only should we
  * check if the topology is nullptr, but we should check if it is the good topology type (so we have to add a
@@ -132,5 +131,3 @@ int PMPI_Cart_sub(MPI_Comm comm, int* remain_dims, MPI_Comm* comm_new) {
     return  MPI_ERR_ARG;
   return MPI_SUCCESS;
 }
-
-}
index 8613941..ada61b8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -9,7 +9,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Type_free(MPI_Datatype * datatype)
 {
@@ -367,5 +366,3 @@ int PMPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int* size)
 
   return MPI_SUCCESS;
 }
-
-}
index 4bb1553..2176dd4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
@@ -14,7 +14,6 @@
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
 
 /* PMPI User level calls */
-extern "C" { // Obviously, the C MPI interface should use the C linkage
 
 int PMPI_Win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win){
   int retval = 0;
@@ -812,5 +811,3 @@ MPI_Win PMPI_Win_f2c(MPI_Fint win){
 MPI_Fint PMPI_Win_c2f(MPI_Win win){
   return win->c2f();
 }
-
-}
index b71adc7..1a64671 100644 (file)
@@ -396,7 +396,6 @@ void smpi_sample_3(int global, const char *file, int line)
   data.benching = false;
 }
 
-extern "C" { /** These functions will be called from the user code **/
 smpi_trace_call_location_t* smpi_trace_get_call_location()
 {
   return smpi_process()->call_location();
@@ -423,7 +422,6 @@ void smpi_trace_set_call_location__(const char* file, int* line)
 {
   smpi_trace_set_call_location(file, *line);
 }
-}
 
 void smpi_bench_destroy()
 {