Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add doc for dev_guide
authornavarro <navarro@caraja.(none)>
Mon, 29 Oct 2012 14:16:11 +0000 (15:16 +0100)
committernavarro <navarro@caraja.(none)>
Mon, 29 Oct 2012 14:16:11 +0000 (15:16 +0100)
doc/dev_guide/doxygen/cmake.doc
doc/dev_guide/doxygen/xps.doc

index 23fbdb1..1378810 100644 (file)
@@ -3,23 +3,40 @@
 
 \section cmake_dev_guide_src How to add sources?
 
-If you want modified, add or delete source files from a library you have to edit <project/directory>/buildtools/Cmake/DefinePackages.cmake
+If you want modified, add or delete source files from a library you have to edit <project/directory>/buildtools/Cmake/DefinePackages.cmake.
+Chose the section you are interested in and modifie it.
 
 \verbatim
-set(JMSG_JAVA_SRC
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgException.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/JniException.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/NativeException.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/HostNotFoundException.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ProcessNotFoundException.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Msg.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Process.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Host.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Task.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/MsgNative.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/ApplicationHandler.java
-  ${CMAKE_HOME_DIRECTORY}/src/java/simgrid/msg/Sem.java
-)
+set(SMPI_SRC
+  src/smpi/smpi_base.c
+  src/smpi/smpi_bench.c
+  src/smpi/smpi_c99.c
+  src/smpi/smpi_coll.c
+  src/smpi/smpi_comm.c
+  src/smpi/smpi_global.c
+  src/smpi/smpi_group.c
+  src/smpi/smpi_mpi.c
+  src/smpi/smpi_mpi_dt.c
+  src/smpi/smpi_pmpi.c
+  src/smpi/smpi_replay.c
+  )
+\endverbatim
+
+If source file are a part of an option library (like fortran smpi source) you have to had it in the compiled sources 
+or in the EXTRA_DIST files package which is only copy in the dist. 
+\verbatim
+### If f2c is installed compiled source other-whise source is only copy in the dist 
+if(SMPI_F2C)
+  set(SMPI_SRC
+    ${SMPI_SRC}
+    src/smpi/smpi_f77.c
+    )
+else()
+  set(EXTRA_DIST
+    ${EXTRA_DIST}
+    src/smpi/smpi_f77.c
+  )
+endif()
 \endverbatim
 
 \section cmake_dev_guide_ex How to add examples?
@@ -30,38 +47,143 @@ You must specified where to create the executable, source list, dependencies and
 \verbatim
 cmake_minimum_required(VERSION 2.6)
 
-set(EXECUTABLE_OUTPUT_PATH "./")
-set(LIBRARY_OUTPUT_PATH "${CMAKE_HOME_DIRECTORY}/lib")
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
 
-#add_executable(<name_of_target> <src list>)
-add_executable(get_sender get_sender.c)
+add_executable(Hello Hello.c)
 
 ### Add definitions for compile
-#target_link_libraries(<name_of_targe> <dependencies>)
-target_link_libraries(get_sender simgrid m pthread) 
+target_link_libraries(Hello simgrid)
+
+### You have to put all new files in the apropriated section 
+### If they are not there, they can't be on the dist package. 
+set(tesh_files
+  ${tesh_files}
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+  ${CMAKE_CURRENT_SOURCE_DIR}/Hello.c
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  PARENT_SCOPE
+  )
 \endverbatim
 
-Then you have to modified <project/directory>/buildtools/Cmake/MakeExeLib.cmake and add
-this line :
+Then you have to modified :
+\li<project/directory>/buildtools/Cmake/MakeExeLib.cmake and add line:
 \verbatim
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/<path_where_is_CMakeList.txt>)
 \endverbatim
 
