-/* Copyright (c) 2007-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2023. 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 <vector>
#endif
-#ifdef _WIN32
-#define MPI_CALL(type, name, args) \
- type name args; \
- type _XBT_CONCAT(P, name) args
-#else
#define MPI_CALL(type, name, args) \
type name args __attribute__((weak)); \
- type _XBT_CONCAT(P, name) args
-#endif
+ type _XBT_CONCAT(P, name) \
+ args
SG_BEGIN_DECL
#define MPI_THREAD_SINGLE 0
#define MPI_STATUSES_IGNORE ((MPI_Status*)NULL)
#define MPI_STATUS_SIZE 5
-#if !defined(DLL_EXPORT)
#if defined(c_plusplus) || defined(__cplusplus)
#define SMPI_PREDEFINED_POINTER(type, internal) (static_cast<type> (static_cast<void*> (&(internal))))
#else
#define SMPI_PREDEFINED_POINTER(type, internal) ((type) ((void *) &(internal)))
#endif
-#else
-#define SMPI_PREDEFINED_POINTER(type, internal) ((type) &(internal))
-#endif
extern SMPI_Datatype smpi_MPI_DATATYPE_NULL;
extern SMPI_Datatype smpi_MPI_CHAR;
SG_END_DECL
-/* C++ declarations for shared_malloc and default copy buffer callback */
#ifdef __cplusplus
+XBT_PUBLIC void SMPI_app_instance_start(const char* name, std::function<void()> const& code,
+ std::vector<simgrid::s4u::Host*> const& hosts);
+
+/* This version without parameter is nice to use with SMPI_app_instance_start() */
+XBT_PUBLIC void MPI_Init();
+
+/* C++ declarations for shared_malloc and default copy buffer callback */
XBT_PUBLIC int smpi_is_shared(const void* ptr, std::vector<std::pair<size_t, size_t>>& private_blocks, size_t* offset);
std::vector<std::pair<size_t, size_t>> shift_and_frame_private_blocks(const std::vector<std::pair<size_t, size_t>>& vec,