Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into MC_LTL
[simgrid.git] / doc / installSimgrid.doc
index bf1f621..46cfd83 100644 (file)
@@ -2,7 +2,7 @@
 
 \htmlinclude .installSimgrid.doc.toc
 
-\section installSimgrid_cmake Installing the SimGrid library with Cmake (since V3.4)
+\section installSimgrid_cmake Installing the SimGrid library
 
 \subsection installSimgrid_intro Some generalitty
 
@@ -29,7 +29,6 @@ For Windows :
   \li cmake 2.8 <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
   \li perl strawberry <a href="http://www.strawberryperl.com/download/5.12.2.0/strawberry-perl-5.12.2.0.msi">(download page)</a>
   \li git <a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">(download page)</a>
-  \li SimGrid Installer <a href="https://gforge.inria.fr/frs/?group_id=12">(download page)</a>
   
 \subsubsection installSimgrid_cmakeoption1 Liste of options
 
@@ -42,7 +41,6 @@ For Windows :
        enable_compile_warnings         ON/OFF or TRUE/FALSE or 1/0
        enable_smpi                     ON/OFF or TRUE/FALSE or 1/0
        enable_maintainer_mode          ON/OFF or TRUE/FALSE or 1/0
-       enable_supernovae               ON/OFF or TRUE/FALSE or 1/0
        enable_tracing                  ON/OFF or TRUE/FALSE or 1/0
        enable_coverage                 ON/OFF or TRUE/FALSE or 1/0
        enable_memcheck                 ON/OFF or TRUE/FALSE or 1/0
@@ -51,10 +49,11 @@ For Windows :
        enable_jedule                   ON/OFF or TRUE/FALSE or 1/0
        enable_latency_bound_tracking   ON/OFF or TRUE/FALSE or 1/0
        enable_lib_static               ON/OFF or TRUE/FALSE or 1/0
-       enable_pcre                     ON/OFF or TRUE/FALSE or 1/0
        custom_flags                    <flags>
        gtnets_path                     <path_to_gtnets_directory>
        CMAKE_INSTALL_PREFIX            <path_to_install_directory>
+       CMAKE_C_COMPILER                <path_to_compiler>
+       CMAKE_CXX_COMPILER              <path_to_compiler>
        pipol_user                      <pipol_username>
 \endverbatim
                                                                                                                                                           
@@ -72,8 +71,6 @@ For Windows :
 
   \li enable_maintainer_mode : set to true it remakes some files. 
 
-  \li enable_supernovae : set to true make one file for each lib and compile with those generated files.
-
   \li enable_tracing : To enable the generation of simulation traces for visualization.
 
   \li enable_coverage : When set to true this option enable code coverage by setting -fprofile-arcs -ftest-coverage flags.
@@ -88,9 +85,7 @@ For Windows :
   
   \li enable_latency_bound_tracking : Set to on if you want to be warned when communications are limited by round trip time.
   
-  \li enable_lib_static : Enable generated Simgrid and smpi static libraries.
-  
-  \li enable_pcre : Use or not the pcre lib for memory optimization.   
+  \li enable_lib_static : Enable generated Simgrid and smpi static libraries.  
   
   \li custom_flags : If user wants to use a specific flag during compilation, give here.
 
@@ -98,6 +93,10 @@ For Windows :
 
   \li CMAKE_INSTALL_PREFIX : Path where are installed lib/ doc/ and include/ directories (ex /usr/local)
   
+  \li CMAKE_C_COMPILER : Change the c compiler.
+  
+  \li CMAKE_CXX_COMPILER : Change the c++ compiler. 
+  
   \li pipol_user : specify your pipol username if you want to use the pipol-remote command.
 
 \subsubsection installSimgrid_cmakeoption3 Initialisation
@@ -108,11 +107,9 @@ Those options are initialized the first time you launch "cmake ." whithout speci
 enable_gtnets                  on
 enable_lua                     on
 enable_smpi                    on
-enable_supernovae              on
 enable_tracing                 on
 enable_compile_optimizations   on
 enable_debug                   on
