### Generated files
_*.c
include/simgrid/config.h
+include/simgrid/version.h
include/smpi/smpif.h
src/internal_config.h
-src/simgrid/version.h
testprog
### Cmake files
CPackConfig.cmake
# Avoid triggering a (full) rebuild by touching the files if they did not really change
configure_file("${CMAKE_HOME_DIRECTORY}/src/internal_config.h.in" "${CMAKE_BINARY_DIR}/src/internal_config.h.generated" @ONLY IMMEDIATE)
-configure_file("${CMAKE_HOME_DIRECTORY}/src/simgrid/version.h.in" "${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated" @ONLY IMMEDIATE)
+configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid/version.h.in" "${CMAKE_BINARY_DIR}/include/simgrid/version.h.generated" @ONLY IMMEDIATE)
configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid/config.h.in" "${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated" @ONLY IMMEDIATE)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/internal_config.h.generated ${CMAKE_BINARY_DIR}/src/internal_config.h)
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated ${CMAKE_BINARY_DIR}/src/simgrid/version.h)
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/version.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/version.h)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/config.h)
file(REMOVE ${CMAKE_BINARY_DIR}/src/internal_config.h.generated)
file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated)
-file(REMOVE ${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated)
+file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/version.h.generated)
# We need two versions of the SMPI scripts because they contain the path to the library
# so, it depends of whether SimGrid is installed, or run from the sources (during the build)
include include/simgrid/simix/blocking_simcall.hpp
include include/simgrid/smpi/replay.hpp
include include/simgrid/storage.h
+include include/simgrid/version.h.in
include include/simgrid/vm.h
include include/simgrid/zone.h
include include/smpi/forward.hpp
include src/simdag/simdag_private.hpp
include src/simgrid/Exception.cpp
include src/simgrid/sg_config.cpp
+include src/simgrid/sg_version.cpp
include src/simgrid/util.hpp
-include src/simgrid/version.h.in
include src/simix/libsmx.cpp
include src/simix/popping.cpp
include src/simix/popping_accessors.hpp
#define SIMGRID_PUBLIC_CONFIG_H
#include <xbt/base.h>
-/** Define the version numbers of the used header files.
- See sg_version_get() to retrieve the version of the dynamic library. */
-#define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
-#define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
-#define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
-#define SIMGRID_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
-
-SG_BEGIN_DECL
-/** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib), while
- SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */
-XBT_PUBLIC void sg_version_get(int* major, int* minor, int* patch);
-
-/** Display the version information and some additional blurb. */
-XBT_PUBLIC void sg_version();
-SG_END_DECL
-
-
-/* Version as a single integer. v3.4 is 30400, v3.16.2 is 31602, v42 will be 420000, and so on. */
-#define SIMGRID_VERSION (100UL * (100UL * (SIMGRID_VERSION_MAJOR) + (SIMGRID_VERSION_MINOR)) + (SIMGRID_VERSION_PATCH))
-
-#define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@"
-
/* Was Jedule compiled in? */
#cmakedefine01 SIMGRID_HAVE_JEDULE
/* Was the Lua support compiled in? */
#include <simgrid/plugins/live_migration.h>
#include <simgrid/semaphore.h>
#include <simgrid/storage.h>
+#include <simgrid/version.h>
#include <simgrid/vm.h>
#include <simgrid/zone.h>
#include <xbt.h>
#include <simgrid/host.h>
#include <simgrid/link.h>
+#include <simgrid/version.h>
#include <xbt/log.h>
#include <xbt/sysdep.h>
--- /dev/null
+/* src/simgrid/version.h - internal versioning info */
+
+/* Copyright (c) 2009-2019. 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 SIMGRID_VERSION_H
+#define SIMGRID_VERSION_H
+
+#define SIMGRID_GIT_VERSION "@GIT_VERSION@"
+
+/** Define the version numbers of the used header files.
+ See sg_version_get() to retrieve the version of the dynamic library. */
+#define SIMGRID_VERSION_MAJOR @SIMGRID_VERSION_MAJOR@
+#define SIMGRID_VERSION_MINOR @SIMGRID_VERSION_MINOR@
+#define SIMGRID_VERSION_PATCH @SIMGRID_VERSION_PATCH@
+#define SIMGRID_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
+
+SG_BEGIN_DECL
+/** Retrieves the version numbers of the used dynamic library (so, DLL or dynlib), while
+ SIMGRID_VERSION_MAJOR and friends give the version numbers of the used header files */
+XBT_PUBLIC void sg_version_get(int* major, int* minor, int* patch);
+
+/** Display the version information and some additional blurb. */
+XBT_PUBLIC void sg_version();
+SG_END_DECL
+
+
+/* Version as a single integer. v3.4 is 30400, v3.16.2 is 31602, v42 will be 420000, and so on. */
+#define SIMGRID_VERSION (100UL * (100UL * (SIMGRID_VERSION_MAJOR) + (SIMGRID_VERSION_MINOR)) + (SIMGRID_VERSION_PATCH))
+
+#define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@"
+
+#endif /* SIMGRID_PUBLIC_CONFIG_H */
#include "include/xbt/config.hpp"
#include "simgrid/Exception.hpp"
#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/version.h"
#include "src/instr/instr_private.hpp"
#include "surf/surf.hpp"
#include "xbt/virtu.h" /* xbt_cmdline */
void post() override;
void finish() override;
- CommImpl::Type type_; /* Type of the communication (SIMIX_COMM_SEND or SIMIX_COMM_RECEIVE) */
+ CommImpl::Type type_; /* Type of the communication (SEND or RECEIVE) */
#if SIMGRID_HAVE_MC
MailboxImpl* mbox_cpy = nullptr; /* Copy of the rendez-vous where the comm is queued, MC needs it for DPOR
XBT_PRIVATE void SIMIX_mailbox_exit();
-#endif /* SIMIX_MAILBOXIMPL_H */
+#endif
s4u::Mutex& mutex() { return piface_; }
};
-}
-}
-}
-#endif /* SIMIX_MUTEXIMPL_HPP */
+} // namespace activity
+} // namespace kernel
+} // namespace simgrid
+#endif
/* 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 SIMIX_ACTORIMPL_H
-#define SIMIX_ACTORIMPL_H
+#ifndef SIMGRID_KERNEL_ACTOR_ACTORIMPL_HPP
+#define SIMGRID_KERNEL_ACTOR_ACTORIMPL_HPP
#include "simgrid/s4u/Actor.hpp"
#include "src/simix/popping_private.hpp"
#include "simgrid/sg_config.hpp"
#include "simgrid/instr.h"
+#include "simgrid/version.h"
#include "src/instr/instr_private.hpp"
#include "src/internal_config.h"
#include "src/kernel/lmm/maxmin.hpp"
--- /dev/null
+/* Copyright (c) 2019. 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/config.h"
+#include "simgrid/version.h"
+#include "xbt/base.h"
+#include "xbt/log.h"
+#include "xbt/misc.h"
+#include "xbt/sysdep.h"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sg_version, surf, "About the versioning of SimGrid");
+
+void sg_version_check(int lib_version_major, int lib_version_minor, int lib_version_patch)
+{
+ if ((lib_version_major != SIMGRID_VERSION_MAJOR) || (lib_version_minor != SIMGRID_VERSION_MINOR)) {
+ fprintf(stderr,
+ "FATAL ERROR: Your program was compiled with SimGrid version %d.%d.%d, "
+ "and then linked against SimGrid %d.%d.%d. Please fix this.\n",
+ lib_version_major, lib_version_minor, lib_version_patch, SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR,
+ SIMGRID_VERSION_PATCH);
+ abort();
+ }
+ if (lib_version_patch != SIMGRID_VERSION_PATCH) {
+ if (SIMGRID_VERSION_PATCH > 89 || lib_version_patch > 89) {
+ fprintf(
+ stderr,
+ "FATAL ERROR: Your program was compiled with SimGrid version %d.%d.%d, "
+ "and then linked against SimGrid %d.%d.%d. \n"
+ "One of them is a development version, and should not be mixed with the stable release. Please fix this.\n",
+ lib_version_major, lib_version_minor, lib_version_patch, SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR,
+ SIMGRID_VERSION_PATCH);
+ abort();
+ }
+ fprintf(stderr,
+ "Warning: Your program was compiled with SimGrid version %d.%d.%d, "
+ "and then linked against SimGrid %d.%d.%d. Proceeding anyway.\n",
+ lib_version_major, lib_version_minor, lib_version_patch, SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR,
+ SIMGRID_VERSION_PATCH);
+ }
+}
+
+void sg_version_get(int* ver_major, int* ver_minor, int* ver_patch)
+{
+ *ver_major = SIMGRID_VERSION_MAJOR;
+ *ver_minor = SIMGRID_VERSION_MINOR;
+ *ver_patch = SIMGRID_VERSION_PATCH;
+}
+
+void sg_version()
+{
+ XBT_HELP("This program was linked against %s (git: %s), found in %s.", SIMGRID_VERSION_STRING, SIMGRID_GIT_VERSION,
+ SIMGRID_INSTALL_PREFIX);
+
+#if SIMGRID_HAVE_MC
+ XBT_HELP(" Model-checking support compiled in.");
+#else
+ XBT_HELP(" Model-checking support disabled at compilation.");
+#endif
+
+#if SIMGRID_HAVE_NS3
+ XBT_HELP(" ns-3 support compiled in.");
+#else
+ XBT_HELP(" ns-3 support disabled at compilation.");
+#endif
+
+#if SIMGRID_HAVE_JEDULE
+ XBT_HELP(" Jedule support compiled in.");
+#else
+ XBT_HELP(" Jedule support disabled at compilation.");
+#endif
+
+#if SIMGRID_HAVE_LUA
+ XBT_HELP(" Lua support compiled in.");
+#else
+ XBT_HELP(" Lua support disabled at compilation.");
+#endif
+
+#if SIMGRID_HAVE_MALLOCATOR
+ XBT_HELP(" Mallocator support compiled in.");
+#else
+ XBT_HELP(" Mallocator support disabled at compilation.");
+#endif
+
+ XBT_HELP("\nTo cite SimGrid in a publication, please use:\n"
+ " Henri Casanova, Arnaud Giersch, Arnaud Legrand, Martin Quinson, Frédéric Suter. \n"
+ " Versatile, Scalable, and Accurate Simulation of Distributed Applications and Platforms. \n"
+ " Journal of Parallel and Distributed Computing, Elsevier, 2014, 74 (10), pp.2899-2917.\n"
+ "The pdf file and a BibTeX entry for LaTeX users can be found at http://hal.inria.fr/hal-01017319");
+}
+++ /dev/null
-/* src/simgrid/version.h - internal versioning info */
-
-/* Copyright (c) 2009-2019. 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 SIMGRID_VERSION_H
-#define SIMGRID_VERSION_H
-
-#define SIMGRID_GIT_VERSION "@GIT_VERSION@"
-
-#endif /* SIMGRID_PUBLIC_CONFIG_H */
#include "simgrid/instr.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
+#include "simgrid/version.h"
#include "smpi_comm.hpp"
#include "smpi_datatype_derived.hpp"
#include "smpi_status.hpp"
#include "simgrid/sg_config.hpp"
#include "src/kernel/resource/profile/FutureEvtSet.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
-#include "src/simgrid/version.h"
#include "src/surf/HostImpl.hpp"
#include "src/surf/xml/platf.hpp"
#include "src/xbt_modinter.h" /* whether initialization was already done */
return -1;
}
-void sg_version_check(int lib_version_major, int lib_version_minor, int lib_version_patch)
-{
- if ((lib_version_major != SIMGRID_VERSION_MAJOR) || (lib_version_minor != SIMGRID_VERSION_MINOR)) {
- fprintf(stderr, "FATAL ERROR: Your program was compiled with SimGrid version %d.%d.%d, "
- "and then linked against SimGrid %d.%d.%d. Please fix this.\n",
- lib_version_major, lib_version_minor, lib_version_patch, SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR,
- SIMGRID_VERSION_PATCH);
- abort();
- }
- if (lib_version_patch != SIMGRID_VERSION_PATCH) {
- if (SIMGRID_VERSION_PATCH > 89 || lib_version_patch > 89) {
- fprintf(
- stderr,
- "FATAL ERROR: Your program was compiled with SimGrid version %d.%d.%d, "
- "and then linked against SimGrid %d.%d.%d. \n"
- "One of them is a development version, and should not be mixed with the stable release. Please fix this.\n",
- lib_version_major, lib_version_minor, lib_version_patch, SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR,
- SIMGRID_VERSION_PATCH);
- abort();
- }
- fprintf(stderr, "Warning: Your program was compiled with SimGrid version %d.%d.%d, "
- "and then linked against SimGrid %d.%d.%d. Proceeding anyway.\n",
- lib_version_major, lib_version_minor, lib_version_patch, SIMGRID_VERSION_MAJOR, SIMGRID_VERSION_MINOR,
- SIMGRID_VERSION_PATCH);
- }
-}
-
-void sg_version_get(int* ver_major, int* ver_minor, int* ver_patch)
-{
- *ver_major = SIMGRID_VERSION_MAJOR;
- *ver_minor = SIMGRID_VERSION_MINOR;
- *ver_patch = SIMGRID_VERSION_PATCH;
-}
-
-void sg_version()
-{
- XBT_HELP("This program was linked against %s (git: %s), found in %s.", SIMGRID_VERSION_STRING, SIMGRID_GIT_VERSION,
- SIMGRID_INSTALL_PREFIX);
-
-#if SIMGRID_HAVE_MC
- XBT_HELP(" Model-checking support compiled in.");
-#else
- XBT_HELP(" Model-checking support disabled at compilation.");
-#endif
-
-#if SIMGRID_HAVE_NS3
- XBT_HELP(" ns-3 support compiled in.");
-#else
- XBT_HELP(" ns-3 support disabled at compilation.");
-#endif
-
-#if SIMGRID_HAVE_JEDULE
- XBT_HELP(" Jedule support compiled in.");
-#else
- XBT_HELP(" Jedule support disabled at compilation.");
-#endif
-
-#if SIMGRID_HAVE_LUA
- XBT_HELP(" Lua support compiled in.");
-#else
- XBT_HELP(" Lua support disabled at compilation.");
-#endif
-
-#if SIMGRID_HAVE_MALLOCATOR
- XBT_HELP(" Mallocator support compiled in.");
-#else
- XBT_HELP(" Mallocator support disabled at compilation.");
-#endif
-
- XBT_HELP("\nTo cite SimGrid in a publication, please use:\n"
- " Henri Casanova, Arnaud Giersch, Arnaud Legrand, Martin Quinson, Frédéric Suter. \n"
- " Versatile, Scalable, and Accurate Simulation of Distributed Applications and Platforms. \n"
- " Journal of Parallel and Distributed Computing, Elsevier, 2014, 74 (10), pp.2899-2917.\n"
- "The pdf file and a BibTeX entry for LaTeX users can be found at http://hal.inria.fr/hal-01017319");
-}
void surf_init(int *argc, char **argv)
{
set(SIMGRID_SRC
src/simgrid/Exception.cpp
src/simgrid/sg_config.cpp
+ src/simgrid/sg_version.cpp
src/simgrid/util.hpp
)
)
set(source_of_generated_headers
include/simgrid/config.h.in
+ include/simgrid/version.h.in
src/internal_config.h.in
- src/simgrid/version.h.in
include/smpi/mpif.h.in)
### depend of some variables setted upper