Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix gtnets detection and add a script to install patched gtnets from simgrid svn.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 6 Dec 2010 12:34:09 +0000 (12:34 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 6 Dec 2010 12:34:09 +0000 (12:34 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9008 48e7efb5-ca39-0410-a469-dd3cf9ba447f

buildtools/Cmake/Modules/FindGTnets.cmake
buildtools/Cmake/Option.cmake
buildtools/pipol/Experimental_all_simgrid_gt.sh
buildtools/pipol/Nightly_simgrid.sh
buildtools/pipol/install_gtnets.sh [new file with mode: 0644]

index 14319a4..14dc6b7 100644 (file)
@@ -1,6 +1,6 @@
 find_path(HAVE_RNGSTREAM_H RngStream.h
     HINTS
-    $ENV{LD_LIBRARY_PATH}
+    $ENV{HOME}
     PATH_SUFFIXES include include/gtnets
     PATHS
     /opt
@@ -8,12 +8,14 @@ find_path(HAVE_RNGSTREAM_H RngStream.h
     /opt/csw
     /sw
     /usr
+    ${gtnets_path}
 )
 
 find_library(HAVE_GTNETS_LIB
     NAME gtnets
     HINTS
     $ENV{LD_LIBRARY_PATH}
+    $ENV{HOME}
     PATH_SUFFIXES lib64 lib lib64/gtnets lib/gtnets
     PATHS
     /opt
@@ -21,6 +23,7 @@ find_library(HAVE_GTNETS_LIB
     /opt/csw
     /sw
     /usr
+    ${gtnets_path}
 )
 
 string(REPLACE "/libgtnets.${LIB_EXE}" ""  GTNETS_LIB_PATH "${HAVE_GTNETS_LIB}")
@@ -53,7 +56,7 @@ if(HAVE_GTNETS_LIB AND HAVE_RNGSTREAM_H)
        endif(COMPILE_GTNETS_VAR)
 
 else(HAVE_GTNETS_LIB AND HAVE_RNGSTREAM_H)
-message(STATUS "Gtnets is enable but can't find it. You should set LD_LIBRARY_PATH...")
+message(STATUS "Gtnets is enabled but can't find it. You should set LD_LIBRARY_PATH...")
 endif(HAVE_GTNETS_LIB AND HAVE_RNGSTREAM_H)
 
 message(STATUS "Looking for RngStream.h")
index 4959732..06dd62a 100644 (file)
@@ -4,7 +4,7 @@
 
 
 set(BIBTEX2HTML ${BIBTEX2HTML} CACHE PATH "Path to bibtex2html")
-
+set(gtnets_path ${gtnets_path} CACHE PATH "Path to gtnets lib and include")
 set(custom_flags ${custom_flags} CACHE FORCE "Customers flags add to cmake_c_flag")
 
 if(NOT CMAKE_INSTALL_PREFIX)
index 9938a78..d15ce5c 100644 (file)
@@ -92,7 +92,7 @@ cmake -Denable_lua=on \
 -Denable_model-checking=on \
 -Denable_tracing=on \
 -Denable_latency_bound_tracking=on \
--Denable_gtnets=on \
+-Denable_gtnets=off \
 -Denable_java=on \
 -Dwith_context=auto \
 -Denable_compile_optimizations=off \
index 18086c9..80f4a22 100644 (file)
@@ -82,25 +82,6 @@ ctest -D NightlyTest
 ctest -D NightlySubmit
 make clean
 
-#gtnets
-cmake -Denable_lua=on \
--Denable_ruby=on \
--Denable_lib_static=on \
--Denable_graphviz=on \
--Denable_model-checking=off \
--Denable_tracing=on \
--Denable_latency_bound_tracking=on \
--Denable_gtnets=on \
--Denable_java=on \
--Dwith_context=auto \
--Denable_smpi=on .
-ctest -D NightlyStart
-ctest -D NightlyConfigure
-ctest -D NightlyBuild
-ctest -D NightlyTest
-ctest -D NightlySubmit
-make clean
-
 #full_flags
 cmake -Denable_lua=on \
 -Denable_ruby=on \
@@ -152,7 +133,7 @@ cmake -Denable_lua=on \
 -Denable_model-checking=on \
 -Denable_tracing=on \
 -Denable_latency_bound_tracking=on \
--Denable_gtnets=on \
+-Denable_gtnets=off \
 -Denable_java=on \
 -Dwith_context=auto \
 -Denable_compile_optimizations=off \
diff --git a/buildtools/pipol/install_gtnets.sh b/buildtools/pipol/install_gtnets.sh
new file mode 100644 (file)
index 0000000..c4cc101
--- /dev/null
@@ -0,0 +1,67 @@
+if [ x$1 != x ]  ; then
+       echo "Install to prefix=$1";
+       prefix=$1;
+fi
+
+if [ -e $prefix ] ; then
+       echo -n ""
+else   
+       echo "Creating directory $prefix";
+       mkdir -p $prefix;
+fi
+
+echo "Downloading GTNetS from SVN SimGrid's repository";
+svn checkout svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/ --quiet
+cd GTNetS
+echo "Uncompressing package";
+unzip gtnets-current.zip > /dev/null
+tar zxvf gtnets-current-patch.tgz  > /dev/null
+cd gtnets-current
+cat ../00*.patch | patch -p1 > /dev/null
+
+ARCH_32=`uname -m | cut -d'_' -f2`
+
+if [ x$ARCH_32 = x64 ] ; then #only if 64 bit processor family
+cat ../AMD64-FATAL-Removed-DUL_SIZE_DIFF-Added-fPIC-compillin.patch | patch -p1 > /dev/null
+fi
+
+ln -sf Makefile.linux Makefile
+echo "Creating dependencies";
+make -j 3 depend > /dev/null
+echo "Compiling GTNetS debug libs";
+make -j 3 debug > /dev/null 2>&1
+echo "Compiling GTNetS optimal libs";
+make -j 3 opt > /dev/null 2>&1
+wait
+
+if [ -e $prefix/lib ] ; then
+       echo -n ""
+else   
+       echo "Creating directory $prefix/lib";
+       mkdir $prefix/lib;
+fi
+
+if [ -e $prefix/include ] ; then
+       echo -n "";
+else   
+       echo "Creating directory $prefix/include";
+       mkdir $prefix/include;
+fi
+
+if [ -e $prefix/include/gtnets ] ; then
+       echo -n "";
+else   
+       echo "Creating directory $prefix/include/gtnets";
+       mkdir $prefix/include/gtnets;
+fi
+
+echo "Copying files to $prefix/lib";
+cp -fr ./*.so $prefix/lib/
+ln -sf $prefix/lib/libgtsim-opt.so $prefix/lib/libgtnets.so
+
+echo "Copying files to $prefix/include/gtnets";
+cp -fr ./SRC/*.h $prefix/include/gtnets
+wait
+
+echo "Done with gtnets installation";
+