-enable_pcre                    on
 enable_compile_warnings                off
 enable_maintainer_mode         off
 enable_coverage                off
@@ -220,9 +217,11 @@ If you want to test before make a commit you can simply make "ctest -D Experimen
 
 \subsection installSimgrid_cmakeinstall How to install with cmake?
 
-\subsubsection installSimgrid_cmakeinstall1 From svn
+\subsubsection installSimgrid_cmakeinstall1 From Git
 
 \verbatim
+git clone git://scm.gforge.inria.fr/simgrid/simgrid.git simgrid
+cd simgrid
 cmake -Denable_maintainer_mode=on -DCMAKE_INSTALL_PREFIX=/home/navarrop/Bureau/install_simgrid ./
 make 
 make install
@@ -231,14 +230,12 @@ make install
 \subsubsection installSimgrid_cmakeinstall2 From a distrib
 
 \verbatim
-For version 3.4.1 and 3.4
-       cmake -Dprefix=/home/navarrop/Bureau/install_simgrid ./
-       make
-       make install-simgrid
-Since version 3.5
-       cmake -DCMAKE_INSTALL_PREFIX=/home/navarrop/Bureau/install_simgrid ./
-       make
-       make install
+wget https://gforge.inria.fr/frs/download.php/28674/simgrid-3.6.1.tar.gz
+tar xf simgrid-3.6.1.tar.gz
+cd simgrid-3.6.1
+cmake -DCMAKE_INSTALL_PREFIX=/home/navarrop/Bureau/install_simgrid ./
+make
+make install
 \endverbatim
 
 
@@ -288,146 +285,83 @@ set(JMSG_JAVA_SRC
 )
 \endverbatim
 
+\section installSimgrid_Win Installing the SimGrid library with Windows pakage
 
-\section installSimgrid_installation Installing the SimGrid library with Autotools (valid until V3.3.4)
+\subsection installSimgrid_Win_install Installing SimGrid
 
-Many people have been asking me questions on how to use SimGrid. Quite
-often, the questions were not really about SimGrid but on the
-installation process. This section is intended to help people that are
-not familiar with compiling C files under UNIX. If you follow these
-instructions and still have some troubles, drop an e-mail to
-<simgrid-user@lists.gforge.inria.fr>.
+Before start the installation, you need to be sure to have the following dependencies:
+  \li cmake 2.8 <a href="http://www.cmake.org/cmake/resources/software.html">(download page)</a>
+  \li perl strawberry <a href="http://www.strawberryperl.com/download/5.12.2.0/strawberry-perl-5.12.2.0.msi">(download page)</a>
+  \li git <a href="http://msysgit.googlecode.com/files/Git-1.7.4-preview20110204.exe">(download page)</a>
+  
+Then download the package <a href="https://gforge.inria.fr/frs/?group_id=12">SimGrid Installer</a>,
+execute it and follow instructions.
 
-\subsection installSimgrid_compiling Compiling SimGrid from a stable archive
+\htmlonly
+<a href="win_install_01.png" border=0><img src="win_install_01.png" border=0></a>
+\endhtmlonly
 
-First of all, you need to download the latest version of SimGrid from 
-<a href="http://gforge.inria.fr/frs/?group_id=12">here</a>.
-Suppose you have uncompressed SimGrid in some temporary location of
-your home directory (say <tt>/home/joe/tmp/simgrid-3.0.1 </tt>). The
-simplest way to use SimGrid is to install it in your home
-directory. Change your directory to
-<tt>/home/joe/tmp/simgrid-3.0.1</tt> and type
+Step 1: Accept the license. 
 
-\verbatim
-./configure --prefix=$HOME
-make
-make install
-\endverbatim
+\htmlonly
+<a href="win_install_02.png" border=0><img src="win_install_02.png" border=0></a>
+\endhtmlonly
 
