X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/347996b4a10c4e8579080692afa60e0afb88b60a..a1d7fb09c29089971a104069a5b0af935892e41b:/doc/doxygen/install.doc diff --git a/doc/doxygen/install.doc b/doc/doxygen/install.doc index 18fea4109b..6414be409e 100644 --- a/doc/doxygen/install.doc +++ b/doc/doxygen/install.doc @@ -93,8 +93,11 @@ SimGrid only uses very standard tools: You need cmake version 2.8.8 or higher. You may want to use ccmake for a graphical interface over cmake. - LibBoost: - - osX: with fink: `sudo fink install boost1.53.nopython` + - osX: with fink: `fink install boost1.53.nopython`, + or with homebrew: `brew install boost` - debian: `apt-get install libboost-dev libboost-context-dev` + - Java (only needed if you want to use the Java bindings): Grab a + full JDK from http://www.oracle.com/technetwork/java/javase/downloads For platform specific details, please see @ref install_cmake_mac and @ref install_cmake_windows. @@ -155,7 +158,7 @@ In addition to the classical cmake configuration variables, SimGrid accepts several options, as listed below. @li CMAKE_INSTALL_PREFIX (path): Where to install SimGrid - (e.g. /usr/local or /opt). + (/opt/simgrid or /usr/local or elsewhere). @li enable_compile_optimizations (ON/OFF): request the compiler to produce efficient code. You want to activate it, @@ -188,10 +191,6 @@ accepts several options, as listed below. (the XML parsers and other related elements). Adds an extra dependency on flex and flexml. - @li enable_tracing (ON/OFF): disable this if you have issues - with the tracing module. But this module is now very stable and - you really should try to enjoy this beauty. - @li enable_smpi (ON/OFF): disable this if you have issues with the module allowing to run MPI code on top of SimGrid. This module very stable, but if you really don't need it, you can @@ -213,9 +212,6 @@ accepts several options, as listed below. @li enable_ns3 (ON/OFF): whether you want to use ns3. See section @ref pls_simgrid_configuration_ns3. @li NS3_HINT (path): Where to search for NS3 (eg /usr or /opt). - @li enable_latency_bound_tracking (ON/OFF): enable it if you - want to be warned when communications are limited by round trip - time while doing packet-level simulation. @li enable_documentation (ON/OFF) : whether the documentation should be generated during the compilation. Default is ON. @@ -266,6 +262,11 @@ warning that the "-pthread" argument is not used, if it appears. CMAKE_OSX_SYSROOT:PATH=/Applications/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer @endverbatim +In the El Capitan version of Max OS X, Apple decided that users don't +need no /usr/include directory anymore. If you are hit by this pure +madness, just run the following command to restore that classical +UNIX directory: `xcode-select -install` + \subsubsection install_cmake_windows Building on Windows Building from the source on Windows, may be something of an adventure. @@ -339,8 +340,6 @@ ctest -R msg- -j5 --output-on-failure # You changed MSG and want to check that y \section install_setting_own Setting up your own code -\subsection install_setting_MSG MSG code on Unix - Do not build your simulator by modifying the SimGrid examples. Go outside the SimGrid source tree and create your own working directory (say /home/joe/SimGrid/MyFirstScheduler/). @@ -368,52 +367,66 @@ Makefile. It is a generic Makefile that we have used many times with our students when we teach the C language. \verbatim +# The first rule of a Makefile is the default target. It will be built when make is called with no parameter +# Here, we want to build the binary 'masterslave' all: masterslave + +# This second rule lists the dependencies of the masterslave binary +# How this dependencies are linked is described in an implicit rule below masterslave: masterslave.o sched.o -INSTALL_PATH = $$HOME -CC = gcc -PEDANTIC_PARANOID_FREAK = -O0 -Wshadow -Wcast-align \ - -Waggregate-return -Wmissing-prototypes -Wmissing-declarations \ - -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \ - -Wmissing-noreturn -Wredundant-decls -Wnested-externs \ - -Wpointer-arith -Wwrite-strings -finline-functions -REASONABLY_CAREFUL_DUDE = -Wall -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 = +# These third give the dependencies of the each source file +masterslave.o: masterslave.c sched.h # list every .h that you use +sched.o: sched.c sched.h -%: %.o - $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) $^ $(LIBS) $(LDADD) -o $@ +# Some configuration +SIMGRID_INSTALL_PATH = /opt/simgrid # Where you installed simgrid +CC = gcc # Your compiler +WARNING = -Wshadow -Wcast-align -Waggregate-return -Wmissing-prototypes \ + -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes \ + -Wmissing-declarations -Wmissing-noreturn -Wredundant-decls \ + -Wnested-externs -Wpointer-arith -Wwrite-strings -finline-functions + +# CFLAGS = -g -O0 $(WARNINGS) # Use this line to make debugging easier +CFLAGS = -g -02 $(WARNINGS) # Use this line to get better performances + +# No change should be mandated past that line +############################################# +# The following are implicit rules, used by default to actually build +# the targets for which you listed the dependencies above. +# The blanks before the $(CC) must be a Tab char, not spaces +%: %.o + $(CC) -L$(SIMGRID_INSTALL_PATH)/lib/ $(CFLAGS) $^ -lsimgrid -o $@ %.o: %.c - $(CC) $(INCLUDES) $(DEFS) $(CFLAGS) -c -o $@ $< + $(CC) -I$(SIMGRID_INSTALL_PATH)/include $(CFLAGS) -c -o $@ $< clean: - rm -f $(BIN_FILES) *.o *~ -.SUFFIXES: + rm -f *.o *~ .PHONY: clean - \endverbatim -The first two lines indicates what should be build when typing make -(masterslave) and of which files it is to be made of -(masterslave.o and sched.o). This makefile assumes -that you have set up correctly your LD_LIBRARY_PATH variable -(look, there is a LDADD = -lm -lsimgrid). If you prefer using -the static version, remove the -lsimgrid and add a -$(INSTALL_PATH)/lib/libsimgrid.a on the next line, right -after the LIBS = . +The comments of this file should be enough to understand what's going +on. If you are completely new to makefiles, you should install the +make-doc package and type this command in a terminal: +info make. -More generally, if you have never written a Makefile by yourself, type -in a terminal: info make and read the introduction. The -previous example should be enough for a first try but you may want to -perform some more complex compilations... +Sometimes, the following error message (or similar) will be produced. +@verbatim +masterworker.c:209: undefined reference to `sg_version_check' +masterworker.c:209: undefined reference to `MSG_init_nocheck' +(and possibly many other undefined references) +@endverbatim +It means that the system does not manage to find simgrid when it tries +to execute your programs. Specify where to search with the +LD_LIBRARY_PATH variable. Try running the following command +before executing your code. If it helps, you should add this line to +your ~/.bashrc so that it gets executed each time you log into your +computer. + +@verbatim +export LD_LIBRARY_PATH=/opt/simgrid/lib +@endverbatim */