Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill f2c. Finally. I hope.
authordegomme <degomme@localhost.localdomain>
Wed, 4 Jun 2014 17:51:58 +0000 (19:51 +0200)
committerdegomme <degomme@localhost.localdomain>
Wed, 4 Jun 2014 18:03:05 +0000 (20:03 +0200)
34 files changed:
INSTALL
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/Distrib.cmake
buildtools/Cmake/Modules/FindF2c.cmake [deleted file]
buildtools/Cmake/Modules/FindGFortran.cmake
buildtools/Cmake/PrintArgs.cmake
buildtools/Cmake/src/internal_config.h.in
buildtools/Cmake/src/simgrid.nsi.in
doc/doxygen/inside_cmake.doc
examples/smpi/energy/f77/CMakeLists.txt
examples/smpi/energy/f90/CMakeLists.txt
include/smpi/smpif.h.in [deleted file]
src/mc/mc_global.c
src/smpi/private.h
src/smpi/smpi_bench.c
src/smpi/smpi_dvfs.c
src/smpi/smpi_f77.c
src/smpi/smpi_global.c
src/smpi/smpif2c.in [deleted file]
teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/comm/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/ext/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/init/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/f77/util/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/init/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/f90/util/CMakeLists.txt

diff --git a/INSTALL b/INSTALL
index cc31a6f..5637597 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -53,7 +53,8 @@ the jni.h header file (available from the JDK).
 If you want to compile the lua bindings, you have to have lua5.1 executable and
 liblua5.1-dev.
 
 If you want to compile the lua bindings, you have to have lua5.1 executable and
 liblua5.1-dev.
 
-If you want to compile smpi, you should install f2c to use Fortran code.
+If you want to compile smpi, you should install a fortran compiler to use
+ Fortran code. Only gfortran has been tested for now.
 
 If you want to compile the GTNetS backend, you have to have a patched version of
 GTNetS installed. The patch lives in the contrib section of the Git.
 
 If you want to compile the GTNetS backend, you have to have a patched version of
 GTNetS installed. The patch lives in the contrib section of the Git.
index 7c0f94e..88f4921 100644 (file)
@@ -6,7 +6,6 @@ ENDIF()
 IF(enable_smpi AND NOT WIN32)
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicxx" OUTPUT_VARIABLE "OKITOKI")
 IF(enable_smpi AND NOT WIN32)
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicxx" OUTPUT_VARIABLE "OKITOKI")
-  exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif2c" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif90" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif90" OUTPUT_VARIABLE "OKITOKI")
   exec_program("chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun" OUTPUT_VARIABLE "OKITOKI")
@@ -427,11 +426,9 @@ IF(NOT enable_memcheck)
         ADD_TEST(test-smpi-mpich3-topo-raw       ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/topo perl ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/topo -tests=testlist -execarg=--cfg=contexts/factory:raw)
         SET_TESTS_PROPERTIES(test-smpi-mpich3-attr-raw test-smpi-mpich3-comm-raw test-smpi-mpich3-init-raw test-smpi-mpich3-datatype-raw test-smpi-mpich3-group-raw test-smpi-mpich3-pt2pt-raw test-smpi-mpich3-topo-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
       ENDIF()
         ADD_TEST(test-smpi-mpich3-topo-raw       ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/topo perl ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/topo -tests=testlist -execarg=--cfg=contexts/factory:raw)
         SET_TESTS_PROPERTIES(test-smpi-mpich3-attr-raw test-smpi-mpich3-comm-raw test-smpi-mpich3-init-raw test-smpi-mpich3-datatype-raw test-smpi-mpich3-group-raw test-smpi-mpich3-pt2pt-raw test-smpi-mpich3-topo-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
       ENDIF()
-      IF(SMPI_F2C)
+      IF(SMPI_FORTRAN)
         ADD_TEST(test-smpi-mpich3-thread-f77     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f77/ perl ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/ -tests=testlist -execarg=--cfg=contexts/stack_size:8000 -execarg=--cfg=smpi/privatize_global_variables:yes)
         SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f77 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
         ADD_TEST(test-smpi-mpich3-thread-f77     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f77/ perl ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/ -tests=testlist -execarg=--cfg=contexts/stack_size:8000 -execarg=--cfg=smpi/privatize_global_variables:yes)
         SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f77 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
-      ENDIF()
-      IF(SMPI_F90)
         ADD_TEST(test-smpi-mpich3-thread-f90     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f90/ perl ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/ -tests=testlist -execarg=--cfg=smpi/privatize_global_variables:yes)
         SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f90 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
       ENDIF()
         ADD_TEST(test-smpi-mpich3-thread-f90     ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/f90/ perl ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/runtests -mpiexec=${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun -srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/ -tests=testlist -execarg=--cfg=smpi/privatize_global_variables:yes)
         SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f90 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
       ENDIF()
@@ -439,10 +436,8 @@ IF(NOT enable_memcheck)
 
     # BEGIN TESH TESTS
     ADD_TESH_FACTORIES(smpi-energy               "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/energy.tesh)
 
     # BEGIN TESH TESTS
     ADD_TESH_FACTORIES(smpi-energy               "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/energy.tesh)
-    IF(SMPI_F2C)
+    IF(SMPI_FORTRAN)
       ADD_TESH_FACTORIES(smpi-energy-f77         "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/f77/energy.tesh)
       ADD_TESH_FACTORIES(smpi-energy-f77         "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/f77/energy.tesh)
-    ENDIF()
-    IF(SMPI_F90)
       ADD_TESH_FACTORIES(smpi-energy-f90         "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/f90/energy.tesh)
     ENDIF()
     ADD_TESH_FACTORIES(smpi-msg-masterslave      "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_msg_masterslave --cd ${CMAKE_BINARY_DIR}/examples/smpi/smpi_msg_masterslave ${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_msg_masterslave/msg_smpi.tesh)
       ADD_TESH_FACTORIES(smpi-energy-f90         "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/energy --cd ${CMAKE_BINARY_DIR}/examples/smpi/energy ${CMAKE_HOME_DIRECTORY}/examples/smpi/energy/f90/energy.tesh)
     ENDIF()
     ADD_TESH_FACTORIES(smpi-msg-masterslave      "thread;ucontext;raw" --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_msg_masterslave --cd ${CMAKE_BINARY_DIR}/examples/smpi/smpi_msg_masterslave ${CMAKE_HOME_DIRECTORY}/examples/smpi/smpi_msg_masterslave/msg_smpi.tesh)
index 9d617d6..6cd514c 100644 (file)
@@ -248,8 +248,6 @@ else()
 endif()
 
 if(enable_smpi)
 endif()
 
 if(enable_smpi)
-  include(FindF2c)
-  # FindGFortran must come after FindF2C, and after having set HAVE_MC
   include(FindGFortran)
   SET(HAVE_SMPI 1)
 endif()
   include(FindGFortran)
   SET(HAVE_SMPI 1)
 endif()
@@ -846,10 +844,8 @@ set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:\${LD_LIBRARY_PATH:+:$LD_LIBRARY_P
 
 file(READ ${CMAKE_HOME_DIRECTORY}/src/smpi/smpitools.sh SMPITOOLS_SH)
 configure_file(${CMAKE_HOME_DIRECTORY}/include/smpi/mpif.h.in ${CMAKE_BINARY_DIR}/include/smpi/mpif.h @ONLY)
 
 file(READ ${CMAKE_HOME_DIRECTORY}/src/smpi/smpitools.sh SMPITOOLS_SH)
 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/smpicxx.in ${CMAKE_BINARY_DIR}/bin/smpicxx @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicxx.in ${CMAKE_BINARY_DIR}/bin/smpicxx @ONLY)
-configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_BINARY_DIR}/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/bin/smpiff @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/bin/smpirun @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/bin/smpiff @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/bin/smpirun @ONLY)
@@ -871,7 +867,6 @@ set(libdir "${CMAKE_BINARY_DIR}/lib")
 
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicxx.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicxx @ONLY)
 
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicc.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpicxx.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicxx @ONLY)
-configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif2c.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif2c @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpiff.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpif90.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90 @ONLY)
 configure_file(${CMAKE_HOME_DIRECTORY}/src/smpi/smpirun.in ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun @ONLY)
@@ -881,13 +876,11 @@ set(top_builddir ${CMAKE_HOME_DIRECTORY})
 if(NOT WIN32)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicxx)
 if(NOT WIN32)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicc)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpicxx)
-  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif2c)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif90)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicxx)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpiff)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpif90)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/bin/smpirun)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpicxx)
-  execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif2c)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90)
   execute_process(COMMAND chmod a=rwx ${CMAKE_BINARY_DIR}/smpi_script/bin/smpirun)
