Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #2 from cemsbr/master
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 28 Sep 2013 20:54:19 +0000 (13:54 -0700)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 28 Sep 2013 20:54:19 +0000 (13:54 -0700)
Fixing introduction.doc links

48 files changed:
.gitignore
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/Flags.cmake
buildtools/Cmake/GenerateDocWin.cmake
buildtools/Cmake/MakeExe.cmake
buildtools/Cmake/MakeJava.cmake
buildtools/Cmake/MakeLibWin.cmake
buildtools/Cmake/Scripts/tesh.pl
buildtools/Cmake/src/simgrid.nsi.in
examples/simdag/io/sd_io.c
include/msg/msg.h
include/simdag/simdag.h
include/simgrid/simix.h
include/smpi/mpif.h.in [moved from include/smpi/mpif.h with 98% similarity]
src/include/surf/surf.h
src/msg/msg_host.c
src/simdag/sd_workstation.c
src/simix/smx_host.c
src/simix/smx_host_private.h
src/simix/smx_smurf_private.h
src/simix/smx_user.c
src/surf/storage.c
src/surf/workstation.c
teshsuite/msg/storage/CMakeLists.txt [new file with mode: 0644]
teshsuite/msg/storage/deployment.xml [new file with mode: 0644]
teshsuite/msg/storage/platform.xml [new file with mode: 0644]
teshsuite/msg/storage/storage.c [new file with mode: 0644]
teshsuite/msg/storage/storage.tesh [new file with mode: 0644]
teshsuite/msg/storage/storage_content_c.txt [new file with mode: 0644]
teshsuite/msg/storage/storage_content_s1.txt [new file with mode: 0644]
teshsuite/msg/storage/storage_content_s2.txt [new file with mode: 0644]
teshsuite/smpi/mpich3-test/datatype/hindexed-zeros.c
teshsuite/smpi/mpich3-test/datatype/localpack.c
teshsuite/smpi/mpich3-test/datatype/lots-of-types.c
teshsuite/smpi/mpich3-test/datatype/slice-pack-external.c
teshsuite/smpi/mpich3-test/datatype/slice-pack.c
teshsuite/smpi/mpich3-test/datatype/struct-empty-el.c
teshsuite/smpi/mpich3-test/datatype/struct-pack.c
teshsuite/smpi/mpich3-test/datatype/transpose-pack.c
teshsuite/smpi/mpich3-test/datatype/triangular-pack.c
teshsuite/smpi/mpich3-test/datatype/unusual-noncontigs.c
teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/datatype/typeaints.h.in [moved from teshsuite/smpi/mpich3-test/f77/datatype/typeaints.h with 53% similarity]
teshsuite/smpi/mpich3-test/include/mpitestconf.h
teshsuite/smpi/mpich3-test/pt2pt/waitany-null.c
tools/tesh/CMakeLists.txt

index b2295cc..dbcfa12 100644 (file)
@@ -619,7 +619,7 @@ teshsuite/smpi/mpich3-test/f77/datatype/gaddressf
 teshsuite/smpi/mpich3-test/f77/datatype/hindex1f
 teshsuite/smpi/mpich3-test/f77/datatype/hindexed_blockf
 teshsuite/smpi/mpich3-test/f77/datatype/packef
-teshsuite/smpi/mpich3-test/f77/datatype/typeaints
+teshsuite/smpi/mpich3-test/f77/datatype/typeaints.h
 teshsuite/smpi/mpich3-test/f77/datatype/typecntsf
 teshsuite/smpi/mpich3-test/f77/datatype/typem2f
 teshsuite/smpi/mpich3-test/f77/datatype/typename3f
index 9e20f9f..668798b 100644 (file)
@@ -139,8 +139,8 @@ if(NOT enable_memcheck)
   ADD_TEST(msg-energy-pstates                   ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy/e1/pstate.tesh)
   ADD_TEST(msg-energy-consumption               ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy/e2/energy_consumption.tesh)
   ADD_TEST(msg-energy-concurrent-tasks          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:thread --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/energy/e3/concurrent_tasks.tesh)
-
-
+  ADD_TEST(msg-storage                          ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite --cd ${CMAKE_BINARY_DIR}/teshsuite ${CMAKE_HOME_DIRECTORY}/teshsuite/msg/storage/storage.tesh)
+  
   if(CONTEXT_UCONTEXT)
     ADD_TEST(msg-sendrecv-CLM03-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_CLM03.tesh)
     ADD_TEST(msg-sendrecv-Vegas-ucontext        ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg contexts/factory:ucontext --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/sendrecv/sendrecv_Vegas.tesh)
index 319f8f0..e8120d2 100644 (file)
@@ -56,6 +56,12 @@ ELSE() #PROCESSOR NOT FOUND
 
 ENDIF()
 
+if(ARCH_32_BITS)
+  set(MPI_ADDRESS_SIZE 4)
+else()
+  set(MPI_ADDRESS_SIZE 8)
+endif()
+
 message(STATUS "Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
 
 include(CheckFunctionExists)
@@ -779,6 +785,7 @@ set(includedir "${CMAKE_INSTALL_PREFIX}/include")
 set(libdir ${exec_prefix}/lib)
 set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib:${GTNETS_LIB_PATH}:${HAVE_NS3_LIB}:$LD_LIBRARY_PATH")
 
+configure_file(${CMAKE_HOME_DIRECTORY}/include/smpi/mpif.h.in ${CMAKE_BINARY_DIR}/include/smpi/mpif.h @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/include/smpi/smpif.h.in ${CMAKE_BINARY_DIR}/include/smpi/smpif.h @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_BINARY_DIR}/bin/smpif2c @ONLY)
@@ -816,6 +823,7 @@ if(NOT WIN32)
 endif()
 
 set(generated_headers_to_install
+  ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/mpif.h
   ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/smpif.h
   ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid_config.h
   )
