X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c5ad8ca1a68bbaa9152471c8d0eeb99d762f0d86..184f7cbedd7496fb81e192e78f7beae87f942ee5:/doc/install.doc
diff --git a/doc/install.doc b/doc/install.doc
index adc5f5f063..8c084e8636 100644
--- a/doc/install.doc
+++ b/doc/install.doc
@@ -1,4 +1,4 @@
-/*! \page install Install Simgrid
+/*! \page install Installing Simgrid
\htmlinclude .install.doc.toc
@@ -12,7 +12,7 @@ CMake is a family of tools designed to build, test and package software. CMake i
\subsubsection install_intro2 Why cmake?
-CMake permits to developers to compil projects on different plateforms. Then many tools are embedded like ctest for making test, a link to cdash for vizualise results but also test coverage and bug reports.
+CMake permits to developers to compil projects on different plateforms. Then many tools are embedded like ctest for making test, a link to cdash for vizualise results but also test coverage and bug reports.
\subsubsection install_intro3 What cmake need?
@@ -25,18 +25,35 @@ For Unix and MacOS:
\li ccmake for graphical used of CMake
\li cmake (download page)
+On MacOSX some users reported that it is still possible to build with clang, provided that you
+use at least clang3.0 installed with macport or with xcode. If it fails on you, try to
+ use gcc47.
+\verbatim
+port install clang-3.0
+port install gcc47
+\endverbatim
+
For Windows :
\li cmake 2.8 (download page)
\li MinGW (download page)
\li perl (download page)
\li git (download page)
-
+
+Note that if you want change the compiler, you can simply specify the environment variables CC and CXX.
+\verbatim
+ export CC=gcc-4.4
+ export CXX=g++-4.4
+ export CC=clang
+ export CXX=clang++
+\endverbatim
+
\subsubsection install_cmakeoption1 Liste of options
\verbatim
"cmake -D[name]=[value] ... ./"
[name] enable_gtnets [value] ON/OFF or TRUE/FALSE or 1/0
+ enable_ns3 ON/OFF or TRUE/FALSE or 1/0
enable_lua ON/OFF or TRUE/FALSE or 1/0
enable_compile_optimizations ON/OFF or TRUE/FALSE or 1/0
enable_compile_warnings ON/OFF or TRUE/FALSE or 1/0
@@ -50,18 +67,21 @@ 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
- custom_flags
+ enable_supernovae ON/OFF or TRUE/FALSE or 1/0
+ enable_msg_deprecated ON/OFF or TRUE/FALSE or 1/0
+ enable_print_message ON/OFF or TRUE/FALSE or 1/0
gtnets_path
+ ns3_path
CMAKE_INSTALL_PREFIX
- CMAKE_C_COMPILER
- CMAKE_CXX_COMPILER
pipol_user
\endverbatim
-
+
\subsubsection install_cmakeoption2 Options explaination
\li enable_gtnets : set to true implie that user wants to use gtnets.
+ \li enable_ns3 : set to true implie that user wants to use ns3.
+
\li enable_lua : set to true implie that user wants to add lua langage into simgrid compilation.
\li enable_compile_optimizations : add flags "-O3 -finline-functions -funroll-loops -fno-strict-aliasing"
@@ -70,7 +90,7 @@ For Windows :
\li enable_smpi : Set to true if you want to use smpi lib. Actually on simgrid v3.4.1 Mac doesn't support lib smpi.
- \li enable_maintainer_mode : set to true it remakes some files.
+ \li enable_maintainer_mode : set to true it remakes some files.
\li enable_tracing : To enable the generation of simulation traces for visualization.
@@ -81,23 +101,25 @@ For Windows :
\li enable_model-checking : Enable the model checking when set to true.
\li enable_debug : If enable_debug is set to 'off' Simgrid compil flag has '-DNDEBUG' option.
-
- \li enable_jedule : To enable jedule mode, which creates visualizations of task schedules with Simdag.
-
+
+ \li enable_jedule : To enable jedule mode, which creates visualizations of task schedules with Simdag.
+
\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 custom_flags : If user wants to use a specific flag during compilation, give here.
+
+ \li enable_lib_static : Enable generated Simgrid and smpi static libraries.
+
+ \li enable_supernovae : Set to true make one file for each lib and compile with those generated files.
+
+ \li enable_msg_deprecated : Simgrid is compiled with msg deprecated functions.
+
+ \li enable_print_message : When set to true configuration print more debug output.
\li gtnets_path : Path to gtnets install directory (ex /usr)
+ \li ns3_path : Path to ns3 install directory (ex /usr)
+
\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 install_cmakeoption3 Initialisation
@@ -117,17 +139,16 @@ enable_coverage off
enable_memcheck off
enable_model-checking off
enable_jedule off
-enable_latency_bound_tracking off
+enable_latency_bound_tracking off
enable_lib_static off
CMAKE_INSTALL_PREFIX /usr/local
-custom_flags null
gtnets_path null
pipol_user null
\endverbatim
\subsubsection install_cmakeoption4 Option's cache and how to reset?
-When options have been set they are keep into a cache file named "CMakeCache.txt". So if you want
+When options have been set they are keep into a cache file named "CMakeCache.txt". So if you want
reset values you just delete this file located to the project directory.
\subsection install_cmakecompilation Cmake compilation
@@ -190,7 +211,7 @@ ming32-make buill all targets for windows
(g)make VERBOSE=1 build all targets and print build command lines
make check test all targets and summarize
make dist make the distrib
-make distcheck check the dist (make + make dist + make check)
+make distcheck check the dist (make + make dist + make check)
(g)make install install the project (doc/ bin/ lib/ include/)
(g)make uninstall uninstall the project (doc/ bin/ lib/ include/)
(g)make clean clean all targets
@@ -208,7 +229,7 @@ ctest -D Continuous(Test|Coverage|MemCheck|Submit)
ctest -D Experimental
ctest -D Experimental(Start|Update|Configure|Build)
ctest -D Experimental(Test|Coverage|MemCheck|Submit)
-ctest -D Nightly
+ctest -D Nightly
ctest -D Nightly(Start|Update|Configure|Build)
ctest -D Nightly(Test|Coverage|MemCheck|Submit)
ctest -D NightlyMemoryCheck
@@ -218,13 +239,13 @@ If you want to test before make a commit you can simply make "ctest -D Experimen
\subsection install_cmakeinstall How to install with cmake?
-\subsubsection install_cmakeinstall1 From Git.
+\subsubsection install_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
make install
\endverbatim
@@ -244,13 +265,13 @@ make install
\subsubsection install_cmakehowto1 Add an executable or examples.
-If you want make an executable you have to create a CMakeList.txt to the src directory.
+If you want make an executable you have to create a CMakeList.txt to the src directory.
You must specified where to create the executable, source list, dependencies and the name of the binary.
\verbatim
cmake_minimum_required(VERSION 2.6)
-set(EXECUTABLE_OUTPUT_PATH "./")
+set(EXECUTABLE_OUTPUT_PATH "./")
set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib")
add_executable(get_sender get_sender.c) #add_executable( )
@@ -259,7 +280,7 @@ add_executable(get_sender get_sender.c) #add_executable( )
\endverbatim
-Then you have to modified /buildtools/Cmake/MakeExeLib.cmake and add
+Then you have to modified /buildtools/Cmake/MakeExeLib.cmake and add
this line :
\verbatim
add_subdirectory(${CMAKE_HOME_DIRECTORY}/)
@@ -295,7 +316,7 @@ Before start the installation, you need to be sure to have the following depende
\li MinGW (download page)
\li perl (download page)
\li git (download page)
-
+
Then download the package SimGrid Installer,
execute it and follow instructions.
@@ -303,7 +324,7 @@ execute it and follow instructions.
\endhtmlonly
-Step 1: Accept the license.
+Step 1: Accept the license.
\htmlonly
@@ -316,16 +337,28 @@ Step 2: Select packets to install.
\endhtmlonly
Step 3: Choice where to install packets previously selected. Please don't use spaces in path.
-
+
\htmlonly
\endhtmlonly
-Step 4: Restart your computer to take in consideration environment variables.
+Step 4: Add CLASSPATH to environment variables.
+
+\htmlonly
+
+\endhtmlonly
+
+Step 5: Add PATH to environment variables.
+
+\htmlonly
+
+\endhtmlonly
+
+Step 6: Restart your computer to take in consideration environment variables.
\subsection install_Win_compile1 Compile a project "HelloWorld"
-In the SimGrid install directroy you should have an HelloWorld project to explain you how to start
+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.
@@ -343,19 +376,19 @@ Now let's compil this example:
\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.
+create a target with the same name of the source.
\subsection install_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
+\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
+\endverbatim
\li To initialize and build your project, you'll need to run
\verbatim
cmake -G"MinGW Makefiles" \
@@ -363,13 +396,29 @@ cmake -G"MinGW Makefiles" \
\li Run "mingw32-make"
\li You should obtain "TARGET_NAME.exe".
-\subsection install_Win_ruby Setup a virtualbox to use SimGrid-Ruby on windows
+\subsection install_Win_ruby Setup a virtualbox to use SimGrid-Ruby on windows
Allan Espinosa made these set of Vagrant rules available so that you
can use the SimGrid Ruby bindings in a virtual machine using
VirtualBox. Thanks to him for that. You can find his project here:
https://github.com/aespinosa/simgrid-vagrant
+\section install_mac Installing the SimGrid framework on Mac OS X
+
+The Mac OS X system is part of the UNIX familly, but it exibits some
+specificities that complicate a bit the build of SimGrid. Current
+versions of SimGrid (3.7.x) can only be build with the GCC Compiler,
+but recent OS X version provide only an ancient version of that tool
+in the hope to see the users switch to the LLVM compiler family. The
+problem is that SimGrid uses internal libraries of GCC, for stack
+manipulation for example. We are working on removing this dependency
+onto gcc to ease the build process, but this is still ongoing.
+
+For the time being, you need to get a recent version of GCC on your
+system to build SimGrid. Version 3.7.1 was successfully built on Mac
+Lion 10.7.4 using a GCC compiler retrieved from macport. The package
+used were gcc47, and the binary in the package were gcc-mp-4.7.
+
\section install_setting_MSG Setting up your own MSG code
Do not build your simulator by modifying the SimGrid examples. Go
@@ -388,7 +437,7 @@ feel free to organize it as you want).
\li sched.c: a C file including sched.h and
implementing the core of the scheduler. Most of these
functions use the MSG functions defined in section \ref
- msg_gos_functions.
+ msg_task_usage.
\li masterslave.c: a C file with the main function, i.e.
the MSG initialization (MSG_global_init()), the platform
@@ -402,7 +451,7 @@ Makefile. It is a generic Makefile that we have used many times with
our students when we teach the C language.
\verbatim
-all: masterslave
+all: masterslave
masterslave: masterslave.o sched.o
INSTALL_PATH = $$HOME
@@ -413,17 +462,17 @@ PEDANTIC_PARANOID_FREAK = -O0 -Wshadow -Wcast-align \
-Wmissing-noreturn -Wredundant-decls -Wnested-externs \
-Wpointer-arith -Wwrite-strings -finline-functions
REASONABLY_CAREFUL_DUDE = -Wall
-NO_PRAYER_FOR_THE_WICKED = -w -O2
+NO_PRAYER_FOR_THE_WICKED = -w -O2
WARNINGS = $(REASONABLY_CAREFUL_DUDE)
CFLAGS = -g $(WARNINGS)
INCLUDES = -I$(INSTALL_PATH)/include
DEFS = -L$(INSTALL_PATH)/lib/
-LDADD = -lm -lsimgrid
-LIBS =
+LDADD = -lm -lsimgrid
+LIBS =
%: %.o
- $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@
+ $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@
%.o: %.c
$(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $<