Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
We have to somehow rely on F2C if we want it.
authorpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 6 Jan 2011 10:13:36 +0000 (10:13 +0000)
committerpini <pini@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 6 Jan 2011 10:13:36 +0000 (10:13 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9370 48e7efb5-ca39-0410-a469-dd3cf9ba447f

.gitignore
buildtools/Cmake/CompleteInFiles.cmake
include/smpi/smpif.h.in [moved from include/smpi/smpif.h with 71% similarity]
src/smpi/smpi_global.c

index 845a93a..0a474a8 100644 (file)
@@ -37,6 +37,7 @@ src/supernovae_*.c
 _*.c\r
 include/simgrid_config.h\r
 include/instr/tracing_config.h\r
 _*.c\r
 include/simgrid_config.h\r
 include/instr/tracing_config.h\r
+include/smpi/smpif.h\r
 src/context_sysv_config.h\r
 src/gras_config.h\r
 src/smpi/smpicc\r
 src/context_sysv_config.h\r
 src/gras_config.h\r
 src/smpi/smpicc\r
index 9683bdb..5f1ae2b 100644 (file)
@@ -638,6 +638,7 @@ set(libdir ${exec_prefix}/lib)
 set(CMAKE_LINKARGS "${CMAKE_CURRENT_BINARY_DIR}/lib")
 set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/lib:${GTNETS_LIB_PATH}:$LD_LIBRARY_PATH")
 
 set(CMAKE_LINKARGS "${CMAKE_CURRENT_BINARY_DIR}/lib")
 set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}/lib:${GTNETS_LIB_PATH}:$LD_LIBRARY_PATH")
 
+configure_file(${CMAKE_HOME_DIRECTORY}/include/smpi/smpif.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/smpif.h @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpiff @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_CURRENT_BINARY_DIR}/bin/smpiff @ONLY)
@@ -668,4 +669,4 @@ ${CMAKE_CURRENT_BINARY_DIR}/examples/msg/small_platform_with_routers.xml
 )
 
 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
 )
 
 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-"${generate_files_to_clean}")
\ No newline at end of file
+"${generate_files_to_clean}")
similarity index 71%
rename from include/smpi/smpif.h
rename to include/smpi/smpif.h.in
index 156c9ea..6f3ccb8 100644 (file)
@@ -7,10 +7,17 @@
 #ifndef SMPIF_H
 #define SMPIF_H
 
 #ifndef SMPIF_H
 #define SMPIF_H
 
+#cmakedefine HAVE_F2C_H @HAVE_SMPI_F2C_H@
+
+#ifndef HAVE_F2C_H
+#error F2C is mandatory
+#endif
+
 #include <xbt/misc.h>
 #include <xbt/misc.h>
+#include <f2c.h>
 
 XBT_PUBLIC(int) smpi_process_argc(void);
 
 XBT_PUBLIC(int) smpi_process_argc(void);
-XBT_PUBLIC(int) smpi_process_getarg(int* index, char* dst, size_t len);
+XBT_PUBLIC(int) smpi_process_getarg(integer* index, char* dst, ftnlen len);
 XBT_PUBLIC(int) smpi_global_rank(void);
 XBT_PUBLIC(int) smpi_global_size(void);
 
 XBT_PUBLIC(int) smpi_global_rank(void);
 XBT_PUBLIC(int) smpi_global_size(void);
 
index 86b1a09..fb4d167 100644 (file)
@@ -75,10 +75,10 @@ int smpi_process_argc(void) {
   return data->argc ? *(data->argc) - 1 : 0;
 }
 
   return data->argc ? *(data->argc) - 1 : 0;
 }
 
-int smpi_process_getarg(int* index, char* dst, size_t len) {
+int smpi_process_getarg(integer* index, char* dst, ftnlen len) {
   smpi_process_data_t data = smpi_process_data();
   char* arg;
   smpi_process_data_t data = smpi_process_data();
   char* arg;
-  size_t i;
+  ftnlen i;
 
   if(!data->argc || !data->argv
      || *index < 1 || *index >= *(data->argc)) {
 
   if(!data->argc || !data->argv
      || *index < 1 || *index >= *(data->argc)) {