@@ -895,7 +888,6 @@ endif()
 
 set(generated_headers_to_install
   ${CMAKE_CURRENT_BINARY_DIR}/include/smpi/mpif.h
 
 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
   )
 
   ${CMAKE_CURRENT_BINARY_DIR}/include/simgrid_config.h
   )
 
@@ -909,7 +901,6 @@ set(generated_files_to_clean
   ${generated_headers_to_install}
   ${CMAKE_BINARY_DIR}/bin/smpicc
   ${CMAKE_BINARY_DIR}/bin/smpicxx
   ${generated_headers_to_install}
   ${CMAKE_BINARY_DIR}/bin/smpicc
   ${CMAKE_BINARY_DIR}/bin/smpicxx
-  ${CMAKE_BINARY_DIR}/bin/smpif2c
   ${CMAKE_BINARY_DIR}/bin/smpiff
   ${CMAKE_BINARY_DIR}/bin/smpif90
   ${CMAKE_BINARY_DIR}/bin/smpirun
   ${CMAKE_BINARY_DIR}/bin/smpiff
   ${CMAKE_BINARY_DIR}/bin/smpif90
   ${CMAKE_BINARY_DIR}/bin/smpirun
index a507408..e602a54 100644 (file)
@@ -233,7 +233,7 @@ set(SMPI_SRC
   src/smpi/smpi_topo.c
   )
 
   src/smpi/smpi_topo.c
   )
 
