Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update the documentation about installing simgrid.
authorNavarrop <Pierre.Navarro@imag.fr>
Fri, 16 Sep 2011 15:36:02 +0000 (17:36 +0200)
committerNavarrop <Pierre.Navarro@imag.fr>
Fri, 16 Sep 2011 15:38:01 +0000 (17:38 +0200)
Add Windows part.
Remove svn for git.

doc/HelloWorld/CMakeLists.txt
doc/installSimgrid.doc

index 6fd3310..52afb5b 100644 (file)
@@ -37,11 +37,6 @@ RELATIVE ${CMAKE_HOME_DIRECTORY}/
 )
 string(REPLACE ".c" "" TARGET_NAME ${SOURCE_FILE})
 
-#########################
-# add_executable        #
-#    args1 target name  #
-#    args2 sources      #
-#########################
 foreach(target "${TARGET_NAME}")
     add_executable(${target} "${target}.c")
     message(STATUS "source_file: ${target}.c")
index 033d6b4..7a7987f 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
 
@@ -226,9 +225,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
@@ -237,14 +238,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
 
 
@@ -294,146 +293,59 @@ 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>.
-
-\subsection installSimgrid_compiling Compiling SimGrid from a stable archive
+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.
 
-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
+\subsection installSimgrid_Win_compile1 Compile a project "HelloWorld"
 
+In the SimGrid install directroy you should have an HelloWorld project to explain you how to start 
+compiling a source file. There are:
 \verbatim
-./configure --prefix=$HOME
-make
-make install
-\endverbatim
-
-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.
-
-Now, the following directory should have been created : 
-
-      \li <tt>/home/joe/doc/simgrid/html/</tt>
-      \li <tt>/home/joe/lib/</tt>
-      \li <tt>/home/joe/include/</tt>
-
-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>:
-
-\verbatim libsimgrid.a libsimgrid.la libsimgrid.so libsimgrid.so.0 libsimgrid.so.0.0.1
+- 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
 
-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
+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_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.
-
-\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
@@ -512,7 +424,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