Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill obsolete parts of README.coding, move others to the doc
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 22 Mar 2018 21:02:14 +0000 (22:02 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 22 Mar 2018 22:17:14 +0000 (23:17 +0100)
ChangeLog
README.coding
doc/doxygen/inside.doc
doc/doxygen/inside_doxygen.doc

index bf2c8c4..6bbdebc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,9 @@ SimGrid (3.19.1) Released March 22 2018
  interfaces and converting them to snake_case() is one release goal of
  v3.20. But don't worry, we are working to smooth this upgrade path.
 
+ In summary, new projects should start with S4U to benefit of the
+ future, but old MSG projects should still be usable with no change.
+
 ----------------------------------------------------------------------------
 
 SimGrid (3.19) Released March 20 2018
index 4dd9610..52c72c3 100644 (file)
@@ -3,31 +3,6 @@
 **
 ******************************************************
 
-There is at least 5 sub-projects in the tree:
-
- - XBT: eXtended Bundle of Tools (low-level toolbox: logging, datatypes).
- - SURF: a SimUlation aRtiFact. This is the simulation kernel.
- - MSG:  originally MetaSimGrid, MSG is a simple distributed application
-         simulator.
- - SMPI: Simulated MPI, to run MPI application using emulation technics;
- - MC: model-checker;
- - SIMIX: basix interface for simulated processes. This layer defines simcalls
-   (simulation calls) exposed to the simulated processes by the SIMIX "kernel".
-   This interface is used to implement the MSG, SMPI layers.
- - SIMDAG;
-
-They are all in the same tree because they are complementary tools and
-having all of them in the same package makes the installation easier
-for end-users. Moreover, it enables to share the compilation chain and
-eases the development.
-
-The tree is not split on projects, but on file finality:
- include/            -> all *public* headers
- include/xbt/*.h     -> one file per module
-
- src/include -> another location for protected headers. Used by SURF, and
-                other should be converted, since this is the Right Thing.
-
  examples/ -> Supposed to be copy/pastable by the user, so keep it clear and
                 avoid any kind of trick. In particular, do only include the
                 public headers here.
@@ -38,20 +13,6 @@ The tree is not split on projects, but on file finality:
                unusual behaviors. All tests written in this section
                should leverage our tesh(1) utility.
 
-**
-** Indentation standard
-**
-*****************************************************
-
-Most files use the Kernighan & Ritchie coding style with 2 spaces of
-indentation. The indent program can help you to stick to it:
-
-indent -kr -l120 -nut -i2 -lps -npcs -br -brs -ce -cdw -bbo -npsl <myfile>
-
-The script ./tools/internal/indent runs indent with the appropriate options.
-
-If you use Eclipse, please import the settings in ./tools/internal/eclipse-formating.xml
-
 **
 ** Type naming standard
 **
@@ -83,30 +44,6 @@ is private.
 If you see any part of the code not following this convention, this is a
 bug. Please report it (or fix it yourself if you can).
 
-**
-** Random bits about coding standards and portability
-**
-*****************************************************
-
-MALLOC
- Don't use it, or you'll have to check the result (and do some dirty stuff
- on AIX). Use xbt_malloc (or even better, xbt_new) instead.
-
-SIZE_T (FIXME: obsolete?)
- If possible, avoid size_t and use unsigned long instead. If not,
- #include <sys/types.h> in all files manipulating size_t
- do cast it to unsigned long before printing (and use %lu),
- or use %zu.
-
-INTEGERS
- Please avoid to use long ints.  This is the source of many compatibility
- problems between 32 bits and 64 bits archs.  Either use plain ints (generally
- 32 bits wide) or long long ints (64 bits wide, at least).  At last resort
- consider using integer types defined in C99 by <stdint.h>.
-
-PRINTF pointer difference (FIXME: advertise %td instead?)
- printf ("diff = %ld\n", (long) (pointer2 - pointer1));
-
 **
 ** Commenting the source: doxygen
 **
@@ -129,78 +66,10 @@ The documentation of each function must be in the C file were it lives.
 
 Any public element (function, type and macro) must have a @brief part.
 
-**
-** XBT virtualization mechanism (FIXME: this section is deprecated)
-**
-****************************************************
-
-There is some functionalities that we want to virtualize in XBT. We
-want xbt_time to give the simulated clock when running on top of the
-simulator, and the host clock when running on a real system. This
-could be placed in GRAS (and was, historically), but there is some
-reason to lower it down to XBT.
-
-Here is the used naming scheme:
-
-  - xbt_<module>_<func>(): functions working both in SG and RL
-  - xbt_os_<module>_<func>(): RL functions usable even in simulator
-
-    That way, in libsimgrid, we still can use native functions if we
-    want to. It may for example be useful to get the real time when
-    implementing the simulator. Think of the SIGINT handler, which
-    wants to see if the user pressed the key twice in a 5 seconds
-    interval. This is of little use to check the simulated time here.
-
-Here is the file layout:
-
-  - xbt_rl_<module>.c: native implementation (xbt_<module>_<func>()).
-    Simply call the corresponding xbt_os_<module>_<func>.
-    Part only of libgras.so
-
-  - xbt_sg_<module>.c: SIMIX implementation xbt_<module>_<func>()).
-    Simply call the corresponding SIMIX implementation.
-    Part only of libsimgrid.so
-
-  - xbt_os_<module>.c: body of the functions implementing natively the
-    stuff (xbt_os_<module>_<func>()).
-    Part of both libgras.so and libsimgrid.so
-
-Since there is almost nothing in xbt_rl_module.c and xbt_sg_module.c,
-it'd be better to use symbol aliasing here (to declare in the object
-code that the same function have two names), but I'm still
-investigating the portability of the thing to windows.
-
 
 *
 * SimGrid Hacker Survival Guide (FIXME: should be betterly placed)
 ********************************
-
-* Before pushing any change, don't forget to check if the compilation
-  passes with compiler optimizations and warnings turned on:
-      cmake -Denable_compile_optimizations=ON \
-            -Denable_compile_warnings=ON
-
-* Your commit message should follow the git habits, explained eg here:
-  http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
-
 * When you add/remove files, and/or make changes in the lists of files to build,
   please check that "make distcheck" still succeeds.  This is needed to ensure
   that the generated archive is consistent.
-
-* If you want to debug memory allocation problems, here are a few hints:
-  - disable compiler optimizations, to have better backtraces;
-  - disable the mallocators, or it will be hard to match malloc's with
-    free's;
-  - disable model checking, unless your problem lies in the model
-    checker part of SimGrid (MC brings its own malloc implementation,
-    which valgrind doesn't understand).
-  All this is configured with:
-      cmake -Denable_model-checking=OFF \
-            -Denable_mallocators=OFF \
-            -Denable_compile_optimizations=OFF
-
-* If you break the logs (for example while hacking in the dynars), you
-  want to define XBT_LOG_MAYDAY at the beginning of log.h. It will
-  deactivate the whole logging mechanism, switching to printfs
-  instead. SimGrid becomes incredibly verbose when doing so, but it
-  you let you fixing the dynars.
index 0ef01a8..a5c2591 100644 (file)
@@ -1,25 +1,21 @@
 /*! @page uhood_tech Coding Standard and Technical Considerations
 
+This page describes the software infrastructure behind the SimGrid
+project. This is not the components' organisation (described in @ref
+uhood_arch) but informations on how to extend the framework, how the
+automatic tests are run, and so on. These informations are split on
+several pages, as follows:
 
-There is two main things you want to know about the internals of
-SimGrid. First, you need to understand the component organization, as
-SimGrid is heavily layered, with each level being rather highly
-specialized and optimized toward a task. For that, please head to 
-@ref uhood_arch. 
-
-Then, if you work actively on the SimGrid project, the second point
-you need to understand is about the infrastructure of the SimGrid
-project, ie how to extend the framework in any way, how the automatic
-tests are run, and so on. These informations are split on several
-pages, as follows:
-
+ - @ref uhood_tech_inside
  - @subpage inside_tests
  - @subpage inside_doxygen
  - @subpage inside_extending
  - @subpage inside_cmake
  - @subpage inside_release
 
-@section uhood_tech_config Insider's Configuration
+@section uhood_tech_inside Insiders Considerations
+
+@subsection uhood_tech_inside_config Extra configuration
 
 The default build configuration of SimGrid fits the user needs, but
 they are not adapted to the ones actually working on SimGrid. See @ref
@@ -37,7 +33,28 @@ we don't want to bother them with compiler warnings (that abort the
 build in SimGrid), but any insider must turn this option on, or your
 code will be refused from the main repository.
 
-@section uhood_tech_codstand Automatically Enforcing our Coding Standards
+@verbatim
+    cmake -Denable_compile_optimizations=OFF \
+          -Denable_compile_warnings=ON .
+@endverbatim
+
+@subsection uhood_tech_inside_commit Interacting with git
+
+During the Gran Refactoring to SimGrid4, things are evolving rather
+quickly, and some changes impact a large amount of files. You should
+thus not have long-standing branches, because they will rot very
+quickly and you will suffer to merge them back. Instead, you should
+work as much as possible with incremental changes that do not break
+things, and get them directly in master.
+
+Your commit message should follow the git habits, explained in this
+<a href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html">blog
+post</a>, or in the 
+<a href="https://github.com/atom/atom/blob/master/CONTRIBUTING.md#git-commit-messages">
+git styleguide of Atom</a>.
+
+  
+@subsection uhood_tech_inside_codstand Automatically Enforcing our Coding Standards
  
 If you plan to commit code to the SimGrid project, you definitely need
 to install the relevant tool to ensure that your changes follow our
@@ -45,7 +62,7 @@ coding standards:
 
 @verbatim
 # install clang-format
-sudo apt-get install clang-format-3.8 # debian
+sudo apt-get install clang-format-3.9 # debian
 
 # tell git to call the script on each commit
 ln -s $(realpath tools/git-hooks/clang-format.pre-commit) .git/hooks/pre-commit
@@ -60,7 +77,7 @@ to find the exact command with git-apply to fix your formating.
 If you find that for a specific commit, the formatter does a very bad
 job, then add --no-verify to your git commit command line.
 
-@section uhood_tech_tricks Insider tricks
+@subsection uhood_tech_tricks Random Tricks
 
 Over the years, we accumulated a few tricks that make it easier to
 work with SimGrid. Here is a somewhat unsorted list of such tricks.
@@ -81,9 +98,9 @@ each build/ subdir to test each of them separately.
 
 It is easy to break one build configuration or another. That's
 perfectly OK and we will not point fingers if it happens. But it is
-somewhat forbidden to leave the tree broken for a long while. Monitor
-the build daemons after you push something, and strive to fix any
-breakage ASAP.
+somewhat forbidden to leave the tree broken for more than one working
+day. Monitor the build daemons after you push something, and strive to
+fix any breakage ASAP.
 
 To easily switch between the configs without rebuilding everything,
 create a set of out of tree builds (as explained in @ref
@@ -107,4 +124,25 @@ after all).
 
 Note that the links sometimes broken by git or others. Relaunching
 `make hardlinks` may help if you're getting incoherent build results.
+
+### Unsorted hints
+
+* If you want to debug memory allocation problems, here are a few hints:
+  - disable compiler optimizations, to have better backtraces;
+  - disable the mallocators, or it will be hard to match malloc's with free's;
+  - disable model checking, unless your problem lies in the model
+    checker part of SimGrid (MC brings its own malloc implementation,
+    which valgrind does not really love).
+    All this is configured with:
+
+    cmake -Denable_model-checking=OFF 
+          -Denable_mallocators=OFF 
+         -Denable_compile_optimizations=OFF .
+
+* If you break the logs, you want to define XBT_LOG_MAYDAY at the
+  beginning of log.h. It deactivates the whole logging mechanism,
+  switching to printfs instead. SimGrid becomes incredibly verbose
+  when doing so, but it you let you fixing things.
+
+
 */
index 0aadd25..4758cfa 100644 (file)
@@ -3,11 +3,9 @@
 
 \tableofcontents
 
-We use doxygen for our documentation. This tool is sometimes annoying
-but that's the best we've found so far. Remember, we all bitch about
-doxygen, but at the end of the day, it kinda delivers what we need. So
-stop bitching about the doc or the tools, and start improving the
-documentation text itself.
+We use doxygen for our documentation. It's annoying but that's the
+best we've found so far. Stop bitching about the doc or the tools, and
+start improving the documentation text itself.
 
 Good documentation is rare and there is not much project of which we
 can get inspiration. The best exception I know is TikZ and
@@ -216,8 +214,8 @@ make pdf # the result is in doc/latex/simgrid_documentation.pdf
 Once you're satisfyied with the result, refreshing the documentation
 on the web pages is very easy, as shown below. A few permission errors
 are ok, unfortunately. We should improve things here, but I'm not sure
-of how. A funny thing is that this make target is also provided in the
-archives we distribute to the users, but I guess that it's harmless :)
+of how. This @c make target is also provided in the archives we
+distribute to the users, but I guess that it's harmless :)
 
 @verbatim
 make sync-gforge-doc