index 940acdb..18e7e44 100644 (file)
@@ -534,7 +534,6 @@ set(headers_to_install
   include/simgrid/platf_generator.h
   include/simgrid/simix.h
   include/smpi/mpi.h
-  include/smpi/mpif.h
   include/smpi/smpi.h
   include/smpi/smpi_cocci.h
   include/smpi/smpi_main.h
@@ -580,6 +579,7 @@ set(headers_to_install
   )
 set(source_of_generated_headers
   include/simgrid_config.h.in
+  include/smpi/mpif.h.in
   include/smpi/smpif.h.in
   src/context_sysv_config.h.in)
 
@@ -904,6 +904,7 @@ set(EXAMPLES_CMAKEFILES_TXT
 set(TESHSUITE_CMAKEFILES_TXT
   teshsuite/CMakeLists.txt
   teshsuite/msg/CMakeLists.txt
+  teshsuite/msg/storage/CMakeLists.txt
   teshsuite/msg/trace/CMakeLists.txt
   teshsuite/simdag/CMakeLists.txt
   teshsuite/simdag/availability/CMakeLists.txt
index c573f81..68cae01 100644 (file)
@@ -4,6 +4,7 @@ set(optCFLAGS "")
 if(NOT __VISUALC__ AND NOT __BORLANDC__)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-g3")
+  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g")
 else()
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}/Zi")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}/Zi")
@@ -18,7 +19,7 @@ if(enable_compile_warnings)
     string(REPLACE "-Wclobbered " "" warnCFLAGS "${warnCFLAGS}")
   endif()
 
-  set(CMAKE_Fortran_FLAGS "-Wall") # FIXME: Q&D hack
+  set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall") # FIXME: Q&D hack
 
   set(CMAKE_JAVA_COMPILE_FLAGS "-Xlint")
 endif()
index a7bc518..71b7f8d 100644 (file)
@@ -16,8 +16,8 @@ endif()
 if(NSIS_PATH)
   ADD_CUSTOM_TARGET(nsis
     COMMENT "Generating the SimGrid installor for Windows..."
-    DEPENDS simgrid simgrid graphicator tesh simgrid-colorizer simgrid_update_xml
+    DEPENDS simgrid simgrid graphicator simgrid-colorizer simgrid_update_xml
     COMMAND ${NSIS_PATH}/makensis.exe simgrid.nsi
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/
     )
-endif()
\ No newline at end of file
+endif()
index 11deec7..8248638 100644 (file)
@@ -78,6 +78,7 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/examples/smpi/MM)
 
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/msg)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/msg/trace)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/msg/storage)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/availability)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/network)
index 86d7dd3..e8f3de6 100644 (file)
@@ -36,7 +36,7 @@ if(WIN32)
   message(STATUS "pexports: ${PEXPORTS_PATH}")
   if(PEXPORTS_PATH)
     add_custom_command(TARGET SG_java POST_BUILD
-      COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/SG_java.dll > ${CMAKE_BINARY_DIR}/SG_java.def)
+      COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/lib/SG_java.dll > ${CMAKE_BINARY_DIR}/lib/SG_java.def)
   endif(PEXPORTS_PATH)
 endif()
 
index 206ab5c..f596b1f 100644 (file)
@@ -1,6 +1,9 @@
 ### Make Libs
 #>gcc c:\simgrid-trunk\examples\msg\icomms\peer.c -static -Lc:\simgrid-trunk\lib -lsimgrid -Ic:\simgrid-trunk\include -lwsock32
 
+if(enable_java)
+  include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/MakeJava.cmake)
+endif()
 
 add_library(simgrid SHARED ${simgrid_sources})
 
index a5b53c4..cbdc724 100755 (executable)
@@ -13,9 +13,10 @@ tesh -- testing shell
 B<tesh> [I<options>] I<tesh_file>
 
 =cut
-my($bindir);
-my($srcdir);
+my($bindir)=".";
+my($srcdir)=".";
 my $path = $0;
+my $OS;
 $path =~ s|[^/]*$||;
 push @INC,$path;
 
@@ -24,14 +25,22 @@ use strict;
 use Term::ANSIColor;
 use IPC::Open3;
 