-If at some point, something fails, check the <a href="http://simgrid.gforge.inria.fr/doc/faq.html#faq_trouble_compil">FAQ section</a>. .
-If it does not help, you can report this problem to the
-list but, please, avoid sending a laconic mail like "There is a problem. Is it
-okay?". Send the config.log file which is automatically generated by
-configure. Try to capture both the standard output and the error output of the
-<tt>make</tt> command with <tt>script</tt>. There is no way for us to help you
-without the relevant bits of information.
+Step 2: Select packets to install.
 
-Now, the following directory should have been created : 
+\htmlonly
+<a href="win_install_03.png" border=0><img src="win_install_03.png" border=0></a>
+\endhtmlonly
 
-      \li <tt>/home/joe/doc/simgrid/html/</tt>
-      \li <tt>/home/joe/lib/</tt>
-      \li <tt>/home/joe/include/</tt>
+Step 3: Choice where to install packets previously selected. Please don't use spaces in path.
+\htmlonly
+<a href="win_install_04.png" border=0><img src="win_install_04.png" border=0></a>
+\endhtmlonly
 
-SimGrid is not a binary, it is a library. Both a static and a dynamic
-version are available. Here is what you can find if you try a <tt>ls
-/home/joe/lib</tt>:
+Step 4: Restart your computer to take in consideration environment variables.
 
-\verbatim libsimgrid.a libsimgrid.la libsimgrid.so libsimgrid.so.0 libsimgrid.so.0.0.1
-\endverbatim
+\subsection installSimgrid_Win_compile1 Compile a project "HelloWorld"
 
-Thus, there is two ways to link your program with SimGrid:
-      \li Either you use the static version, e.g 
-\verbatim gcc libsimgrid.a -o MainProgram MainProgram.c
-\endverbatim
-          In this case, all the SimGrid functions are directly
-          included in <tt>MainProgram</tt> (hence a bigger binary).
-      \li Either you use the dynamic version (the preferred method)
-\verbatim gcc -lsimgrid -o MainProgram MainProgram.c
-\endverbatim
-          In this case, the SimGrid functions are not included in
-          <tt>MainProgram</tt> and you need to set your environment
-          variable in such a way that <tt>libsimgrid.so</tt> will be
-          found at runtime. This can be done by adding the following
-          line in your .bashrc (if you use bash and if you have
-          installed the SimGrid libraries in your home directory):
-\verbatim export LD_LIBRARY_PATH=$HOME/lib/:$LD_LIBRARY_PATH
+In the SimGrid install directroy you should have an HelloWorld project to explain you how to start 
+compiling a source file. There are:
+\verbatim
+- HelloWorld.c         The example source file.
+- CMakeLists.txt       It allows to configure the project.
+- FindPCRE.cmake       This finds and links to the pcre library (Normally included into Simgrid directory "GnuWin32").
+- README               This explaination.
 \endverbatim
 