-if(SMPI_F2C)
+if(SMPI_FORTRAN)
   set(SMPI_SRC
     ${SMPI_SRC}
     src/smpi/smpi_f77.c
   set(SMPI_SRC
     ${SMPI_SRC}
     src/smpi/smpi_f77.c
@@ -665,7 +665,6 @@ set(headers_to_install
 set(source_of_generated_headers
   include/simgrid_config.h.in
   include/smpi/mpif.h.in
 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)
 
 ### depend of some variables setted upper
   src/context_sysv_config.h.in)
 
 ### depend of some variables setted upper
@@ -907,7 +906,6 @@ set(bin_files
   ${bin_files}
   src/smpi/smpicc.in
   src/smpi/smpicxx.in
   ${bin_files}
   src/smpi/smpicc.in
   src/smpi/smpicxx.in
-  src/smpi/smpif2c.in
   src/smpi/smpiff.in
   src/smpi/smpif90.in
   src/smpi/smpirun.in
   src/smpi/smpiff.in
   src/smpi/smpif90.in
   src/smpi/smpirun.in
@@ -1103,7 +1101,6 @@ set(CMAKE_SOURCE_FILES
   buildtools/Cmake/MakeJava.cmake
   buildtools/Cmake/MakeLib.cmake
   buildtools/Cmake/MakeLibWin.cmake
   buildtools/Cmake/MakeJava.cmake
   buildtools/Cmake/MakeLib.cmake
   buildtools/Cmake/MakeLibWin.cmake
-  buildtools/Cmake/Modules/FindF2c.cmake
   buildtools/Cmake/Modules/FindGFortran.cmake
   buildtools/Cmake/Modules/FindGTnets.cmake
   buildtools/Cmake/Modules/FindGraphviz.cmake
   buildtools/Cmake/Modules/FindGFortran.cmake
   buildtools/Cmake/Modules/FindGTnets.cmake
   buildtools/Cmake/Modules/FindGraphviz.cmake
index 597fc9e..96fbcbc 100644 (file)
@@ -32,15 +32,10 @@ if(enable_smpi)
     ${CMAKE_BINARY_DIR}/bin/smpicxx
     ${CMAKE_BINARY_DIR}/bin/smpirun
     DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
     ${CMAKE_BINARY_DIR}/bin/smpicxx
     ${CMAKE_BINARY_DIR}/bin/smpirun
     DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
-  if(SMPI_F2C)
-    install(PROGRAMS
-      ${CMAKE_BINARY_DIR}/bin/smpif2c
-      ${CMAKE_BINARY_DIR}/bin/smpiff
-      DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
-  endif()
-  if(SMPI_F90)
+  if(SMPI_FORTRAN)
     install(PROGRAMS
       ${CMAKE_BINARY_DIR}/bin/smpif90
     install(PROGRAMS
       ${CMAKE_BINARY_DIR}/bin/smpif90
+      ${CMAKE_BINARY_DIR}/bin/smpiff
       DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
   endif()
 endif()
       DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/)
   endif()
 endif()
@@ -140,7 +135,6 @@ add_custom_target(uninstall
   COMMAND ${CMAKE_COMMAND} -E  echo "uninstall lib ok"
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpicc
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpicxx
   COMMAND ${CMAKE_COMMAND} -E  echo "uninstall lib ok"
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpicc
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpicxx
-  COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpif2c
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpiff
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpif90
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpirun
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpiff
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpif90
   COMMAND ${CMAKE_COMMAND} -E  remove -f ${CMAKE_INSTALL_PREFIX}/bin/smpirun
diff --git a/buildtools/Cmake/Modules/FindF2c.cmake b/buildtools/Cmake/Modules/FindF2c.cmake
deleted file mode 100644 (file)
index 4d22501..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-find_program(F2C_EXE
-  NAME f2c
-  PATH_SUFFIXES bin/
-  PATHS
-  /opt
-  /opt/local
-  /opt/csw
-  /sw
-  /usr
-  )
-
-if(F2C_EXE)
-  message(STATUS "Looking for bin f2c - found: ${F2C_EXE}")
-else()
-  message(STATUS "Looking for bin f2c - not found (http://www.netlib.org/f2c/)")
-endif()
-
-find_library(HAVE_F2C_LIB
-  NAME f2c
-  HINTS
-  ENV LD_LIBRARY_PATH
-  PATH_SUFFIXES lib/
-  PATHS
-  /opt
-  /opt/local
-  /opt/csw
-  /sw
-  /usr
-  )
-
-if(HAVE_F2C_LIB)
-  message(STATUS "Looking for lib f2c - found: ${HAVE_F2C_LIB}")
-else()
-  message(STATUS "Looking for lib f2c - not found")
-endif()
-
-get_filename_component(F2C_HINT ${HAVE_F2C_LIB} PATH)
-find_path(HAVE_F2C_H f2c.h
-  HINTS
-  ${F2C_HINT}/..
-  PATH_SUFFIXES include/
-  PATHS
-  /opt
-  /opt/local
-  /opt/csw
-  /sw
-  /usr
-  )
-
-if(HAVE_F2C_H)
-  message(STATUS "Looking for f2c.h - found: ${HAVE_F2C_H}")
-else()
-  message(STATUS "Looking for f2c.h - not found")
-endif()
-
-if(HAVE_F2C_H)
-  set(HAVE_SMPI_F2C_H 1)
-endif()
-
-mark_as_advanced(HAVE_F2C_H)
-mark_as_advanced(F2C_EXE)
-mark_as_advanced(HAVE_F2C_LIB)
-
-if(HAVE_F2C_LIB)
-  get_filename_component(F2C_LIBRARY_PATH "${HAVE_F2C_LIB}" PATH)
-  file(TO_NATIVE_PATH "${F2C_LIBRARY_PATH}" F2C_LIBRARY_PATH)
-endif()
-
-#Some old versions of 64 bits systems seem to have a different size between C and Fortran Datatypes
-#Deactivate F2C with these versions, in order to avoid breaking test cases in legacy systems (as Fedora 13)
-set(COMPILER_OK 1)
-if(PROCESSOR_x86_64 AND "${CMAKE_SYSTEM}" MATCHES "Linux" AND ${CMAKE_C_COMPILER_ID} STREQUAL "GNU" AND "4.5" STRGREATER "${COMPILER_C_VERSION_MAJOR_MINOR}" )
-    set(COMPILER_OK 0)
-    message("Your C compiler is a bit old and Fortran support is quite problematic on 64 bit platforms, F2C has been deactivated")
-endif()
-
-set(SMPI_F2C 0)
-if(HAVE_F2C_H AND F2C_EXE AND HAVE_F2C_LIB AND COMPILER_OK)
-  set(SMPI_F2C 1)
-endif()
-
-if(SMPI_F2C)
-  include_directories(${HAVE_F2C_H})
-else()
-  message("-- Fortran 77 support for smpi is disabled.")
-endif()
index ff01f17..4dada0d 100644 (file)
@@ -12,23 +12,14 @@ find_program(GFORTRAN_EXE
 mark_as_advanced(GFORTRAN_EXE)
 
 message(STATUS "Looking for bin gfortran")
 mark_as_advanced(GFORTRAN_EXE)
 
 message(STATUS "Looking for bin gfortran")
+set(SMPI_FORTRAN 0)
 if(GFORTRAN_EXE)
   message(STATUS "Found gfortran: ${GFORTRAN_EXE}")
 if(GFORTRAN_EXE)
   message(STATUS "Found gfortran: ${GFORTRAN_EXE}")
+  set(SMPI_FORTRAN 1)
 else()
   message(STATUS "Looking for bin gfortran - not found")
 endif()
 
 else()
   message(STATUS "Looking for bin gfortran - not found")
 endif()
 
-set(SMPI_F90 0)
-if(GFORTRAN_EXE)
-  if(NOT SMPI_F2C)
-    message("-- Fortran 90 support for smpi also needs f2c.")
-  #elseif(HAVE_MC)
-  #  message("-- Fortran 90 support for smpi is currently not compatible with model checking.")
-  else()
-    set(SMPI_F90 1)
-  endif()
-endif()
-
-if(NOT SMPI_F90)
-  message("-- Fortran 90 support for smpi is disabled.")
+if(NOT SMPI_FORTRAN)
+  message("-- Fortran support for smpi is disabled.")
 endif()
 endif()
index cf3c58b..5180926 100644 (file)
@@ -112,8 +112,8 @@ message("        Compile Scala........: ${HAVE_Scala}")
 message("        Compile Lua .........: ${HAVE_LUA}")
 message("        Compile Smpi ........: ${HAVE_SMPI}")
 message("        Compile MPI testsuite: ${enable_smpi_MPICH3_testsuite}")
 message("        Compile Lua .........: ${HAVE_LUA}")
 message("        Compile Smpi ........: ${HAVE_SMPI}")
 message("        Compile MPI testsuite: ${enable_smpi_MPICH3_testsuite}")
-message("        Compile Smpi f77 ....: ${SMPI_F2C}")
-message("        Compile Smpi f90 ....: ${SMPI_F90}")
+message("        Compile Smpi f77 ....: ${SMPI_FORTRAN}")
+message("        Compile Smpi f90 ....: ${SMPI_FORTRAN}")
 message("        Compile Static ......: ${enable_lib_static}")
 if(enable_java)
   message("        Native lib in jar ...: ${enable_lib_in_jar}")
 message("        Compile Static ......: ${enable_lib_static}")
 if(enable_java)
   message("        Native lib in jar ...: ${enable_lib_in_jar}")
index 71b4bb4..76f05f8 100644 (file)
 /* Indicates that we have SMPI support */
 #cmakedefine HAVE_SMPI @HAVE_SMPI@
 
 /* Indicates that we have SMPI support */
 #cmakedefine HAVE_SMPI @HAVE_SMPI@
 
-/* Indicates that we have SMPI F2C support */
-#cmakedefine  SMPI_F2C @SMPI_F2C@
+/* Indicates that we have SMPI FORTRAN support */
+#cmakedefine  SMPI_FORTRAN @SMPI_FORTRAN@
 
 /* Indicates that we have NS3 support */
 #cmakedefine HAVE_NS3 @HAVE_NS3@
 
 /* Indicates that we have NS3 support */
 #cmakedefine HAVE_NS3 @HAVE_NS3@
index 53813ec..e5dbeaf 100644 (file)
@@ -188,7 +188,6 @@ SectionEnd
 Section "SMPI Library" SMPISection\r
        setOutPath $INSTDIR\bin\r
        file bin\smpicc\r
 Section "SMPI Library" SMPISection\r
        setOutPath $INSTDIR\bin\r
        file bin\smpicc\r
-       file bin\smpif2c\r
        file bin\smpiff\r
        file bin\smpirun\r
        file bin\smpif90\r
        file bin\smpiff\r
        file bin\smpirun\r
        file bin\smpif90\r
@@ -202,7 +201,6 @@ Section "SMPI Library" SMPISection
        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 @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
        file /r @CMAKE_HOME_DIRECTORY@\examples\smpi\tracing\r
        \r
        CreateDirectory $INSTDIR\examples\smpi\r
        file /r @CMAKE_HOME_DIRECTORY@\examples\smpi\tracing\r
@@ -285,7 +283,6 @@ section "Uninstall"
        delete $INSTDIR\bin\graphicator@BIN_EXE@\r
        delete $INSTDIR\bin\simgrid_update_xml\r
        delete $INSTDIR\bin\smpicc\r
        delete $INSTDIR\bin\graphicator@BIN_EXE@\r
        delete $INSTDIR\bin\simgrid_update_xml\r
        delete $INSTDIR\bin\smpicc\r
-       delete $INSTDIR\bin\smpif2c\r
        delete $INSTDIR\bin\smpiff\r
        delete $INSTDIR\bin\smpirun\r
        delete $INSTDIR\bin\tesh\r
        delete $INSTDIR\bin\smpiff\r
        delete $INSTDIR\bin\smpirun\r
        delete $INSTDIR\bin\tesh\r
@@ -343,7 +340,6 @@ section "Uninstall"
        delete $INSTDIR\include\smpi\mpif.h\r
        delete $INSTDIR\include\smpi\smpi_cocci.h\r
        delete $INSTDIR\include\smpi\smpi_main.h\r
        delete $INSTDIR\include\smpi\mpif.h\r
        delete $INSTDIR\include\smpi\smpi_cocci.h\r
        delete $INSTDIR\include\smpi\smpi_main.h\r
-       delete $INSTDIR\include\smpi\smpif.h\r
        delete $INSTDIR\include\surf\surfxml_parse.h\r
        delete $INSTDIR\include\surf\simgrid_dtd.h\r
        delete $INSTDIR\include\surf\surf_routing.h\r
        delete $INSTDIR\include\surf\surfxml_parse.h\r
        delete $INSTDIR\include\surf\simgrid_dtd.h\r
        delete $INSTDIR\include\surf\surf_routing.h\r
index 616a219..4d95e0c 100644 (file)
@@ -50,8 +50,8 @@ done by adding the files to the EXTRA_DIST list, as in the following
 example:
 
 \verbatim
 example:
 
 \verbatim
-### If f2c is installed compiled source other-whise source is only copy in the dist 
-if(SMPI_F2C)
+### If fortran is installed compile source other-whise source is only copied in the dist 
+if(SMPI_FORTRAN)
   set(SMPI_SRC
     ${SMPI_SRC}
     src/smpi/smpi_f77.c
   set(SMPI_SRC
     ${SMPI_SRC}
     src/smpi/smpi_f77.c
index 52709c2..6fd67a1 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND SMPI_F2C)
+if(enable_smpi AND SMPI_FORTRAN)
   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
 
   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
index 84b55b5..9187792 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND SMPI_F90)
+if(enable_smpi AND SMPI_FORTRAN)
   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
   set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
 
   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
diff --git a/include/smpi/smpif.h.in b/include/smpi/smpif.h.in
deleted file mode 100644 (file)
index a61dabc..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright (c) 2007-2014. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SMPIF_H
-#define SMPIF_H
-
-#cmakedefine SMPI_F2C @SMPI_F2C@
-
-#ifdef SMPI_F2C
-
-#include <xbt/misc.h>
-#include <smpi/smpi.h>
-/* those are defined in f2c.h */
-#undef min
-#undef max
-#include <f2c.h>
-
-XBT_PUBLIC_DATA(__thread int) smpi_current_rank;
-
-XBT_PUBLIC(int) smpi_process_argc(void);
-XBT_PUBLIC(int) smpi_process_getarg(integer* index, char* dst, ftnlen len);
-
-#define smpi_sample_local__(pi,pt) \
-   { \
-      if(smpi_sample_1(0, __FILE__, __LINE__, *pi, *pt)) { \
-         smpi_sample_3(0, __FILE__, __LINE__); \
-      } \
-      if(!smpi_sample_2(0, __FILE__, __LINE__)) { \
-         continue; \
-      } \
-   }
-
-#define smpi_sample_global__(pi,pt) \
-   { \
-      if(smpi_sample_1(1, __FILE__, __LINE__, *pi, *pt)) { \
-         smpi_sample_3(1, __FILE__, __LINE__); \
-      } \
-      if(!smpi_sample_2(1, __FILE__, __LINE__)) { \
-         continue; \
-      } \
-   }
-
-
-#endif
-
-#endif // SMPI_F2C
index 89b9855..f596b2a 100644 (file)
@@ -848,7 +848,6 @@ void MC_init(){
   MC_ignore_global_variable("mc_comp_times");
   MC_ignore_global_variable("mc_snapshot_comparison_time"); 
   MC_ignore_global_variable("mc_time");
   MC_ignore_global_variable("mc_comp_times");
   MC_ignore_global_variable("mc_snapshot_comparison_time"); 
   MC_ignore_global_variable("mc_time");
-  MC_ignore_global_variable("smpi_current_rank");
   MC_ignore_global_variable("counter"); /* Static variable used for tracing */
   MC_ignore_global_variable("maestro_stack_start");
   MC_ignore_global_variable("maestro_stack_end");
   MC_ignore_global_variable("counter"); /* Static variable used for tracing */
   MC_ignore_global_variable("maestro_stack_start");
   MC_ignore_global_variable("maestro_stack_end");
index d8b00f0..b6a24e9 100644 (file)
@@ -14,7 +14,6 @@
 #include "simgrid/simix.h"
 #include "smpi/smpi_interface.h"
 #include "smpi/smpi.h"
 #include "simgrid/simix.h"
 #include "smpi/smpi_interface.h"
 #include "smpi/smpi.h"
-#include "smpi/smpif.h"
 #include "smpi/smpi_cocci.h"
 #include "instr/instr_private.h"
 
 #include "smpi/smpi_cocci.h"
 #include "instr/instr_private.h"
 
index 878f336..e33d659 100644 (file)
@@ -69,7 +69,6 @@ xbt_dict_t allocs = NULL;          /* Allocated on first use */
 xbt_dict_t allocs_metadata = NULL; /* Allocated on first use */
 xbt_dict_t samples = NULL;         /* Allocated on first use */
 xbt_dict_t calls = NULL;           /* Allocated on first use */
 xbt_dict_t allocs_metadata = NULL; /* Allocated on first use */
 xbt_dict_t samples = NULL;         /* Allocated on first use */
 xbt_dict_t calls = NULL;           /* Allocated on first use */
-__thread int smpi_current_rank = 0;      /* Updated after each MPI call */
 
 double smpi_cpu_threshold;
 double smpi_running_power;
 
 double smpi_cpu_threshold;
 double smpi_running_power;
@@ -192,7 +191,6 @@ void smpi_bench_begin(void)
 {
   switch_data_segment(smpi_process_index());
   xbt_os_threadtimer_start(smpi_process_timer());
 {
   switch_data_segment(smpi_process_index());
   xbt_os_threadtimer_start(smpi_process_timer());
-  smpi_current_rank = smpi_process_index();
 }
 
 void smpi_bench_end(void)
 }
 
 void smpi_bench_end(void)
index a8ab0ae..608bba4 100644 (file)
@@ -7,6 +7,7 @@
 #include "xbt/log.h"
 #include "simgrid/simix.h"
 #include "smpi/smpi.h"
 #include "xbt/log.h"
 #include "simgrid/simix.h"
 #include "smpi/smpi.h"
+#include "internal_config.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_dvfs, smpi,
                                 "Logging specific to SMPI (experimental DVFS support)");
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_dvfs, smpi,
                                 "Logging specific to SMPI (experimental DVFS support)");
@@ -60,9 +61,22 @@ double smpi_get_host_consumed_energy(void)
   return simcall_host_get_consumed_energy(SIMIX_host_self());
 }
 
   return simcall_host_get_consumed_energy(SIMIX_host_self());
 }
 
-#include "smpi/smpif.h"
 
 
-#ifdef SMPI_F2C
+#ifdef SMPI_FORTRAN
+
+#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
+typedef int integer;
+typedef unsigned int uinteger;
+#else
+typedef long int integer;
+typedef unsigned long int uinteger;
+#endif
+typedef char *address;
+typedef short int shortint;
+typedef float real;
+typedef double doublereal;
+typedef struct { real r, i; } complex;
+typedef struct { doublereal r, i; } doublecomplex;
 
 XBT_PUBLIC(doublereal) smpi_get_host_power_peak_at_(integer *pstate_index);
 doublereal smpi_get_host_power_peak_at_(integer *pstate_index)
 
 XBT_PUBLIC(doublereal) smpi_get_host_power_peak_at_(integer *pstate_index);
 doublereal smpi_get_host_power_peak_at_(integer *pstate_index)
index 95c40d7..1d8a6e4 100644 (file)
@@ -10,9 +10,6 @@
 #include "private.h"
 #include "xbt.h"
 
 #include "private.h"
 #include "xbt.h"
 
-extern int xargc;
-extern char** xargv;
-
 static xbt_dict_t comm_lookup = NULL;
 static xbt_dict_t group_lookup = NULL;
 static xbt_dict_t request_lookup = NULL;
 static xbt_dict_t comm_lookup = NULL;
 static xbt_dict_t group_lookup = NULL;
 static xbt_dict_t request_lookup = NULL;
@@ -20,27 +17,33 @@ static xbt_dict_t datatype_lookup = NULL;
 static xbt_dict_t op_lookup = NULL;
 static int running_processes = 0;
 
 static xbt_dict_t op_lookup = NULL;
 static int running_processes = 0;
 
+#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
+typedef int integer;
+typedef unsigned int uinteger;
+#else
+typedef long int integer;
+typedef unsigned long int uinteger;
+#endif
+
 /* Bindings for MPI special values */
 /* Bindings for MPI special values */
-union u_smpi_common {
+
   struct s_smpi_common {
     integer _MPI_IN_PLACE;
     integer _MPI_BOTTOM;
     integer _MPI_STATUS_IGNORE;
     integer _MPI_STATUSES_IGNORE;
   struct s_smpi_common {
     integer _MPI_IN_PLACE;
     integer _MPI_BOTTOM;
     integer _MPI_STATUS_IGNORE;
     integer _MPI_STATUSES_IGNORE;
-  } *f77;                       /* with f2c, remains NULL with gfortran */
-  struct s_smpi_common f90;     /* with gfortran */
-} smpi_ = { NULL };
+  } smpi_f90;                       
+
+
 
 /* Convert between Fortran and C */
 
 /* Convert between Fortran and C */
-#define F2C_ADDR(addr, val)                                             \
-  (((void *)(addr) == (void *)(smpi_.f77                                \
-                               ? &smpi_.f77[smpi_current_rank]._ ## val \
-                               : &smpi_.f90._ ## val))                  \
+#define FORT_ADDR(addr, val)                                         \
+  (((void *)(addr) == (void*) &(smpi_f90._ ## val))                  \
    ? (val) : (void *)(addr))
    ? (val) : (void *)(addr))
-#define F2C_BOTTOM(addr)          F2C_ADDR(addr, MPI_BOTTOM)
-#define F2C_IN_PLACE(addr)        F2C_ADDR(addr, MPI_IN_PLACE)
-#define F2C_STATUS_IGNORE(addr)   F2C_ADDR(addr, MPI_STATUS_IGNORE)
-#define F2C_STATUSES_IGNORE(addr) F2C_ADDR(addr, MPI_STATUSES_IGNORE)
+#define FORT_BOTTOM(addr)          FORT_ADDR(addr, MPI_BOTTOM)
+#define FORT_IN_PLACE(addr)        FORT_ADDR(addr, MPI_IN_PLACE)
+#define FORT_STATUS_IGNORE(addr)   FORT_ADDR(addr, MPI_STATUS_IGNORE)
+#define FORT_STATUSES_IGNORE(addr) FORT_ADDR(addr, MPI_STATUSES_IGNORE)
 
 #define KEY_SIZE (sizeof(int) * 2 + 1)
 
 
 #define KEY_SIZE (sizeof(int) * 2 + 1)
 
@@ -217,7 +220,6 @@ void mpi_init_(int* ierr) {
      new_op(MPI_BOR);
      new_op(MPI_BXOR);
    }
      new_op(MPI_BOR);
      new_op(MPI_BXOR);
    }
-   /* smpif2c is responsible for generating a call with the final arguments */
    *ierr = MPI_Init(NULL, NULL);
    running_processes++;
 }
    *ierr = MPI_Init(NULL, NULL);
    running_processes++;
 }
@@ -329,7 +331,7 @@ void mpi_send_init_(void *buf, int* count, int* datatype, int* dst, int* tag,
 void mpi_isend_(void *buf, int* count, int* datatype, int* dst,
                  int* tag, int* comm, int* request, int* ierr) {
   MPI_Request req;
 void mpi_isend_(void *buf, int* count, int* datatype, int* dst,
                  int* tag, int* comm, int* request, int* ierr) {
   MPI_Request req;
-  buf = (char *) F2C_BOTTOM(buf);
+  buf = (char *) FORT_BOTTOM(buf);
   *ierr = MPI_Isend(buf, *count, get_datatype(*datatype), *dst, *tag,
                     get_comm(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
   *ierr = MPI_Isend(buf, *count, get_datatype(*datatype), *dst, *tag,
                     get_comm(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
@@ -340,7 +342,7 @@ void mpi_isend_(void *buf, int* count, int* datatype, int* dst,
 void mpi_irsend_(void *buf, int* count, int* datatype, int* dst,
                  int* tag, int* comm, int* request, int* ierr) {
   MPI_Request req;
 void mpi_irsend_(void *buf, int* count, int* datatype, int* dst,
                  int* tag, int* comm, int* request, int* ierr) {
   MPI_Request req;
-  buf = (char *) F2C_BOTTOM(buf);
+  buf = (char *) FORT_BOTTOM(buf);
   *ierr = MPI_Irsend(buf, *count, get_datatype(*datatype), *dst, *tag,
                     get_comm(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
   *ierr = MPI_Irsend(buf, *count, get_datatype(*datatype), *dst, *tag,
                     get_comm(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
@@ -366,7 +368,7 @@ void mpi_sendrecv_(void* sendbuf, int* sendcount, int* sendtype, int* dst,
                 int* comm, MPI_Status* status, int* ierr) {
    *ierr = MPI_Sendrecv(sendbuf, *sendcount, get_datatype(*sendtype), *dst,
        *sendtag, recvbuf, *recvcount,get_datatype(*recvtype), *src, *recvtag,
                 int* comm, MPI_Status* status, int* ierr) {
    *ierr = MPI_Sendrecv(sendbuf, *sendcount, get_datatype(*sendtype), *dst,
        *sendtag, recvbuf, *recvcount,get_datatype(*recvtype), *src, *recvtag,
-       get_comm(*comm), F2C_STATUS_IGNORE(status));
+       get_comm(*comm), FORT_STATUS_IGNORE(status));
 }
 
 void mpi_recv_init_(void *buf, int* count, int* datatype, int* src, int* tag,
 }
 
 void mpi_recv_init_(void *buf, int* count, int* datatype, int* src, int* tag,
@@ -383,7 +385,7 @@ void mpi_recv_init_(void *buf, int* count, int* datatype, int* src, int* tag,
 void mpi_irecv_(void *buf, int* count, int* datatype, int* src, int* tag,
                  int* comm, int* request, int* ierr) {
   MPI_Request req;
 void mpi_irecv_(void *buf, int* count, int* datatype, int* src, int* tag,
                  int* comm, int* request, int* ierr) {
   MPI_Request req;
-  buf = (char *) F2C_BOTTOM(buf);
+  buf = (char *) FORT_BOTTOM(buf);
   *ierr = MPI_Irecv(buf, *count, get_datatype(*datatype), *src, *tag,
                     get_comm(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
   *ierr = MPI_Irecv(buf, *count, get_datatype(*datatype), *src, *tag,
                     get_comm(*comm), &req);
   if(*ierr == MPI_SUCCESS) {
@@ -418,7 +420,7 @@ void mpi_startall_(int* count, int* requests, int* ierr) {
 void mpi_wait_(int* request, MPI_Status* status, int* ierr) {
    MPI_Request req = find_request(*request);
    
 void mpi_wait_(int* request, MPI_Status* status, int* ierr) {
    MPI_Request req = find_request(*request);
    
-   *ierr = MPI_Wait(&req, F2C_STATUS_IGNORE(status));
+   *ierr = MPI_Wait(&req, FORT_STATUS_IGNORE(status));
    if(req==MPI_REQUEST_NULL){
      free_request(*request);
      *request=MPI_FORTRAN_REQUEST_NULL;
    if(req==MPI_REQUEST_NULL){
      free_request(*request);
      *request=MPI_FORTRAN_REQUEST_NULL;
@@ -449,7 +451,7 @@ void mpi_waitall_(int* count, int* requests, MPI_Status* status, int* ierr) {
   for(i = 0; i < *count; i++) {
     reqs[i] = find_request(requests[i]);
   }
   for(i = 0; i < *count; i++) {
     reqs[i] = find_request(requests[i]);
   }
-  *ierr = MPI_Waitall(*count, reqs, F2C_STATUSES_IGNORE(status));
+  *ierr = MPI_Waitall(*count, reqs, FORT_STATUSES_IGNORE(status));
   for(i = 0; i < *count; i++) {
       if(reqs[i]==MPI_REQUEST_NULL){
           free_request(requests[i]);
   for(i = 0; i < *count; i++) {
       if(reqs[i]==MPI_REQUEST_NULL){
           free_request(requests[i]);
@@ -470,23 +472,23 @@ void mpi_bcast_(void *buf, int* count, int* datatype, int* root, int* comm, int*
 
 void mpi_reduce_(void* sendbuf, void* recvbuf, int* count,
                   int* datatype, int* op, int* root, int* comm, int* ierr) {
 
 void mpi_reduce_(void* sendbuf, void* recvbuf, int* count,
                   int* datatype, int* op, int* root, int* comm, int* ierr) {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
-  sendbuf = (char *) F2C_BOTTOM(sendbuf);
-  recvbuf = (char *) F2C_BOTTOM(recvbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_BOTTOM(sendbuf);
+  recvbuf = (char *) FORT_BOTTOM(recvbuf);
   *ierr = MPI_Reduce(sendbuf, recvbuf, *count,
                      get_datatype(*datatype), get_op(*op), *root, get_comm(*comm));
 }
 
 void mpi_allreduce_(void* sendbuf, void* recvbuf, int* count, int* datatype,
                      int* op, int* comm, int* ierr) {
   *ierr = MPI_Reduce(sendbuf, recvbuf, *count,
                      get_datatype(*datatype), get_op(*op), *root, get_comm(*comm));
 }
 
 void mpi_allreduce_(void* sendbuf, void* recvbuf, int* count, int* datatype,
                      int* op, int* comm, int* ierr) {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
   *ierr = MPI_Allreduce(sendbuf, recvbuf, *count, get_datatype(*datatype),
                         get_op(*op), get_comm(*comm));
 }
 
 void mpi_reduce_scatter_(void* sendbuf, void* recvbuf, int* recvcounts, int* datatype,
                      int* op, int* comm, int* ierr) {
   *ierr = MPI_Allreduce(sendbuf, recvbuf, *count, get_datatype(*datatype),
                         get_op(*op), get_comm(*comm));
 }
 
 void mpi_reduce_scatter_(void* sendbuf, void* recvbuf, int* recvcounts, int* datatype,
                      int* op, int* comm, int* ierr) {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
   *ierr = MPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, get_datatype(*datatype),
                         get_op(*op), get_comm(*comm));
 }
   *ierr = MPI_Reduce_scatter(sendbuf, recvbuf, recvcounts, get_datatype(*datatype),
                         get_op(*op), get_comm(*comm));
 }
@@ -494,7 +496,7 @@ void mpi_reduce_scatter_(void* sendbuf, void* recvbuf, int* recvcounts, int* dat
 void mpi_scatter_(void* sendbuf, int* sendcount, int* sendtype,
                    void* recvbuf, int* recvcount, int* recvtype, 
                    int* root, int* comm, int* ierr) {
 void mpi_scatter_(void* sendbuf, int* sendcount, int* sendtype,
                    void* recvbuf, int* recvcount, int* recvtype, 
                    int* root, int* comm, int* ierr) {
-  recvbuf = (char *) F2C_IN_PLACE(recvbuf);
+  recvbuf = (char *) FORT_IN_PLACE(recvbuf);
   *ierr = MPI_Scatter(sendbuf, *sendcount, get_datatype(*sendtype),
                       recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
   *ierr = MPI_Scatter(sendbuf, *sendcount, get_datatype(*sendtype),
                       recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
@@ -503,7 +505,7 @@ void mpi_scatter_(void* sendbuf, int* sendcount, int* sendtype,
 void mpi_scatterv_(void* sendbuf, int* sendcounts, int* displs, int* sendtype,
                    void* recvbuf, int* recvcount, int* recvtype,
                    int* root, int* comm, int* ierr) {
 void mpi_scatterv_(void* sendbuf, int* sendcounts, int* displs, int* sendtype,
                    void* recvbuf, int* recvcount, int* recvtype,
                    int* root, int* comm, int* ierr) {
-  recvbuf = (char *) F2C_IN_PLACE(recvbuf);
+  recvbuf = (char *) FORT_IN_PLACE(recvbuf);
   *ierr = MPI_Scatterv(sendbuf, sendcounts, displs, get_datatype(*sendtype),
                       recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
   *ierr = MPI_Scatterv(sendbuf, sendcounts, displs, get_datatype(*sendtype),
                       recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
@@ -511,9 +513,9 @@ void mpi_scatterv_(void* sendbuf, int* sendcounts, int* displs, int* sendtype,
 void mpi_gather_(void* sendbuf, int* sendcount, int* sendtype,
                   void* recvbuf, int* recvcount, int* recvtype,
                   int* root, int* comm, int* ierr) {
 void mpi_gather_(void* sendbuf, int* sendcount, int* sendtype,
                   void* recvbuf, int* recvcount, int* recvtype,
                   int* root, int* comm, int* ierr) {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
-  sendbuf = (char *) F2C_BOTTOM(sendbuf);
-  recvbuf = (char *) F2C_BOTTOM(recvbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_BOTTOM(sendbuf);
+  recvbuf = (char *) FORT_BOTTOM(recvbuf);
   *ierr = MPI_Gather(sendbuf, *sendcount, get_datatype(*sendtype),
                      recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
   *ierr = MPI_Gather(sendbuf, *sendcount, get_datatype(*sendtype),
                      recvbuf, *recvcount, get_datatype(*recvtype), *root, get_comm(*comm));
 }
@@ -521,9 +523,9 @@ void mpi_gather_(void* sendbuf, int* sendcount, int* sendtype,
 void mpi_gatherv_(void* sendbuf, int* sendcount, int* sendtype,
                   void* recvbuf, int* recvcounts, int* displs, int* recvtype,
                   int* root, int* comm, int* ierr) {
 void mpi_gatherv_(void* sendbuf, int* sendcount, int* sendtype,
                   void* recvbuf, int* recvcounts, int* displs, int* recvtype,
                   int* root, int* comm, int* ierr) {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
-  sendbuf = (char *) F2C_BOTTOM(sendbuf);
-  recvbuf = (char *) F2C_BOTTOM(recvbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_BOTTOM(sendbuf);
+  recvbuf = (char *) FORT_BOTTOM(recvbuf);
   *ierr = MPI_Gatherv(sendbuf, *sendcount, get_datatype(*sendtype),
                      recvbuf, recvcounts, displs, get_datatype(*recvtype), *root, get_comm(*comm));
 }
   *ierr = MPI_Gatherv(sendbuf, *sendcount, get_datatype(*sendtype),
                      recvbuf, recvcounts, displs, get_datatype(*recvtype), *root, get_comm(*comm));
 }
@@ -531,7 +533,7 @@ void mpi_gatherv_(void* sendbuf, int* sendcount, int* sendtype,
 void mpi_allgather_(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcount, int* recvtype,
                      int* comm, int* ierr) {
 void mpi_allgather_(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcount, int* recvtype,
                      int* comm, int* ierr) {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
   *ierr = MPI_Allgather(sendbuf, *sendcount, get_datatype(*sendtype),
                         recvbuf, *recvcount, get_datatype(*recvtype), get_comm(*comm));
 }
   *ierr = MPI_Allgather(sendbuf, *sendcount, get_datatype(*sendtype),
                         recvbuf, *recvcount, get_datatype(*recvtype), get_comm(*comm));
 }
@@ -539,7 +541,7 @@ void mpi_allgather_(void* sendbuf, int* sendcount, int* sendtype,
 void mpi_allgatherv_(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcounts,int* displs, int* recvtype,
                      int* comm, int* ierr) {
 void mpi_allgatherv_(void* sendbuf, int* sendcount, int* sendtype,
                      void* recvbuf, int* recvcounts,int* displs, int* recvtype,
                      int* comm, int* ierr) {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
   *ierr = MPI_Allgatherv(sendbuf, *sendcount, get_datatype(*sendtype),
                         recvbuf, recvcounts, displs, get_datatype(*recvtype), get_comm(*comm));
 }
   *ierr = MPI_Allgatherv(sendbuf, *sendcount, get_datatype(*sendtype),
                         recvbuf, recvcounts, displs, get_datatype(*recvtype), get_comm(*comm));
 }
@@ -564,7 +566,7 @@ void mpi_alltoallv_(void* sendbuf, int* sendcounts, int* senddisps, int* sendtyp
 
 void mpi_test_ (int * request, int *flag, MPI_Status * status, int* ierr){
   MPI_Request req = find_request(*request);
 
 void mpi_test_ (int * request, int *flag, MPI_Status * status, int* ierr){
   MPI_Request req = find_request(*request);
-  *ierr= MPI_Test(&req, flag, F2C_STATUS_IGNORE(status));
+  *ierr= MPI_Test(&req, flag, FORT_STATUS_IGNORE(status));
   if(req==MPI_REQUEST_NULL){
       free_request(*request);
       *request=MPI_FORTRAN_REQUEST_NULL;
   if(req==MPI_REQUEST_NULL){
       free_request(*request);
       *request=MPI_FORTRAN_REQUEST_NULL;
@@ -579,7 +581,7 @@ void mpi_testall_ (int* count, int * requests,  int *flag, MPI_Status * statuses
   for(i = 0; i < *count; i++) {
     reqs[i] = find_request(requests[i]);
   }
   for(i = 0; i < *count; i++) {
     reqs[i] = find_request(requests[i]);
   }
-  *ierr= MPI_Testall(*count, reqs, flag, F2C_STATUSES_IGNORE(statuses));
+  *ierr= MPI_Testall(*count, reqs, flag, FORT_STATUSES_IGNORE(statuses));
   for(i = 0; i < *count; i++) {
     if(reqs[i]==MPI_REQUEST_NULL){
         free_request(requests[i]);
   for(i = 0; i < *count; i++) {
     if(reqs[i]==MPI_REQUEST_NULL){
         free_request(requests[i]);
@@ -594,7 +596,7 @@ void mpi_get_processor_name_(char *name, int *resultlen, int* ierr){
 }
 
 void mpi_get_count_(MPI_Status * status, int* datatype, int *count, int* ierr){
 }
 
 void mpi_get_count_(MPI_Status * status, int* datatype, int *count, int* ierr){
-  *ierr = MPI_Get_count(F2C_STATUS_IGNORE(status), get_datatype(*datatype), count);
+  *ierr = MPI_Get_count(FORT_STATUS_IGNORE(status), get_datatype(*datatype), count);
 }
 
 void mpi_attr_get_(int* comm, int* keyval, void* attr_value, int* flag, int* ierr ){
 }
 
 void mpi_attr_get_(int* comm, int* keyval, void* attr_value, int* flag, int* ierr ){
@@ -749,7 +751,7 @@ void mpi_init_thread_ (int* required, int *provided, int* ierr){
     new_op(MPI_BOR);
     new_op(MPI_BXOR);
   }
     new_op(MPI_BOR);
     new_op(MPI_BXOR);
   }
-  /* smpif2c is responsible for generating a call with the final arguments */
+
  *ierr = MPI_Init_thread(NULL, NULL,*required, provided);
 }
 
  *ierr = MPI_Init_thread(NULL, NULL,*required, provided);
 }
 
@@ -979,7 +981,7 @@ void mpi_sendrecv_replace_ (void *buf, int* count, int* datatype, int* dst, int*
 {
 
  *ierr = MPI_Sendrecv_replace(buf, *count, get_datatype(*datatype), *dst, *sendtag, *src,
 {
 
  *ierr = MPI_Sendrecv_replace(buf, *count, get_datatype(*datatype), *dst, *sendtag, *src,
- *recvtag, get_comm(*comm), F2C_STATUS_IGNORE(status));
+ *recvtag, get_comm(*comm), FORT_STATUS_IGNORE(status));
 }
 
 void mpi_testany_ (int* count, int* requests, int *index, int *flag, MPI_Status* status, int* ierr)
 }
 
 void mpi_testany_ (int* count, int* requests, int *index, int *flag, MPI_Status* status, int* ierr)
@@ -991,7 +993,7 @@ void mpi_testany_ (int* count, int* requests, int *index, int *flag, MPI_Status*
   for(i = 0; i < *count; i++) {
     reqs[i] = find_request(requests[i]);
   }
   for(i = 0; i < *count; i++) {
     reqs[i] = find_request(requests[i]);
   }
-  *ierr = MPI_Testany(*count, reqs, index, flag, F2C_STATUS_IGNORE(status));
+  *ierr = MPI_Testany(*count, reqs, index, flag, FORT_STATUS_IGNORE(status));
   if(*index!=MPI_UNDEFINED)
   if(reqs[*index]==MPI_REQUEST_NULL){
     free_request(requests[*index]);
   if(*index!=MPI_UNDEFINED)
   if(reqs[*index]==MPI_REQUEST_NULL){
     free_request(requests[*index]);
@@ -1026,7 +1028,7 @@ void mpi_reduce_local_ (void *inbuf, void *inoutbuf, int* count, int* datatype,
 
 void mpi_reduce_scatter_block_ (void *sendbuf, void *recvbuf, int* recvcount, int* datatype, int* op, int* comm, int* ierr)
 {
 
 void mpi_reduce_scatter_block_ (void *sendbuf, void *recvbuf, int* recvcount, int* datatype, int* op, int* comm, int* ierr)
 {
-  sendbuf = (char *) F2C_IN_PLACE(sendbuf);
+  sendbuf = (char *) FORT_IN_PLACE(sendbuf);
  *ierr = MPI_Reduce_scatter_block(sendbuf, recvbuf, *recvcount, get_datatype(*datatype), get_op(*op), get_comm(*comm));
 }
 
  *ierr = MPI_Reduce_scatter_block(sendbuf, recvbuf, *recvcount, get_datatype(*datatype), get_op(*op), get_comm(*comm));
 }
 
@@ -1167,7 +1169,7 @@ void mpi_testsome_ (int* incount, int*  requests, int* outcount, int* indices, M
     reqs[i] = find_request(requests[i]);
     indices[i]=0;
   }
     reqs[i] = find_request(requests[i]);
     indices[i]=0;
   }
-  *ierr = MPI_Testsome(*incount, reqs, outcount, indices, F2C_STATUSES_IGNORE(statuses));
+  *ierr = MPI_Testsome(*incount, reqs, outcount, indices, FORT_STATUSES_IGNORE(statuses));
   for(i=0;i<*incount;i++){
     if(indices[i]){
       if(reqs[indices[i]]==MPI_REQUEST_NULL){
   for(i=0;i<*incount;i++){
     if(indices[i]){
       if(reqs[indices[i]]==MPI_REQUEST_NULL){
@@ -1324,7 +1326,7 @@ void mpi_issend_ (void* buf, int* count, int* datatype, int *dest, int* tag, int
 }
 
 void mpi_probe_ (int* source, int* tag, int* comm, MPI_Status*  status, int* ierr) {
 }
 
 void mpi_probe_ (int* source, int* tag, int* comm, MPI_Status*  status, int* ierr) {
- *ierr = MPI_Probe(*source, *tag, get_comm(*comm), F2C_STATUS_IGNORE(status));
+ *ierr = MPI_Probe(*source, *tag, get_comm(*comm), FORT_STATUS_IGNORE(status));
 }
 
 void mpi_attr_delete_ (int* comm, int* keyval, int* ierr) {
 }
 
 void mpi_attr_delete_ (int* comm, int* keyval, int* ierr) {
index 02d4a9f..775e84a 100644 (file)
@@ -79,9 +79,6 @@ void smpi_process_init(int *argc, char ***argv)
     int rank = atoi((*argv)[2]);
     index =  SIMIX_process_get_PID(proc) -1;
 
     int rank = atoi((*argv)[2]);
     index =  SIMIX_process_get_PID(proc) -1;
 
-#ifdef SMPI_F2C
-    smpi_current_rank = index;
-#endif
     if(!index_to_process_data){
         index_to_process_data=(int*)xbt_malloc(SIMIX_process_count()*sizeof(int));
     }
     if(!index_to_process_data){
         index_to_process_data=(int*)xbt_malloc(SIMIX_process_count()*sizeof(int));
     }
@@ -172,33 +169,6 @@ void smpi_process_mark_as_initialized(void)
 }
 
 
 }
 
 
-#ifdef SMPI_F2C
-int smpi_process_argc(void)
-{
-  smpi_process_data_t data = smpi_process_data();
-  return data->argc ? *(data->argc) - 1 : 0;
-}
-
-int smpi_process_getarg(integer * index, char *dst, ftnlen len)
-{
-  smpi_process_data_t data = smpi_process_data();
-  char *arg;
-  ftnlen i;
-
-  if (!data->argc || !data->argv || *index < 1 || *index >= *(data->argc)) {
-    return -1;
-  }
-  arg = (*data->argv)[*index];
-  for (i = 0; i < len && arg[i] != '\0'; i++) {
-    dst[i] = arg[i];
-  }
-  for (; i < len; i++) {
-    dst[i] = ' ';
-  }
-  return 0;
-}
-#endif
-
 int smpi_global_size(void)
 {
   char *value = getenv("SMPI_GLOBAL_SIZE");
 int smpi_global_size(void)
 {
   char *value = getenv("SMPI_GLOBAL_SIZE");
@@ -464,12 +434,6 @@ void smpi_global_destroy(void)
   smpi_free_static();
 }
 
   smpi_free_static();
 }
 
-/* Fortran specific stuff */
-/* With smpicc, the following weak symbols are used */
-/* With smpiff, the following weak symbols are replaced by those in libf2c */
-int __attribute__ ((weak)) xargc;
-char ** __attribute__ ((weak)) xargv;
-
 #ifndef WIN32
 void __attribute__ ((weak)) user_main_()
 {
 #ifndef WIN32
 void __attribute__ ((weak)) user_main_()
 {
@@ -489,10 +453,6 @@ int __attribute__ ((weak)) main(int argc, char **argv)
   return smpi_main(smpi_simulated_main_, argc, argv);
 }
 
   return smpi_main(smpi_simulated_main_, argc, argv);
 }
 
-int __attribute__ ((weak)) MAIN__()
-{
-  return smpi_main(smpi_simulated_main_, xargc, xargv);
-};
 #endif
 
 static void smpi_init_logs(){
 #endif
 
 static void smpi_init_logs(){
diff --git a/src/smpi/smpif2c.in b/src/smpi/smpif2c.in
deleted file mode 100755 (executable)
index e79c31f..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /usr/bin/env perl
-
-# Copyright (c) 2010-2014. The SimGrid Team.
-# All rights reserved.
-
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the license (GNU LGPL) which comes with this package.
-
-use warnings;
-use strict;
-use File::Temp;
-use File::Copy;
-
-my $include="@includeflag@@f2cflags@";
-
-foreach my $fortran (@ARGV) {
-   my $output = $fortran;
-   $output =~ s/.f$/.c/;
-
-   #print "F2C INPUT : ".$fortran."\n";
-   #print "F2C OUTPUT: ".$output."\n";
-
-   my$outputdir = $output;
-   $outputdir=~s/[^\/]*\.c$//g;
-   #print "F2C DIR   : ".$outputdir."\n";
-
-   my $tmp = new File::Temp;
-   $tmp->autoflush(1);
-   #print "f2c -d$outputdir $include -w -a $fortran\n";
-   `f2c -d$outputdir $include -w -a $fortran`;
-   die "F2C failed\n" if $?;
-   open F2C,"<$output" or die "Unable to open file $output";
-   my $started = 0;
-   print $tmp "#ifndef INTEGER_STAR_8\n";
-   print $tmp "#define INTEGER_STAR_8\n";
-   print $tmp "#endif\n";
-   print $tmp "#include <stdlib.h>\n";
-   print $tmp "#include <smpif.h>\n";
-   while(<F2C>) {
-      chomp;
-      if(/\/\* Common Block Declarations \*\//) {
-         $started = 1;
-      }
-      if($started) {
-         if(/^} (.*?);/) {
-            $_ = "}* __attribute__((weak)) $1 = NULL;\n";
-         } elsif(/^#define\s*(\S*)\s*\(?([^.]*)(\..*?)?\)?$/) {
-            $_ = "#define $1 $2\[smpi_current_rank\]";
-            if(defined $3) {
-               $_ .= $3;
-            }
-            $_ .= "\n";
-            $_ .= "\nvoid __attribute__((weak,constructor)) __preinit_$1(void) {\n  if(!$2) $2 = malloc(smpi_global_size() * sizeof(*$2));\n}\n";
-            $_ .= "\nvoid __attribute__((weak,destructor)) __postfini_$1(void) {\n  free($2);\n  $2 = NULL;\n}\n";
-         }
-      }
-      if(/\/\* Table of constant values \*\// || /MAIN__/) {
-         $started = 0;
-      }
-      $_ =~ s/(mpi_[\w]*_)_/$1/g;
-      if(/\/* Main program alias \*\/\s*int\s+.*\s*\(\s*\)\s*{(.*)}/) {
-         $_ = "int smpi_simulated_main_(int argc, char** argv) { smpi_process_init(&argc, &argv); $1 }\n";
-      }
-      print $tmp "$_\n";
-   }
-   close F2C;
-   copy($tmp->filename,$output) or die "Copy failed: $!\n";
-}
index b3f9899..55916b7 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index ad84557..0ae2a3f 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index cedc5c1..3560877 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index bc07be4..fc6366c 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index cf6b636..2d0c920 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index 523aa93..7cee626 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index e7cc14a..8145098 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index c0e65e2..b56403b 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F2C)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index 1f8e36b..c48dd83 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F90)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index 3ad68e7..d5c02d2 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F90)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index 398f3db..254e6b1 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F90)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index 9275e6a..89e3b7d 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F90)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
index 04968a4..224b031 100644 (file)
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 2.6)
 
 cmake_minimum_required(VERSION 2.6)
 
-if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_F90)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()