-my($OS)=`echo %OS%`;
-if($OS eq "%OS%"){
+if($^O eq "linux"){
        $OS = "UNIX";
 }
 else{
        $OS = "WIN";
 }
 
+
+sub trim($)
+{
+       my $string = shift;
+       $string =~ s/^\s+//;
+       $string =~ s/\s+$//;
+       return $string;
+}
+
 print "OS: ".$OS."\n";
 
 # make sure we received a tesh file
@@ -59,8 +68,14 @@ sub cd_cmd {
 }
 
 sub setenv_cmd {
-    if ($_[1] =~ /^(.*)=(.*)$/) {
-       my($var,$ctn)=($1,$2);
+    my($var,$ctn);
+    if ($_[0] =~ /^(.*)=(.*)$/) {
+        ($var,$ctn)=($1,$2);
+    }elsif ($_[1] =~ /^(.*)=(.*)$/) {
+        ($var,$ctn)=($1,$2);
+    } else { 
+           die "[Tesh/CRITICAL] Malformed argument to setenv: expected 'name=value' but got '$_[1]'\n";
+    }
        
        if($var =~ /bindir/){
                print "[Tesh/INFO] setenv $var=$ctn\n";
@@ -76,9 +91,6 @@ sub setenv_cmd {
                        print "[Tesh/INFO] setenv $var=$ctn\n";
                }
        }       
-       } else { 
-       die "[Tesh/CRITICAL] Malformed argument to setenv: expected 'name=value' but got '$_[1]'\n";
-    }
 }
 
 # Main option parsing sub
@@ -220,12 +232,25 @@ sub exec_cmd {
     my @got;
     while(defined(my $got=<OUT>)) {
        $got =~ s/\r//g;
-       #$got =~ s/^( )*//g;
+       $got =~ s/^( )*//g;
        chomp $got;
-       push @got, "$got";
+    $got=trim($got);
+       if( $got ne ""){
+        push @got, "$got";
+    }
     }  
     close OUT;
-    
+   
+    if ($sort){   
+      sub mysort{
+        $a cmp $b
+        }
+      use sort qw(defaults _quicksort); # force quicksort
+      @got = sort mysort @got;
+      #also resort the other one, as perl sort is not the same as the C one used to generate teshes
+      @{$cmd{'out'}}=sort mysort @{$cmd{'out'}};
+    }
+  
     # Cleanup the executing child, and kill the timeouter brother on need
     $cmd{'return'} = 0 unless defined($cmd{'return'});
     my $wantret = "returned code ".(defined($cmd{'return'})? $cmd{'return'} : 0);
@@ -304,7 +329,10 @@ LINE: while (defined(my $line=<TESH_FILE>)) {
     if ($cmd =~ /^#/) {        #comment
     } elsif ($cmd eq '> '){    #expected result line
        print "[TESH/debug] push expected result\n" if $opts{'debug'};
-       push @{$cmd{'out'}}, $arg;
+    $arg=trim($arg);
+       if($arg ne ""){
+        push @{$cmd{'out'}}, $arg;
+    }
 
     } elsif ($cmd eq '< ') {   # provided input
        print "[TESH/debug] push provided input\n" if $opts{'debug'};
@@ -346,6 +374,7 @@ LINE: while (defined(my $line=<TESH_FILE>)) {
        $cmd{'cmd'} = $arg;
     }  
     elsif($line =~ /^! output sort/){  #output sort
+    $sort=1;
        $cmd{'sort'} = 1;
     }
     elsif($line =~ /^! output ignore/){        #output ignore
index 2105d4d..c53efe4 100644 (file)
@@ -201,9 +201,9 @@ Section "SMPI Library" SMPISection
        setOutPath $INSTDIR\include\smpi\r
        file @CMAKE_HOME_DIRECTORY@\include\smpi\smpi.h\r
        file @CMAKE_HOME_DIRECTORY@\include\smpi\mpi.h\r
-       file @CMAKE_HOME_DIRECTORY@\include\smpi\mpif.h\r
        file @CMAKE_HOME_DIRECTORY@\include\smpi\smpi_cocci.h\r
        file @CMAKE_HOME_DIRECTORY@\include\smpi\smpi_main.h\r
+       file include\smpi\mpif.h\r
        file include\smpi\smpif.h\r
        \r
        CreateDirectory $INSTDIR\examples\smpi\r
index c64fe6a..5d30703 100644 (file)
@@ -14,11 +14,13 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(sd_io,
                              "Logging specific to this SimDag example");
 int main(int argc, char **argv)
 {
-  unsigned int ctr, ctr2;
+  unsigned int ctr;
   const SD_workstation_t *workstations;
   int total_nworkstations;
-  xbt_dynar_t current_storage_list;
+  xbt_dict_t current_storage_list;
   char *mount_name;
+  char *storage_name;
+  xbt_dict_cursor_t cursor = NULL;
 
   SD_init(&argc, argv);
   /* Set the workstation model to default, as storage is not supported by the
@@ -31,10 +33,10 @@ int main(int argc, char **argv)
 
   for (ctr=0; ctr<total_nworkstations;ctr++){
     current_storage_list = SD_workstation_get_storage_list(workstations[ctr]);
-    xbt_dynar_foreach(current_storage_list, ctr2, mount_name)
+    xbt_dict_foreach(current_storage_list,cursor,mount_name,storage_name)
       XBT_INFO("Workstation '%s' mounts '%s'",
          SD_workstation_get_name(workstations[ctr]), mount_name);
-    xbt_dynar_free_container(&current_storage_list);
+    xbt_dict_free(&current_storage_list);
   }
   SD_exit();
   return 0;
index 5916660..d907f6a 100644 (file)
@@ -142,8 +142,8 @@ XBT_PUBLIC(void) MSG_create_environment(const char *file);
 XBT_PUBLIC(msg_host_t) MSG_get_host_by_name(const char *name);
 XBT_PUBLIC(xbt_dynar_t) MSG_hosts_as_dynar(void);
 XBT_PUBLIC(int) MSG_get_host_number(void);
-XBT_PUBLIC(xbt_dynar_t) MSG_host_get_storage_list(msg_host_t host);
-XBT_PUBLIC(xbt_dynar_t) MSG_host_get_storage_content(msg_host_t host);
+XBT_PUBLIC(xbt_dict_t) MSG_host_get_storage_list(msg_host_t host);
+XBT_PUBLIC(xbt_dict_t) MSG_host_get_storage_content(msg_host_t host);
 /************************** Process handling *********************************/
 XBT_PUBLIC(msg_process_t) MSG_process_create(const char *name,
                                            xbt_main_func_t code,
index 49d062e..d78288f 100644 (file)
@@ -105,7 +105,7 @@ XBT_PUBLIC(double) SD_route_get_communication_time(SD_workstation_t src,
 
 XBT_PUBLIC(SD_task_t) SD_workstation_get_current_task(SD_workstation_t
                                                       workstation);
-XBT_PUBLIC(xbt_dynar_t)
+XBT_PUBLIC(xbt_dict_t)
     SD_workstation_get_storage_list(SD_workstation_t workstation);
 /** @} */
 
index 6b46fb6..4d41c7c 100644 (file)
@@ -263,7 +263,7 @@ XBT_PUBLIC(void) SIMIX_host_self_set_data(void *data);
 XBT_PUBLIC(void*) SIMIX_host_self_get_data(void);
 XBT_PUBLIC(void*) SIMIX_host_get_data(smx_host_t host);
 XBT_PUBLIC(void) SIMIX_host_set_data(smx_host_t host, void *data);
-XBT_PUBLIC(xbt_dynar_t) SIMIX_host_get_storage_list(smx_host_t host);
+XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_storage_list(smx_host_t host);
 /********************************* Process ************************************/
 XBT_PUBLIC(int) SIMIX_process_count(void);
 XBT_PUBLIC(smx_process_t) SIMIX_process_self(void);
@@ -334,7 +334,7 @@ XBT_PUBLIC(double) simcall_host_execution_get_remains(smx_action_t execution);
 XBT_PUBLIC(e_smx_state_t) simcall_host_execution_get_state(smx_action_t execution);
 XBT_PUBLIC(void) simcall_host_execution_set_priority(smx_action_t execution, double priority);
 XBT_PUBLIC(e_smx_state_t) simcall_host_execution_wait(smx_action_t execution);
-XBT_PUBLIC(xbt_dynar_t) simcall_host_get_storage_list(smx_host_t host);
+XBT_PUBLIC(xbt_dict_t) simcall_host_get_storage_list(smx_host_t host);
 
 /**************************** Process simcalls ********************************/
 /* Constructor and Destructor */
similarity index 98%
rename from include/smpi/mpif.h
rename to include/smpi/mpif.h.in
index 88922f3..c6a96a2 100644 (file)
       parameter(MPI_BXOR=11)
       
       INTEGER MPI_ADDRESS_KIND, MPI_OFFSET_KIND
-      PARAMETER (MPI_ADDRESS_KIND=8)
-      PARAMETER (MPI_OFFSET_KIND=8)
+      PARAMETER (MPI_ADDRESS_KIND=@MPI_ADDRESS_SIZE@)
+      PARAMETER (MPI_OFFSET_KIND=@MPI_ADDRESS_SIZE@)
       
       INTEGER MPI_MODE_NOPRECEDE
       PARAMETER (MPI_MODE_NOPRECEDE=8192)
index 428a63b..b1afac9 100644 (file)
@@ -293,7 +293,7 @@ typedef struct surf_workstation_model_extension_public {
 
   size_t (*get_free_size) (void *workstation,const char* name);
   size_t (*get_used_size) (void *workstation,const char* name);
-  xbt_dynar_t (*get_storage_list) (void *workstation);
+  xbt_dict_t (*get_storage_list) (void *workstation);
 
 } s_surf_model_extension_workstation_t;
 
index 29b5908..cb9dd48 100644 (file)
@@ -339,11 +339,11 @@ double MSG_get_host_consumed_energy(msg_host_t host) {
 }
 
 /** \ingroup m_host_management
- * \brief Return the list of mounted storages on an host.
+ * \brief Return the list of mount point names on an host.
  * \param host a host
- * \return a dynar containing all storages mounted on the host
+ * \return a dict containing all mount point on the host (mount_name => msg_storage_t)
  */
-xbt_dynar_t MSG_host_get_storage_list(msg_host_t host)
+xbt_dict_t MSG_host_get_storage_list(msg_host_t host)
 {
   xbt_assert((host != NULL), "Invalid parameters");
   return (simcall_host_get_storage_list(host));
@@ -354,18 +354,31 @@ xbt_dynar_t MSG_host_get_storage_list(msg_host_t host)
  * \param host a host
  * \return a dynar containing content (as a dict) of all storages mounted on the host
  */
-xbt_dynar_t MSG_host_get_storage_content(msg_host_t host)
+xbt_dict_t MSG_host_get_storage_content(msg_host_t host)
 {
   xbt_assert((host != NULL), "Invalid parameters");
-  xbt_dynar_t contents = xbt_dynar_new(sizeof(void *),NULL);
+  xbt_dict_t contents = xbt_dict_new();
+
   msg_storage_t storage;
   char* storage_name;
-  unsigned int i;
-  xbt_dynar_t storage_list = simcall_host_get_storage_list(host);
-  xbt_dynar_foreach(storage_list, i, storage_name){
-       storage = xbt_lib_get_elm_or_null(storage_lib,storage_name);
+  char* mount_name;
+  xbt_dict_cursor_t cursor = NULL;
+  xbt_dict_cursor_t cursor2 = NULL;
+  char* file;
+  size_t size;
+
+  xbt_dict_t storage_list = simcall_host_get_storage_list(host);
+
+  xbt_dict_foreach(storage_list,cursor,mount_name,storage_name){
+       storage = (msg_storage_t)xbt_lib_get_elm_or_null(storage_lib,storage_name);
+
+       XBT_INFO("mount name => %s", mount_name);
        xbt_dict_t content = simcall_storage_get_content(storage);
-       xbt_dynar_push(contents, &content);
+    xbt_dict_foreach(content,cursor2,file,size){
+      XBT_INFO("\t\t%s size: %zu bytes", file, size);
+    }
+
+       xbt_dict_set(contents,mount_name,(void *)content,NULL);
   }
   return contents;
 }
index f035d13..574c99c 100644 (file)
@@ -482,7 +482,7 @@ void SD_workstation_set_access_mode(SD_workstation_t workstation,
  * \param workstation a workstation
  * \return a dynar containing all mounted storages on the workstation
  */
-xbt_dynar_t SD_workstation_get_storage_list(SD_workstation_t workstation){
+xbt_dict_t SD_workstation_get_storage_list(SD_workstation_t workstation){
   return surf_workstation_model->extension.workstation.get_storage_list(workstation);
 }
 
index 5b7b0e9..5ef2bd9 100644 (file)
@@ -626,10 +626,10 @@ void SIMIX_set_category(smx_action_t action, const char *category)
 }
 #endif
 
-xbt_dynar_t SIMIX_pre_host_get_storage_list(smx_simcall_t simcall, smx_host_t host){
+xbt_dict_t SIMIX_pre_host_get_storage_list(smx_simcall_t simcall, smx_host_t host){
   return SIMIX_host_get_storage_list(host);
 }
-xbt_dynar_t SIMIX_host_get_storage_list(smx_host_t host){
+xbt_dict_t SIMIX_host_get_storage_list(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_model->extension.workstation.get_storage_list(host);
index c5099bd..f91d19d 100644 (file)
@@ -60,7 +60,7 @@ double SIMIX_host_execution_get_remains(smx_action_t action);
 e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action);
 void SIMIX_host_execution_set_priority(smx_action_t action, double priority);
 void SIMIX_pre_host_execution_wait(smx_simcall_t simcall, smx_action_t action);
-xbt_dynar_t SIMIX_host_get_storage_list(smx_host_t host);
+xbt_dict_t SIMIX_host_get_storage_list(smx_host_t host);
 
 // pre prototypes
 smx_host_t SIMIX_pre_host_get_by_name(smx_simcall_t, const char*);
@@ -93,7 +93,7 @@ void SIMIX_host_execution_suspend(smx_action_t action);
 void SIMIX_host_execution_resume(smx_action_t action);
 
 void SIMIX_post_host_execute(smx_action_t action);
-xbt_dynar_t SIMIX_pre_host_get_storage_list(smx_simcall_t, smx_host_t);
+xbt_dict_t SIMIX_pre_host_get_storage_list(smx_simcall_t, smx_host_t);
 #ifdef HAVE_TRACING
 void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action,
                            const char *category);
index 084a6bb..0b57815 100644 (file)
@@ -282,7 +282,7 @@ ACTION(SIMCALL_HOST_EXECUTION_GET_REMAINS, host_execution_get_remains, WITH_ANSW
 ACTION(SIMCALL_HOST_EXECUTION_GET_STATE, host_execution_get_state, WITH_ANSWER, TINT(result), TSPEC(execution, smx_action_t)) sep \
 ACTION(SIMCALL_HOST_EXECUTION_SET_PRIORITY, host_execution_set_priority, WITH_ANSWER, TVOID(result), TSPEC(execution, smx_action_t), TDOUBLE(priority)) sep \
 ACTION(SIMCALL_HOST_EXECUTION_WAIT, host_execution_wait, WITHOUT_ANSWER, TINT(result), TSPEC(execution, smx_action_t)) sep \
-ACTION(SIMCALL_HOST_GET_STORAGE_LIST, host_get_storage_list, WITH_ANSWER, TSPEC(result, xbt_dynar_t), TSPEC(host, smx_host_t)) sep \
+ACTION(SIMCALL_HOST_GET_STORAGE_LIST, host_get_storage_list, WITH_ANSWER, TSPEC(result, xbt_dict_t), TSPEC(host, smx_host_t)) sep \
 ACTION(SIMCALL_PROCESS_CREATE, process_create, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t*), TSTRING(name), TSPEC(code, xbt_main_func_t), TPTR(data), TSTRING(hostname), TDOUBLE(kill_time), TINT(argc), TSPEC(argv, char**), TSPEC(properties, xbt_dict_t), TINT(auto_restart)) sep \
 ACTION(SIMCALL_PROCESS_KILL, process_kill, WITH_ANSWER, TVOID(result), TSPEC(process, smx_process_t)) sep \
 ACTION(SIMCALL_PROCESS_KILLALL, process_killall, WITH_ANSWER, TVOID(result), TINT(reset_pid)) sep \
index 4b873f9..75e467b 100644 (file)
@@ -1293,9 +1293,9 @@ size_t simcall_storage_get_used_size (const char* name){
  * \ingroup simix_storage_management
  * \brief Returns the list of storages mounted on an host.
  * \param host A SIMIX host
- * \return a dynar containing all storages mounted on the host
+ * \return a dict containing all storages mounted on the host
  */
-xbt_dynar_t simcall_host_get_storage_list(smx_host_t host)
+xbt_dict_t simcall_host_get_storage_list(smx_host_t host)
 {
   return simcall_BODY_host_get_storage_list(host);
 }
index 416cadf..17ed2b1 100644 (file)
@@ -206,9 +206,9 @@ static xbt_dict_t storage_get_content(void *storage)
   xbt_dict_t content_dict = xbt_dict_new();
   xbt_dict_cursor_t cursor = NULL;
   char *file;
-  size_t size;
+  char *size;
   xbt_dict_foreach(((storage_t)st)->content, cursor, file, size){
-    xbt_dict_set(content_dict,file,&size,NULL);
+    xbt_dict_set(content_dict,file,(void*)size,NULL);
   }
   return content_dict;
 }
index 86f6619..e328332 100644 (file)
@@ -365,18 +365,20 @@ static storage_t find_storage_on_mount_list(void *workstation,const char* mount)
   return st;
 }
 
-static xbt_dynar_t ws_get_storage_list(void *workstation)
+static xbt_dict_t ws_get_storage_list(void *workstation)
 {
   s_mount_t mnt;
   unsigned int i;
-  xbt_dynar_t storage_list = xbt_dynar_new(sizeof(char*), NULL);
+  xbt_dict_t storage_list = xbt_dict_new();
+  char *storage_name = NULL;
 
   workstation_CLM03_t ws = (workstation_CLM03_t) surf_workstation_resource_priv(workstation);
   xbt_dynar_t storages = ws->storage;
 
   xbt_dynar_foreach(storages,i,mnt)
   {
-    xbt_dynar_push(storage_list, &mnt.name);
+       storage_name = ((storage_t)mnt.storage)->generic_resource.name;
+    xbt_dict_set(storage_list,mnt.name,storage_name,NULL);
   }
   return storage_list;
 }
diff --git a/teshsuite/msg/storage/CMakeLists.txt b/teshsuite/msg/storage/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8f2c3fc
--- /dev/null
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 2.6)
+
+set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+add_executable(storage storage.c)
+
+### Add definitions for compile
+if(NOT WIN32)
+  target_link_libraries(storage simgrid m pthread )
+else()
+  target_link_libraries(storage simgrid)
+endif()
+
+set(tesh_files
+  ${tesh_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage.tesh
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/platform.xml
+  ${CMAKE_CURRENT_SOURCE_DIR}/deployment.xml
+  PARENT_SCOPE
+  )
+set(teshsuite_src
+  ${teshsuite_src}
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage.c
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage_content_c.txt
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage_content_s1.txt
+  ${CMAKE_CURRENT_SOURCE_DIR}/storage_content_s2.txt
+  PARENT_SCOPE
+  )
diff --git a/teshsuite/msg/storage/deployment.xml b/teshsuite/msg/storage/deployment.xml
new file mode 100644 (file)
index 0000000..4ff8c10
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+  <process host="client" function="client"/>
+  <process host="server" function="server"/>
+</platform>
\ No newline at end of file
diff --git a/teshsuite/msg/storage/platform.xml b/teshsuite/msg/storage/platform.xml
new file mode 100644 (file)
index 0000000..c288fb5
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+
+<platform version="3">
+       <AS id="AS0" routing="Full">
+               <!-- STORAGE TYPES -->
+               <storage_type id="crucial" model="SSD" size="500">
+                       <prop id="Bwrite" value="30000000" /> <!-- 30Mo/s -->
+                       <prop id="Bread" value="100000000" /> <!-- 100Mo/s -->
+                       <prop id="Bconnection" value="150000000" /> <!-- 150Mo/s -->
+               </storage_type>
+
+               <storage_type id="single_HDD" model="linear_no_lat" size="500GiB" content_type="txt_unix">
+                       <prop id="Bwrite" value="30MBps" />
+                       <prop id="Bread" value="100MBps" />
+                       <prop id="Bconnection" value="150MBps" />
+               </storage_type>
+
+               <storage_type id="single_SSD" model="linear_no_lat" size="500GiB">
+                       <prop id="Bwrite" value="30MBps" />
+                       <prop id="Bread" value="100MBps" />
+                       <prop id="Bconnection" value="150MBps" />
+               </storage_type>
+
+               <!-- DISKS -->
+               <storage id="cdisk" typeId="single_HDD" content="msg/storage/storage_content_c.txt">
+                  <prop id="usage" value="scratch"/>
+                  <prop id="date" value="31-08-13"/>
+               </storage>
+               <storage id="sdisk1" typeId="single_SSD" content="msg/storage/storage_content_s1.txt" />
+               <storage id="sdisk2" typeId="single_HDD" content="msg/storage/storage_content_s2.txt" />
+
+               <!-- HOSTS -->
+               <host id="client" power="1000000000">
+                       <mount storageId="cdisk" name="/sd1" />
+               </host>
+
+               <host id="server" power="1000000000">
+                       <mount storageId="sdisk1" name="/sd1" />
+                       <mount storageId="sdisk2" name="/sd2" />
+                       <prop id="ip adress" value="134.165.2.5"/>
+               </host>
+
+               <!-- LINKS & ROUTES -->
+               <link id="link" bandwidth="125MBps" latency="50us" />
+
+               <route src="client" dst="server" symmetrical="YES">
+                       <link_ctn id="link" />
+               </route>
+       </AS>
+</platform>
diff --git a/teshsuite/msg/storage/storage.c b/teshsuite/msg/storage/storage.c
new file mode 100644 (file)
index 0000000..8512d6e
--- /dev/null
@@ -0,0 +1,89 @@
+#include "msg/msg.h"
+#include "xbt/log.h"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(storage,"Messages specific for this simulation");
+
+void storage_info(msg_host_t host);
+void display_storage_properties(msg_storage_t storage);
+int client(int argc, char *argv[]);
+int server(int argc, char *argv[]);
+
+
+int client(int argc, char *argv[])
+{
+  storage_info(MSG_host_self());
+  return 1;
+}
+
+int server(int argc, char *argv[])
+{
+  //display_storage_info();
+  return 1;
+}
+
+void storage_info(msg_host_t host){
+
+  const char* host_name = MSG_host_get_name(host);
+  XBT_INFO("** Storage info on %s:", host_name);
+
+  xbt_dict_cursor_t cursor = NULL;
+  char* mount_name;
+  char* storage_name;
+  msg_storage_t storage;
+
+  xbt_dict_t storage_list = MSG_host_get_storage_list(MSG_host_self());
+
+  xbt_dict_foreach(storage_list,cursor,mount_name,storage_name)
+  {
+    XBT_INFO("\tStorage mount name: %s", mount_name);
+
+    size_t free_size = MSG_storage_get_free_size(mount_name);
+    size_t used_size = MSG_storage_get_used_size(mount_name);
+
+    XBT_INFO("\t\tFree size: %zu octets", free_size);
+    XBT_INFO("\t\tUsed size: %zu octets", used_size);
+
+    storage = MSG_storage_get_by_name(storage_name);
+    display_storage_properties(storage);
+  }
+}
+
+void display_storage_properties(msg_storage_t storage){
+  xbt_dict_cursor_t cursor = NULL;
+  char *key, *data;
+  xbt_dict_t props = MSG_storage_get_properties(storage);
+  if (props){
+    XBT_INFO("\tProperties of mounted storage: %s", MSG_storage_get_name(storage));
+    xbt_dict_foreach(props, cursor, key, data)
+         XBT_INFO("\t\t'%s' -> '%s'", key, data);
+  }else{
+       XBT_INFO("\t\tNo property attached.");
+  }
+}
+
+int main(int argc, char *argv[])
+{
+  MSG_init(&argc, argv);
+
+  /* Check the arguments */
+  if (argc < 3) {
+    printf("Usage: %s platform_file deployment_file \n", argv[0]);
+    return -1;
+  }
+
+  const char *platform_file = argv[1];
+  const char *deployment_file = argv[2];
+
+  MSG_create_environment(platform_file);
+
+  MSG_function_register("client", client);
+  MSG_function_register("server", server);
+  MSG_launch_application(deployment_file);
+
+  msg_error_t res = MSG_main();
+
+  if (res == MSG_OK)
+    return 0;
+  else
+    return 1;
+}
diff --git a/teshsuite/msg/storage/storage.tesh b/teshsuite/msg/storage/storage.tesh
new file mode 100644 (file)
index 0000000..5cc7fe4
--- /dev/null
@@ -0,0 +1,8 @@
+$ msg/storage/storage --cfg=path:${srcdir:=.} ${srcdir:=.}/msg/storage/platform.xml ${srcdir:=.}/msg/storage/deployment.xml 0 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (1:client@client) ** Storage info on client:
+> [  0.000000] (1:client@client)       Storage mount name: /sd1
+> [  0.000000] (1:client@client)               Free size: 536774599000 octets
+> [  0.000000] (1:client@client)               Used size: 96313000 octets
+> [  0.000000] (1:client@client)       Properties of mounted storage: cdisk
+> [  0.000000] (1:client@client)               'date' -> '31-08-13'
+> [  0.000000] (1:client@client)               'usage' -> 'scratch'
diff --git a/teshsuite/msg/storage/storage_content_c.txt b/teshsuite/msg/storage/storage_content_c.txt
new file mode 100644 (file)
index 0000000..d461c10
--- /dev/null
@@ -0,0 +1,5 @@
+./doc/simgrid/examples/cxx/autoDestination/FinalizeTask.cxx 71000
+./doc/simgrid/examples/cxx/autoDestination/autoDestination_deployment.xml 1262000         
+./doc/simgrid/examples/cxx/autoDestination/Main.cxx    1480000
+./doc/simgrid/examples/cxx/autoDestination/Slave.cxx 87000000  
+./doc/simgrid/examples/cxx/autoDestination/BasicTask.cxx 6500000
diff --git a/teshsuite/msg/storage/storage_content_s1.txt b/teshsuite/msg/storage/storage_content_s1.txt
new file mode 100644 (file)
index 0000000..004f34b
--- /dev/null
@@ -0,0 +1,4 @@
+./doc/simgrid/examples/cxx/autoDestination/Master.cxx 18910000
+./doc/simgrid/examples/cxx/autoDestination/autoDestination_platform.xml        21339320000   
+./doc/simgrid/examples/cxx/autoDestination/Forwarder.cxx 113700000        
+./doc/simgrid/examples/cxx/basic/FinalizeTask.cxx 710000000       
diff --git a/teshsuite/msg/storage/storage_content_s2.txt b/teshsuite/msg/storage/storage_content_s2.txt
new file mode 100644 (file)
index 0000000..98d37e0
--- /dev/null
@@ -0,0 +1,2 @@
+./doc/simgrid/examples/cxx/basic/Main.cxx 14800000
+./doc/simgrid/examples/cxx/basic/Slave.cxx 69300000       
\ No newline at end of file
index 4d4c39a..db9d165 100644 (file)
@@ -11,7 +11,6 @@
 
 static int verbose = 0;
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 int hindexed_zerotype_test(void);
 int hindexed_sparsetype_test(void);
index 5348d55..11e165a 100644 (file)
@@ -20,7 +20,6 @@ static int verbose = 0;
 
 #define BUF_SIZE 16384
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 
 int main(int argc, char *argv[])
index 9722167..418ff0b 100644 (file)
@@ -18,7 +18,6 @@
 */
 static int verbose = 1;
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 int lots_of_types_test(void);
 
index 8f4c004..25038fc 100644 (file)
@@ -12,7 +12,6 @@
 static int verbose = 0;
 int a[100][100][100], e[9][9][9];
 
-int main(int argc, char *argv[]);
 
 /* helper functions */
 static int parse_args(int argc, char **argv);
index 8fcd3b5..ef8c3c9 100644 (file)
@@ -16,7 +16,6 @@
 static int verbose = 0;
 int a[100][100][100], e[9][9][9];
 
-int main(int argc, char *argv[]);
 
 /* helper functions */
 static int parse_args(int argc, char **argv);
index 3704293..d0c57bd 100644 (file)
@@ -11,7 +11,6 @@
 
 static int verbose = 0;
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 int single_struct_test(void);
 
index d7b5719..cf16e6a 100644 (file)
@@ -11,7 +11,6 @@
 
 static int verbose = 0;
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 int single_struct_test(void);
 int array_of_structs_test(void);
index 1cd2202..18e2c59 100644 (file)
@@ -15,7 +15,6 @@
 
 static int verbose = 0;
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 
 int main(int argc, char *argv[])
index 0720524..dde6eda 100644 (file)
@@ -10,8 +10,6 @@
 #include "mpi.h"
 #include "mpitest.h"
 
-int main(int argc, char *argv[]);
-
 /* helper functions */
 int parse_args(int argc, char **argv);
 
index 5c608f8..d6fd63c 100644 (file)
@@ -18,7 +18,6 @@
 */
 static int verbose = 1;
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 int struct_negdisp_test(void);
 int vector_negstride_test(void);
index 11202e8..0b7c836 100644 (file)
@@ -12,12 +12,13 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
   include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
   include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
 
+  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/typeaints.h.in ${CMAKE_CURRENT_SOURCE_DIR}/typeaints.h @ONLY)
+
   add_executable(allctypesf allctypesf.f ../util/mtestf.f)
   add_executable(gaddressf gaddressf.f ../util/mtestf.f)
   add_executable(hindex1f hindex1f.f ../util/mtestf.f)
   add_executable(hindexed_blockf hindexed_blockf.f ../util/mtestf.f)
   add_executable(packef packef.f ../util/mtestf.f)
-  add_executable(typeaints typeaints.h ../util/mtestf.f)
   add_executable(typecntsf typecntsf.f ../util/mtestf.f)
   add_executable(typem2f typem2f.f ../util/mtestf.f)
   add_executable(typename3f typename3f.f ../util/mtestf.f)
@@ -30,7 +31,6 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
   target_link_libraries(hindex1f  simgrid)
   target_link_libraries(hindexed_blockf  simgrid)
   target_link_libraries(packef  simgrid)
-  target_link_libraries(typeaints  simgrid)
   target_link_libraries(typecntsf  simgrid)
   target_link_libraries(typem2f  simgrid)
   target_link_libraries(typename3f  simgrid)
@@ -55,7 +55,7 @@ set(examples_src
   ${CMAKE_CURRENT_SOURCE_DIR}/hindex1f.f
   ${CMAKE_CURRENT_SOURCE_DIR}/hindexed_blockf.f
   ${CMAKE_CURRENT_SOURCE_DIR}/packef.f
-  ${CMAKE_CURRENT_SOURCE_DIR}/typeaints.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/typeaints.h.in
   ${CMAKE_CURRENT_SOURCE_DIR}/typecntsf.f
   ${CMAKE_CURRENT_SOURCE_DIR}/typem2f.f
   ${CMAKE_CURRENT_SOURCE_DIR}/typename3f.f
@@ -1,6 +1,6 @@
-C -*- Mode: Fortran; -*- 
+C -*- Mode: Fortran; -*-
 C
 C  (C) 2003 by Argonne National Laboratory.
 C      See COPYRIGHT in top-level directory.
 C
-      integer aint, aintv(max_asizev)
+      integer*@MPI_ADDRESS_SIZE@ aint, aintv(max_asizev)
index eb39223..4eb4bb2 100644 (file)
@@ -57,8 +57,9 @@
 //#define HAVE_FORTRAN_BINDING 0
 
 /* Define to 1 if you have the `getrusage' function. */
+#ifndef WIN32
 #define HAVE_GETRUSAGE 1
-
+#endif
 /* Define if struct hostent contains h_addr_list */
 #define HAVE_H_ADDR_LIST 1
 
 #define HAVE_STRING_H 1
 
 /* Define to 1 if you have the <sys/resource.h> header file. */
+#ifndef WIN32
 #define HAVE_SYS_RESOURCE_H 1
-
+#endif
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #define HAVE_SYS_STAT_H 1
 
index 9ba1eef..98df8ef 100644 (file)
@@ -13,7 +13,6 @@
 
 static int verbose = 0;
 
-int main(int argc, char *argv[]);
 int parse_args(int argc, char **argv);
 
 int main(int argc, char *argv[])
index c099aa1..467c8e3 100644 (file)
@@ -1,16 +1,20 @@
 cmake_minimum_required(VERSION 2.6)
 
 if(WIN32)
-  #add_custom_target(tesh ALL
-  #  DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
-  #  COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
-  #  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
-  #  )
+#  add_custom_target(tesh ALL
+#    DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
+#    COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
+#    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
+#    )
     
     file(COPY        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl 
          DESTINATION ${CMAKE_BINARY_DIR}/bin/
          FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
                           GROUP_EXECUTE GROUP_READ)
+    file(COPY        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/Diff.pm 
+         DESTINATION ${CMAKE_BINARY_DIR}
+         FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+                          GROUP_EXECUTE GROUP_READ)
     file(RENAME ${CMAKE_BINARY_DIR}/bin/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh)                    
 else()
   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")