+\li <project/directory>/buildtools/Cmake/DefinePackages.cmake to add your CMakeLists to CMAKE_SOURCE_FILES:
+\verbatim
+set(CMAKE_SOURCE_FILES
+  CMakeLists.txt
+  ....
+  <path_where_is_CMakeList.txt>
+  )
+\endverbatim
+
 \section cmake_dev_guide_test How to add tests?
+To add a test in simgrid you have to modify source <project/directory>/buildtools/Cmake/AddTests.cmake. Create a new test with adding this line:
+\li With tesh
+\verbatim
+#  ADD_TEST(test-name ${CMAKE_BINARY_DIR}/bin/tesh <options> <tesh-file>)
+#  option --setenv bindir set the directory containing the binary
+#         --setenv srcdir set the directory containing the source file
+#         --cd set the working directory
+ADD_TEST(my-test-name ${CMAKE_BINARY_DIR}/bin/tesh 
+         --setenv bindir=${CMAKE_BINARY_DIR}/examples/my-test/
+         --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/my-test/
+         --cd ${CMAKE_HOME_DIRECTORY}/examples/my-test/
+         ${CMAKE_HOME_DIRECTORY}/examples/msg/io/io.tesh
+)
+\endverbatim             
 
+\li Without tesh
+\verbatim
+# ADD_TEST(NAME <name>]
+#          [WORKING_DIRECTORY dir]
+#          COMMAND <command> [arg1 [arg2 ...]])
+ADD_TEST(NAME my-test-name 
+         WORKING_DIRECTORY  ${CMAKE_BINARY_DIR}/examples/my-test/
+         COMMAND Hello
+)
+\endverbatim 
 \section cmake_dev_guide_dist How to make a clean dist?
 
 \subsection cmake_dev_guide_dist_sim Simgrid
 
 \subsubsection cmake_dev_guide_dist_sim_unix Under UNIX
+You need to be in a clean repository.
+\verbatim
+$ cd simgrid
+$ git stash
+$ git stash clear
+$ git clean -dfx
+$ mkdir build
+$ cd build
+$ make dist
+\endverbatim
+
+After that you have your distrib in the build dir: 'SimGrid-${release_version}.tar.gz'.
+
+You finally have to compile the new distrib to test the "make install" target.
 
 \subsubsection cmake_dev_guide_dist_sim_win Under Win32
 
+You have to install nsis tool first. Download it 
+<a href="http://nsis.sourceforge.net/Download">here</a>.
+
+Then be sure having wget.exe in your path to get the online documentation. You can download it 
+<a href="http://users.ugent.be/~bpuype/wget/">here</a>.
+
+You can finally make the win installer.
+\verbatim
+$ cd simgrid
+$ mkdir build
+$ cd build
+$ cmake ..
+$ make nsis
+\endverbatim
+
 \subsection cmake_dev_guide_dist_bindings Bindings
 
 \subsubsection cmake_dev_guide_dist_bindings_java Java
+You need to be in a clean repository.
+\verbatim
+$ cd simgrid
+$ git stash
+$ git stash clear
+$ git clean -dfx
+$ mkdir build
+$ cd build
+$ make dist
+\endverbatim
 
-\subsubsection cmake_dev_guide_dist_bindings_lua LUA
+After that you have your distrib in the build dir: 'SimGrid-Java-${release_version}.tar.gz'.
 
 \subsubsection cmake_dev_guide_dist_bindings_ruby Ruby
+You need to be in a clean repository.
+\verbatim
+$ cd simgrid-ruby
+$ git stash
+$ git stash clear
+$ git clean -dfx
+$ mkdir build
+$ cd build
+$ make dist
+\endverbatim
+
+After that you have your distrib in the build dir: 'SimGrid-Ruby-${release_version}.tar.gz'.
 */
index 1c88210..12fc0fe 100644 (file)
@@ -29,10 +29,227 @@ user@pipol:~$
 \endverbatim
 Then you can see pipol images availables for deployment
 