-\subsection installSimgrid_compiling_snapshoot SimGrid development snapshots
-
-We have very high standards on software quality, and we are reluctant releasing
-a stable release as long as there is still some known bug in the code base. In
-addition, we added quite an extensive test base, making sure that we correctly
-test the most important parts of the tool. 
-
-As an unfortunate conclusion, there may be some time between the stable
-releases. If you want to benefit from the most recent features we introduced,
-but don't want to take the risk of an untested version from the SVN, then
-development snapshots are done for you. 
-
-These are pre-releases of SimGrid that still fail some tests about features
-that almost nobody use, or on platforms not being in our core target (which is
-Linux, Mac, other Unixes and Windows, from the most important to the less
-one). That means that using this development releases should be safe for most
-users. 
-
-These archives can be found on 
-<a href="http://www.loria.fr/~quinson/Research/SimGrid/">this web page</a>. Once you 
-got the lastest archive, you can compile it just like any archive (see above).
-
-\subsection installSimgrid_compiling_svn Compiling SimGrid from the SVN
-
-The project development takes place in the SVN, where all changes are
-committed when they happen. Then every once in a while, we make sure that the
-code quality meets our standard and release an archive from the code in the
-SVN. We afterward go back to the development in the SVN. So, if you need a
-recently added feature and can afford some little problem with the stability
-of the lastest features, you may want to use the SVN version instead of a
-released one.
-
-For that, you first need to get the "simgrid" module from
-<a href="http://gforge.inria.fr/scm/?group_id=12">here</a>. 
-
-You won't find any <tt>configure</tt> and a few other things
-(<tt>Makefile.in</tt>'s, documentation, ...) will be missing as well. The
-reason for that is that all these files have to be regenerated using the
-latest versions of <tt>autoconf</tt>, <tt>libtool</tt>, <tt>automake</tt>
-(>1.9) and <tt>doxygen</tt> (>1.4). To generate the <tt>configure</tt> and
-the <tt>Makefile.in</tt>'s, you just have to launch the <tt>bootstrap</tt>
-command that resides in the top of the source tree. Then just follow the
-instructions of Section \ref installSimgrid_compiling.
-
-We insist on the fact that you really need the latest versions of
-autoconf, automake and libtool. Doing this step on exotic architectures/systems
-(i.e. anything different from a recent linux distribution) may be
-... uncertain. If you need to compile the SVN version on a machine where all these
-dependencies are not met, the easiest is to do <tt>make dist</tt> in the SVN
-directory of another machine where all dependencies are met. It will create an
-archive you may deploy on other sites just as a regular stable release.
-
-In summary, the following commands will checkout the SVN, regenerate the
-configure script and friends, configure SimGrid and build it.
-
-\verbatim svn checkout svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk simgrid
-cd simgrid
-./bootstrap
-./configure --enable-maintainer-mode --prefix=<where to install SimGrid>
-make \endverbatim
-
-Then, if you want to install SimGrid on the current box, just do:
-\verbatim make install \endverbatim
-
-If you want to build an snapshot of the SVN to deploy it on another box (for
-example because the other machine don't have the autotools), do:
-\verbatim make dist \endverbatim
-
-Moreover, you should never call the autotools manually since you must run
-them in a specific order with specific arguments. Most of the times, the
-makefiles will automatically call the tools for you. When it's not possible
-(such as the first time you checkout the SVN), use the ./bootstrap command
-to call them explicitly.
+Now let's compil this example:
+\li Run "Git bash" (installed with git) or windows shell "cmd".
+\li Open HelloWorld Directory ('cd' command line).
+\li Create a build directory and change directory. (optional)
+\li Type 'cmake -G"Unix Makefiles" \<path_to_HelloWorld_project\>'
+\li Run gmake
+\li You should obtain a runnable example ("HelloWorld.exe").
+
+For compiling your own code you can simply copy the HelloWorld project and rename source name. It will
+create a target with the same name of the source. 
+
+\subsection installSimgrid_Win_compile2 How to add and compile a new example
+
+\li Put your source file into the helloWord directory.
+\li Edit CMakeLists.txt by removing the Find Targets section and add those two lines into this section
+\verbatim 
+################
+# FIND TARGETS #
+################
+add_executable(TARGET_NAME SOURCES)            #It creates a target called 'TARGET_NAME.exe' with the sources 'SOURCES'
+target_link_libraries(TARGET_NAME simgrid pcre) #Links TARGET_NAME with simgrid and pcre
+\endverbatim   
+\li To initialize and build your project, you'll need to run
+\verbatim
+cmake -G"Unix Makefiles" \<path_to_HelloWorld_project\>
+\endverbatim
+\li Run "gmake"
+\li You should obtain "TARGET_NAME.exe".
 
-\subsection installSimgrid_setting_MSG Setting up your own MSG code
+\section installSimgrid_setting_MSG Setting up your own MSG code
 
 Do not build your simulator by modifying the SimGrid examples.  Go
 outside the SimGrid source tree and create your own working directory
@@ -506,7 +440,7 @@ in a terminal : <tt>info make</tt> and read the introduction. The
 previous example should be enough for a first try but you may want to
 perform some more complex compilations...
 
-\subsection installSimgrid_setting_GRAS Setting up your own GRAS code
+\section installSimgrid_setting_GRAS Setting up your own GRAS code
 
 If you use the GRAS interface instead of the MSG one, then previous section
 is not the better source of information. Instead, you should check the GRAS