+\verbatim
+user@pipol:~$ pipol-sub si
+    amd64_2010-linux-centos-5.dd.gz
+    amd64_2010-linux-debian-squeeze.dd.gz
+    amd64_2010-linux-debian-testing.dd.gz
+    amd64_2010-linux-fedora-core13.dd.gz
+    amd64_2010-linux-fedora-core14.dd.gz
+    amd64_2010-linux-fedora-core16.dd.gz
+    amd64_2010-linux-ubuntu-lucid.dd.gz
+    amd64_2010-linux-ubuntu-maverick.dd.gz
+    amd64_2010-linux-ubuntu-natty.dd.gz
+    amd64_kvm-linux-debian-lenny
+    amd64_kvm-linux-debian-testing
+    amd64_kvm-windows-7
+    amd64-linux-centos-5.dd.gz
+    amd64-linux-debian-etch.dd.gz
+    amd64-linux-debian-lenny.dd.gz
+....
+    i386-linux-ubuntu-lucid.dd.gz
+    i386-linux-ubuntu-maverick.dd.gz
+    i386-linux-ubuntu-natty.dd.gz
+    i386-linux-ubuntu-precise.dd.gz
+    i386_mac-mac-osx-server-leopard.dd.gz
+    i386-unix-freebsd-7.dd.gz
+    i386-unix-opensolaris-10.dd.gz
+    i386-unix-opensolaris-11.dd.gz
+    i386-unix-solaris-10.dd.gz
+    ia64-linux-debian-lenny.dd
+    ia64-linux-debian-squeeze.dd
+    ia64-linux-fedora-core9.dd
+    ia64-linux-redhatEL-5.0.dd
+    x86_64_mac-mac-osx-server-snow-leopard.dd.gz
+    x86_mac-mac-osx-server-snow-leopard.dd.gz
+\endverbatim
+
+You can also see available architectures on host name:
+\verbatim
+navarro@pipol:~$ pipol-sub sa    
+=================================================================
+                    Availables architectures:         
+=================================================================
+
+pipol18
+:i386_2010:amd64_2010:
+pipol19
+:i386_2010:amd64_2010:
+pipol20
+:i386_2010:amd64_2010:
+pipol1
+:i386:amd64:
+pipol2
+:i386:amd64:
+pipol3
+:i386:amd64:
+pipol4
+:i386:amd64:
+pipol5
+:i386:amd64:
+pipol6
+:i386:amd64:
+pipol7
+:i386:amd64:
+pipol8
+:i386:amd64:
+pipol14
+:i386_kvm:amd64_kvm:
+pipol15
+:i386_kvm:amd64_kvm:
+pipol16
+:i386_kvm:amd64_kvm:
+pipol17
+:i386_kvm:amd64_kvm:
+pipol11
+:i386_mac:x86_mac:
+pipol10
+:ia64:
+pipol9
+:ia64:
+pipol12
+:x86_64_mac:
+\endverbatim
+
+When you have choose your image and host (not necessary) you deploy with command line:
+
+pipol-sub esn \<image name\> \<host-name\> \<deployment-time\>
+\verbatim
+user@pipol:~$pipol-sub esn amd64_2010-linux-ubuntu-maverick.dd.gz pipol20 02:00
+user@pipol:~$ssh pipol20
+\endverbatim
+
+You can now make all your tests.
+
 \subsection xps_dev_guide_pipol_home From a computer
 
+You have to renseign to simgrid configuration your pipol login.
+\verbatim
+$ cmake -Dpipol_user=user .
+\endverbatim
+
+Then you have two kind of command:
+\li make \<image-name\>
+\verbatim
+$ make amd64_2010-linux-ubuntu-maverick
+\endverbatim
+This command copy your local simgrid directory to pipol and execute a configure, make and ctest.
+
+\li make \<image_name\>_experimental
+\verbatim
+$ make amd64_2010-linux-ubuntu-maverick_experimental
+\endverbatim
+Same as previous but report into cdash
+
+You can also see all available images from pipol
+\verbatim
+$ make pipol_test_list_images
+\endverbatim
+
+
 \section xps_dev_guide_cdash How to report tests in cdash?
 
+Reporting experiment in cdash is very easy because it is done by ctest.
+
+The easier way is to execute command line "ctest -D Experiemntal" in build directory. More option is available by ctest:
+\verbatim
+  ctest -D Continuous
+  ctest -D Continuous(Start|Update|Configure|Build)
+  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(Start|Update|Configure|Build)
+  ctest -D Nightly(Test|Coverage|MemCheck|Submit)
+  ctest -D NightlyMemoryCheck
+\endverbatim
+
+If you want to have a code coverage, please add option on simgrid.
+\verbatim
+$ cmake -Denable_coverage=ON .
+$ ctest -D ExperimentalStart
+$ ctest -D ExperimentalConfigure
+$ ctest -D ExperimentalBuild
+$ ctest -D ExperimentalTest
+$ ctest -D ExperimentalCoverage
+$ ctest -D ExperimentalSubmit
+\endverbatim
+
 \section xps_dev_guide_g5k How to run simgrid scalability xps?
 
+\subsection xps_dev_guide_g5k_campaign How to execute g5k campaign?
+
+Quick steps deployment:
+
+\li 1/ Create a G5K account
+
+\li 2/ SSH to a frontend (must be rennes, nancy or toulouse for git protocol)
+
+\li 3/ Install g5k-campaign
+\verbatim
+$ gem install g5k-campaign --source http://g5k-campaign.gforge.inria.fr/pkg -p http://proxy:3128 --no-ri --no-rdoc --user-install
+\endverbatim  
+  
+\li 4/ Configure the API
+\verbatim
+$  mkdir ~/.restfully
+$  echo 'base_uri: https://api.grid5000.fr/stable/grid5000' > ~/.restfully/api.grid5000.fr.yml
+$  chmod 0600 ~/.restfully/api.grid5000.fr.yml
+\endverbatim
+
+\li 5/ Git clone the SimGrid Scalability project
+\verbatim
+$  git clone git://scm.gforge.inria.fr/simgrid/simgrid-scalability-XPs.git
+\endverbatim
+
+\li 6/ Copy the run script into your home
+\verbatim
+$  cp simgrid-scalability-XPs/script-sh/run-g5k-scalab.sh ~/
+\endverbatim
+
+\li 7/ Create the result log directory (must be ~/log/)
+\verbatim
+$  mkdir ~/log
+\endverbatim
+
+\li 8/ Execute the g5k campaign on a revision "rev"
+\verbatim
+$  sh run-g5k-scalab.sh "rev"
+\endverbatim
+
+You can also have more parameters
+
+\li 1/ -> 5/ Same as before
+
+\li 6/ Open simgrid-scalability-XPs
+
+\li 7/ Execute SGXP.pl to see parameters
+\verbatim
+$  perl SGXP.pl --help
+\endverbatim
+
+\li 8/ Execute SGXP.pl with your parameters like
+\verbatim
+$  ./SGXP.pl --site=nancy --cluster=graphene,griffon --test=chord,goal --rev="09bbc8de,3ca7b9a13"
+\endverbatim
+
+\subsection xps_dev_guide_g5k_log How to analyze logs?
+
+To analyze log from g5k-campaign you must install R tool.
+
+\li 0/ You can copy logs from g5k to your computer (recommanded)
+
+\li 1/ Open ~/log/
+
+\li 2/ Execute the perl analyzer for goal log
+\verbatim
+$  ~/simgrid-scalability-XPs/libperl/analyzer.pl goal.log.* > goal.csv
+\endverbatim
+
+\li 3/ Execute the R analyer for goal log
+\verbatim
+$  ~/simgrid-scalability-XPs/script-R/chord.R goal.csv output.chord.pdf
+\endverbatim
+
 */