Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
merge msg_vm.c - adrien (please note that there is one line (destruction of the tx_pr...
authorAdrien Lebre <alebre@adsein.local>
Fri, 28 Nov 2014 16:29:16 +0000 (17:29 +0100)
committerAdrien Lebre <alebre@adsein.local>
Fri, 28 Nov 2014 16:29:16 +0000 (17:29 +0100)
273 files changed:
.gitignore
.travis.yml [new file with mode: 0644]
CMakeLists.txt
COPYING
ChangeLog
README
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/Flags.cmake
buildtools/Cmake/MaintainerMode.cmake
buildtools/Cmake/MakeExe.cmake
buildtools/Cmake/MakeLib.cmake
buildtools/Cmake/Option.cmake
doc/doxygen/inside_extending.doc
doc/doxygen/options.doc
examples/java/cloud/cloud.tesh
examples/java/cloud/migration/CMakeLists.txt
examples/java/cloud/migration/XVM.java
examples/java/cloud/migration/migration.tesh
examples/msg/cloud/master_worker_vm.tesh
examples/msg/cloud/simple_vm.tesh
examples/msg/mc/CMakeLists.txt
examples/msg/mc/bugged1_liveness.c
examples/msg/mc/bugged1_liveness_stack_cleaner [new file with mode: 0755]
examples/smpi/NAS/BT/Makefile [deleted file]
examples/smpi/NAS/BT/add.f [deleted file]
examples/smpi/NAS/BT/adi.f [deleted file]
examples/smpi/NAS/BT/bt.f [deleted file]
examples/smpi/NAS/BT/btio.f [deleted file]
examples/smpi/NAS/BT/btio_common.f [deleted file]
examples/smpi/NAS/BT/copy_faces.f [deleted file]
examples/smpi/NAS/BT/define.f [deleted file]
examples/smpi/NAS/BT/epio.f [deleted file]
examples/smpi/NAS/BT/error.f [deleted file]
examples/smpi/NAS/BT/exact_rhs.f [deleted file]
examples/smpi/NAS/BT/exact_solution.f [deleted file]
examples/smpi/NAS/BT/fortran_io.f [deleted file]
examples/smpi/NAS/BT/full_mpiio.f [deleted file]
examples/smpi/NAS/BT/header.h [deleted file]
examples/smpi/NAS/BT/initialize.f [deleted file]
examples/smpi/NAS/BT/inputbt.data.sample [deleted file]
examples/smpi/NAS/BT/make_set.f [deleted file]
examples/smpi/NAS/BT/mpinpb.h [deleted file]
examples/smpi/NAS/BT/rhs.f [deleted file]
examples/smpi/NAS/BT/set_constants.f [deleted file]
examples/smpi/NAS/BT/setup_mpi.f [deleted file]
examples/smpi/NAS/BT/simple_mpiio.f [deleted file]
examples/smpi/NAS/BT/solve_subs.f [deleted file]
examples/smpi/NAS/BT/verify.f [deleted file]
examples/smpi/NAS/BT/work_lhs.h [deleted file]
examples/smpi/NAS/BT/work_lhs_vec.h [deleted file]
examples/smpi/NAS/BT/x_solve.f [deleted file]
examples/smpi/NAS/BT/x_solve_vec.f [deleted file]
examples/smpi/NAS/BT/y_solve.f [deleted file]
examples/smpi/NAS/BT/y_solve_vec.f [deleted file]
examples/smpi/NAS/BT/z_solve.f [deleted file]
examples/smpi/NAS/BT/z_solve_vec.f [deleted file]
examples/smpi/NAS/CG/Makefile [deleted file]
examples/smpi/NAS/CG/cg.f [deleted file]
examples/smpi/NAS/CG/mpinpb.h [deleted file]
examples/smpi/NAS/FT/Makefile [deleted file]
examples/smpi/NAS/FT/README [deleted file]
examples/smpi/NAS/FT/ft.f [deleted file]
examples/smpi/NAS/FT/global.h [deleted file]
examples/smpi/NAS/FT/inputft.data.sample [deleted file]
examples/smpi/NAS/FT/mpinpb.h [deleted file]
examples/smpi/NAS/LU/Makefile [deleted file]
examples/smpi/NAS/LU/applu.incl [deleted file]
examples/smpi/NAS/LU/bcast_inputs.f [deleted file]
examples/smpi/NAS/LU/blts.f [deleted file]
examples/smpi/NAS/LU/blts_vec.f [deleted file]
examples/smpi/NAS/LU/buts.f [deleted file]
examples/smpi/NAS/LU/buts_vec.f [deleted file]
examples/smpi/NAS/LU/erhs.f [deleted file]
examples/smpi/NAS/LU/error.f [deleted file]
examples/smpi/NAS/LU/exact.f [deleted file]
examples/smpi/NAS/LU/exchange_1.f [deleted file]
examples/smpi/NAS/LU/exchange_3.f [deleted file]
examples/smpi/NAS/LU/exchange_4.f [deleted file]
examples/smpi/NAS/LU/exchange_5.f [deleted file]
examples/smpi/NAS/LU/exchange_6.f [deleted file]
examples/smpi/NAS/LU/init_comm.f [deleted file]
examples/smpi/NAS/LU/inputlu.data.sample [deleted file]
examples/smpi/NAS/LU/jacld.f [deleted file]
examples/smpi/NAS/LU/jacu.f [deleted file]
examples/smpi/NAS/LU/l2norm.f [deleted file]
examples/smpi/NAS/LU/lu.f [deleted file]
examples/smpi/NAS/LU/mpinpb.h [deleted file]
examples/smpi/NAS/LU/neighbors.f [deleted file]
examples/smpi/NAS/LU/nodedim.f [deleted file]
examples/smpi/NAS/LU/pintgr.f [deleted file]
examples/smpi/NAS/LU/proc_grid.f [deleted file]
examples/smpi/NAS/LU/read_input.f [deleted file]
examples/smpi/NAS/LU/rhs.f [deleted file]
examples/smpi/NAS/LU/setbv.f [deleted file]
examples/smpi/NAS/LU/setcoeff.f [deleted file]
examples/smpi/NAS/LU/sethyper.f [deleted file]
examples/smpi/NAS/LU/setiv.f [deleted file]
examples/smpi/NAS/LU/ssor.f [deleted file]
examples/smpi/NAS/LU/subdomain.f [deleted file]
examples/smpi/NAS/LU/verify.f [deleted file]
examples/smpi/NAS/MG/Makefile [deleted file]
examples/smpi/NAS/MG/README [deleted file]
examples/smpi/NAS/MG/globals.h [deleted file]
examples/smpi/NAS/MG/mg.f [deleted file]
examples/smpi/NAS/MG/mg.input.sample [deleted file]
examples/smpi/NAS/MG/mpinpb.h [deleted file]
examples/smpi/NAS/Makefile
examples/smpi/NAS/SP/Makefile [deleted file]
examples/smpi/NAS/SP/README [deleted file]
examples/smpi/NAS/SP/add.f [deleted file]
examples/smpi/NAS/SP/adi.f [deleted file]
examples/smpi/NAS/SP/copy_faces.f [deleted file]
examples/smpi/NAS/SP/define.f [deleted file]
examples/smpi/NAS/SP/error.f [deleted file]
examples/smpi/NAS/SP/exact_rhs.f [deleted file]
examples/smpi/NAS/SP/exact_solution.f [deleted file]
examples/smpi/NAS/SP/header.h [deleted file]
examples/smpi/NAS/SP/initialize.f [deleted file]
examples/smpi/NAS/SP/inputsp.data.sample [deleted file]
examples/smpi/NAS/SP/lhsx.f [deleted file]
examples/smpi/NAS/SP/lhsy.f [deleted file]
examples/smpi/NAS/SP/lhsz.f [deleted file]
examples/smpi/NAS/SP/make_set.f [deleted file]
examples/smpi/NAS/SP/mpinpb.h [deleted file]
examples/smpi/NAS/SP/ninvr.f [deleted file]
examples/smpi/NAS/SP/pinvr.f [deleted file]
examples/smpi/NAS/SP/rhs.f [deleted file]
examples/smpi/NAS/SP/set_constants.f [deleted file]
examples/smpi/NAS/SP/setup_mpi.f [deleted file]
examples/smpi/NAS/SP/sp.f [deleted file]
examples/smpi/NAS/SP/txinvr.f [deleted file]
examples/smpi/NAS/SP/tzetar.f [deleted file]
examples/smpi/NAS/SP/verify.f [deleted file]
examples/smpi/NAS/SP/x_solve.f [deleted file]
examples/smpi/NAS/SP/y_solve.f [deleted file]
examples/smpi/NAS/SP/z_solve.f [deleted file]
examples/smpi/replay/smpi_replay.tesh
examples/smpi/replay_multiple/replay_multiple.tesh
include/msg/msg.h
include/simgrid/datatypes.h
include/simgrid/simix.h
include/smpi/mpif.h.in
include/smpi/smpi.h
include/surf/simgrid_dtd.h
include/xbt/graphxml.h
include/xbt/synchro_core.h
src/bindings/java/org/simgrid/msg/VM.java
src/bindings/java/org/simgrid/surf/NetworkLink.java
src/include/surf/maxmin.h
src/include/surf/surf.h
src/mc/mc_checkpoint.c
src/mc/mc_comm_determinism.c
src/mc/mc_compare.cpp
src/mc/mc_config.c [new file with mode: 0644]
src/mc/mc_dwarf.c
src/mc/mc_dwarf_expression.c
src/mc/mc_dwarf_tagnames.h
src/mc/mc_global.c
src/mc/mc_interface.h
src/mc/mc_liveness.c
src/mc/mc_memory.c
src/mc/mc_private.h
src/mc/mc_request.c
src/mc/mc_safety.c
src/mc/mc_state.c
src/msg/instr_msg_vm.c
src/msg/msg_gos.c
src/msg/msg_mailbox.c
src/msg/msg_new_api.c [deleted file]
src/msg/msg_private.h
src/msg/msg_task.c
src/msg/msg_vm.c
src/probes.tp [new file with mode: 0644]
src/simdag/dax_dtd.c
src/simdag/dax_dtd.h
src/simgrid/sg_config.c
src/simix/libsmx.c [moved from src/simix/smx_user.c with 82% similarity]
src/simix/popping.c [new file with mode: 0644]
src/simix/popping_accessors.h [moved from src/simix/simcalls_generated_args_getter_setter.h with 53% similarity]
src/simix/popping_bodies.c [moved from src/simix/simcalls_generated_body.c with 79% similarity]
src/simix/popping_enum.h [new file with mode: 0644]
src/simix/popping_generated.c [new file with mode: 0644]
src/simix/popping_private.h [moved from src/simix/smx_smurf_private.h with 56% similarity]
src/simix/simcalls.in
src/simix/simcalls.py
src/simix/simcalls_generated_enum.h [deleted file]
src/simix/simcalls_generated_res_getter_setter.h [deleted file]
src/simix/simcalls_generated_string.c [deleted file]
src/simix/smx_context_raw.c
src/simix/smx_environment.c
src/simix/smx_global.c
src/simix/smx_host.c
src/simix/smx_host_private.h
src/simix/smx_io.c
src/simix/smx_io_private.h
src/simix/smx_network.c
src/simix/smx_network_private.h
src/simix/smx_new_api.c [deleted file]
src/simix/smx_new_api_private.h [deleted file]
src/simix/smx_private.h
src/simix/smx_process.c
src/simix/smx_process_private.h
src/simix/smx_simcall_enter.c [deleted file]
src/simix/smx_smurf.c [deleted file]
src/simix/smx_synchro.c
src/simix/smx_synchro_private.h
src/simix/smx_vm.c
src/smpi/instr_smpi.c
src/smpi/private.h
src/smpi/smpi_base.c
src/smpi/smpi_bench.c
src/smpi/smpi_comm.c
src/smpi/smpi_f77.c
src/smpi/smpi_global.c
src/smpi/smpi_mpi_dt.c
src/smpi/smpi_pmpi.c
src/smpi/smpi_replay.c
src/smpi/smpi_rma.c
src/surf/maxmin.cpp
src/surf/network_cm02.cpp
src/surf/network_ib.cpp
src/surf/network_ib.hpp
src/surf/simgrid_dtd.c
src/surf/surf_interface.cpp
src/xbt/automaton/automaton_lexer.yy.c
src/xbt/config.c
src/xbt/graphxml.c
src/xbt/log.c
src/xbt/mmalloc/mfree.c
src/xbt/mmalloc/mm_legacy.c
src/xbt/mmalloc/mm_module.c
src/xbt/probes.h [new file with mode: 0644]
src/xbt/xbt_replay.c
teshsuite/java/sleep_host_off/SleepHostOff.java
teshsuite/java/sleep_host_off/sleep_host_off.tesh
teshsuite/mc/dwarf/dwarf.c
teshsuite/msg/host_on_off_processes/host_on_off_processes.c
teshsuite/smpi/mpich3-test/coll/CMakeLists.txt
teshsuite/smpi/mpich3-test/coll/allgatherv4.c
teshsuite/smpi/mpich3-test/coll/allgatherv4_manual.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt
teshsuite/smpi/mpich3-test/datatype/testlist
teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f77/info/infotest2f.f [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f77/info/infotestf.f [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f77/info/testlist [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f77/testlist
teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f90/info/infotest2f90.f90 [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f90/info/infotestf90.f90 [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f90/info/testlist [new file with mode: 0644]
teshsuite/smpi/mpich3-test/f90/testlist
teshsuite/smpi/mpich3-test/info/CMakeLists.txt [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infodel.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infodup.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infoenv.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infomany.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infomany2.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infoorder.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infotest.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/infovallen.c [new file with mode: 0644]
teshsuite/smpi/mpich3-test/info/testlist [new file with mode: 0644]
teshsuite/smpi/mpich3-test/testlist
tools/check_dist_archive.exclude
tools/stack-cleaner/README [new file with mode: 0644]
tools/stack-cleaner/as [new file with mode: 0755]
tools/stack-cleaner/c++ [new file with mode: 0755]
tools/stack-cleaner/cc [new file with mode: 0755]
tools/stack-cleaner/clean-stack-filter [new file with mode: 0755]
tools/stack-cleaner/compiler-wrapper [new file with mode: 0755]
tools/stack-cleaner/fortran [new file with mode: 0755]

index 5f4bffc..2770b2c 100644 (file)
@@ -392,7 +392,6 @@ teshsuite/smpi/isp/umpire/remote_group-no-error
 teshsuite/smpi/isp/umpire/send-recv-ok
 teshsuite/smpi/isp/umpire/sendrecv-deadlock
 teshsuite/smpi/isp/umpire/temp.txt
-teshsuite/smpi/isp/umpire/tmpzLRJML
 teshsuite/smpi/isp/umpire/type-commit-twice
 teshsuite/smpi/isp/umpire/type-no-error
 teshsuite/smpi/isp/umpire/type-no-error-exhaustive
@@ -404,7 +403,6 @@ teshsuite/smpi/isp/umpire/type-no-free3
 teshsuite/smpi/isp/umpire/wait-deadlock
 teshsuite/smpi/isp/umpire/waitall-deadlock
 teshsuite/smpi/isp/umpire/waitany-deadlock
-teshsuite/smpi/bcast/bcast_coll
 teshsuite/smpi/compute/compute2
 teshsuite/smpi/compute/compute3
 teshsuite/smpi/pingpong/dsend
@@ -583,6 +581,35 @@ teshsuite/smpi/mpich-test/pt2pt/waitall2
 teshsuite/smpi/mpich-test/pt2pt/waitall3
 teshsuite/smpi/mpich-test/pt2pt/waitall4
 teshsuite/smpi/mpich-test/pt2pt/waitany
+teshsuite/smpi/mpich3-test/f77/info/infotest2f
+teshsuite/smpi/mpich3-test/f77/info/infotestf
+teshsuite/smpi/mpich3-test/f90/info/infotest2f90
+teshsuite/smpi/mpich3-test/f90/info/infotestf90
+teshsuite/smpi/bcast/bcast_coll
+teshsuite/smpi/mpich3-test/coll/allred
+teshsuite/smpi/mpich3-test/datatype/dataalign
+teshsuite/smpi/mpich3-test/datatype/sendrecvt2
+teshsuite/smpi/mpich3-test/datatype/sendrecvt4
+teshsuite/smpi/mpich3-test/f77/rma/c2f2cwinf
+teshsuite/smpi/mpich3-test/f77/rma/winaccf
+teshsuite/smpi/mpich3-test/f77/rma/winfencef
+teshsuite/smpi/mpich3-test/f77/rma/wingetf
+teshsuite/smpi/mpich3-test/f77/rma/winnamef
+teshsuite/smpi/mpich3-test/f77/topo/cartcrf
+teshsuite/smpi/mpich3-test/f90/rma/c2f2cwinf90
+teshsuite/smpi/mpich3-test/f90/rma/winaccf90
+teshsuite/smpi/mpich3-test/f90/rma/winfencef90
+teshsuite/smpi/mpich3-test/f90/rma/wingetf90
+teshsuite/smpi/mpich3-test/f90/rma/winnamef90
+teshsuite/smpi/mpich3-test/perf/commcreatep
+teshsuite/smpi/mpich3-test/perf/non_zero_root
+teshsuite/smpi/mpich3-test/perf/sendrecvl
+teshsuite/smpi/mpich3-test/perf/timer
+teshsuite/smpi/mpich3-test/perf/transp-datatype
+teshsuite/smpi/mpich3-test/perf/twovec
+teshsuite/smpi/mpich3-test/pt2pt/issendselfcancel
+teshsuite/smpi/mpich3-test/rma/getgroup
+teshsuite/smpi/mpich3-test/rma/manyrma3
 teshsuite/smpi/mpich3-test/attr/attr2type
 teshsuite/smpi/mpich3-test/attr/attrend
 teshsuite/smpi/mpich3-test/attr/attrend2
@@ -835,6 +862,13 @@ teshsuite/smpi/mpich3-test/group/grouptest
 teshsuite/smpi/mpich3-test/group/grouptest2
 teshsuite/smpi/mpich3-test/group/gtranks
 teshsuite/smpi/mpich3-test/group/gtranksperf
+teshsuite/smpi/mpich3-test/info/infodel
+teshsuite/smpi/mpich3-test/info/infodup
+teshsuite/smpi/mpich3-test/info/infomany
+teshsuite/smpi/mpich3-test/info/infomany2
+teshsuite/smpi/mpich3-test/info/infoorder
+teshsuite/smpi/mpich3-test/info/infotest
+teshsuite/smpi/mpich3-test/info/infovallen
 teshsuite/smpi/mpich3-test/init/attrself
 teshsuite/smpi/mpich3-test/init/exitst1
 teshsuite/smpi/mpich3-test/init/exitst2
diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..8572822
--- /dev/null
@@ -0,0 +1,27 @@
+language: cpp
+compiler:
+   - gcc
+#   - clang # does not work for us on debian stable (boost is too old there)
+before_install: 
+   - sudo apt-get update  -qq
+   - sudo apt-get install -qq doxygen valgrind default-jdk gfortran liblua5.1-dev lua5.1 libboost-dev transfig ghostscript texlive-font-utils
+script:
+   - cmake -Denable_documentation=OFF -Denable_coverage=OFF -Denable_java=ON -Denable_model-checking=OFF -Denable_lua=ON -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON . && make && ctest --output-on-failure --timeout 100
+branches:
+  only:
+     - master
+notifications:
+  recipients:
+    - martin.quinson@loria.fr
+  email:
+    on_success: change
+    on_failure: always
+  irc:
+    channels:
+      - "irc.debian.org#simgrid"
+  template:
+    - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"
+os:
+  - linux
+  - osx
+  - windows
\ No newline at end of file
index a97eb96..80bc299 100644 (file)
@@ -10,6 +10,9 @@ endif()
 
 enable_language(CXX)
 
+INCLUDE(CheckCCompilerFlag)
+CHECK_C_COMPILER_FLAG(-fstack-cleaner HAVE_C_STACK_CLEANER)
+
 if (APPLE) #MAC
   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
   set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
diff --git a/COPYING b/COPYING
index a7c0504..80daaf1 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -416,3 +416,15 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+==========================================================================
+
+Torus Cluster support is based on the works of Christian Heinrich
+
+/* Copyright (c) 2012
+ * Christian Heinrich, National Center for Supercomputing Applications
+ *                     University of Illinois <cheinric@illinois.edu>
+ * 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. */
index ad6b503..8bee1a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,10 +6,57 @@ SimGrid (3.12) NOT RELEASED; urgency=low
  jMSG:
  * Interface improvement:
    - Rename Host.isAvail() to Host.isOn()
+   
  SIMIX:
  * New functions
    - SIMIX_process_throw: raises an exception in a remote process
+ * Refactoring: Separate submodules
+   - libsmx: the public interface, as libc in a real system
+   - popping: the strange dance that converts a user request into a kernel handling
+   - smx_context_*: the virtualization mechanisms that embeed the user code
+   - smx_*: the handling of each simcalls
+ * Rename smx_action_t into smx_synchro_t, making explicit that these
+   things are used to synchronize processes with their environment.    
+   For example, a communication is a sort of synchronization involving
+   the communicating processes (that may block until the exchange) and
+   the platform. The same can be said from computations, etc.
+   
+ SMPI: 
+ * New functions
+   - Onesided early support for : MPI_Win_(create, free, fence, get_name, set_name, get_group), MPI_Get, MPI_Put, MPI_Accumulate, MPI_Alloc_mem, MPI_Free_mem. 
+   - MPI_Keyval*, MPI_Attr* functions, as well as MPI_Comm_attr*, MPI_Type_attr* variants (C only, no Fortran support yet)
+   - MPI_Type_set_name, MPI_Type_get_name
+   - MPI_*_c2f and MPI_*_f2c functions
+   - MPI_Info_* functions (beware, get_nthkey may not follow the insertion order)
+   - MPI_Pack, MPI_Unpack and MPI_Pack_size functions
+   - Activate a lot of new tests from the mpich 3 testsuite
+ * Features 
+   - Constant times can be injected inside MPI_Wtime and MPI_Test through options smpi/wtime and smpi/test
+   - InfiniBand network model added : Based on the works of Jerome Vienne (http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf )
+   - When smpi/display_timing is set, also display global simulation time and application times
+ * Collective communications
+   - SMP-aware algorithms are now dynamically handled. An internal communicator is created for each node, and an external one to handle communications between "leaders" of each node
+   - MVAPICH2 (1.9) collective algorithms selector : normal and SMP algorithms are handled, and selection logic is based on the one used on TACC's Stampede cluster (https://www.tacc.utexas.edu/stampede/).
+   - Support for Rabenseifner Reduce/Allreduce algorithms (https://fs.hlrs.de/projects/par/mpi//myreduce.html)
+ * Replay 
+   - Replay now uses algorithms from wanted collective selector
+   - Replay can be used with SMP-aware algorithms
+   - Memory occupation of replay should now be contained (temporary buffers allocated in collective algorithms should be shared between processes)
+   - Replay can now replay several traces at the same time (check examples/smpi/replay_multiple example), to simulate interactions between several applications on a given platform. User can specify the start time of each instance. This should also allow replay + actual applications to run.
+  * Bug fixes 
+   - [#17799] : have mpi_group_range_incl and mpi_group_range_excl better test some corner cases
+   - Correctly use loopback on fat-tree clusters
+   - Asynchronous small messages shouldn't trigger deadlocks anymore
+ SURF
+  * Bug fixes 
+   - "Full" network optimization flag was broken since Surf++
+   - Better handling of precision flags in maxmin
+   - Fix bug causing sometimes "Impossible" errors 
+ XBT
+  * New functions
+   - Add a xbt_heap_update function, to avoid costly xbt_heap_remove+xbt_heap_insert use 
+   - Add a xbt wrapper for simcall_mutex_trylock (asked in [#17878])
+
 
  -- $date Da SimGrid team <simgrid-devel@lists.gforge.inria.fr>
 
diff --git a/README b/README
index d1d40b9..cd8a33d 100644 (file)
--- a/README
+++ b/README
@@ -21,3 +21,6 @@ feedback.
 
 Cheers,
 Da SimGrid Team.
+
+
+https://travis-ci.org/mquinson/simgrid.svg?branch=master
\ No newline at end of file
index ff453f3..1343003 100644 (file)
@@ -117,6 +117,14 @@ ENDIF()
       ADD_TESH(mc-bugged1-liveness-ucontext-sparse  --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1_liveness_sparse.tesh)
       ADD_TESH(mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1_liveness_visited.tesh)
       ADD_TESH(mc-bugged1-liveness-visited-ucontext-sparse --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1_liveness_visited_sparse.tesh)
+    if(HAVE_C_STACK_CLEANER)
+      # This test checks if the stack cleaner is makign a difference:
+      add_test(mc-bugged1-liveness-stack-cleaner
+        ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/bugged1_liveness_stack_cleaner
+        ${CMAKE_HOME_DIRECTORY}/examples/msg/mc/
+        ${CMAKE_BINARY_DIR}/examples/msg/mc/
+        )
+    endif()
     ENDIF()
   ENDIF()
 
@@ -458,8 +466,9 @@ ENDIF()
         ADD_TEST(test-smpi-mpich3-pt2pt-raw      ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/pt2pt 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/pt2pt -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/privatize_global_variables:yes)
         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)
         ADD_TEST(test-smpi-mpich3-rma-raw       ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/rma 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/rma -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/privatize_global_variables:yes)
+        ADD_TEST(test-smpi-mpich3-info-raw       ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/info 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/info -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/privatize_global_variables:yes)
         ADD_TEST(test-smpi-mpich3-perf-raw       ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR}/teshsuite/smpi/mpich3-test/perf 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/perf -tests=testlist -execarg=--cfg=contexts/factory:raw -execarg=--cfg=smpi/running_power:-1)
-        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 test-smpi-mpich3-rma-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
+        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 test-smpi-mpich3-rma-raw test-smpi-mpich3-info-raw PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
       ENDIF()
       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)
@@ -588,7 +597,11 @@ FOREACH (tesh
     no-error3
     no-error
     )
-  ADD_TESH(umpire_${tesh} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire/${tesh}.tesh)
+  ADD_TESH(umpire_${tesh}
+    --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire
+    --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/isp/umpire
+    --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire
+    ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/isp/umpire/${tesh}.tesh)
 ENDFOREACH()
 endif()
 
index b0a4b7c..9600214 100644 (file)
@@ -913,8 +913,7 @@ set(generated_files_to_clean
   ${CMAKE_BINARY_DIR}/examples/smpi/tracing/smpi_traced.trace
   )
 
-if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
-else()
+if(NOT "${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions0.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions0.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions1.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions1.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_allReduce.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allReduce.txt COPYONLY)
@@ -928,6 +927,42 @@ else()
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_gather.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_gather.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay/actions_allgatherv.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allgatherv.txt COPYONLY)
   configure_file(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/hostfile ${CMAKE_BINARY_DIR}/teshsuite/smpi/hostfile COPYONLY)
+  
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/description_file ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/description_file COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/README ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/README COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/smpi_replay.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/smpi_replay.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace0.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace0.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace1.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace1.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace2.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace2.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace3.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace3.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace4.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace4.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace5.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace5.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace6.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace6.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace7.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace7.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace8.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace8.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace9.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace9.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace10.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace10.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace11.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace11.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace12.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace12.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace13.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace13.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace14.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace14.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace15.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace15.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace16.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace16.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace17.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace17.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace18.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace18.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace19.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace19.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace20.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace20.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace21.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace21.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace22.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace22.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace23.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace23.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace24.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace24.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace25.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace25.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace26.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace26.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace27.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace27.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace28.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace28.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace29.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace29.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace30.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace30.txt COPYONLY)
+  configure_file(${CMAKE_HOME_DIRECTORY}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace31.txt ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace31.txt COPYONLY)
 
   set(generated_files_to_clean
     ${generated_files_to_clean}
@@ -940,7 +975,45 @@ else()
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_alltoall.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_alltoallv.txt
     ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_waitall.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_gather.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_allgatherv.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay/actions_reducescatter.txt
     ${CMAKE_BINARY_DIR}/teshsuite/smpi/hostfile
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/description_file
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/README
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/smpi_replay.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace0.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace1.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace2.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace3.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace4.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace5.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace6.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace7.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace8.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace9.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace10.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace11.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace12.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace13.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace14.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace15.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace16.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace17.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace18.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace19.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace20.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace21.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace22.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace23.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace24.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace25.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace26.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace27.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace28.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace29.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace30.txt
+    ${CMAKE_BINARY_DIR}/examples/smpi/replay_multiple/ti_traces_32_1/ti_trace31.txt
     )
 endif()
 
index 8cd8172..fe63858 100644 (file)
@@ -23,24 +23,23 @@ set(EXTRA_DIST
   src/msg/msg_mailbox.h
   src/msg/msg_private.h
   src/portable.h
+  src/probes.tp
   src/simdag/dax.dtd
   src/simdag/dax_dtd.c
   src/simdag/dax_dtd.h
   src/simdag/private.h
   src/simix/simcalls.in
   src/simix/simcalls.py
-  src/simix/simcalls_generated_args_getter_setter.h
-  src/simix/simcalls_generated_body.c
-  src/simix/smx_simcall_enter.c
-  src/simix/simcalls_generated_enum.h
-  src/simix/simcalls_generated_res_getter_setter.h
-  src/simix/simcalls_generated_string.c
+  src/simix/popping_private.h
+  src/simix/popping_bodies.c
+  src/simix/popping_generated.c
+  src/simix/popping_enum.h
+  src/simix/popping_accessors.h
   src/simix/smx_host_private.h
   src/simix/smx_io_private.h
   src/simix/smx_network_private.h
   src/simix/smx_private.h
   src/simix/smx_process_private.h
-  src/simix/smx_smurf_private.h
   src/simix/smx_synchro_private.h
   src/smpi/README
   src/smpi/colls/coll_tuned_topo.h
@@ -123,6 +122,7 @@ set(EXTRA_DIST
   src/xbt/mmalloc/mmprivate.h
   src/xbt/mmalloc/mmtrace.awk
   src/xbt/mmalloc/mrealloc.c
+  src/xbt/probes.h
   src/xbt/setset_private.h
   src/xbt/win32_ucontext.c
   tools/tesh/run_context.h
@@ -361,9 +361,10 @@ set(SURF_SRC
   )
 
 set(SIMIX_GENERATED_SRC
-  src/simix/smx_simcall_enter.c
+  src/simix/popping_generated.c
   )
 set(SIMIX_SRC
+  src/simix/libsmx.c
   src/simix/smx_context.c
   src/simix/smx_context_base.c
   src/simix/smx_context_raw.c
@@ -374,10 +375,9 @@ set(SIMIX_SRC
   src/simix/smx_io.c
   src/simix/smx_network.c
   src/simix/smx_process.c
-  src/simix/smx_smurf.c
   src/simix/smx_synchro.c
-  src/simix/smx_user.c
   src/simix/smx_vm.c
+  src/simix/popping.c
   ${SIMIX_GENERATED_SRC}
   )
 
@@ -403,23 +403,6 @@ set(MSG_SRC
   src/msg/msg_vm.c
   )
 
-#* ****************************************************************************************** *#
-#* TUTORIAL: New API                                                                          *#
-
-set(MSG_SRC
-  ${MSG_SRC}
-  src/msg/msg_new_api.c
-  )
-set(EXTRA_DIST
-  ${EXTRA_DIST}
-  src/simix/smx_new_api_private.h
-  )
-set(SIMIX_SRC
-  ${SIMIX_SRC}
-  src/simix/smx_new_api.c
-)
-#* ****************************************************************************************** *#
-
 set(SIMDAG_SRC
   src/simdag/instr_sd_task.c
   src/simdag/sd_daxloader.c
@@ -607,6 +590,7 @@ set(MC_SRC
   src/mc/mc_page_snapshot.cpp
   src/mc/mc_comm_determinism.c
   src/mc/mc_compare.cpp
+  src/mc/mc_config.c
   src/mc/mc_diff.c
   src/mc/mc_dwarf.c
   src/mc/mc_dwarf_attrnames.h
@@ -1084,6 +1068,7 @@ set(TESHSUITE_CMAKEFILES_TXT
   teshsuite/smpi/mpich3-test/datatype/CMakeLists.txt
 #  teshsuite/smpi/mpich3-test/f77/attr/CMakeLists.txt
   teshsuite/smpi/mpich3-test/f77/coll/CMakeLists.txt
+  teshsuite/smpi/mpich3-test/f77/info/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
@@ -1094,11 +1079,13 @@ set(TESHSUITE_CMAKEFILES_TXT
   teshsuite/smpi/mpich3-test/f77/rma/CMakeLists.txt
   teshsuite/smpi/mpich3-test/f90/coll/CMakeLists.txt
   teshsuite/smpi/mpich3-test/f90/datatype/CMakeLists.txt
+  teshsuite/smpi/mpich3-test/f90/info/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
   teshsuite/smpi/mpich3-test/f90/rma/CMakeLists.txt
   teshsuite/smpi/mpich3-test/group/CMakeLists.txt
+  teshsuite/smpi/mpich3-test/info/CMakeLists.txt
   teshsuite/smpi/mpich3-test/init/CMakeLists.txt
   teshsuite/smpi/mpich3-test/pt2pt/CMakeLists.txt
   teshsuite/smpi/mpich3-test/topo/CMakeLists.txt
@@ -1184,6 +1171,13 @@ set(CMAKE_SOURCE_FILES
   buildtools/Cmake/test_prog/prog_stacksetup.c
   buildtools/Cmake/test_prog/prog_thread_storage.c
   buildtools/Cmake/test_prog/prog_vsnprintf.c
+  tools/stack-cleaner/as
+  tools/stack-cleaner/cc
+  tools/stack-cleaner/c++
+  tools/stack-cleaner/fortran
+  tools/stack-cleaner/clean-stack-filter
+  tools/stack-cleaner/compiler-wrapper
+  tools/stack-cleaner/README
   )
 
 set(PLATFORMS_EXAMPLES
@@ -1251,6 +1245,23 @@ set(generated_src_files
   src/xbt/automaton/parserPromela.tab.hacc
   )
 
+if(enable_ust)
+  set(simgrid_sources ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_ust.c ${simgrid_sources})
+  ADD_CUSTOM_COMMAND(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_ust.c
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_ust.h
+    COMMAND lttng-gen-tp -o simgrid_ust.c -o simgrid_ust.h ${CMAKE_CURRENT_SOURCE_DIR}/src/probes.tp
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/src/
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/probes.tp
+  )
+  ADD_CUSTOM_TARGET(simgrid_ust
+    DEPENDS
+      ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_ust.c
+      ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_ust.h
+    )
+  set(generated_src_files ${CMAKE_CURRENT_BINARY_DIR}/src/simgrid_ust.c ${generated_src_files})
+endif()
+
 foreach(file ${generated_src_files})
   set_source_files_properties(${file} PROPERTIES GENERATED true)
 endforeach(file ${generated_src_files})
index 6e50110..d45e7f9 100644 (file)
@@ -50,6 +50,14 @@ else()
   set(optCFLAGS "-O0 ")
 endif()
 
+if(enable_sdt)
+  add_definitions(-DUSE_SDT)
+endif()
+
+if(enable_ust)
+  add_definitions(-DUSE_UST)
+endif()
+
 if(enable_model-checking AND enable_compile_optimizations)
   # Forget it, do not optimize the code (because it confuses the MC):
   set(optCFLAGS "-O0 ")
index 66f0190..fba030f 100644 (file)
@@ -10,12 +10,10 @@ if(enable_maintainer_mode AND NOT WIN32)
   if (PYTHON_EXE)
     add_custom_command(
       OUTPUT
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_enum.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_string.c
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_res_getter_setter.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_args_getter_setter.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/smx_simcall_enter.c
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_body.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_bodies.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_enum.h
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.h
       
       DEPENDS
       ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls.py
@@ -28,16 +26,14 @@ if(enable_maintainer_mode AND NOT WIN32)
 
     add_custom_target(simcalls_generated_src
       DEPENDS
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_enum.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_string.c
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_res_getter_setter.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_args_getter_setter.h
-      ${CMAKE_HOME_DIRECTORY}/src/simix/smx_simcall_enter.c
-      ${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_body.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_bodies.c
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_enum.h
+      ${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.h
       )
 
     SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
-      "${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_enum.h;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_string.c;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_res_getter_setter.h;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_args_getter_setter.h;${CMAKE_HOME_DIRECTORY}/src/simix/smx_simcall_enter.c;${CMAKE_HOME_DIRECTORY}/src/simix/simcalls_generated_body.c"
+      "${CMAKE_HOME_DIRECTORY}/src/simix/popping_enum.h;${CMAKE_HOME_DIRECTORY}/src/simix/popping_generated.c;${CMAKE_HOME_DIRECTORY}/src/simix/popping_bodies.c;${CMAKE_HOME_DIRECTORY}/src/simix/popping_accessors.h"
       )
   endif()
 endif()
index 2328e39..59ac10f 100644 (file)
@@ -146,6 +146,7 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/init)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/pt2pt)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/rma)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/perf)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/info)
 
 #add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/attr)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/util)
@@ -154,6 +155,7 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/comm)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/datatype)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/ext)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/init)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/info)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/pt2pt)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/topo)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f77/rma)
@@ -161,6 +163,7 @@ add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/util)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/rma)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/coll)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/datatype)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/info)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/init)
 add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/mpich3-test/f90/pt2pt)
 
index f73882a..9f15a91 100644 (file)
@@ -12,6 +12,10 @@ if(enable_lib_static)
   add_library(simgrid_static STATIC ${simgrid_sources})
 endif()
 
+if(enable_ust)
+  ADD_DEPENDENCIES(simgrid simgrid_ust)
+endif()
+
 if(enable_java)
   include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/MakeJava.cmake)
 endif()
@@ -124,6 +128,12 @@ if(HAVE_BACKTRACE_IN_LIBEXECINFO)
   SET(SIMGRID_DEP "${SIMGRID_DEP} -lexecinfo")
 endif(HAVE_BACKTRACE_IN_LIBEXECINFO)
 
+# Dependencies from USR
+###################################
+if(enable_ust)
+  set(SIMGRID_DEP "${SIMGRID_DEP} -llttng-ust")
+endif()
+
 # Compute the dependencies of SMPI
 ##################################
 if(enable_smpi AND APPLE)
index eb1aae1..27463ba 100644 (file)
@@ -27,6 +27,8 @@ option(enable_maintainer_mode "Whether flex and flexml files should be rebuilt."
 option(enable_tracing "Tracing simulations for visualization." on)
 option(enable_latency_bound_tracking "" off)
 option(enable_coverage "Enable coverage." off)
+option(enable_ust "Enable userspace statuic tracepoint (lttng-ust)." off)
+option(enable_sdt "Enable statically defined tracepoint (strace/systemtap)." off)
 mark_as_advanced(enable_coverage)
 option(enable_memcheck "Enable memcheck." off)
 option(enable_memcheck_xml "Enable memcheck with xml output." off)
index ba660ff..bb37b1d 100644 (file)
@@ -3,25 +3,6 @@
 
 \tableofcontents
 
-\section simgrid_dev_guide_api How to add a new MSG function?
-Search for expression \"TUTORIAL: New API\".
-\verbatim
-user@caraja:~/workspace/simgrid/src$ cg "TUTORIAL: New API"
- 0 msg/msg_new_api.c             15 /* TUTORIAL: New API*/
- 1 simix/smx_smurf.c            582 /* TUTORIAL: New API*/
- 2 simix/smx_smurf.c            616 /* TUTORIAL: New API*/
- 3 simix/smx_smurf_private.h    102 /* TUTORIAL: New API*/
- 4 simix/smx_smurf_private.h    629 /* TUTORIAL: New API*/
- 5 simix/smx_private.h           28 /* TUTORIAL: New API*/
- 6 simix/smx_private.h          101 /* TUTORIAL: New API*/
- 7 simix/smx_private.h          182 /* TUTORIAL: New API*/
- 8 simix/smx_global.c           454 /* TUTORIAL: New API*/
- 9 simix/smx_new_api.c            8 /* TUTORIAL: New API*/
-10 simix/smx_user.c            1684 /* TUTORIAL: New API*/
-11 simix/smx_new_api_private.h    8 /* TUTORIAL: New API*/
-12 simix/smx_process.c          338 /* TUTORIAL: New API*/
-\endverbatim
-
 \section simgrid_dev_guide_model How to add a new model in surf?
 The figure below show the architecture of the SURF layer. This layer is composed
 of different kind of models representing the differents systems we want to
@@ -136,39 +117,48 @@ s_surf_model_description_t surf_plugin_description[] = {
 ~~~~
 
 \section simgrid_dev_guide_simcall How to add a new simcall?
-A simcall is used to go from user mode to kernel mode. The workflow of
-a simcall is the following:
+
+A simcall is used to go from user mode to kernel mode. There is some
+sort of popping dance involved, as we want to isolate the user
+contextes from their environment (so that they can run in parallel).
+
+The workflow of a simcall is the following:
 
 - `<ret> simcall_<name>(<args>)`
  - `simcall_BODY_<name>(<args>)`
-  - create the simcall
-  - `SIMIX_process_yield` if not maestro
+  - Initializes the simcall (store the arguments in position)
+  - If maestro, executes the simcall directly (and return)
+  - If not, call `SIMIX_process_yield` to give back the control to maestro
   - ========== KERNEL MODE ==========
-  - `SIMIX_simcall_pre`
-   - `SIMIX_pre_<name>(simcall, <args>)`
-   - `SIMIX_simcall_answer(simcall)`
-
-To simplify the simcall creation, we have made a python script that
-generate most of the code and give helpers for the remaining stuff.
-The script generating the simcalls (src/simix/simcalls.in) take in input
-the src/simix/simcalls.in file where the simcalls are defined and generate
-the following files:
-
-- simcall_generated_args_getter_setter.h:
-  functions to get and set simcall arguments
-- simcall_generated_res_getter_setter.h:
-  functions to get and set simcall result
-- simcall_generated_body.c:
-  the BODY function of the simcall
-- simcall_generated_case.c:
-  the case of the SIMIX_simcall_pre function
-- simcall_generated_enum.h:
-  the enum of simcalls
-- simcall_generated_string.c:
-  string corresponding to the enum to debug
-
-Furthermode if the simcall_<name> or the SIMIX_pre_<name> function are missing,
-a warning will show up with a prototype of the corresponding fonction to fill.
+  - `SIMIX_simcall_handle` large switch (on simcall) doing for each:
+   - `simcall_HANDLER_<name>(simcall, <args>)` (the manual code handling the simcall)
+   - If the simcall is not marked as "blocking" in its definition,
+     call `SIMIX_simcall_answer(simcall)` that adds back the issuer
+     process to the list of processes to run in the next scheduling round.
+     It is thus the responsability of the blocking simcalls to call
+     `SIMIX_simcall_answer(simcall)` themselves in their handler.
+
+Note that empty HANDLERs can be omitted. These functions usually do
+some parameter checking, or retrieve some information about the
+simcall issuer, but when there no need for such things, the handler
+can be omited. In that case, we directly call the function
+`simcall_<name>(<args>)`.
+
+To simplify the simcall creation, a python script generates most of
+the code and give helpers for the remaining stuff. That script reads
+the simcall definitions from src/simix/simcalls.in, checks that both
+`simcall_<name>()` and `simcall_HANDLER()` are defined somewhere, and
+generates the following files:
+
+- smx_popping_accessors.h:
+  Helper functions to get and set simcall arguments and results
+- smx_popping_bodies.c:
+  The BODY function of each simcall
+- smx_popping_enum.c:
+  Definition of type `enum e_smx_simcall_t` (one value per existing simcall)
+- smx_popping_generated.c:
+  Definitions of `simcall_names[]` (debug name of each simcall), and
+  SIMIX_simcall_enter() that deals with the simcall from within the kernel
 
 The simcall.in file list all the simcalls in sections. A line starting by "##"
 define a new section which will be replace by a "ifdef" in the generated code.
index 82776a5..6abd745 100644 (file)
@@ -95,6 +95,11 @@ described in
     settings (accurate modeling of slow start with correction factors on
     three intervals: < 1KiB, < 64 KiB, >= 64 KiB). See also \ref
     options_model_network_coefs "this section" for more info.
+  - \b IB: Realistic network model specifically tailored for HPC
+    settings with InfiniBand networks (accurate modeling contention 
+    behavior, based on the model explained in 
+    http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf). 
+    See also \ref options_model_network_coefs "this section" for more info.
   - \b CM02: Legacy network analytic model (Very similar to LV08, but
     without corrective factors. The timings of small messages are thus
     poorly modeled)
@@ -208,6 +213,12 @@ If you are using the SMPI model, these correction coeficients are
 themselves corrected by constant values depending on the size of the
 exchange. Again, only hardcore experts should bother about this fact.
 
+InfiniBand network behavior can be modeled through 3 parameters, as explained in
+http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf . These
+factors can be changed through option smpi/IB_penalty_factors:"βe;βs;γs". By 
+default SMPI uses factors computed one Stampede cluster from TACC, with optimal
+deployment of processes on nodes.
+
 \subsubsection options_model_network_crosstraffic Simulating cross-traffic
 
 As of SimGrid v3.7, cross-traffic effects can be taken into account in
index faf82a5..e89384c 100644 (file)
@@ -29,21 +29,9 @@ $ java -classpath ${classpath:=.} cloud/Cloud ${srcdir:=.}/../platforms/platform
 > [  4.798398] (3:WRK01@VM01) WRK01 executed task (Task01)
 > [1000.000000] (1:Master@Jacquelin) Migrate everyone to Fernand
 > [1000.000000] (1:Master@Jacquelin) Migrate VM00fromIntelto Fernand
-> [1000.000000] (5:__pr_mig_tx:VM00(Intel-Fernand)@Intel) mig-stage1: remaining_size 1073741824.000000
-> [3463.797594] (5:__pr_mig_tx:VM00(Intel-Fernand)@Intel) actual bandwidth 0.415619 (MB/s), threshold 13074.229313
-> [3463.797594] (5:__pr_mig_tx:VM00(Intel-Fernand)@Intel) mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 966367641.600000
-> [3463.797594] (5:__pr_mig_tx:VM00(Intel-Fernand)@Intel) mig-stage2.0: remaining_size 0.000000 (< threshold 13074.229313)
-> [3463.797594] (5:__pr_mig_tx:VM00(Intel-Fernand)@Intel) mig-stage3: remaining_size 0.000000
 > [3465.751712] (0:@) migrate VM(VM00): set bound (137333000.000000) at Fernand
-> [3465.751712] (4:__pr_mig_rx:VM00(Intel-Fernand)@Fernand) set affinity(0x0000@Fernand) for VM00
 > [3467.577368] (1:Master@Jacquelin) Migrate VM01fromProvostto Fernand
-> [3467.577368] (9:__pr_mig_tx:VM01(Provost-Fernand)@Provost) mig-stage1: remaining_size 1073741824.000000
-> [5929.514531] (9:__pr_mig_tx:VM01(Provost-Fernand)@Provost) actual bandwidth 0.415933 (MB/s), threshold 13084.109212
-> [5929.514531] (9:__pr_mig_tx:VM01(Provost-Fernand)@Provost) mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 966367641.600000
-> [5929.514531] (9:__pr_mig_tx:VM01(Provost-Fernand)@Provost) mig-stage2.0: remaining_size 0.000000 (< threshold 13084.109212)
-> [5929.514531] (9:__pr_mig_tx:VM01(Provost-Fernand)@Provost) mig-stage3: remaining_size 0.000000
 > [5929.608220] (0:@) migrate VM(VM01): set bound (137333000.000000) at Fernand
-> [5929.608220] (8:__pr_mig_rx:VM01(Provost-Fernand)@Fernand) set affinity(0x0000@Fernand) for VM01
 > [5931.433875] (0:@) MSG_main finished; Cleaning up the simulation...
 > [5931.433875] (1:Master@Jacquelin) Let's shut down the simulation and kill everyone.
 > [5931.433875] (1:Master@Jacquelin) Master done.
index b1620c4..4967240 100644 (file)
@@ -5,6 +5,7 @@ set(sources
   ${CMAKE_CURRENT_SOURCE_DIR}/Daemon.java
   ${CMAKE_CURRENT_SOURCE_DIR}/Main.java
   ${CMAKE_CURRENT_SOURCE_DIR}/Test.java
+  ${CMAKE_CURRENT_SOURCE_DIR}/TestHostOnOff.java
   ${CMAKE_CURRENT_SOURCE_DIR}/XVM.java
   )
 
@@ -41,6 +42,7 @@ set(bin_files
   PARENT_SCOPE
   )
 set(txt_files
+  ${CMAKE_CURRENT_SOURCE_DIR}/README
   ${txt_files}
   PARENT_SCOPE
   )
index 46b2dc9..6e3671e 100644 (file)
@@ -68,7 +68,8 @@ public class XVM extends VM {
 
     public void migrate(Host host) throws HostFailureException {
         Msg.info("Start migration of VM " + this.getName() + " to " + host.getName());
-        Msg.info("    currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity + "/remaining:" + this.daemon.getRemaining());
+        Msg.info("    currentLoad:" + this.currentLoad + "/ramSize:" + this.ramsize + "/dpIntensity:" + this.dpIntensity 
+                       + "/remaining:" + String.format(java.util.Locale.US, "%.2E",this.daemon.getRemaining()));
         try{
                super.migrate(host);
        } catch (Exception e){
index fc93f69..619d4e0 100644 (file)
@@ -21,71 +21,14 @@ $ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Round trip of VM1 (load 90%)
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO]      - Launch migration from host 0 to host 1
 > [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO] Start migration of VM vm0 to host1
-> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:8.095E11
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 0.000000] [msg_vm/INFO] mig-stage1: remaining_size 2147483648.000000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 18.598067] [msg_vm/INFO] actual bandwidth 110.118973 (MB/s), threshold 3464043.375348
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 18.598067] [msg_vm/INFO] mig-stage 2:0 updated_size 1009084906.862392 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 18.598067] [msg_vm/INFO] mig-stage2.0: remaining_size 1009084906.862392 (> threshold 3464043.375348)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 27.337835] [msg_vm/INFO] actual bandwidth 110.110284, threshold 3463770.024427
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 27.337835] [msg_vm/INFO] mig-stage 2:1 updated_size 474198119.178924 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 27.337835] [msg_vm/INFO] mig-stage2.1: remaining_size 474198119.178924 (> threshold 3463770.024427)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 31.445594] [msg_vm/INFO] actual bandwidth 110.091798, threshold 3463188.514958
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 31.445594] [msg_vm/INFO] mig-stage 2:2 updated_size 222876798.522755 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 31.445594] [msg_vm/INFO] mig-stage2.2: remaining_size 222876798.522755 (> threshold 3463188.514958)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 33.376962] [msg_vm/INFO] actual bandwidth 110.052494, threshold 3461952.124955
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 33.376962] [msg_vm/INFO] mig-stage 2:3 updated_size 104791237.544459 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 33.376962] [msg_vm/INFO] mig-stage2.3: remaining_size 104791237.544459 (> threshold 3461952.124955)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.285733] [msg_vm/INFO] actual bandwidth 109.969020, threshold 3459326.250492
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.285733] [msg_vm/INFO] mig-stage 2:4 updated_size 49307685.020391 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.285733] [msg_vm/INFO] mig-stage2.4: remaining_size 49307685.020391 (> threshold 3459326.250492)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.714029] [msg_vm/INFO] actual bandwidth 109.792154, threshold 3453762.521054
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.714029] [msg_vm/INFO] mig-stage 2:5 updated_size 23238243.968121 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.714029] [msg_vm/INFO] mig-stage2.5: remaining_size 23238243.968121 (> threshold 3453762.521054)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.916568] [msg_vm/INFO] actual bandwidth 109.419289, threshold 3442033.220071
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.916568] [msg_vm/INFO] mig-stage 2:6 updated_size 10989284.465950 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 34.916568] [msg_vm/INFO] mig-stage2.6: remaining_size 10989284.465950 (> threshold 3442033.220071)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 35.013034] [msg_vm/INFO] actual bandwidth 108.641444, threshold 3417564.332268
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 35.013034] [msg_vm/INFO] mig-stage 2:7 updated_size 5234001.988682 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 35.013034] [msg_vm/INFO] mig-stage2.7: remaining_size 5234001.988682 (> threshold 3417564.332268)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 35.059660] [msg_vm/INFO] actual bandwidth 107.053869, threshold 3367623.544281
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 35.059660] [msg_vm/INFO] mig-stage 2:8 updated_size 2529831.013694 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 35.059660] [msg_vm/INFO] mig-stage2.8: remaining_size 2529831.013694 (< threshold 3367623.544281)
-> [host0:__pr_mig_tx:vm0(host0-host1):(16) 35.059660] [msg_vm/INFO] mig-stage3: remaining_size 2529831.013694
+> [host0:cloud/migration/Test:(1) 0.000000] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:8.10E+11
 > [35.082869] [surf_vm_workstation/INFO] migrate VM(vm0): set bound (7285500000.000000) at host1
-> [host1:__pr_mig_rx:vm0(host0-host1):(15) 35.082869] [msg_vm/INFO] set affinity(0x0000@host1) for vm0
 > [host0:cloud/migration/Test:(1) 35.084170] [jmsg/INFO] End of migration of VM vm0 to node host1
 > [host0:cloud/migration/Test:(1) 35.084170] [jmsg/INFO]      - End of Migration from host 0 to host 1 (duration:35.0841702956701)
 > [host0:cloud/migration/Test:(1) 35.084170] [jmsg/INFO]      - Launch migration from host 1 to host 0
 > [host0:cloud/migration/Test:(1) 35.084170] [jmsg/INFO] Start migration of VM vm0 to host0
-> [host0:cloud/migration/Test:(1) 35.084170] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:6.220564352570236E11
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 35.084170] [msg_vm/INFO] mig-stage1: remaining_size 2147483648.000000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 53.682237] [msg_vm/INFO] actual bandwidth 110.118973 (MB/s), threshold 3464043.375348
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 53.682237] [msg_vm/INFO] mig-stage 2:0 updated_size 917349915.329448 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 53.682237] [msg_vm/INFO] mig-stage2.0: remaining_size 917349915.329448 (> threshold 3464043.375348)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 61.627599] [msg_vm/INFO] actual bandwidth 110.108645, threshold 3463718.461873
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 61.627599] [msg_vm/INFO] mig-stage 2:1 updated_size 391905106.046906 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 61.627599] [msg_vm/INFO] mig-stage2.1: remaining_size 391905106.046906 (> threshold 3463718.461873)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 65.022717] [msg_vm/INFO] actual bandwidth 110.084477, threshold 3462958.209981
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 65.022717] [msg_vm/INFO] mig-stage 2:2 updated_size 167464266.773127 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 65.022717] [msg_vm/INFO] mig-stage2.2: remaining_size 167464266.773127 (> threshold 3462958.209981)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 66.474224] [msg_vm/INFO] actual bandwidth 110.027970, threshold 3461180.656939
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 66.474224] [msg_vm/INFO] mig-stage 2:3 updated_size 71595605.337913 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 66.474224] [msg_vm/INFO] mig-stage2.3: remaining_size 71595605.337913 (> threshold 3461180.656939)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.095529] [msg_vm/INFO] actual bandwidth 109.896074, threshold 3457031.577357
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.095529] [msg_vm/INFO] mig-stage 2:4 updated_size 30645837.890704 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.095529] [msg_vm/INFO] mig-stage2.4: remaining_size 30645837.890704 (> threshold 3457031.577357)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.362216] [msg_vm/INFO] actual bandwidth 109.589442, threshold 3447385.759089
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.362216] [msg_vm/INFO] mig-stage 2:5 updated_size 13154371.345477 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.362216] [msg_vm/INFO] mig-stage2.5: remaining_size 13154371.345477 (> threshold 3447385.759089)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.477431] [msg_vm/INFO] actual bandwidth 108.883138, threshold 3425167.371629
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.477431] [msg_vm/INFO] mig-stage 2:6 updated_size 5682988.543846 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.477431] [msg_vm/INFO] mig-stage2.6: remaining_size 5682988.543846 (> threshold 3425167.371629)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.527946] [msg_vm/INFO] actual bandwidth 107.290377, threshold 3375063.431326
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.527946] [msg_vm/INFO] mig-stage 2:7 updated_size 2491628.685811 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.527946] [msg_vm/INFO] mig-stage2.7: remaining_size 2491628.685811 (< threshold 3375063.431326)
-> [host1:__pr_mig_tx:vm0(host1-host0):(28) 67.527946] [msg_vm/INFO] mig-stage3: remaining_size 2491628.685811
+> [host0:cloud/migration/Test:(1) 35.084170] [jmsg/INFO]     currentLoad:90/ramSize:2048/dpIntensity:70/remaining:6.22E+11
 > [67.550824] [surf_vm_workstation/INFO] migrate VM(vm0): set bound (7285500000.000000) at host0
-> [host0:__pr_mig_rx:vm0(host1-host0):(27) 67.550824] [msg_vm/INFO] set affinity(0x0000@host0) for vm0
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] End of migration of VM vm0 to node host0
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO]      - End of Migration from host 1 to host 0 (duration:32.46684874546391)
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] 
@@ -94,71 +37,14 @@ $ java -classpath ${classpath:=.} cloud/migration/Main ${srcdir:=.}/../platforms
 > Round trip of VM1 (load 80%)
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO]      - Launch migration from host 0 to host 1
 > [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO] Start migration of VM vm0 to host1
-> [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:4.6436485611595026E11
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 67.551019] [msg_vm/INFO] mig-stage1: remaining_size 2147483648.000000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 86.149086] [msg_vm/INFO] actual bandwidth 110.118973 (MB/s), threshold 3464043.375348
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 86.149086] [msg_vm/INFO] mig-stage 2:0 updated_size 1009084906.862392 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 86.149086] [msg_vm/INFO] mig-stage2.0: remaining_size 1009084906.862392 (> threshold 3464043.375348)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 94.888854] [msg_vm/INFO] actual bandwidth 110.110284, threshold 3463770.024427
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 94.888854] [msg_vm/INFO] mig-stage 2:1 updated_size 474198119.178924 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 94.888854] [msg_vm/INFO] mig-stage2.1: remaining_size 474198119.178924 (> threshold 3463770.024427)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 98.996613] [msg_vm/INFO] actual bandwidth 110.091798, threshold 3463188.514958
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 98.996613] [msg_vm/INFO] mig-stage 2:2 updated_size 222876798.522756 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 98.996613] [msg_vm/INFO] mig-stage2.2: remaining_size 222876798.522756 (> threshold 3463188.514958)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 100.927981] [msg_vm/INFO] actual bandwidth 110.052494, threshold 3461952.124955
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 100.927981] [msg_vm/INFO] mig-stage 2:3 updated_size 104791237.544460 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 100.927981] [msg_vm/INFO] mig-stage2.3: remaining_size 104791237.544460 (> threshold 3461952.124955)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 101.836752] [msg_vm/INFO] actual bandwidth 109.969020, threshold 3459326.250492
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 101.836752] [msg_vm/INFO] mig-stage 2:4 updated_size 49307685.020392 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 101.836752] [msg_vm/INFO] mig-stage2.4: remaining_size 49307685.020392 (> threshold 3459326.250492)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.265048] [msg_vm/INFO] actual bandwidth 109.792154, threshold 3453762.521054
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.265048] [msg_vm/INFO] mig-stage 2:5 updated_size 23238243.968121 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.265048] [msg_vm/INFO] mig-stage2.5: remaining_size 23238243.968121 (> threshold 3453762.521054)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.467587] [msg_vm/INFO] actual bandwidth 109.419289, threshold 3442033.220071
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.467587] [msg_vm/INFO] mig-stage 2:6 updated_size 10989284.465950 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.467587] [msg_vm/INFO] mig-stage2.6: remaining_size 10989284.465950 (> threshold 3442033.220071)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.564053] [msg_vm/INFO] actual bandwidth 108.641444, threshold 3417564.332268
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.564053] [msg_vm/INFO] mig-stage 2:7 updated_size 5234001.988682 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.564053] [msg_vm/INFO] mig-stage2.7: remaining_size 5234001.988682 (> threshold 3417564.332268)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.610680] [msg_vm/INFO] actual bandwidth 107.053869, threshold 3367623.544281
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.610680] [msg_vm/INFO] mig-stage 2:8 updated_size 2529831.013694 computed_during_stage1 99363890485.508911 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.610680] [msg_vm/INFO] mig-stage2.8: remaining_size 2529831.013694 (< threshold 3367623.544281)
-> [host0:__pr_mig_tx:vm0(host0-host1):(39) 102.610680] [msg_vm/INFO] mig-stage3: remaining_size 2529831.013694
+> [host0:cloud/migration/Test:(1) 67.551019] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:4.64E+11
 > [102.633888] [surf_vm_workstation/INFO] migrate VM(vm0): set bound (6476000000.000000) at host1
-> [host1:__pr_mig_rx:vm0(host0-host1):(38) 102.633888] [msg_vm/INFO] set affinity(0x0000@host1) for vm0
 > [host0:cloud/migration/Test:(1) 102.635189] [jmsg/INFO] End of migration of VM vm0 to node host1
 > [host0:cloud/migration/Test:(1) 102.635189] [jmsg/INFO]      - End of Migration from host 0 to host 1 (duration:35.08417029567006)
 > [host0:cloud/migration/Test:(1) 102.635189] [jmsg/INFO]      - Launch migration from host 1 to host 0
 > [host0:cloud/migration/Test:(1) 102.635189] [jmsg/INFO] Start migration of VM vm0 to host0
-> [host0:cloud/migration/Test:(1) 102.635189] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:2.7692129137297363E11
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 102.635189] [msg_vm/INFO] mig-stage1: remaining_size 2147483648.000000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 121.233256] [msg_vm/INFO] actual bandwidth 110.118973 (MB/s), threshold 3464043.375348
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 121.233256] [msg_vm/INFO] mig-stage 2:0 updated_size 917349915.329448 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 121.233256] [msg_vm/INFO] mig-stage2.0: remaining_size 917349915.329448 (> threshold 3464043.375348)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 129.178618] [msg_vm/INFO] actual bandwidth 110.108645, threshold 3463718.461873
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 129.178618] [msg_vm/INFO] mig-stage 2:1 updated_size 391905106.046906 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 129.178618] [msg_vm/INFO] mig-stage2.1: remaining_size 391905106.046906 (> threshold 3463718.461873)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 132.573736] [msg_vm/INFO] actual bandwidth 110.084477, threshold 3462958.209981
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 132.573736] [msg_vm/INFO] mig-stage 2:2 updated_size 167464266.773128 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 132.573736] [msg_vm/INFO] mig-stage2.2: remaining_size 167464266.773128 (> threshold 3462958.209981)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.025243] [msg_vm/INFO] actual bandwidth 110.027970, threshold 3461180.656939
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.025243] [msg_vm/INFO] mig-stage 2:3 updated_size 71595605.337913 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.025243] [msg_vm/INFO] mig-stage2.3: remaining_size 71595605.337913 (> threshold 3461180.656939)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.646548] [msg_vm/INFO] actual bandwidth 109.896074, threshold 3457031.577357
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.646548] [msg_vm/INFO] mig-stage 2:4 updated_size 30645837.890704 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.646548] [msg_vm/INFO] mig-stage2.4: remaining_size 30645837.890704 (> threshold 3457031.577357)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.913235] [msg_vm/INFO] actual bandwidth 109.589442, threshold 3447385.759089
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.913235] [msg_vm/INFO] mig-stage 2:5 updated_size 13154371.345477 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 134.913235] [msg_vm/INFO] mig-stage2.5: remaining_size 13154371.345477 (> threshold 3447385.759089)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 135.028450] [msg_vm/INFO] actual bandwidth 108.883138, threshold 3425167.371628
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 135.028450] [msg_vm/INFO] mig-stage 2:6 updated_size 5682988.543847 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 135.028450] [msg_vm/INFO] mig-stage2.6: remaining_size 5682988.543847 (> threshold 3425167.371628)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 135.078965] [msg_vm/INFO] actual bandwidth 107.290377, threshold 3375063.431326
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 135.078965] [msg_vm/INFO] mig-stage 2:7 updated_size 2491628.685810 computed_during_stage1 90330809532.280823 dp_rate 0.010155 dp_cap 1932735283.200000
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 135.078965] [msg_vm/INFO] mig-stage2.7: remaining_size 2491628.685810 (< threshold 3375063.431326)
-> [host1:__pr_mig_tx:vm0(host1-host0):(51) 135.078965] [msg_vm/INFO] mig-stage3: remaining_size 2491628.685810
+> [host0:cloud/migration/Test:(1) 102.635189] [jmsg/INFO]     currentLoad:80/ramSize:2048/dpIntensity:70/remaining:2.77E+11
 > [135.101843] [surf_vm_workstation/INFO] migrate VM(vm0): set bound (6476000000.000000) at host0
-> [host0:__pr_mig_rx:vm0(host1-host0):(50) 135.101843] [msg_vm/INFO] set affinity(0x0000@host0) for vm0
 > [host0:cloud/migration/Test:(1) 135.102038] [jmsg/INFO] End of migration of VM vm0 to node host0
 > [host0:cloud/migration/Test:(1) 135.102038] [jmsg/INFO]      - End of Migration from host 1 to host 0 (duration:32.46684874546395)
 > [host0:cloud/migration/Test:(1) 135.102038] [jmsg/INFO] Destroy VMs
index 7e7422d..0e407e4 100644 (file)
@@ -44,39 +44,15 @@ $ $SG_TEST_EXENV ${bindir:=.}/master_worker_vm$EXEEXT --log=no_loc ${srcdir:=.}/
 > [VM01:WRK03:(5) 1097.307521] [msg_test/INFO] WRK03 received task(Task03) from mailbox(MBOX:WRK03)
 > [Jacquelin:master:(1) 1097.307521] [msg_test/INFO] # Migrate all VMs to PM(Intel)
 > [Intel:__pr_mig_tx:VM00(Intel-Intel):(7) 1097.307521] [msg_vm/WARNING] use the default max_downtime value 30ms
-> [Intel:__pr_mig_tx:VM00(Intel-Intel):(7) 1097.307521] [msg_vm/INFO] mig-stage1: remaining_size 1073741824.000000
 > [VM01:WRK03:(5) 1097.380336] [msg_test/INFO] WRK03 executed task(Task03)
-> [Intel:__pr_mig_tx:VM00(Intel-Intel):(7) 1099.463824] [msg_vm/INFO] actual bandwidth 474.886827 (MB/s), threshold 14938647.898422
-> [Intel:__pr_mig_tx:VM00(Intel-Intel):(7) 1099.463824] [msg_vm/INFO] mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 0.000000
-> [Intel:__pr_mig_tx:VM00(Intel-Intel):(7) 1099.463824] [msg_vm/INFO] mig-stage2.0: remaining_size 0.000000 (< threshold 14938647.898422)
-> [Intel:__pr_mig_tx:VM00(Intel-Intel):(7) 1099.463824] [msg_vm/INFO] mig-stage3: remaining_size 0.000000
 > [1099.464019] [surf_vm_workstation/INFO] migrate VM(VM00): set bound (137333000.000000) at Intel
-> [Intel:__pr_mig_rx:VM00(Intel-Intel):(6) 1099.464019] [msg_vm/INFO] set affinity(0x0000@Intel) for VM00
-> [Provost:__pr_mig_tx:VM01(Provost-Intel):(11) 1100.382717] [msg_vm/WARNING] use the default max_downtime value 30ms
-> [Provost:__pr_mig_tx:VM01(Provost-Intel):(11) 1100.382717] [msg_vm/INFO] mig-stage1: remaining_size 1073741824.000000
-> [Provost:__pr_mig_tx:VM01(Provost-Intel):(11) 3564.234309] [msg_vm/INFO] actual bandwidth 0.415609 (MB/s), threshold 13073.942775
-> [Provost:__pr_mig_tx:VM01(Provost-Intel):(11) 3564.234309] [msg_vm/INFO] mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 0.000000
-> [Provost:__pr_mig_tx:VM01(Provost-Intel):(11) 3564.234309] [msg_vm/INFO] mig-stage2.0: remaining_size 0.000000 (< threshold 13073.942775)
-> [Provost:__pr_mig_tx:VM01(Provost-Intel):(11) 3564.234309] [msg_vm/INFO] mig-stage3: remaining_size 0.000000
+> [Provost:__pr_mig_tx:VM01(Provost-Intel):(9) 1100.382717] [msg_vm/WARNING] use the default max_downtime value 30ms
 > [3566.242426] [surf_vm_workstation/INFO] migrate VM(VM01): set bound (137333000.000000) at Intel
-> [Intel:__pr_mig_rx:VM01(Provost-Intel):(10) 3566.242426] [msg_vm/INFO] set affinity(0x0000@Intel) for VM01
 > [Jacquelin:master:(1) 3567.161124] [msg_test/INFO] # Migrate all VMs to PM(Provost)
-> [Intel:__pr_mig_tx:VM00(Intel-Provost):(15) 3567.161124] [msg_vm/WARNING] use the default max_downtime value 30ms
-> [Intel:__pr_mig_tx:VM00(Intel-Provost):(15) 3567.161124] [msg_vm/INFO] mig-stage1: remaining_size 1073741824.000000
-> [Intel:__pr_mig_tx:VM00(Intel-Provost):(15) 6031.012716] [msg_vm/INFO] actual bandwidth 0.415609 (MB/s), threshold 13073.942775
-> [Intel:__pr_mig_tx:VM00(Intel-Provost):(15) 6031.012716] [msg_vm/INFO] mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 0.000000
-> [Intel:__pr_mig_tx:VM00(Intel-Provost):(15) 6031.012716] [msg_vm/INFO] mig-stage2.0: remaining_size 0.000000 (< threshold 13073.942775)
-> [Intel:__pr_mig_tx:VM00(Intel-Provost):(15) 6031.012716] [msg_vm/INFO] mig-stage3: remaining_size 0.000000
+> [Intel:__pr_mig_tx:VM00(Intel-Provost):(11) 3567.161124] [msg_vm/WARNING] use the default max_downtime value 30ms
 > [6033.020833] [surf_vm_workstation/INFO] migrate VM(VM00): set bound (137333000.000000) at Provost
-> [Provost:__pr_mig_rx:VM00(Intel-Provost):(14) 6033.020833] [msg_vm/INFO] set affinity(0x0000@Provost) for VM00
-> [Intel:__pr_mig_tx:VM01(Intel-Provost):(19) 6034.900487] [msg_vm/WARNING] use the default max_downtime value 30ms
-> [Intel:__pr_mig_tx:VM01(Intel-Provost):(19) 6034.900487] [msg_vm/INFO] mig-stage1: remaining_size 1073741824.000000
-> [Intel:__pr_mig_tx:VM01(Intel-Provost):(19) 8498.752079] [msg_vm/INFO] actual bandwidth 0.415609 (MB/s), threshold 13073.942775
-> [Intel:__pr_mig_tx:VM01(Intel-Provost):(19) 8498.752079] [msg_vm/INFO] mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 0.000000
-> [Intel:__pr_mig_tx:VM01(Intel-Provost):(19) 8498.752079] [msg_vm/INFO] mig-stage2.0: remaining_size 0.000000 (< threshold 13073.942775)
-> [Intel:__pr_mig_tx:VM01(Intel-Provost):(19) 8498.752079] [msg_vm/INFO] mig-stage3: remaining_size 0.000000
+> [Intel:__pr_mig_tx:VM01(Intel-Provost):(13) 6034.900487] [msg_vm/WARNING] use the default max_downtime value 30ms
 > [8500.760196] [surf_vm_workstation/INFO] migrate VM(VM01): set bound (137333000.000000) at Provost
-> [Provost:__pr_mig_rx:VM01(Intel-Provost):(18) 8500.760196] [msg_vm/INFO] set affinity(0x0000@Provost) for VM01
 > [Jacquelin:master:(1) 8502.639850] [msg_test/INFO] # Shutdown the half of worker processes gracefuly. The remaining half will be forcibly killed.
 > [VM00:WRK00:(2) 8504.519504] [msg_test/INFO] WRK00 received task(finalize) from mailbox(MBOX:WRK00)
 > [VM01:WRK01:(3) 8506.399157] [msg_test/INFO] WRK01 received task(finalize) from mailbox(MBOX:WRK01)
index 6adcb34..b7c9e02 100644 (file)
@@ -65,22 +65,10 @@ $ $SG_TEST_EXENV ${bindir:=.}/simple_vm$EXEEXT --log=no_loc ${srcdir:=.}/../../p
 > [Fafard:master_:(1) 49.000000] [msg_test/INFO] ### Relocate VM0 between PM0 and PM1
 > [49.000000] [surf_vm_workstation/INFO] Create VM(VM0)@PM(Fafard) with 0 mounted disks
 > [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 49.010000] [msg_vm/WARNING] use the default max_downtime value 30ms
-> [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 49.010000] [msg_vm/INFO] mig-stage1: remaining_size 1073741824.000000
 > [Bourassa:comm_rx:(36) 49.204993] [msg_test/INFO] VM0:comm_tx to Bourassa:comm_rx => 0.204993 sec
-> [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 191.612841] [msg_vm/INFO] actual bandwidth 7.180783 (MB/s), threshold 225887.888231
-> [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 191.612841] [msg_vm/INFO] mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 0.000000
-> [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 191.612841] [msg_vm/INFO] mig-stage2.0: remaining_size 0.000000 (< threshold 225887.888231)
-> [Fafard:__pr_mig_tx:VM0(Fafard-Tremblay):(38) 191.612841] [msg_vm/INFO] mig-stage3: remaining_size 0.000000
 > [191.638550] [surf_vm_workstation/INFO] migrate VM(VM0): set bound (76296000.000000) at Tremblay
-> [Tremblay:__pr_mig_rx:VM0(Fafard-Tremblay):(37) 191.638550] [msg_vm/INFO] set affinity(0x0000@Tremblay) for VM0
-> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(42) 191.674258] [msg_vm/WARNING] use the default max_downtime value 30ms
-> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(42) 191.674258] [msg_vm/INFO] mig-stage1: remaining_size 1073741824.000000
-> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(42) 334.173348] [msg_vm/INFO] actual bandwidth 7.186011 (MB/s), threshold 226052.353672
-> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(42) 334.173348] [msg_vm/INFO] mig-stage 2:0 updated_size 0.000000 computed_during_stage1 0.000000 dp_rate 0.000000 dp_cap 0.000000
-> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(42) 334.173348] [msg_vm/INFO] mig-stage2.0: remaining_size 0.000000 (< threshold 226052.353672)
-> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(42) 334.173348] [msg_vm/INFO] mig-stage3: remaining_size 0.000000
+> [Tremblay:__pr_mig_tx:VM0(Tremblay-Fafard):(40) 191.674258] [msg_vm/WARNING] use the default max_downtime value 30ms
 > [334.199056] [surf_vm_workstation/CRITICAL] FIXME: may need a proper handling, 1
 > [334.199056] [surf_vm_workstation/INFO] migrate VM(VM0): set bound (76296000.000000) at Fafard
-> [Fafard:__pr_mig_rx:VM0(Tremblay-Fafard):(41) 334.199056] [msg_vm/INFO] set affinity(0x0000@Fafard) for VM0
 > [Fafard:master_:(1) 339.199251] [msg_test/INFO] ## Test 6 (ended)
 > [339.199251] [msg_test/INFO] Bye (simulation time 339.199)
index 483500c..fb51f84 100644 (file)
@@ -17,7 +17,20 @@ if(HAVE_MC)
   target_link_libraries(bugged3     simgrid )
   target_link_libraries(electric_fence     simgrid )
   target_link_libraries(bugged1_liveness     simgrid )
-  target_link_libraries(bugged2_liveness     simgrid )
+    target_link_libraries(bugged2_liveness     simgrid )
+
+  if(HAVE_C_STACK_CLEANER)
+    add_executable(bugged1_liveness_cleaner_on     bugged1_liveness.c )
+    add_executable(bugged1_liveness_cleaner_off     bugged1_liveness.c )
+
+    target_link_libraries(bugged1_liveness_cleaner_on     simgrid )
+    target_link_libraries(bugged1_liveness_cleaner_off     simgrid )
+
+    set_target_properties(bugged1_liveness_cleaner_on
+      PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fstack-cleaner")
+    set_target_properties(bugged1_liveness_cleaner_off
+      PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fno-stack-cleaner")
+  endif()
 
 endif()
 
@@ -62,6 +75,7 @@ set(bin_files
   ${bin_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged1_liveness
   ${CMAKE_CURRENT_SOURCE_DIR}/promela_bugged2_liveness
+  ${CMAKE_CURRENT_SOURCE_DIR}/bugged1_liveness_stack_cleaner
   PARENT_SCOPE
   )
 set(txt_files
index 09d3746..5143623 100644 (file)
 /* LTL property checked : G(r->F(cs)); (r=request of CS, cs=CS ok)            */
 /******************************************************************************/
 
+#ifdef GARBAGE_STACK
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#endif
+
 #include "msg/msg.h"
 #include "mc/mc.h"
 #include "xbt/automaton.h"
@@ -28,6 +34,16 @@ int predCS(){
   return cs;
 }
 
+#ifdef GARBAGE_STACK
+/** Do not use a clean stack */
+static void garbage_stack(void) {
+  const size_t size = 256;
+  int fd = open("/dev/urandom", O_RDONLY);
+  char foo[size];
+  read(fd, foo, size);
+  close(fd);
+}
+#endif
 
 int coordinator(int argc, char *argv[])
 {
@@ -84,7 +100,7 @@ int client(int argc, char *argv[])
 
   char *my_mailbox = xbt_strdup(argv[1]);
   msg_task_t grant = NULL, release = NULL;
-    
+
   while(1){
     XBT_INFO("Ask the request");
     MSG_task_send(MSG_task_create("request", 0, 1000, my_mailbox), "coordinator");
@@ -130,6 +146,17 @@ int client(int argc, char *argv[])
   return 0;
 }
 
+static int raw_client(int argc, char *argv[])
+{
+#ifdef GARBAGE_STACK
+  // At this point the stack of the callee (client) is probably filled with
+  // zeros and unitialized variables will contain 0. This call will place
+  // random byes in the stack of the callee:
+  garbage_stack();
+#endif
+  return client(argc, argv);
+}
+
 int main(int argc, char *argv[])
 {
 
@@ -146,7 +173,7 @@ int main(int argc, char *argv[])
   
   MSG_create_environment(platform_file);
   MSG_function_register("coordinator", coordinator);
-  MSG_function_register("client", client);
+  MSG_function_register("client", raw_client);
   MSG_launch_application(application_file);
   MSG_main();
 
diff --git a/examples/msg/mc/bugged1_liveness_stack_cleaner b/examples/msg/mc/bugged1_liveness_stack_cleaner
new file mode 100755 (executable)
index 0000000..2f372b6
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Run the same test compiled with -fstack-cleaner / f-no-stack-cleaner
+# and compare the output.
+
+srcdir="$1"
+bindir="$2"
+
+cd "$srcdir"
+
+die() {
+  echo "$@" >&2
+  exit 1
+}
+
+assert() {
+  if ! eval "$1"; then
+    die "Assertion failed: $@"
+  fi
+}
+
+# If we don't have timeout, fake it:
+if ! which timeout > /dev/null; then
+  timeout() {
+    shift
+    "$@"
+  }
+fi
+
+run() {
+  state=$1
+  shift
+  timeout 30s ${bindir:=.}/bugged1_liveness_cleaner_$state \
+    ${srcdir:=.}/../../platforms/platform.xml \
+    ${srcdir:=.}/deploy_bugged1_liveness.xml \
+    --cfg=model-check:1 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" \
+    --cfg=contexts/factory:ucontext \
+    --cfg=contexts/stack_size:256
+  assert 'test $? = 134'
+}
+
+get_states() {
+  echo "$1" | grep "Expanded pairs = " | sed "s/^.*Expanded pairs = //" | head -n1
+}
+
+RES_ON="$(run on 2>&1 1>/dev/null)"
+RES_OFF="$(run off 2>&1 1>/dev/null)"
+
+STATES_ON=$(get_states "$RES_ON")
+STATES_OFF=$(get_states "$RES_OFF")
+
+# Both runs finished:
+assert 'test -n "$STATES_ON"'
+assert 'test -n "$STATES_OFF"'
+
+# We expect 21 visited pairs with the stack cleaner:
+assert 'test "$STATES_ON" = 21'
+
+# We expect more states without the stack cleaner:
+assert 'test "$STATES_ON" -lt "$STATES_OFF"'
diff --git a/examples/smpi/NAS/BT/Makefile b/examples/smpi/NAS/BT/Makefile
deleted file mode 100644 (file)
index dd27503..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-SHELL=/bin/sh
-BENCHMARK=bt
-BENCHMARKU=BT
-VEC=
-
-include ../config/make.def
-
-
-OBJS = bt.o make_set.o initialize.o exact_solution.o exact_rhs.o \
-       set_constants.o adi.o define.o copy_faces.o rhs.o solve_subs.o \
-       x_solve$(VEC).o y_solve$(VEC).o z_solve$(VEC).o add.o error.o \
-       verify.o setup_mpi.o \
-       ${COMMON}/print_results.o ${COMMON}/timers.o
-
-include ../sys/make.common
-
-# npbparams.h is included by header.h
-# The following rule should do the trick but many make programs (not gmake)
-# will do the wrong thing and rebuild the world every time (because the
-# mod time on header.h is not changed. One solution would be to 
-# touch header.h but this might cause confusion if someone has
-# accidentally deleted it. Instead, make the dependency on npbparams.h
-# explicit in all the lines below (even though dependence is indirect). 
-
-# header.h: npbparams.h
-
-${PROGRAM}: config
-       @if [ x$(VERSION) = xvec ] ; then       \
-               ${MAKE} VEC=_vec exec;          \
-       elif [ x$(VERSION) = xVEC ] ; then      \
-               ${MAKE} VEC=_vec exec;          \
-       else                                    \
-               ${MAKE} exec;                   \
-       fi
-
-exec: $(OBJS)
-       @if [ x$(SUBTYPE) = xfull ] ; then      \
-               ${MAKE} bt-full;                \
-       elif [ x$(SUBTYPE) = xFULL ] ; then     \
-               ${MAKE} bt-full;                \
-       elif [ x$(SUBTYPE) = xsimple ] ; then   \
-               ${MAKE} bt-simple;              \
-       elif [ x$(SUBTYPE) = xSIMPLE ] ; then   \
-               ${MAKE} bt-simple;              \
-       elif [ x$(SUBTYPE) = xfortran ] ; then  \
-               ${MAKE} bt-fortran;             \
-       elif [ x$(SUBTYPE) = xFORTRAN ] ; then  \
-               ${MAKE} bt-fortran;             \
-       elif [ x$(SUBTYPE) = xepio ] ; then     \
-               ${MAKE} bt-epio;                \
-       elif [ x$(SUBTYPE) = xEPIO ] ; then     \
-               ${MAKE} bt-epio;                \
-       else                                    \
-               ${MAKE} bt-bt;                  \
-       fi
-
-bt-bt: ${OBJS} btio.o
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} btio.o ${FMPI_LIB}
-
-bt-full: ${OBJS} full_mpiio.o btio_common.o
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM}.mpi_io_full ${OBJS} btio_common.o full_mpiio.o ${FMPI_LIB}
-
-bt-simple: ${OBJS} simple_mpiio.o btio_common.o
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM}.mpi_io_simple ${OBJS} btio_common.o simple_mpiio.o ${FMPI_LIB}
-
-bt-fortran: ${OBJS} fortran_io.o btio_common.o
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM}.fortran_io ${OBJS} btio_common.o fortran_io.o ${FMPI_LIB}
-
-bt-epio: ${OBJS} epio.o btio_common.o
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM}.ep_io ${OBJS} btio_common.o epio.o ${FMPI_LIB}
-
-.f.o:
-       ${FCOMPILE} $<
-
-.c.o:
-       ${CCOMPILE} $<
-
-
-bt.o:             bt.f  header.h npbparams.h  mpinpb.h
-make_set.o:       make_set.f  header.h npbparams.h  mpinpb.h
-initialize.o:     initialize.f  header.h npbparams.h
-exact_solution.o: exact_solution.f  header.h npbparams.h
-exact_rhs.o:      exact_rhs.f  header.h npbparams.h
-set_constants.o:  set_constants.f  header.h npbparams.h
-adi.o:            adi.f  header.h npbparams.h
-define.o:         define.f  header.h npbparams.h
-copy_faces.o:     copy_faces.f  header.h npbparams.h  mpinpb.h
-rhs.o:            rhs.f  header.h npbparams.h
-x_solve$(VEC).o:  x_solve$(VEC).f  header.h work_lhs$(VEC).h npbparams.h  mpinpb.h
-y_solve$(VEC).o:  y_solve$(VEC).f  header.h work_lhs$(VEC).h npbparams.h  mpinpb.h
-z_solve$(VEC).o:  z_solve$(VEC).f  header.h work_lhs$(VEC).h npbparams.h  mpinpb.h
-solve_subs.o:     solve_subs.f  npbparams.h
-add.o:            add.f  header.h npbparams.h
-error.o:          error.f  header.h npbparams.h  mpinpb.h
-verify.o:         verify.f  header.h npbparams.h  mpinpb.h
-setup_mpi.o:      setup_mpi.f mpinpb.h npbparams.h 
-btio.o:           btio.f  header.h npbparams.h
-btio_common.o:    btio_common.f mpinpb.h npbparams.h 
-fortran_io.o:     fortran_io.f mpinpb.h npbparams.h 
-simple_mpiio.o:   simple_mpiio.f mpinpb.h npbparams.h 
-full_mpiio.o:     full_mpiio.f mpinpb.h npbparams.h 
-epio.o:           epio.f mpinpb.h npbparams.h 
-
-clean:
-       - rm -f *.o *~ mputil*
-       - rm -f  npbparams.h core
diff --git a/examples/smpi/NAS/BT/add.f b/examples/smpi/NAS/BT/add.f
deleted file mode 100644 (file)
index e14cde4..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine  add
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     addition of update to the vector u
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer  c, i, j, k, m
-
-      do     c = 1, ncells
-         do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do    m = 1, 5
-                     u(m,i,j,k,c) = u(m,i,j,k,c) + rhs(m,i,j,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      enddo
-
-      return
-      end
diff --git a/examples/smpi/NAS/BT/adi.f b/examples/smpi/NAS/BT/adi.f
deleted file mode 100644 (file)
index 58450c0..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine  adi
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      call copy_faces
-
-      call x_solve
-
-      call y_solve
-
-      call z_solve
-
-      call add
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/BT/bt.f b/examples/smpi/NAS/BT/bt.f
deleted file mode 100644 (file)
index 36e5078..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-!-------------------------------------------------------------------------!
-!                                                                         !
-!        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3         !
-!                                                                         !
-!                                   B T                                   !
-!                                                                         !
-!-------------------------------------------------------------------------!
-!                                                                         !
-!    This benchmark is part of the NAS Parallel Benchmark 3.3 suite.      !
-!    It is described in NAS Technical Reports 95-020 and 02-007.          !
-!                                                                         !
-!    Permission to use, copy, distribute and modify this software         !
-!    for any purpose with or without fee is hereby granted.  We           !
-!    request, however, that all derived work reference the NAS            !
-!    Parallel Benchmarks 3.3. This software is provided "as is"           !
-!    without express or implied warranty.                                 !
-!                                                                         !
-!    Information on NPB 3.3, including the technical report, the          !
-!    original specifications, source code, results and information        !
-!    on how to submit new results, is available at:                       !
-!                                                                         !
-!           http://www.nas.nasa.gov/Software/NPB/                         !
-!                                                                         !
-!    Send comments or suggestions to  npb@nas.nasa.gov                    !
-!                                                                         !
-!          NAS Parallel Benchmarks Group                                  !
-!          NASA Ames Research Center                                      !
-!          Mail Stop: T27A-1                                              !
-!          Moffett Field, CA   94035-1000                                 !
-!                                                                         !
-!          E-mail:  npb@nas.nasa.gov                                      !
-!          Fax:     (650) 604-3957                                        !
-!                                                                         !
-!-------------------------------------------------------------------------!
-
-c---------------------------------------------------------------------
-c
-c Authors: R. F. Van der Wijngaart
-c          T. Harris
-c          M. Yarrow
-c
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-       program MPBT
-c---------------------------------------------------------------------
-
-       include  'header.h'
-       include  'mpinpb.h'
-      
-       integer i, niter, step, c, error, fstatus
-       double precision navg, mflops, mbytes, n3
-
-       external timer_read
-       double precision t, tmax, tiominv, tpc, timer_read
-       logical verified
-       character class, cbuff*40
-
-       integer wr_interval
-
-       call setup_mpi
-       if (.not. active) goto 999
-
-c---------------------------------------------------------------------
-c      Root node reads input file (if it exists) else takes
-c      defaults from parameters
-c---------------------------------------------------------------------
-       if (node .eq. root) then
-          
-          write(*, 1000)
-          open (unit=2,file='inputbt.data',status='old', iostat=fstatus)
-c
-          rd_interval = 0
-          if (fstatus .eq. 0) then
-            write(*,233) 
- 233        format(' Reading from input file inputbt.data')
-            read (2,*) niter
-            read (2,*) dt
-            read (2,*) grid_points(1), grid_points(2), grid_points(3)
-            if (iotype .ne. 0) then
-                read (2,'(A)') cbuff
-                read (cbuff,*,iostat=i) wr_interval, rd_interval
-                if (i .ne. 0) rd_interval = 0
-                if (wr_interval .le. 0) wr_interval = wr_default
-            endif
-            if (iotype .eq. 1) then
-                read (2,*) collbuf_nodes, collbuf_size
-                write(*,*) 'collbuf_nodes ', collbuf_nodes
-                write(*,*) 'collbuf_size  ', collbuf_size
-            endif
-            close(2)
-          else
-            write(*,234) 
-            niter = niter_default
-            dt    = dt_default
-            grid_points(1) = problem_size
-            grid_points(2) = problem_size
-            grid_points(3) = problem_size
-            wr_interval = wr_default
-            if (iotype .eq. 1) then
-c             set number of nodes involved in collective buffering to 4,
-c             unless total number of nodes is smaller than that.
-c             set buffer size for collective buffering to 1MB per node
-c             collbuf_nodes = min(4,no_nodes)
-c             set default to No-File-Hints with a value of 0
-              collbuf_nodes = 0
-              collbuf_size = 1000000
-            endif
-          endif
- 234      format(' No input file inputbt.data. Using compiled defaults')
-
-          write(*, 1001) grid_points(1), grid_points(2), grid_points(3)
-          write(*, 1002) niter, dt
-          if (no_nodes .ne. total_nodes) write(*, 1004) total_nodes
-          if (no_nodes .ne. maxcells*maxcells) 
-     >        write(*, 1005) maxcells*maxcells
-          write(*, 1003) no_nodes
-
-          if (iotype .eq. 1) write(*, 1006) 'FULL MPI-IO', wr_interval
-          if (iotype .eq. 2) write(*, 1006) 'SIMPLE MPI-IO', wr_interval
-          if (iotype .eq. 3) write(*, 1006) 'EPIO', wr_interval
-          if (iotype .eq. 4) write(*, 1006) 'FORTRAN IO', wr_interval
-
- 1000 format(//, ' NAS Parallel Benchmarks 3.3 -- BT Benchmark ',/)
- 1001     format(' Size: ', i4, 'x', i4, 'x', i4)
- 1002     format(' Iterations: ', i4, '    dt: ', F11.7)
- 1004     format(' Total number of processes: ', i5)
- 1005     format(' WARNING: compiled for ', i5, ' processes ')
- 1003     format(' Number of active processes: ', i5, /)
- 1006     format(' BTIO -- ', A, ' write interval: ', i3 /)
-
-       endif
-
-       call mpi_bcast(niter, 1, MPI_INTEGER,
-     >                root, comm_setup, error)
-
-       call mpi_bcast(dt, 1, dp_type, 
-     >                root, comm_setup, error)
-
-       call mpi_bcast(grid_points(1), 3, MPI_INTEGER, 
-     >                root, comm_setup, error)
-
-       call mpi_bcast(wr_interval, 1, MPI_INTEGER,
-     >                root, comm_setup, error)
-
-       call mpi_bcast(rd_interval, 1, MPI_INTEGER,
-     >                root, comm_setup, error)
-
-       call make_set
-
-       do  c = 1, maxcells
-          if ( (cell_size(1,c) .gt. IMAX) .or.
-     >         (cell_size(2,c) .gt. JMAX) .or.
-     >         (cell_size(3,c) .gt. KMAX) ) then
-             print *,node, c, (cell_size(i,c),i=1,3)
-             print *,' Problem size too big for compiled array sizes'
-             goto 999
-          endif
-       end do
-
-       call set_constants
-
-       call initialize
-
-       call setup_btio
-       idump = 0
-
-       call lhsinit
-
-       call exact_rhs
-
-       call compute_buffer_size(5)
-
-c---------------------------------------------------------------------
-c      do one time step to touch all code, and reinitialize
-c---------------------------------------------------------------------
-       call adi
-       call initialize
-
-       call timer_clear(2)
-
-c---------------------------------------------------------------------
-c      Synchronize before placing time stamp
-c---------------------------------------------------------------------
-       call mpi_barrier(comm_setup, error)
-
-       call timer_clear(1)
-       call timer_start(1)
-
-       do  step = 1, niter
-
-          if (node .eq. root) then
-             if (mod(step, 20) .eq. 0 .or. step .eq. niter .or.
-     >           step .eq. 1) then
-                write(*, 200) step
- 200            format(' Time step ', i4)
-             endif
-          endif
-
-          call adi
-
-          if (iotype .ne. 0) then
-              call timer_start(2)
-              if (mod(step, wr_interval).eq.0 .or. step .eq. niter) then
-                  if (node .eq. root) then
-                      print *, 'Writing data set, time step', step
-                  endif
-                  if (step .eq. niter .and. rd_interval .gt. 1) then
-                      rd_interval = 1
-                  endif
-                  call output_timestep
-                  idump = idump + 1
-              endif
-              call timer_stop(2)
-          endif
-       end do
-
-       call btio_cleanup
-
-       call timer_stop(1)
-       t = timer_read(1)
-       
-       call verify(niter, class, verified)
-
-       call mpi_reduce(t, tmax, 1, 
-     >                 dp_type, MPI_MAX, 
-     >                 root, comm_setup, error)
-
-       if (iotype .ne. 0) then
-          t = timer_read(2)
-          if (t .ne. 0.d0) t = 1.0d0 / t
-          call mpi_reduce(t, tiominv, 1, 
-     >                    dp_type, MPI_SUM, 
-     >                    root, comm_setup, error)
-       endif
-
-       if( node .eq. root ) then
-          n3 = 1.0d0*grid_points(1)*grid_points(2)*grid_points(3)
-          navg = (grid_points(1)+grid_points(2)+grid_points(3))/3.0
-          if( tmax .ne. 0. ) then
-             mflops = 1.0e-6*float(niter)*
-     >     (3478.8*n3-17655.7*navg**2+28023.7*navg)
-     >     / tmax
-          else
-             mflops = 0.0
-          endif
-
-          if (iotype .ne. 0) then
-             mbytes = n3 * 40.0 * idump * 1.0d-6
-             tiominv = tiominv / no_nodes
-             t = 0.0
-             if (tiominv .ne. 0.) t = 1.d0 / tiominv
-             tpc = 0.0
-             if (tmax .ne. 0.) tpc = t * 100.0 / tmax
-             write(*,1100) t, tpc, mbytes, mbytes*tiominv
- 1100        format(/' BTIO -- statistics:'/
-     >               '   I/O timing in seconds   : ', f14.2/
-     >               '   I/O timing percentage   : ', f14.2/
-     >               '   Total data written (MB) : ', f14.2/
-     >               '   I/O data rate  (MB/sec) : ', f14.2)
-          endif
-
-         call print_results('BT', class, grid_points(1), 
-     >     grid_points(2), grid_points(3), niter, maxcells*maxcells, 
-     >     total_nodes, tmax, mflops, '          floating point', 
-     >     verified, npbversion,compiletime, cs1, cs2, cs3, cs4, cs5, 
-     >     cs6, '(none)')
-       endif
-
- 999   continue
-       call mpi_barrier(MPI_COMM_WORLD, error)
-       call mpi_finalize(error)
-
-       end
-
diff --git a/examples/smpi/NAS/BT/btio.f b/examples/smpi/NAS/BT/btio.f
deleted file mode 100644 (file)
index 1fb730b..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup_btio
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine output_timestep
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine btio_cleanup
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine btio_verify(verified)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      logical verified
-
-      verified = .true.
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine accumulate_norms(xce_acc)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      double precision xce_acc(5)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine checksum_timestep
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      return
-      end
diff --git a/examples/smpi/NAS/BT/btio_common.f b/examples/smpi/NAS/BT/btio_common.f
deleted file mode 100644 (file)
index 9227a12..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine clear_timestep
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer cio, kio, jio, ix
-
-      do cio=1,ncells
-          do kio=0, cell_size(3,cio)-1
-              do jio=0, cell_size(2,cio)-1
-                  do ix=0,cell_size(1,cio)-1
-                            u(1,ix, jio,kio,cio) = 0
-                            u(2,ix, jio,kio,cio) = 0
-                            u(3,ix, jio,kio,cio) = 0
-                            u(4,ix, jio,kio,cio) = 0
-                            u(5,ix, jio,kio,cio) = 0
-                  enddo
-              enddo
-          enddo
-      enddo
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/BT/copy_faces.f b/examples/smpi/NAS/BT/copy_faces.f
deleted file mode 100644 (file)
index 14b82ca..0000000
+++ /dev/null
@@ -1,316 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine copy_faces
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     
-c This function copies the face values of a variable defined on a set 
-c of cells to the overlap locations of the adjacent sets of cells. 
-c Because a set of cells interfaces in each direction with exactly one 
-c other set, we only need to fill six different buffers. We could try to 
-c overlap communication with computation, by computing
-c some internal values while communicating boundary values, but this
-c adds so much overhead that it's not clearly useful. 
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i, j, k, c, m, requests(0:11), p0, p1, 
-     >     p2, p3, p4, p5, b_size(0:5), ss(0:5), 
-     >     sr(0:5), error, statuses(MPI_STATUS_SIZE, 0:11)
-
-c---------------------------------------------------------------------
-c     exit immediately if there are no faces to be copied           
-c---------------------------------------------------------------------
-      if (no_nodes .eq. 1) then
-         call compute_rhs
-         return
-      endif
-
-      ss(0) = start_send_east
-      ss(1) = start_send_west
-      ss(2) = start_send_north
-      ss(3) = start_send_south
-      ss(4) = start_send_top
-      ss(5) = start_send_bottom
-
-      sr(0) = start_recv_east
-      sr(1) = start_recv_west
-      sr(2) = start_recv_north
-      sr(3) = start_recv_south
-      sr(4) = start_recv_top
-      sr(5) = start_recv_bottom
-
-      b_size(0) = east_size   
-      b_size(1) = west_size   
-      b_size(2) = north_size  
-      b_size(3) = south_size  
-      b_size(4) = top_size    
-      b_size(5) = bottom_size 
-
-c---------------------------------------------------------------------
-c     because the difference stencil for the diagonalized scheme is 
-c     orthogonal, we do not have to perform the staged copying of faces, 
-c     but can send all face information simultaneously to the neighboring 
-c     cells in all directions          
-c---------------------------------------------------------------------
-      p0 = 0
-      p1 = 0
-      p2 = 0
-      p3 = 0
-      p4 = 0
-      p5 = 0
-
-      do  c = 1, ncells
-
-c---------------------------------------------------------------------
-c     fill the buffer to be sent to eastern neighbors (i-dir)
-c---------------------------------------------------------------------
-         if (cell_coord(1,c) .ne. ncells) then
-            do   k = 0, cell_size(3,c)-1
-               do   j = 0, cell_size(2,c)-1
-                  do   i = cell_size(1,c)-2, cell_size(1,c)-1
-                     do   m = 1, 5
-                        out_buffer(ss(0)+p0) = u(m,i,j,k,c)
-                        p0 = p0 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-c---------------------------------------------------------------------
-c     fill the buffer to be sent to western neighbors 
-c---------------------------------------------------------------------
-         if (cell_coord(1,c) .ne. 1) then
-            do   k = 0, cell_size(3,c)-1
-               do   j = 0, cell_size(2,c)-1
-                  do   i = 0, 1
-                     do   m = 1, 5
-                        out_buffer(ss(1)+p1) = u(m,i,j,k,c)
-                        p1 = p1 + 1
-                     end do
-                  end do
-               end do
-            end do
-
-         endif
-
-c---------------------------------------------------------------------
-c     fill the buffer to be sent to northern neighbors (j_dir)
-c---------------------------------------------------------------------
-         if (cell_coord(2,c) .ne. ncells) then
-            do   k = 0, cell_size(3,c)-1
-               do   j = cell_size(2,c)-2, cell_size(2,c)-1
-                  do   i = 0, cell_size(1,c)-1
-                     do   m = 1, 5
-                        out_buffer(ss(2)+p2) = u(m,i,j,k,c)
-                        p2 = p2 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-c---------------------------------------------------------------------
-c     fill the buffer to be sent to southern neighbors 
-c---------------------------------------------------------------------
-         if (cell_coord(2,c).ne. 1) then
-            do   k = 0, cell_size(3,c)-1
-               do   j = 0, 1
-                  do   i = 0, cell_size(1,c)-1   
-                     do   m = 1, 5
-                        out_buffer(ss(3)+p3) = u(m,i,j,k,c)
-                        p3 = p3 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-c---------------------------------------------------------------------
-c     fill the buffer to be sent to top neighbors (k-dir)
-c---------------------------------------------------------------------
-         if (cell_coord(3,c) .ne. ncells) then
-            do   k = cell_size(3,c)-2, cell_size(3,c)-1
-               do   j = 0, cell_size(2,c)-1
-                  do   i = 0, cell_size(1,c)-1
-                     do   m = 1, 5
-                        out_buffer(ss(4)+p4) = u(m,i,j,k,c)
-                        p4 = p4 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-c---------------------------------------------------------------------
-c     fill the buffer to be sent to bottom neighbors
-c---------------------------------------------------------------------
-         if (cell_coord(3,c).ne. 1) then
-            do    k=0, 1
-               do   j = 0, cell_size(2,c)-1
-                  do   i = 0, cell_size(1,c)-1
-                     do   m = 1, 5
-                        out_buffer(ss(5)+p5) = u(m,i,j,k,c)
-                        p5 = p5 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-c---------------------------------------------------------------------
-c     cell loop
-c---------------------------------------------------------------------
-      end do
-
-      call mpi_irecv(in_buffer(sr(0)), b_size(0), 
-     >     dp_type, successor(1), WEST,  
-     >     comm_rhs, requests(0), error)
-      call mpi_irecv(in_buffer(sr(1)), b_size(1), 
-     >     dp_type, predecessor(1), EAST,  
-     >     comm_rhs, requests(1), error)
-      call mpi_irecv(in_buffer(sr(2)), b_size(2), 
-     >     dp_type, successor(2), SOUTH, 
-     >     comm_rhs, requests(2), error)
-      call mpi_irecv(in_buffer(sr(3)), b_size(3), 
-     >     dp_type, predecessor(2), NORTH, 
-     >     comm_rhs, requests(3), error)
-      call mpi_irecv(in_buffer(sr(4)), b_size(4), 
-     >     dp_type, successor(3), BOTTOM,
-     >     comm_rhs, requests(4), error)
-      call mpi_irecv(in_buffer(sr(5)), b_size(5), 
-     >     dp_type, predecessor(3), TOP,   
-     >     comm_rhs, requests(5), error)
-
-      call mpi_isend(out_buffer(ss(0)), b_size(0), 
-     >     dp_type, successor(1),   EAST, 
-     >     comm_rhs, requests(6), error)
-      call mpi_isend(out_buffer(ss(1)), b_size(1), 
-     >     dp_type, predecessor(1), WEST, 
-     >     comm_rhs, requests(7), error)
-      call mpi_isend(out_buffer(ss(2)), b_size(2), 
-     >     dp_type,successor(2),   NORTH, 
-     >     comm_rhs, requests(8), error)
-      call mpi_isend(out_buffer(ss(3)), b_size(3), 
-     >     dp_type,predecessor(2), SOUTH, 
-     >     comm_rhs, requests(9), error)
-      call mpi_isend(out_buffer(ss(4)), b_size(4), 
-     >     dp_type,successor(3),   TOP, 
-     >     comm_rhs,   requests(10), error)
-      call mpi_isend(out_buffer(ss(5)), b_size(5), 
-     >     dp_type,predecessor(3), BOTTOM, 
-     >     comm_rhs,requests(11), error)
-
-
-      call mpi_waitall(12, requests, statuses, error)
-
-c---------------------------------------------------------------------
-c     unpack the data that has just been received;             
-c---------------------------------------------------------------------
-      p0 = 0
-      p1 = 0
-      p2 = 0
-      p3 = 0
-      p4 = 0
-      p5 = 0
-
-      do   c = 1, ncells
-
-         if (cell_coord(1,c) .ne. 1) then
-            do   k = 0, cell_size(3,c)-1
-               do   j = 0, cell_size(2,c)-1
-                  do   i = -2, -1
-                     do   m = 1, 5
-                        u(m,i,j,k,c) = in_buffer(sr(1)+p0)
-                        p0 = p0 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-         if (cell_coord(1,c) .ne. ncells) then
-            do  k = 0, cell_size(3,c)-1
-               do  j = 0, cell_size(2,c)-1
-                  do  i = cell_size(1,c), cell_size(1,c)+1
-                     do   m = 1, 5
-                        u(m,i,j,k,c) = in_buffer(sr(0)+p1)
-                        p1 = p1 + 1
-                     end do
-                  end do
-               end do
-            end do
-         end if
-            
-         if (cell_coord(2,c) .ne. 1) then
-            do  k = 0, cell_size(3,c)-1
-               do   j = -2, -1
-                  do  i = 0, cell_size(1,c)-1
-                     do   m = 1, 5
-                        u(m,i,j,k,c) = in_buffer(sr(3)+p2)
-                        p2 = p2 + 1
-                     end do
-                  end do
-               end do
-            end do
-
-         endif
-            
-         if (cell_coord(2,c) .ne. ncells) then
-            do  k = 0, cell_size(3,c)-1
-               do   j = cell_size(2,c), cell_size(2,c)+1
-                  do  i = 0, cell_size(1,c)-1
-                     do   m = 1, 5
-                        u(m,i,j,k,c) = in_buffer(sr(2)+p3)
-                        p3 = p3 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-         if (cell_coord(3,c) .ne. 1) then
-            do  k = -2, -1
-               do  j = 0, cell_size(2,c)-1
-                  do  i = 0, cell_size(1,c)-1
-                     do   m = 1, 5
-                        u(m,i,j,k,c) = in_buffer(sr(5)+p4)
-                        p4 = p4 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-         if (cell_coord(3,c) .ne. ncells) then
-            do  k = cell_size(3,c), cell_size(3,c)+1
-               do  j = 0, cell_size(2,c)-1
-                  do  i = 0, cell_size(1,c)-1
-                     do   m = 1, 5
-                        u(m,i,j,k,c) = in_buffer(sr(4)+p5)
-                        p5 = p5 + 1
-                     end do
-                  end do
-               end do
-            end do
-         endif
-
-c---------------------------------------------------------------------
-c     cells loop
-c---------------------------------------------------------------------
-      end do
-
-c---------------------------------------------------------------------
-c     do the rest of the rhs that uses the copied face values          
-c---------------------------------------------------------------------
-      call compute_rhs
-
-      return
-      end
diff --git a/examples/smpi/NAS/BT/define.f b/examples/smpi/NAS/BT/define.f
deleted file mode 100644 (file)
index 03c4c6e..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine compute_buffer_size(dim)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer  c, dim, face_size
-
-      if (ncells .eq. 1) return
-
-c---------------------------------------------------------------------
-c     compute the actual sizes of the buffers; note that there is 
-c     always one cell face that doesn't need buffer space, because it 
-c     is at the boundary of the grid
-c---------------------------------------------------------------------
-      west_size = 0
-      east_size = 0
-
-      do   c = 1, ncells
-         face_size = cell_size(2,c) * cell_size(3,c) * dim * 2
-         if (cell_coord(1,c).ne.1) west_size = west_size + face_size
-         if (cell_coord(1,c).ne.ncells) east_size = east_size + 
-     >        face_size 
-      end do
-
-      north_size = 0
-      south_size = 0
-      do   c = 1, ncells
-         face_size = cell_size(1,c)*cell_size(3,c) * dim * 2
-         if (cell_coord(2,c).ne.1) south_size = south_size + face_size
-         if (cell_coord(2,c).ne.ncells) north_size = north_size + 
-     >        face_size 
-      end do
-
-      top_size = 0
-      bottom_size = 0
-      do   c = 1, ncells
-         face_size = cell_size(1,c) * cell_size(2,c) * dim * 2
-         if (cell_coord(3,c).ne.1) bottom_size = bottom_size + 
-     >        face_size
-         if (cell_coord(3,c).ne.ncells) top_size = top_size +
-     >        face_size     
-      end do
-
-      start_send_west   = 1
-      start_send_east   = start_send_west   + west_size
-      start_send_south  = start_send_east   + east_size
-      start_send_north  = start_send_south  + south_size
-      start_send_bottom = start_send_north  + north_size
-      start_send_top    = start_send_bottom + bottom_size
-      start_recv_west   = 1
-      start_recv_east   = start_recv_west   + west_size
-      start_recv_south  = start_recv_east   + east_size
-      start_recv_north  = start_recv_south  + south_size
-      start_recv_bottom = start_recv_north  + north_size
-      start_recv_top    = start_recv_bottom + bottom_size
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/BT/epio.f b/examples/smpi/NAS/BT/epio.f
deleted file mode 100644 (file)
index 52b6309..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup_btio
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      character*(128) newfilenm
-      integer m
-
-      if (node .lt. 10000) then
-          write (newfilenm, 996) filenm,node
-      else
-          print *, 'error generating file names (> 10000 nodes)'
-          stop
-      endif
-
-996   format (a,'.',i4.4)
-
-      open (unit=99, file=newfilenm, form='unformatted',
-     $       status='unknown')
-
-      do m = 1, 5
-         xce_sub(m) = 0.d0
-      end do
-
-      idump_sub = 0
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine output_timestep
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ix, iio, jio, kio, cio, aio
-
-      do cio=1,ncells
-          write(99)
-     $         ((((u(aio,ix, jio,kio,cio),aio=1,5),
-     $             ix=0, cell_size(1,cio)-1),
-     $             jio=0, cell_size(2,cio)-1),
-     $             kio=0, cell_size(3,cio)-1)
-      enddo
-
-      idump_sub = idump_sub + 1
-      if (rd_interval .gt. 0) then
-         if (idump_sub .ge. rd_interval) then
-
-            rewind(99)
-            call acc_sub_norms(idump+1)
-
-            rewind(99)
-            idump_sub = 0
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine acc_sub_norms(idump_cur)
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer idump_cur
-
-      integer ix, jio, kio, cio, ii, m, ichunk
-      double precision xce_single(5)
-
-      ichunk = idump_cur - idump_sub + 1
-      do ii=0, idump_sub-1
-        do cio=1,ncells
-          read(99)
-     $         ((((u(m,ix, jio,kio,cio),m=1,5),
-     $             ix=0, cell_size(1,cio)-1),
-     $             jio=0, cell_size(2,cio)-1),
-     $             kio=0, cell_size(3,cio)-1)
-        enddo
-
-        if (node .eq. root) print *, 'Reading data set ', ii+ichunk
-
-        call error_norm(xce_single)
-        do m = 1, 5
-           xce_sub(m) = xce_sub(m) + xce_single(m)
-        end do
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine btio_cleanup
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      close(unit=99)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine accumulate_norms(xce_acc)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      double precision xce_acc(5)
-
-      character*(128) newfilenm
-      integer m
-
-      if (rd_interval .gt. 0) goto 20
-
-      if (node .lt. 10000) then
-          write (newfilenm, 996) filenm,node
-      else
-          print *, 'error generating file names (> 10000 nodes)'
-          stop
-      endif
-
-996   format (a,'.',i4.4)
-
-      open (unit=99, file=newfilenm,
-     $      form='unformatted')
-
-c     clear the last time step
-
-      call clear_timestep
-
-c     read back the time steps and accumulate norms
-
-      call acc_sub_norms(idump)
-
-      close(unit=99)
-
- 20   continue
-      do m = 1, 5
-         xce_acc(m) = xce_sub(m) / dble(idump)
-      end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/BT/error.f b/examples/smpi/NAS/BT/error.f
deleted file mode 100644 (file)
index 147a582..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine error_norm(rms)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     this function computes the norm of the difference between the
-c     computed solution and the exact solution
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer c, i, j, k, m, ii, jj, kk, d, error
-      double precision xi, eta, zeta, u_exact(5), rms(5), rms_work(5),
-     >     add
-
-      do m = 1, 5 
-         rms_work(m) = 0.0d0
-      enddo
-
-      do c = 1, ncells
-         kk = 0
-         do k = cell_low(3,c), cell_high(3,c)
-            zeta = dble(k) * dnzm1
-            jj = 0
-            do j = cell_low(2,c), cell_high(2,c)
-               eta = dble(j) * dnym1
-               ii = 0
-               do i = cell_low(1,c), cell_high(1,c)
-                  xi = dble(i) * dnxm1
-                  call exact_solution(xi, eta, zeta, u_exact)
-
-                  do m = 1, 5
-                     add = u(m,ii,jj,kk,c)-u_exact(m)
-                     rms_work(m) = rms_work(m) + add*add
-                  enddo
-                  ii = ii + 1
-               enddo
-               jj = jj + 1
-            enddo
-            kk = kk + 1
-         enddo
-      enddo
-
-      call mpi_allreduce(rms_work, rms, 5, dp_type, 
-     >     MPI_SUM, comm_setup, error)
-
-      do m = 1, 5
-         do d = 1, 3
-            rms(m) = rms(m) / dble(grid_points(d)-2)
-         enddo
-         rms(m) = dsqrt(rms(m))
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine rhs_norm(rms)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer c, i, j, k, d, m, error
-      double precision rms(5), rms_work(5), add
-
-      do m = 1, 5
-         rms_work(m) = 0.0d0
-      enddo 
-
-      do c = 1, ncells
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     add = rhs(m,i,j,k,c)
-                     rms_work(m) = rms_work(m) + add*add
-                  enddo 
-               enddo 
-            enddo 
-         enddo 
-      enddo 
-
-      call mpi_allreduce(rms_work, rms, 5, dp_type, 
-     >     MPI_SUM, comm_setup, error)
-
-      do m = 1, 5
-         do d = 1, 3
-            rms(m) = rms(m) / dble(grid_points(d)-2)
-         enddo 
-         rms(m) = dsqrt(rms(m))
-      enddo 
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/BT/exact_rhs.f b/examples/smpi/NAS/BT/exact_rhs.f
deleted file mode 100644 (file)
index 26a2871..0000000
+++ /dev/null
@@ -1,360 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exact_rhs
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     compute the right hand side based on exact solution
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      double precision dtemp(5), xi, eta, zeta, dtpp
-      integer          c, m, i, j, k, ip1, im1, jp1, 
-     >     jm1, km1, kp1
-
-
-c---------------------------------------------------------------------
-c     loop over all cells owned by this node                   
-c---------------------------------------------------------------------
-      do c = 1, ncells
-
-c---------------------------------------------------------------------
-c     initialize                                  
-c---------------------------------------------------------------------
-         do k= 0, cell_size(3,c)-1
-            do j = 0, cell_size(2,c)-1
-               do i = 0, cell_size(1,c)-1
-                  do m = 1, 5
-                     forcing(m,i,j,k,c) = 0.0d0
-                  enddo
-               enddo
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     xi-direction flux differences                      
-c---------------------------------------------------------------------
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            zeta = dble(k+cell_low(3,c)) * dnzm1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               eta = dble(j+cell_low(2,c)) * dnym1
-
-               do i=-2*(1-start(1,c)), cell_size(1,c)+1-2*end(1,c)
-                  xi = dble(i+cell_low(1,c)) * dnxm1
-
-                  call exact_solution(xi, eta, zeta, dtemp)
-                  do m = 1, 5
-                     ue(i,m) = dtemp(m)
-                  enddo
-
-                  dtpp = 1.0d0 / dtemp(1)
-
-                  do m = 2, 5
-                     buf(i,m) = dtpp * dtemp(m)
-                  enddo
-
-                  cuf(i)   = buf(i,2) * buf(i,2)
-                  buf(i,1) = cuf(i) + buf(i,3) * buf(i,3) + 
-     >                 buf(i,4) * buf(i,4) 
-                  q(i) = 0.5d0*(buf(i,2)*ue(i,2) + buf(i,3)*ue(i,3) +
-     >                 buf(i,4)*ue(i,4))
-
-               enddo
-               
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  im1 = i-1
-                  ip1 = i+1
-
-                  forcing(1,i,j,k,c) = forcing(1,i,j,k,c) -
-     >                 tx2*( ue(ip1,2)-ue(im1,2) )+
-     >                 dx1tx1*(ue(ip1,1)-2.0d0*ue(i,1)+ue(im1,1))
-
-                  forcing(2,i,j,k,c) = forcing(2,i,j,k,c) - tx2 * (
-     >                 (ue(ip1,2)*buf(ip1,2)+c2*(ue(ip1,5)-q(ip1)))-
-     >                 (ue(im1,2)*buf(im1,2)+c2*(ue(im1,5)-q(im1))))+
-     >                 xxcon1*(buf(ip1,2)-2.0d0*buf(i,2)+buf(im1,2))+
-     >                 dx2tx1*( ue(ip1,2)-2.0d0* ue(i,2)+ue(im1,2))
-
-                  forcing(3,i,j,k,c) = forcing(3,i,j,k,c) - tx2 * (
-     >                 ue(ip1,3)*buf(ip1,2)-ue(im1,3)*buf(im1,2))+
-     >                 xxcon2*(buf(ip1,3)-2.0d0*buf(i,3)+buf(im1,3))+
-     >                 dx3tx1*( ue(ip1,3)-2.0d0*ue(i,3) +ue(im1,3))
-                  
-                  forcing(4,i,j,k,c) = forcing(4,i,j,k,c) - tx2*(
-     >                 ue(ip1,4)*buf(ip1,2)-ue(im1,4)*buf(im1,2))+
-     >                 xxcon2*(buf(ip1,4)-2.0d0*buf(i,4)+buf(im1,4))+
-     >                 dx4tx1*( ue(ip1,4)-2.0d0* ue(i,4)+ ue(im1,4))
-
-                  forcing(5,i,j,k,c) = forcing(5,i,j,k,c) - tx2*(
-     >                 buf(ip1,2)*(c1*ue(ip1,5)-c2*q(ip1))-
-     >                 buf(im1,2)*(c1*ue(im1,5)-c2*q(im1)))+
-     >                 0.5d0*xxcon3*(buf(ip1,1)-2.0d0*buf(i,1)+
-     >                 buf(im1,1))+
-     >                 xxcon4*(cuf(ip1)-2.0d0*cuf(i)+cuf(im1))+
-     >                 xxcon5*(buf(ip1,5)-2.0d0*buf(i,5)+buf(im1,5))+
-     >                 dx5tx1*( ue(ip1,5)-2.0d0* ue(i,5)+ ue(im1,5))
-               enddo
-
-c---------------------------------------------------------------------
-c     Fourth-order dissipation                         
-c---------------------------------------------------------------------
-               if (start(1,c) .gt. 0) then
-                  do m = 1, 5
-                     i = 1
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (5.0d0*ue(i,m) - 4.0d0*ue(i+1,m) +ue(i+2,m))
-                     i = 2
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (-4.0d0*ue(i-1,m) + 6.0d0*ue(i,m) -
-     >                    4.0d0*ue(i+1,m) +       ue(i+2,m))
-                  enddo
-               endif
-
-               do i = start(1,c)*3, cell_size(1,c)-3*end(1,c)-1
-                  do m = 1, 5
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp*
-     >                    (ue(i-2,m) - 4.0d0*ue(i-1,m) +
-     >                    6.0d0*ue(i,m) - 4.0d0*ue(i+1,m) + ue(i+2,m))
-                  enddo
-               enddo
-
-               if (end(1,c) .gt. 0) then
-                  do m = 1, 5
-                     i = cell_size(1,c)-3
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (ue(i-2,m) - 4.0d0*ue(i-1,m) +
-     >                    6.0d0*ue(i,m) - 4.0d0*ue(i+1,m))
-                     i = cell_size(1,c)-2
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (ue(i-2,m) - 4.0d0*ue(i-1,m) + 5.0d0*ue(i,m))
-                  enddo
-               endif
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     eta-direction flux differences             
-c---------------------------------------------------------------------
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1          
-            zeta = dble(k+cell_low(3,c)) * dnzm1
-            do i=start(1,c), cell_size(1,c)-end(1,c)-1
-               xi = dble(i+cell_low(1,c)) * dnxm1
-
-               do j=-2*(1-start(2,c)), cell_size(2,c)+1-2*end(2,c)
-                  eta = dble(j+cell_low(2,c)) * dnym1
-
-                  call exact_solution(xi, eta, zeta, dtemp)
-                  do m = 1, 5 
-                     ue(j,m) = dtemp(m)
-                  enddo
-                  
-                  dtpp = 1.0d0/dtemp(1)
-
-                  do m = 2, 5
-                     buf(j,m) = dtpp * dtemp(m)
-                  enddo
-
-                  cuf(j)   = buf(j,3) * buf(j,3)
-                  buf(j,1) = cuf(j) + buf(j,2) * buf(j,2) + 
-     >                 buf(j,4) * buf(j,4)
-                  q(j) = 0.5d0*(buf(j,2)*ue(j,2) + buf(j,3)*ue(j,3) +
-     >                 buf(j,4)*ue(j,4))
-               enddo
-
-               do j = start(2,c), cell_size(2,c)-end(2,c)-1
-                  jm1 = j-1
-                  jp1 = j+1
-                  
-                  forcing(1,i,j,k,c) = forcing(1,i,j,k,c) -
-     >                 ty2*( ue(jp1,3)-ue(jm1,3) )+
-     >                 dy1ty1*(ue(jp1,1)-2.0d0*ue(j,1)+ue(jm1,1))
-
-                  forcing(2,i,j,k,c) = forcing(2,i,j,k,c) - ty2*(
-     >                 ue(jp1,2)*buf(jp1,3)-ue(jm1,2)*buf(jm1,3))+
-     >                 yycon2*(buf(jp1,2)-2.0d0*buf(j,2)+buf(jm1,2))+
-     >                 dy2ty1*( ue(jp1,2)-2.0* ue(j,2)+ ue(jm1,2))
-
-                  forcing(3,i,j,k,c) = forcing(3,i,j,k,c) - ty2*(
-     >                 (ue(jp1,3)*buf(jp1,3)+c2*(ue(jp1,5)-q(jp1)))-
-     >                 (ue(jm1,3)*buf(jm1,3)+c2*(ue(jm1,5)-q(jm1))))+
-     >                 yycon1*(buf(jp1,3)-2.0d0*buf(j,3)+buf(jm1,3))+
-     >                 dy3ty1*( ue(jp1,3)-2.0d0*ue(j,3) +ue(jm1,3))
-
-                  forcing(4,i,j,k,c) = forcing(4,i,j,k,c) - ty2*(
-     >                 ue(jp1,4)*buf(jp1,3)-ue(jm1,4)*buf(jm1,3))+
-     >                 yycon2*(buf(jp1,4)-2.0d0*buf(j,4)+buf(jm1,4))+
-     >                 dy4ty1*( ue(jp1,4)-2.0d0*ue(j,4)+ ue(jm1,4))
-
-                  forcing(5,i,j,k,c) = forcing(5,i,j,k,c) - ty2*(
-     >                 buf(jp1,3)*(c1*ue(jp1,5)-c2*q(jp1))-
-     >                 buf(jm1,3)*(c1*ue(jm1,5)-c2*q(jm1)))+
-     >                 0.5d0*yycon3*(buf(jp1,1)-2.0d0*buf(j,1)+
-     >                 buf(jm1,1))+
-     >                 yycon4*(cuf(jp1)-2.0d0*cuf(j)+cuf(jm1))+
-     >                 yycon5*(buf(jp1,5)-2.0d0*buf(j,5)+buf(jm1,5))+
-     >                 dy5ty1*(ue(jp1,5)-2.0d0*ue(j,5)+ue(jm1,5))
-               enddo
-
-c---------------------------------------------------------------------
-c     Fourth-order dissipation                      
-c---------------------------------------------------------------------
-               if (start(2,c) .gt. 0) then
-                  do m = 1, 5
-                     j = 1
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (5.0d0*ue(j,m) - 4.0d0*ue(j+1,m) +ue(j+2,m))
-                     j = 2
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (-4.0d0*ue(j-1,m) + 6.0d0*ue(j,m) -
-     >                    4.0d0*ue(j+1,m) +       ue(j+2,m))
-                  enddo
-               endif
-
-               do j = start(2,c)*3, cell_size(2,c)-3*end(2,c)-1
-                  do m = 1, 5
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp*
-     >                    (ue(j-2,m) - 4.0d0*ue(j-1,m) +
-     >                    6.0d0*ue(j,m) - 4.0d0*ue(j+1,m) + ue(j+2,m))
-                  enddo
-               enddo
-
-               if (end(2,c) .gt. 0) then
-                  do m = 1, 5
-                     j = cell_size(2,c)-3
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (ue(j-2,m) - 4.0d0*ue(j-1,m) +
-     >                    6.0d0*ue(j,m) - 4.0d0*ue(j+1,m))
-                     j = cell_size(2,c)-2
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (ue(j-2,m) - 4.0d0*ue(j-1,m) + 5.0d0*ue(j,m))
-
-                  enddo
-               endif
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     zeta-direction flux differences                      
-c---------------------------------------------------------------------
-         do j=start(2,c), cell_size(2,c)-end(2,c)-1
-            eta = dble(j+cell_low(2,c)) * dnym1
-            do i = start(1,c), cell_size(1,c)-end(1,c)-1
-               xi = dble(i+cell_low(1,c)) * dnxm1
-
-               do k=-2*(1-start(3,c)), cell_size(3,c)+1-2*end(3,c)
-                  zeta = dble(k+cell_low(3,c)) * dnzm1
-
-                  call exact_solution(xi, eta, zeta, dtemp)
-                  do m = 1, 5
-                     ue(k,m) = dtemp(m)
-                  enddo
-
-                  dtpp = 1.0d0/dtemp(1)
-
-                  do m = 2, 5
-                     buf(k,m) = dtpp * dtemp(m)
-                  enddo
-
-                  cuf(k)   = buf(k,4) * buf(k,4)
-                  buf(k,1) = cuf(k) + buf(k,2) * buf(k,2) + 
-     >                 buf(k,3) * buf(k,3)
-                  q(k) = 0.5d0*(buf(k,2)*ue(k,2) + buf(k,3)*ue(k,3) +
-     >                 buf(k,4)*ue(k,4))
-               enddo
-
-               do k=start(3,c), cell_size(3,c)-end(3,c)-1
-                  km1 = k-1
-                  kp1 = k+1
-                  
-                  forcing(1,i,j,k,c) = forcing(1,i,j,k,c) -
-     >                 tz2*( ue(kp1,4)-ue(km1,4) )+
-     >                 dz1tz1*(ue(kp1,1)-2.0d0*ue(k,1)+ue(km1,1))
-
-                  forcing(2,i,j,k,c) = forcing(2,i,j,k,c) - tz2 * (
-     >                 ue(kp1,2)*buf(kp1,4)-ue(km1,2)*buf(km1,4))+
-     >                 zzcon2*(buf(kp1,2)-2.0d0*buf(k,2)+buf(km1,2))+
-     >                 dz2tz1*( ue(kp1,2)-2.0d0* ue(k,2)+ ue(km1,2))
-
-                  forcing(3,i,j,k,c) = forcing(3,i,j,k,c) - tz2 * (
-     >                 ue(kp1,3)*buf(kp1,4)-ue(km1,3)*buf(km1,4))+
-     >                 zzcon2*(buf(kp1,3)-2.0d0*buf(k,3)+buf(km1,3))+
-     >                 dz3tz1*(ue(kp1,3)-2.0d0*ue(k,3)+ue(km1,3))
-
-                  forcing(4,i,j,k,c) = forcing(4,i,j,k,c) - tz2 * (
-     >                 (ue(kp1,4)*buf(kp1,4)+c2*(ue(kp1,5)-q(kp1)))-
-     >                 (ue(km1,4)*buf(km1,4)+c2*(ue(km1,5)-q(km1))))+
-     >                 zzcon1*(buf(kp1,4)-2.0d0*buf(k,4)+buf(km1,4))+
-     >                 dz4tz1*( ue(kp1,4)-2.0d0*ue(k,4) +ue(km1,4))
-
-                  forcing(5,i,j,k,c) = forcing(5,i,j,k,c) - tz2 * (
-     >                 buf(kp1,4)*(c1*ue(kp1,5)-c2*q(kp1))-
-     >                 buf(km1,4)*(c1*ue(km1,5)-c2*q(km1)))+
-     >                 0.5d0*zzcon3*(buf(kp1,1)-2.0d0*buf(k,1)
-     >                 +buf(km1,1))+
-     >                 zzcon4*(cuf(kp1)-2.0d0*cuf(k)+cuf(km1))+
-     >                 zzcon5*(buf(kp1,5)-2.0d0*buf(k,5)+buf(km1,5))+
-     >                 dz5tz1*( ue(kp1,5)-2.0d0*ue(k,5)+ ue(km1,5))
-               enddo
-
-c---------------------------------------------------------------------
-c     Fourth-order dissipation                        
-c---------------------------------------------------------------------
-               if (start(3,c) .gt. 0) then
-                  do m = 1, 5
-                     k = 1
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (5.0d0*ue(k,m) - 4.0d0*ue(k+1,m) +ue(k+2,m))
-                     k = 2
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (-4.0d0*ue(k-1,m) + 6.0d0*ue(k,m) -
-     >                    4.0d0*ue(k+1,m) +       ue(k+2,m))
-                  enddo
-               endif
-
-               do k = start(3,c)*3, cell_size(3,c)-3*end(3,c)-1
-                  do m = 1, 5
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp*
-     >                    (ue(k-2,m) - 4.0d0*ue(k-1,m) +
-     >                    6.0d0*ue(k,m) - 4.0d0*ue(k+1,m) + ue(k+2,m))
-                  enddo
-               enddo
-
-               if (end(3,c) .gt. 0) then
-                  do m = 1, 5
-                     k = cell_size(3,c)-3
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (ue(k-2,m) - 4.0d0*ue(k-1,m) +
-     >                    6.0d0*ue(k,m) - 4.0d0*ue(k+1,m))
-                     k = cell_size(3,c)-2
-                     forcing(m,i,j,k,c) = forcing(m,i,j,k,c) - dssp *
-     >                    (ue(k-2,m) - 4.0d0*ue(k-1,m) + 5.0d0*ue(k,m))
-                  enddo
-               endif
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     now change the sign of the forcing function, 
-c---------------------------------------------------------------------
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     forcing(m,i,j,k,c) = -1.d0 * forcing(m,i,j,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-
-      enddo
-
-      return
-      end
diff --git a/examples/smpi/NAS/BT/exact_solution.f b/examples/smpi/NAS/BT/exact_solution.f
deleted file mode 100644 (file)
index b093b46..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exact_solution(xi,eta,zeta,dtemp)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     this function returns the exact solution at point xi, eta, zeta  
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      double precision  xi, eta, zeta, dtemp(5)
-      integer m
-
-      do m = 1, 5
-         dtemp(m) =  ce(m,1) +
-     >     xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) +
-     >     eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+
-     >     zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 
-     >     zeta*ce(m,13))))
-      enddo
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/BT/fortran_io.f b/examples/smpi/NAS/BT/fortran_io.f
deleted file mode 100644 (file)
index d3085a0..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup_btio
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      character*(128) newfilenm
-      integer m, ierr
-
-      if (node.eq.root) record_length = 40/fortran_rec_sz
-      call mpi_bcast(record_length, 1, MPI_INTEGER,
-     >                root, comm_setup, ierr)
-
-      open (unit=99, file=filenm,
-     $      form='unformatted', access='direct',
-     $      recl=record_length)
-
-      do m = 1, 5
-         xce_sub(m) = 0.d0
-      end do
-
-      idump_sub = 0
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine output_timestep
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ix, jio, kio, cio
-
-      do cio=1,ncells
-          do kio=0, cell_size(3,cio)-1
-              do jio=0, cell_size(2,cio)-1
-                  iseek=(cell_low(1,cio) +
-     $                   PROBLEM_SIZE*((cell_low(2,cio)+jio) +
-     $                   PROBLEM_SIZE*((cell_low(3,cio)+kio) +
-     $                   PROBLEM_SIZE*idump_sub)))
-
-                  do ix=0,cell_size(1,cio)-1
-                      write(99, rec=iseek+ix+1)
-     $                      u(1,ix, jio,kio,cio),
-     $                      u(2,ix, jio,kio,cio),
-     $                      u(3,ix, jio,kio,cio),
-     $                      u(4,ix, jio,kio,cio),
-     $                      u(5,ix, jio,kio,cio)
-                  enddo
-              enddo
-          enddo
-      enddo
-
-      idump_sub = idump_sub + 1
-      if (rd_interval .gt. 0) then
-         if (idump_sub .ge. rd_interval) then
-
-            call acc_sub_norms(idump+1)
-
-            idump_sub = 0
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine acc_sub_norms(idump_cur)
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer idump_cur
-
-      integer ix, jio, kio, cio, ii, m, ichunk
-      double precision xce_single(5)
-
-      ichunk = idump_cur - idump_sub + 1
-      do ii=0, idump_sub-1
-        do cio=1,ncells
-          do kio=0, cell_size(3,cio)-1
-              do jio=0, cell_size(2,cio)-1
-                  iseek=(cell_low(1,cio) +
-     $                   PROBLEM_SIZE*((cell_low(2,cio)+jio) +
-     $                   PROBLEM_SIZE*((cell_low(3,cio)+kio) +
-     $                   PROBLEM_SIZE*ii)))
-
-
-                  do ix=0,cell_size(1,cio)-1
-                      read(99, rec=iseek+ix+1)
-     $                      u(1,ix, jio,kio,cio),
-     $                      u(2,ix, jio,kio,cio),
-     $                      u(3,ix, jio,kio,cio),
-     $                      u(4,ix, jio,kio,cio),
-     $                      u(5,ix, jio,kio,cio)
-                  enddo
-              enddo
-          enddo
-        enddo
-
-        if (node .eq. root) print *, 'Reading data set ', ii+ichunk
-
-        call error_norm(xce_single)
-        do m = 1, 5
-           xce_sub(m) = xce_sub(m) + xce_single(m)
-        end do
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine btio_cleanup
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      close(unit=99)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine accumulate_norms(xce_acc)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      include 'header.h'
-      include 'mpinpb.h'
-
-      double precision xce_acc(5)
-      integer m
-
-      if (rd_interval .gt. 0) goto 20
-
-      open (unit=99, file=filenm,
-     $      form='unformatted', access='direct',
-     $      recl=record_length)
-
-c     clear the last time step
-
-      call clear_timestep
-
-c     read back the time steps and accumulate norms
-
-      call acc_sub_norms(idump)
-
-      close(unit=99)
-
- 20   continue
-      do m = 1, 5
-         xce_acc(m) = xce_sub(m) / dble(idump)
-      end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/BT/full_mpiio.f b/examples/smpi/NAS/BT/full_mpiio.f
deleted file mode 100644 (file)
index ecfd41c..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup_btio
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ierr
-      integer mstatus(MPI_STATUS_SIZE)
-      integer sizes(4), starts(4), subsizes(4)
-      integer cell_btype(maxcells), cell_ftype(maxcells)
-      integer cell_blength(maxcells)
-      integer info
-      character*20 cb_nodes, cb_size
-      integer c, m
-      integer cell_disp(maxcells)
-
-       call mpi_bcast(collbuf_nodes, 1, MPI_INTEGER,
-     >                root, comm_setup, ierr)
-
-       call mpi_bcast(collbuf_size, 1, MPI_INTEGER,
-     >                root, comm_setup, ierr)
-
-       if (collbuf_nodes .eq. 0) then
-          info = MPI_INFO_NULL
-       else
-          write (cb_nodes,*) collbuf_nodes
-          write (cb_size,*) collbuf_size
-          call MPI_Info_create(info, ierr)
-          call MPI_Info_set(info, 'cb_nodes', cb_nodes, ierr)
-          call MPI_Info_set(info, 'cb_buffer_size', cb_size, ierr)
-          call MPI_Info_set(info, 'collective_buffering', 'true', ierr)
-       endif
-
-       call MPI_Type_contiguous(5, MPI_DOUBLE_PRECISION,
-     $                          element, ierr)
-       call MPI_Type_commit(element, ierr)
-       call MPI_Type_extent(element, eltext, ierr)
-
-       do  c = 1, ncells
-c
-c Outer array dimensions ar same for every cell
-c
-           sizes(1) = IMAX+4
-           sizes(2) = JMAX+4
-           sizes(3) = KMAX+4
-c
-c 4th dimension is cell number, total of maxcells cells
-c
-           sizes(4) = maxcells
-c
-c Internal dimensions of cells can differ slightly between cells
-c
-           subsizes(1) = cell_size(1, c)
-           subsizes(2) = cell_size(2, c)
-           subsizes(3) = cell_size(3, c)
-c
-c Cell is 4th dimension, 1 cell per cell type to handle varying 
-c cell sub-array sizes
-c
-           subsizes(4) = 1
-
-c
-c type constructors use 0-based start addresses
-c
-           starts(1) = 2 
-           starts(2) = 2
-           starts(3) = 2
-           starts(4) = c-1
-
-c 
-c Create buftype for a cell
-c
-           call MPI_Type_create_subarray(4, sizes, subsizes, 
-     $          starts, MPI_ORDER_FORTRAN, element, 
-     $          cell_btype(c), ierr)
-c
-c block length and displacement for joining cells - 
-c 1 cell buftype per block, cell buftypes have own displacment
-c generated from cell number (4th array dimension)
-c
-           cell_blength(c) = 1
-           cell_disp(c) = 0
-
-       enddo
-c
-c Create combined buftype for all cells
-c
-       call MPI_Type_struct(ncells, cell_blength, cell_disp,
-     $            cell_btype, combined_btype, ierr)
-       call MPI_Type_commit(combined_btype, ierr)
-
-       do  c = 1, ncells
-c
-c Entire array size
-c
-           sizes(1) = PROBLEM_SIZE
-           sizes(2) = PROBLEM_SIZE
-           sizes(3) = PROBLEM_SIZE
-
-c
-c Size of c'th cell
-c
-           subsizes(1) = cell_size(1, c)
-           subsizes(2) = cell_size(2, c)
-           subsizes(3) = cell_size(3, c)
-
-c
-c Starting point in full array of c'th cell
-c
-           starts(1) = cell_low(1,c)
-           starts(2) = cell_low(2,c)
-           starts(3) = cell_low(3,c)
-
-           call MPI_Type_create_subarray(3, sizes, subsizes,
-     $          starts, MPI_ORDER_FORTRAN,
-     $          element, cell_ftype(c), ierr)
-           cell_blength(c) = 1
-           cell_disp(c) = 0
-       enddo
-
-       call MPI_Type_struct(ncells, cell_blength, cell_disp,
-     $            cell_ftype, combined_ftype, ierr)
-       call MPI_Type_commit(combined_ftype, ierr)
-
-       iseek=0
-       if (node .eq. root) then
-          call MPI_File_delete(filenm, MPI_INFO_NULL, ierr)
-       endif
-
-
-      call MPI_Barrier(comm_solve, ierr)
-
-       call MPI_File_open(comm_solve,
-     $          filenm,
-     $          MPI_MODE_RDWR+MPI_MODE_CREATE,
-     $          MPI_INFO_NULL, fp, ierr)
-
-       if (ierr .ne. MPI_SUCCESS) then
-                print *, 'Error opening file'
-                stop
-       endif
-
-        call MPI_File_set_view(fp, iseek, element, 
-     $          combined_ftype, 'native', info, ierr)
-
-       if (ierr .ne. MPI_SUCCESS) then
-                print *, 'Error setting file view'
-                stop
-       endif
-
-      do m = 1, 5
-         xce_sub(m) = 0.d0
-      end do
-
-      idump_sub = 0
-
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine output_timestep
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer mstatus(MPI_STATUS_SIZE)
-      integer ierr
-
-      call MPI_File_write_at_all(fp, iseek, u,
-     $                           1, combined_btype, mstatus, ierr)
-      if (ierr .ne. MPI_SUCCESS) then
-          print *, 'Error writing to file'
-          stop
-      endif
-
-      call MPI_Type_size(combined_btype, iosize, ierr)
-      iseek = iseek + iosize/eltext
-
-      idump_sub = idump_sub + 1
-      if (rd_interval .gt. 0) then
-         if (idump_sub .ge. rd_interval) then
-
-            iseek = 0
-            call acc_sub_norms(idump+1)
-
-            iseek = 0
-            idump_sub = 0
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine acc_sub_norms(idump_cur)
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer idump_cur
-
-      integer ii, m, ichunk
-      integer ierr
-      integer mstatus(MPI_STATUS_SIZE)
-      double precision xce_single(5)
-
-      ichunk = idump_cur - idump_sub + 1
-      do ii=0, idump_sub-1
-
-        call MPI_File_read_at_all(fp, iseek, u,
-     $                           1, combined_btype, mstatus, ierr)
-        if (ierr .ne. MPI_SUCCESS) then
-           print *, 'Error reading back file'
-           call MPI_File_close(fp, ierr)
-           stop
-        endif
-
-        call MPI_Type_size(combined_btype, iosize, ierr)
-        iseek = iseek + iosize/eltext
-
-        if (node .eq. root) print *, 'Reading data set ', ii+ichunk
-
-        call error_norm(xce_single)
-        do m = 1, 5
-           xce_sub(m) = xce_sub(m) + xce_single(m)
-        end do
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine btio_cleanup
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ierr
-
-      call MPI_File_close(fp, ierr)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-
-      subroutine accumulate_norms(xce_acc)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      double precision xce_acc(5)
-      integer m, ierr
-
-      if (rd_interval .gt. 0) goto 20
-
-      call MPI_File_open(comm_solve,
-     $          filenm,
-     $          MPI_MODE_RDONLY,
-     $          MPI_INFO_NULL,
-     $          fp,
-     $          ierr)
-
-      iseek = 0
-      call MPI_File_set_view(fp, iseek, element, combined_ftype,
-     $          'native', MPI_INFO_NULL, ierr)
-
-c     clear the last time step
-
-      call clear_timestep
-
-c     read back the time steps and accumulate norms
-
-      call acc_sub_norms(idump)
-
-      call MPI_File_close(fp, ierr)
-
- 20   continue
-      do m = 1, 5
-         xce_acc(m) = xce_sub(m) / dble(idump)
-      end do
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/BT/header.h b/examples/smpi/NAS/BT/header.h
deleted file mode 100644 (file)
index 47719da..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-c
-c  header.h
-c
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      implicit none
-
-c---------------------------------------------------------------------
-c The following include file is generated automatically by the
-c "setparams" utility. It defines 
-c      maxcells:      the square root of the maximum number of processors
-c      problem_size:  12, 64, 102, 162 (for class T, A, B, C)
-c      dt_default:    default time step for this problem size if no
-c                     config file
-c      niter_default: default number of iterations for this problem size
-c---------------------------------------------------------------------
-
-      include 'npbparams.h'
-
-      integer           aa, bb, cc, BLOCK_SIZE
-      parameter (aa=1, bb=2, cc=3, BLOCK_SIZE=5)
-
-      integer           ncells, grid_points(3)
-      double precision  elapsed_time
-      common /global/   elapsed_time, ncells, grid_points
-
-      double precision  tx1, tx2, tx3, ty1, ty2, ty3, tz1, tz2, tz3, 
-     >                  dx1, dx2, dx3, dx4, dx5, dy1, dy2, dy3, dy4, 
-     >                  dy5, dz1, dz2, dz3, dz4, dz5, dssp, dt, 
-     >                  ce(5,13), dxmax, dymax, dzmax, xxcon1, xxcon2, 
-     >                  xxcon3, xxcon4, xxcon5, dx1tx1, dx2tx1, dx3tx1,
-     >                  dx4tx1, dx5tx1, yycon1, yycon2, yycon3, yycon4,
-     >                  yycon5, dy1ty1, dy2ty1, dy3ty1, dy4ty1, dy5ty1,
-     >                  zzcon1, zzcon2, zzcon3, zzcon4, zzcon5, dz1tz1, 
-     >                  dz2tz1, dz3tz1, dz4tz1, dz5tz1, dnxm1, dnym1, 
-     >                  dnzm1, c1c2, c1c5, c3c4, c1345, conz1, c1, c2, 
-     >                  c3, c4, c5, c4dssp, c5dssp, dtdssp, dttx1, bt,
-     >                  dttx2, dtty1, dtty2, dttz1, dttz2, c2dttx1, 
-     >                  c2dtty1, c2dttz1, comz1, comz4, comz5, comz6, 
-     >                  c3c4tx3, c3c4ty3, c3c4tz3, c2iv, con43, con16
-
-      common /constants/ tx1, tx2, tx3, ty1, ty2, ty3, tz1, tz2, tz3,
-     >                  dx1, dx2, dx3, dx4, dx5, dy1, dy2, dy3, dy4, 
-     >                  dy5, dz1, dz2, dz3, dz4, dz5, dssp, dt, 
-     >                  ce, dxmax, dymax, dzmax, xxcon1, xxcon2, 
-     >                  xxcon3, xxcon4, xxcon5, dx1tx1, dx2tx1, dx3tx1,
-     >                  dx4tx1, dx5tx1, yycon1, yycon2, yycon3, yycon4,
-     >                  yycon5, dy1ty1, dy2ty1, dy3ty1, dy4ty1, dy5ty1,
-     >                  zzcon1, zzcon2, zzcon3, zzcon4, zzcon5, dz1tz1, 
-     >                  dz2tz1, dz3tz1, dz4tz1, dz5tz1, dnxm1, dnym1, 
-     >                  dnzm1, c1c2, c1c5, c3c4, c1345, conz1, c1, c2, 
-     >                  c3, c4, c5, c4dssp, c5dssp, dtdssp, dttx1, bt,
-     >                  dttx2, dtty1, dtty2, dttz1, dttz2, c2dttx1, 
-     >                  c2dtty1, c2dttz1, comz1, comz4, comz5, comz6, 
-     >                  c3c4tx3, c3c4ty3, c3c4tz3, c2iv, con43, con16
-
-      integer           EAST, WEST, NORTH, SOUTH, 
-     >                  BOTTOM, TOP
-
-      parameter (EAST=2000, WEST=3000,      NORTH=4000, SOUTH=5000,
-     >           BOTTOM=6000, TOP=7000)
-
-      integer cell_coord (3,maxcells), cell_low (3,maxcells), 
-     >        cell_high  (3,maxcells), cell_size(3,maxcells),
-     >        predecessor(3),          slice    (3,maxcells),
-     >        grid_size  (3),          successor(3)         ,
-     >        start      (3,maxcells), end      (3,maxcells)
-      common /partition/ cell_coord, cell_low, cell_high, cell_size,
-     >                   grid_size, successor, predecessor, slice,
-     >                   start, end
-
-      integer IMAX, JMAX, KMAX, MAX_CELL_DIM, BUF_SIZE
-
-      parameter (MAX_CELL_DIM = (problem_size/maxcells)+1)
-
-      parameter (IMAX=MAX_CELL_DIM,JMAX=MAX_CELL_DIM,KMAX=MAX_CELL_DIM)
-
-      parameter (BUF_SIZE=MAX_CELL_DIM*MAX_CELL_DIM*(maxcells-1)*60+1)
-
-      double precision 
-     >   us      (    -1:IMAX,  -1:JMAX,  -1:KMAX,   maxcells),
-     >   vs      (    -1:IMAX,  -1:JMAX,  -1:KMAX,   maxcells),
-     >   ws      (    -1:IMAX,  -1:JMAX,  -1:KMAX,   maxcells),
-     >   qs      (    -1:IMAX,  -1:JMAX,  -1:KMAX,   maxcells),
-     >   rho_i   (    -1:IMAX,  -1:JMAX,  -1:KMAX,   maxcells),
-     >   square  (    -1:IMAX,  -1:JMAX,  -1:KMAX,   maxcells),
-     >   forcing (5,   0:IMAX-1, 0:JMAX-1, 0:KMAX-1, maxcells),
-     >   u       (5,  -2:IMAX+1,-2:JMAX+1,-2:KMAX+1, maxcells),
-     >   rhs     (5,  -1:IMAX-1,-1:JMAX-1,-1:KMAX-1, maxcells),
-     >   lhsc    (5,5,-1:IMAX-1,-1:JMAX-1,-1:KMAX-1, maxcells),
-     >   backsub_info (5, 0:MAX_CELL_DIM, 0:MAX_CELL_DIM, maxcells),
-     >   in_buffer(BUF_SIZE), out_buffer(BUF_SIZE)
-      common /fields/  u, us, vs, ws, qs, rho_i, square, 
-     >                 rhs, forcing, lhsc, in_buffer, out_buffer,
-     >                 backsub_info
-
-      double precision cv(-2:MAX_CELL_DIM+1),   rhon(-2:MAX_CELL_DIM+1),
-     >                 rhos(-2:MAX_CELL_DIM+1), rhoq(-2:MAX_CELL_DIM+1),
-     >                 cuf(-2:MAX_CELL_DIM+1),  q(-2:MAX_CELL_DIM+1),
-     >                 ue(-2:MAX_CELL_DIM+1,5), buf(-2:MAX_CELL_DIM+1,5)
-      common /work_1d/ cv, rhon, rhos, rhoq, cuf, q, ue, buf
-
-      integer  west_size, east_size, bottom_size, top_size,
-     >         north_size, south_size, start_send_west, 
-     >         start_send_east, start_send_south, start_send_north,
-     >         start_send_bottom, start_send_top, start_recv_west,
-     >         start_recv_east, start_recv_south, start_recv_north,
-     >         start_recv_bottom, start_recv_top
-      common /box/ west_size, east_size, bottom_size,
-     >             top_size, north_size, south_size, 
-     >             start_send_west, start_send_east, start_send_south,
-     >             start_send_north, start_send_bottom, start_send_top,
-     >             start_recv_west, start_recv_east, start_recv_south,
-     >             start_recv_north, start_recv_bottom, start_recv_top
-
-      double precision  tmp_block(5,5), b_inverse(5,5), tmp_vec(5)
-      common /work_solve/ tmp_block, b_inverse, tmp_vec
-
-c
-c     These are used by btio
-c
-      integer collbuf_nodes, collbuf_size, iosize, eltext,
-     $        combined_btype, fp, idump, record_length, element,
-     $        combined_ftype, idump_sub, rd_interval
-      common /btio/ collbuf_nodes, collbuf_size, iosize, eltext,
-     $              combined_btype, fp, idump, record_length,
-     $              idump_sub, rd_interval
-      double precision sum(niter_default), xce_sub(5)
-      common /btio/ sum, xce_sub
-      integer*8 iseek
-      common /btio/ iseek, element, combined_ftype
-
-
-
diff --git a/examples/smpi/NAS/BT/initialize.f b/examples/smpi/NAS/BT/initialize.f
deleted file mode 100644 (file)
index 274cdb1..0000000
+++ /dev/null
@@ -1,308 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine  initialize
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     This subroutine initializes the field variable u using 
-c     tri-linear transfinite interpolation of the boundary values     
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      
-      integer c, i, j, k, m, ii, jj, kk, ix, iy, iz
-      double precision  xi, eta, zeta, Pface(5,3,2), Pxi, Peta, 
-     >     Pzeta, temp(5)
-
-c---------------------------------------------------------------------
-c  Later (in compute_rhs) we compute 1/u for every element. A few of 
-c  the corner elements are not used, but it convenient (and faster) 
-c  to compute the whole thing with a simple loop. Make sure those 
-c  values are nonzero by initializing the whole thing here. 
-c---------------------------------------------------------------------
-      do c = 1, ncells
-         do kk = -1, KMAX
-            do jj = -1, JMAX
-               do ii = -1, IMAX
-                  do m = 1, 5
-                     u(m, ii, jj, kk, c) = 1.0
-                  end do
-               end do
-            end do
-         end do
-      end do
-c---------------------------------------------------------------------
-
-
-
-c---------------------------------------------------------------------
-c     first store the "interpolated" values everywhere on the grid    
-c---------------------------------------------------------------------
-      do c=1, ncells
-         kk = 0
-         do k = cell_low(3,c), cell_high(3,c)
-            zeta = dble(k) * dnzm1
-            jj = 0
-            do j = cell_low(2,c), cell_high(2,c)
-               eta = dble(j) * dnym1
-               ii = 0
-               do i = cell_low(1,c), cell_high(1,c)
-                  xi = dble(i) * dnxm1
-                  
-                  do ix = 1, 2
-                     call exact_solution(dble(ix-1), eta, zeta, 
-     >                    Pface(1,1,ix))
-                  enddo
-
-                  do iy = 1, 2
-                     call exact_solution(xi, dble(iy-1) , zeta, 
-     >                    Pface(1,2,iy))
-                  enddo
-
-                  do iz = 1, 2
-                     call exact_solution(xi, eta, dble(iz-1),   
-     >                    Pface(1,3,iz))
-                  enddo
-
-                  do m = 1, 5
-                     Pxi   = xi   * Pface(m,1,2) + 
-     >                    (1.0d0-xi)   * Pface(m,1,1)
-                     Peta  = eta  * Pface(m,2,2) + 
-     >                    (1.0d0-eta)  * Pface(m,2,1)
-                     Pzeta = zeta * Pface(m,3,2) + 
-     >                    (1.0d0-zeta) * Pface(m,3,1)
-                     
-                     u(m,ii,jj,kk,c) = Pxi + Peta + Pzeta - 
-     >                    Pxi*Peta - Pxi*Pzeta - Peta*Pzeta + 
-     >                    Pxi*Peta*Pzeta
-
-                  enddo
-                  ii = ii + 1
-               enddo
-               jj = jj + 1
-            enddo
-            kk = kk+1
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     now store the exact values on the boundaries        
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     west face                                                  
-c---------------------------------------------------------------------
-      c = slice(1,1)
-      ii = 0
-      xi = 0.0d0
-      kk = 0
-      do k = cell_low(3,c), cell_high(3,c)
-         zeta = dble(k) * dnzm1
-         jj = 0
-         do j = cell_low(2,c), cell_high(2,c)
-            eta = dble(j) * dnym1
-            call exact_solution(xi, eta, zeta, temp)
-            do m = 1, 5
-               u(m,ii,jj,kk,c) = temp(m)
-            enddo
-            jj = jj + 1
-         enddo
-         kk = kk + 1
-      enddo
-
-c---------------------------------------------------------------------
-c     east face                                                      
-c---------------------------------------------------------------------
-      c  = slice(1,ncells)
-      ii = cell_size(1,c)-1
-      xi = 1.0d0
-      kk = 0
-      do k = cell_low(3,c), cell_high(3,c)
-         zeta = dble(k) * dnzm1
-         jj = 0
-         do j = cell_low(2,c), cell_high(2,c)
-            eta = dble(j) * dnym1
-            call exact_solution(xi, eta, zeta, temp)
-            do m = 1, 5
-               u(m,ii,jj,kk,c) = temp(m)
-            enddo
-            jj = jj + 1
-         enddo
-         kk = kk + 1
-      enddo
-
-c---------------------------------------------------------------------
-c     south face                                                 
-c---------------------------------------------------------------------
-      c = slice(2,1)
-      jj = 0
-      eta = 0.0d0
-      kk = 0
-      do k = cell_low(3,c), cell_high(3,c)
-         zeta = dble(k) * dnzm1
-         ii = 0
-         do i = cell_low(1,c), cell_high(1,c)
-            xi = dble(i) * dnxm1
-            call exact_solution(xi, eta, zeta, temp)
-            do m = 1, 5
-               u(m,ii,jj,kk,c) = temp(m)
-            enddo
-            ii = ii + 1
-         enddo
-         kk = kk + 1
-      enddo
-
-
-c---------------------------------------------------------------------
-c     north face                                    
-c---------------------------------------------------------------------
-      c = slice(2,ncells)
-      jj = cell_size(2,c)-1
-      eta = 1.0d0
-      kk = 0
-      do k = cell_low(3,c), cell_high(3,c)
-         zeta = dble(k) * dnzm1
-         ii = 0
-         do i = cell_low(1,c), cell_high(1,c)
-            xi = dble(i) * dnxm1
-            call exact_solution(xi, eta, zeta, temp)
-            do m = 1, 5
-               u(m,ii,jj,kk,c) = temp(m)
-            enddo
-            ii = ii + 1
-         enddo
-         kk = kk + 1
-      enddo
-
-c---------------------------------------------------------------------
-c     bottom face                                       
-c---------------------------------------------------------------------
-      c = slice(3,1)
-      kk = 0
-      zeta = 0.0d0
-      jj = 0
-      do j = cell_low(2,c), cell_high(2,c)
-         eta = dble(j) * dnym1
-         ii = 0
-         do i =cell_low(1,c), cell_high(1,c)
-            xi = dble(i) *dnxm1
-            call exact_solution(xi, eta, zeta, temp)
-            do m = 1, 5
-               u(m,ii,jj,kk,c) = temp(m)
-            enddo
-            ii = ii + 1
-         enddo
-         jj = jj + 1
-      enddo
-
-c---------------------------------------------------------------------
-c     top face     
-c---------------------------------------------------------------------
-      c = slice(3,ncells)
-      kk = cell_size(3,c)-1
-      zeta = 1.0d0
-      jj = 0
-      do j = cell_low(2,c), cell_high(2,c)
-         eta = dble(j) * dnym1
-         ii = 0
-         do i =cell_low(1,c), cell_high(1,c)
-            xi = dble(i) * dnxm1
-            call exact_solution(xi, eta, zeta, temp)
-            do m = 1, 5
-               u(m,ii,jj,kk,c) = temp(m)
-            enddo
-            ii = ii + 1
-         enddo
-         jj = jj + 1
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine lhsinit
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      
-      integer i, j, k, d, c, m, n
-
-c---------------------------------------------------------------------
-c     loop over all cells                                       
-c---------------------------------------------------------------------
-      do c = 1, ncells
-
-c---------------------------------------------------------------------
-c     first, initialize the start and end arrays
-c---------------------------------------------------------------------
-         do d = 1, 3
-            if (cell_coord(d,c) .eq. 1) then
-               start(d,c) = 1
-            else 
-               start(d,c) = 0
-            endif
-            if (cell_coord(d,c) .eq. ncells) then
-               end(d,c) = 1
-            else
-               end(d,c) = 0
-            endif
-         enddo
-
-c---------------------------------------------------------------------
-c     zero the whole left hand side for starters
-c---------------------------------------------------------------------
-         do k = 0, cell_size(3,c)-1
-            do j = 0, cell_size(2,c)-1
-               do i = 0, cell_size(1,c)-1
-                  do m = 1,5
-                     do n = 1, 5
-                        lhsc(m,n,i,j,k,c) = 0.0d0
-                     enddo
-                  enddo
-               enddo
-            enddo
-         enddo
-
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine lhsabinit(lhsa, lhsb, size)
-      implicit none
-
-      integer size
-      double precision lhsa(5, 5, -1:size), lhsb(5, 5, -1:size)
-
-      integer i, m, n
-
-c---------------------------------------------------------------------
-c     next, set all diagonal values to 1. This is overkill, but convenient
-c---------------------------------------------------------------------
-      do i = 0, size
-         do m = 1, 5
-            do n = 1, 5
-               lhsa(m,n,i) = 0.0d0
-               lhsb(m,n,i) = 0.0d0
-            enddo
-            lhsb(m,m,i) = 1.0d0
-         enddo
-      enddo
-
-      return
-      end
-
-
-
diff --git a/examples/smpi/NAS/BT/inputbt.data.sample b/examples/smpi/NAS/BT/inputbt.data.sample
deleted file mode 100644 (file)
index 776654e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-200       number of time steps
-0.0008d0  dt for class A = 0.0008d0. class B = 0.0003d0  class C = 0.0001d0
-64 64 64
-5 0        write interval (optional read interval) for BTIO
-0 1000000  number of nodes in collective buffering and buffer size for BTIO
diff --git a/examples/smpi/NAS/BT/make_set.f b/examples/smpi/NAS/BT/make_set.f
deleted file mode 100644 (file)
index b8d90c6..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine make_set
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     This function allocates space for a set of cells and fills the set     
-c     such that communication between cells on different nodes is only
-c     nearest neighbor                                                   
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-
-      integer p, i, j, c, dir, size, excess, ierr,ierrcode
-
-c---------------------------------------------------------------------
-c     compute square root; add small number to allow for roundoff
-c     (note: this is computed in setup_mpi.f also, but prefer to do
-c     it twice because of some include file problems).
-c---------------------------------------------------------------------
-      ncells = dint(dsqrt(dble(no_nodes) + 0.00001d0))
-
-c---------------------------------------------------------------------
-c     this makes coding easier
-c---------------------------------------------------------------------
-      p = ncells
-      
-c---------------------------------------------------------------------
-c     determine the location of the cell at the bottom of the 3D 
-c     array of cells
-c---------------------------------------------------------------------
-      cell_coord(1,1) = mod(node,p) 
-      cell_coord(2,1) = node/p 
-      cell_coord(3,1) = 0
-
-c---------------------------------------------------------------------
-c     set the cell_coords for cells in the rest of the z-layers; 
-c     this comes down to a simple linear numbering in the z-direct-
-c     ion, and to the doubly-cyclic numbering in the other dirs     
-c---------------------------------------------------------------------
-      do c=2, p
-         cell_coord(1,c) = mod(cell_coord(1,c-1)+1,p) 
-         cell_coord(2,c) = mod(cell_coord(2,c-1)-1+p,p) 
-         cell_coord(3,c) = c-1
-      end do
-
-c---------------------------------------------------------------------
-c     offset all the coordinates by 1 to adjust for Fortran arrays
-c---------------------------------------------------------------------
-      do dir = 1, 3
-         do c = 1, p
-            cell_coord(dir,c) = cell_coord(dir,c) + 1
-         end do
-      end do
-      
-c---------------------------------------------------------------------
-c     slice(dir,n) contains the sequence number of the cell that is in
-c     coordinate plane n in the dir direction
-c---------------------------------------------------------------------
-      do dir = 1, 3
-         do c = 1, p
-            slice(dir,cell_coord(dir,c)) = c
-         end do
-      end do
-
-
-c---------------------------------------------------------------------
-c     fill the predecessor and successor entries, using the indices 
-c     of the bottom cells (they are the same at each level of k 
-c     anyway) acting as if full periodicity pertains; note that p is
-c     added to those arguments to the mod functions that might
-c     otherwise return wrong values when using the modulo function
-c---------------------------------------------------------------------
-      i = cell_coord(1,1)-1
-      j = cell_coord(2,1)-1
-
-      predecessor(1) = mod(i-1+p,p) + p*j
-      predecessor(2) = i + p*mod(j-1+p,p)
-      predecessor(3) = mod(i+1,p) + p*mod(j-1+p,p)
-      successor(1)   = mod(i+1,p) + p*j
-      successor(2)   = i + p*mod(j+1,p)
-      successor(3)   = mod(i-1+p,p) + p*mod(j+1,p)
-
-c---------------------------------------------------------------------
-c     now compute the sizes of the cells                                    
-c---------------------------------------------------------------------
-      do dir= 1, 3
-c---------------------------------------------------------------------
-c     set cell_coord range for each direction                            
-c---------------------------------------------------------------------
-         size   = grid_points(dir)/p
-         excess = mod(grid_points(dir),p)
-         do c=1, ncells
-            if (cell_coord(dir,c) .le. excess) then
-               cell_size(dir,c) = size+1
-               cell_low(dir,c) = (cell_coord(dir,c)-1)*(size+1)
-               cell_high(dir,c) = cell_low(dir,c)+size
-            else 
-               cell_size(dir,c) = size
-               cell_low(dir,c)  = excess*(size+1)+
-     >              (cell_coord(dir,c)-excess-1)*size
-               cell_high(dir,c) = cell_low(dir,c)+size-1
-            endif
-            if (cell_size(dir, c) .le. 2) then
-               write(*,50)
- 50            format(' Error: Cell size too small. Min size is 3')
-               call MPI_Abort(mpi_comm_world,ierrcode,ierr)
-               stop
-            endif
-         end do
-      end do
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-
diff --git a/examples/smpi/NAS/BT/mpinpb.h b/examples/smpi/NAS/BT/mpinpb.h
deleted file mode 100644 (file)
index f621f08..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'mpif.h'
-
-      integer           node, no_nodes, total_nodes, root, comm_setup, 
-     >                  comm_solve, comm_rhs, dp_type
-      logical           active
-      common /mpistuff/ node, no_nodes, total_nodes, root, comm_setup, 
-     >                  comm_solve, comm_rhs, dp_type, active
-
diff --git a/examples/smpi/NAS/BT/rhs.f b/examples/smpi/NAS/BT/rhs.f
deleted file mode 100644 (file)
index 89171a6..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine compute_rhs
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer c, i, j, k, m
-      double precision rho_inv, uijk, up1, um1, vijk, vp1, vm1,
-     >     wijk, wp1, wm1
-
-
-c---------------------------------------------------------------------
-c     loop over all cells owned by this node                           
-c---------------------------------------------------------------------
-      do c = 1, ncells
-
-c---------------------------------------------------------------------
-c     compute the reciprocal of density, and the kinetic energy, 
-c     and the speed of sound.
-c---------------------------------------------------------------------
-         do k = -1, cell_size(3,c)
-            do j = -1, cell_size(2,c)
-               do i = -1, cell_size(1,c)
-                  rho_inv = 1.0d0/u(1,i,j,k,c)
-                  rho_i(i,j,k,c) = rho_inv
-                  us(i,j,k,c) = u(2,i,j,k,c) * rho_inv
-                  vs(i,j,k,c) = u(3,i,j,k,c) * rho_inv
-                  ws(i,j,k,c) = u(4,i,j,k,c) * rho_inv
-                  square(i,j,k,c)     = 0.5d0* (
-     >                 u(2,i,j,k,c)*u(2,i,j,k,c) + 
-     >                 u(3,i,j,k,c)*u(3,i,j,k,c) +
-     >                 u(4,i,j,k,c)*u(4,i,j,k,c) ) * rho_inv
-                  qs(i,j,k,c) = square(i,j,k,c) * rho_inv
-               enddo
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c copy the exact forcing term to the right hand side;  because 
-c this forcing term is known, we can store it on the whole of every 
-c cell,  including the boundary                   
-c---------------------------------------------------------------------
-
-         do k = 0, cell_size(3,c)-1
-            do j = 0, cell_size(2,c)-1
-               do i = 0, cell_size(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = forcing(m,i,j,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-
-
-c---------------------------------------------------------------------
-c     compute xi-direction fluxes 
-c---------------------------------------------------------------------
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  uijk = us(i,j,k,c)
-                  up1  = us(i+1,j,k,c)
-                  um1  = us(i-1,j,k,c)
-
-                  rhs(1,i,j,k,c) = rhs(1,i,j,k,c) + dx1tx1 * 
-     >                 (u(1,i+1,j,k,c) - 2.0d0*u(1,i,j,k,c) + 
-     >                 u(1,i-1,j,k,c)) -
-     >                 tx2 * (u(2,i+1,j,k,c) - u(2,i-1,j,k,c))
-
-                  rhs(2,i,j,k,c) = rhs(2,i,j,k,c) + dx2tx1 * 
-     >                 (u(2,i+1,j,k,c) - 2.0d0*u(2,i,j,k,c) + 
-     >                 u(2,i-1,j,k,c)) +
-     >                 xxcon2*con43 * (up1 - 2.0d0*uijk + um1) -
-     >                 tx2 * (u(2,i+1,j,k,c)*up1 - 
-     >                 u(2,i-1,j,k,c)*um1 +
-     >                 (u(5,i+1,j,k,c)- square(i+1,j,k,c)-
-     >                 u(5,i-1,j,k,c)+ square(i-1,j,k,c))*
-     >                 c2)
-
-                  rhs(3,i,j,k,c) = rhs(3,i,j,k,c) + dx3tx1 * 
-     >                 (u(3,i+1,j,k,c) - 2.0d0*u(3,i,j,k,c) +
-     >                 u(3,i-1,j,k,c)) +
-     >                 xxcon2 * (vs(i+1,j,k,c) - 2.0d0*vs(i,j,k,c) +
-     >                 vs(i-1,j,k,c)) -
-     >                 tx2 * (u(3,i+1,j,k,c)*up1 - 
-     >                 u(3,i-1,j,k,c)*um1)
-
-                  rhs(4,i,j,k,c) = rhs(4,i,j,k,c) + dx4tx1 * 
-     >                 (u(4,i+1,j,k,c) - 2.0d0*u(4,i,j,k,c) +
-     >                 u(4,i-1,j,k,c)) +
-     >                 xxcon2 * (ws(i+1,j,k,c) - 2.0d0*ws(i,j,k,c) +
-     >                 ws(i-1,j,k,c)) -
-     >                 tx2 * (u(4,i+1,j,k,c)*up1 - 
-     >                 u(4,i-1,j,k,c)*um1)
-
-                  rhs(5,i,j,k,c) = rhs(5,i,j,k,c) + dx5tx1 * 
-     >                 (u(5,i+1,j,k,c) - 2.0d0*u(5,i,j,k,c) +
-     >                 u(5,i-1,j,k,c)) +
-     >                 xxcon3 * (qs(i+1,j,k,c) - 2.0d0*qs(i,j,k,c) +
-     >                 qs(i-1,j,k,c)) +
-     >                 xxcon4 * (up1*up1 -       2.0d0*uijk*uijk + 
-     >                 um1*um1) +
-     >                 xxcon5 * (u(5,i+1,j,k,c)*rho_i(i+1,j,k,c) - 
-     >                 2.0d0*u(5,i,j,k,c)*rho_i(i,j,k,c) +
-     >                 u(5,i-1,j,k,c)*rho_i(i-1,j,k,c)) -
-     >                 tx2 * ( (c1*u(5,i+1,j,k,c) - 
-     >                 c2*square(i+1,j,k,c))*up1 -
-     >                 (c1*u(5,i-1,j,k,c) - 
-     >                 c2*square(i-1,j,k,c))*um1 )
-               enddo
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     add fourth order xi-direction dissipation               
-c---------------------------------------------------------------------
-         if (start(1,c) .gt. 0) then
-            do k = start(3,c), cell_size(3,c)-end(3,c)-1
-               do j = start(2,c), cell_size(2,c)-end(2,c)-1
-                  i = 1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c)- dssp * 
-     >                    ( 5.0d0*u(m,i,j,k,c) - 4.0d0*u(m,i+1,j,k,c) +
-     >                    u(m,i+2,j,k,c))
-                  enddo
-
-                  i = 2
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp * 
-     >                    (-4.0d0*u(m,i-1,j,k,c) + 6.0d0*u(m,i,j,k,c) -
-     >                    4.0d0*u(m,i+1,j,k,c) + u(m,i+2,j,k,c))
-                  enddo
-               enddo
-            enddo
-         endif
-
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = 3*start(1,c),cell_size(1,c)-3*end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp * 
-     >                    (  u(m,i-2,j,k,c) - 4.0d0*u(m,i-1,j,k,c) + 
-     >                    6.0*u(m,i,j,k,c) - 4.0d0*u(m,i+1,j,k,c) + 
-     >                    u(m,i+2,j,k,c) )
-                  enddo
-               enddo
-            enddo
-         enddo
-         
-
-         if (end(1,c) .gt. 0) then
-            do k = start(3,c), cell_size(3,c)-end(3,c)-1
-               do j = start(2,c), cell_size(2,c)-end(2,c)-1
-                  i = cell_size(1,c)-3
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp *
-     >                    ( u(m,i-2,j,k,c) - 4.0d0*u(m,i-1,j,k,c) + 
-     >                    6.0d0*u(m,i,j,k,c) - 4.0d0*u(m,i+1,j,k,c) )
-                  enddo
-
-                  i = cell_size(1,c)-2
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp *
-     >                    ( u(m,i-2,j,k,c) - 4.d0*u(m,i-1,j,k,c) +
-     >                    5.d0*u(m,i,j,k,c) )
-                  enddo
-               enddo
-            enddo
-         endif
-
-c---------------------------------------------------------------------
-c     compute eta-direction fluxes 
-c---------------------------------------------------------------------
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  vijk = vs(i,j,k,c)
-                  vp1  = vs(i,j+1,k,c)
-                  vm1  = vs(i,j-1,k,c)
-                  rhs(1,i,j,k,c) = rhs(1,i,j,k,c) + dy1ty1 * 
-     >                 (u(1,i,j+1,k,c) - 2.0d0*u(1,i,j,k,c) + 
-     >                 u(1,i,j-1,k,c)) -
-     >                 ty2 * (u(3,i,j+1,k,c) - u(3,i,j-1,k,c))
-                  rhs(2,i,j,k,c) = rhs(2,i,j,k,c) + dy2ty1 * 
-     >                 (u(2,i,j+1,k,c) - 2.0d0*u(2,i,j,k,c) + 
-     >                 u(2,i,j-1,k,c)) +
-     >                 yycon2 * (us(i,j+1,k,c) - 2.0d0*us(i,j,k,c) + 
-     >                 us(i,j-1,k,c)) -
-     >                 ty2 * (u(2,i,j+1,k,c)*vp1 - 
-     >                 u(2,i,j-1,k,c)*vm1)
-                  rhs(3,i,j,k,c) = rhs(3,i,j,k,c) + dy3ty1 * 
-     >                 (u(3,i,j+1,k,c) - 2.0d0*u(3,i,j,k,c) + 
-     >                 u(3,i,j-1,k,c)) +
-     >                 yycon2*con43 * (vp1 - 2.0d0*vijk + vm1) -
-     >                 ty2 * (u(3,i,j+1,k,c)*vp1 - 
-     >                 u(3,i,j-1,k,c)*vm1 +
-     >                 (u(5,i,j+1,k,c) - square(i,j+1,k,c) - 
-     >                 u(5,i,j-1,k,c) + square(i,j-1,k,c))
-     >                 *c2)
-                  rhs(4,i,j,k,c) = rhs(4,i,j,k,c) + dy4ty1 * 
-     >                 (u(4,i,j+1,k,c) - 2.0d0*u(4,i,j,k,c) + 
-     >                 u(4,i,j-1,k,c)) +
-     >                 yycon2 * (ws(i,j+1,k,c) - 2.0d0*ws(i,j,k,c) + 
-     >                 ws(i,j-1,k,c)) -
-     >                 ty2 * (u(4,i,j+1,k,c)*vp1 - 
-     >                 u(4,i,j-1,k,c)*vm1)
-                  rhs(5,i,j,k,c) = rhs(5,i,j,k,c) + dy5ty1 * 
-     >                 (u(5,i,j+1,k,c) - 2.0d0*u(5,i,j,k,c) + 
-     >                 u(5,i,j-1,k,c)) +
-     >                 yycon3 * (qs(i,j+1,k,c) - 2.0d0*qs(i,j,k,c) + 
-     >                 qs(i,j-1,k,c)) +
-     >                 yycon4 * (vp1*vp1       - 2.0d0*vijk*vijk + 
-     >                 vm1*vm1) +
-     >                 yycon5 * (u(5,i,j+1,k,c)*rho_i(i,j+1,k,c) - 
-     >                 2.0d0*u(5,i,j,k,c)*rho_i(i,j,k,c) +
-     >                 u(5,i,j-1,k,c)*rho_i(i,j-1,k,c)) -
-     >                 ty2 * ((c1*u(5,i,j+1,k,c) - 
-     >                 c2*square(i,j+1,k,c)) * vp1 -
-     >                 (c1*u(5,i,j-1,k,c) - 
-     >                 c2*square(i,j-1,k,c)) * vm1)
-               enddo
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     add fourth order eta-direction dissipation         
-c---------------------------------------------------------------------
-         if (start(2,c) .gt. 0) then
-            do k = start(3,c), cell_size(3,c)-end(3,c)-1
-               j = 1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c)- dssp * 
-     >                    ( 5.0d0*u(m,i,j,k,c) - 4.0d0*u(m,i,j+1,k,c) +
-     >                    u(m,i,j+2,k,c))
-                  enddo
-               enddo
-
-               j = 2
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp * 
-     >                    (-4.0d0*u(m,i,j-1,k,c) + 6.0d0*u(m,i,j,k,c) -
-     >                    4.0d0*u(m,i,j+1,k,c) + u(m,i,j+2,k,c))
-                  enddo
-               enddo
-            enddo
-         endif
-
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = 3*start(2,c), cell_size(2,c)-3*end(2,c)-1
-               do i = start(1,c),cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp * 
-     >                    (  u(m,i,j-2,k,c) - 4.0d0*u(m,i,j-1,k,c) + 
-     >                    6.0*u(m,i,j,k,c) - 4.0d0*u(m,i,j+1,k,c) + 
-     >                    u(m,i,j+2,k,c) )
-                  enddo
-               enddo
-            enddo
-         enddo
-         
-         if (end(2,c) .gt. 0) then
-            do k = start(3,c), cell_size(3,c)-end(3,c)-1
-               j = cell_size(2,c)-3
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp *
-     >                    ( u(m,i,j-2,k,c) - 4.0d0*u(m,i,j-1,k,c) + 
-     >                    6.0d0*u(m,i,j,k,c) - 4.0d0*u(m,i,j+1,k,c) )
-                  enddo
-               enddo
-
-               j = cell_size(2,c)-2
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp *
-     >                    ( u(m,i,j-2,k,c) - 4.d0*u(m,i,j-1,k,c) +
-     >                    5.d0*u(m,i,j,k,c) )
-                  enddo
-               enddo
-            enddo
-         endif
-
-c---------------------------------------------------------------------
-c     compute zeta-direction fluxes 
-c---------------------------------------------------------------------
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  wijk = ws(i,j,k,c)
-                  wp1  = ws(i,j,k+1,c)
-                  wm1  = ws(i,j,k-1,c)
-
-                  rhs(1,i,j,k,c) = rhs(1,i,j,k,c) + dz1tz1 * 
-     >                 (u(1,i,j,k+1,c) - 2.0d0*u(1,i,j,k,c) + 
-     >                 u(1,i,j,k-1,c)) -
-     >                 tz2 * (u(4,i,j,k+1,c) - u(4,i,j,k-1,c))
-                  rhs(2,i,j,k,c) = rhs(2,i,j,k,c) + dz2tz1 * 
-     >                 (u(2,i,j,k+1,c) - 2.0d0*u(2,i,j,k,c) + 
-     >                 u(2,i,j,k-1,c)) +
-     >                 zzcon2 * (us(i,j,k+1,c) - 2.0d0*us(i,j,k,c) + 
-     >                 us(i,j,k-1,c)) -
-     >                 tz2 * (u(2,i,j,k+1,c)*wp1 - 
-     >                 u(2,i,j,k-1,c)*wm1)
-                  rhs(3,i,j,k,c) = rhs(3,i,j,k,c) + dz3tz1 * 
-     >                 (u(3,i,j,k+1,c) - 2.0d0*u(3,i,j,k,c) + 
-     >                 u(3,i,j,k-1,c)) +
-     >                 zzcon2 * (vs(i,j,k+1,c) - 2.0d0*vs(i,j,k,c) + 
-     >                 vs(i,j,k-1,c)) -
-     >                 tz2 * (u(3,i,j,k+1,c)*wp1 - 
-     >                 u(3,i,j,k-1,c)*wm1)
-                  rhs(4,i,j,k,c) = rhs(4,i,j,k,c) + dz4tz1 * 
-     >                 (u(4,i,j,k+1,c) - 2.0d0*u(4,i,j,k,c) + 
-     >                 u(4,i,j,k-1,c)) +
-     >                 zzcon2*con43 * (wp1 - 2.0d0*wijk + wm1) -
-     >                 tz2 * (u(4,i,j,k+1,c)*wp1 - 
-     >                 u(4,i,j,k-1,c)*wm1 +
-     >                 (u(5,i,j,k+1,c) - square(i,j,k+1,c) - 
-     >                 u(5,i,j,k-1,c) + square(i,j,k-1,c))
-     >                 *c2)
-                  rhs(5,i,j,k,c) = rhs(5,i,j,k,c) + dz5tz1 * 
-     >                 (u(5,i,j,k+1,c) - 2.0d0*u(5,i,j,k,c) + 
-     >                 u(5,i,j,k-1,c)) +
-     >                 zzcon3 * (qs(i,j,k+1,c) - 2.0d0*qs(i,j,k,c) + 
-     >                 qs(i,j,k-1,c)) +
-     >                 zzcon4 * (wp1*wp1 - 2.0d0*wijk*wijk + 
-     >                 wm1*wm1) +
-     >                 zzcon5 * (u(5,i,j,k+1,c)*rho_i(i,j,k+1,c) - 
-     >                 2.0d0*u(5,i,j,k,c)*rho_i(i,j,k,c) +
-     >                 u(5,i,j,k-1,c)*rho_i(i,j,k-1,c)) -
-     >                 tz2 * ( (c1*u(5,i,j,k+1,c) - 
-     >                 c2*square(i,j,k+1,c))*wp1 -
-     >                 (c1*u(5,i,j,k-1,c) - 
-     >                 c2*square(i,j,k-1,c))*wm1)
-               enddo
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     add fourth order zeta-direction dissipation                
-c---------------------------------------------------------------------
-         if (start(3,c) .gt. 0) then
-            k = 1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c)- dssp * 
-     >                    ( 5.0d0*u(m,i,j,k,c) - 4.0d0*u(m,i,j,k+1,c) +
-     >                    u(m,i,j,k+2,c))
-                  enddo
-               enddo
-            enddo
-
-            k = 2
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp * 
-     >                    (-4.0d0*u(m,i,j,k-1,c) + 6.0d0*u(m,i,j,k,c) -
-     >                    4.0d0*u(m,i,j,k+1,c) + u(m,i,j,k+2,c))
-                  enddo
-               enddo
-            enddo
-         endif
-
-         do k = 3*start(3,c), cell_size(3,c)-3*end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c),cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp * 
-     >                    (  u(m,i,j,k-2,c) - 4.0d0*u(m,i,j,k-1,c) + 
-     >                    6.0*u(m,i,j,k,c) - 4.0d0*u(m,i,j,k+1,c) + 
-     >                    u(m,i,j,k+2,c) )
-                  enddo
-               enddo
-            enddo
-         enddo
-         
-         if (end(3,c) .gt. 0) then
-            k = cell_size(3,c)-3
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp *
-     >                    ( u(m,i,j,k-2,c) - 4.0d0*u(m,i,j,k-1,c) + 
-     >                    6.0d0*u(m,i,j,k,c) - 4.0d0*u(m,i,j,k+1,c) )
-                  enddo
-               enddo
-            enddo
-
-            k = cell_size(3,c)-2
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) - dssp *
-     >                    ( u(m,i,j,k-2,c) - 4.d0*u(m,i,j,k-1,c) +
-     >                    5.d0*u(m,i,j,k,c) )
-                  enddo
-               enddo
-            enddo
-         endif
-
-         do k = start(3,c), cell_size(3,c)-end(3,c)-1
-            do j = start(2,c), cell_size(2,c)-end(2,c)-1
-               do i = start(1,c), cell_size(1,c)-end(1,c)-1
-                  do m = 1, 5
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) * dt
-                  enddo
-               enddo
-            enddo
-         enddo
-
-      enddo
-      
-      return
-      end
-
-
-
-
diff --git a/examples/smpi/NAS/BT/set_constants.f b/examples/smpi/NAS/BT/set_constants.f
deleted file mode 100644 (file)
index 81397d4..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine  set_constants
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      
-      ce(1,1)  = 2.0d0
-      ce(1,2)  = 0.0d0
-      ce(1,3)  = 0.0d0
-      ce(1,4)  = 4.0d0
-      ce(1,5)  = 5.0d0
-      ce(1,6)  = 3.0d0
-      ce(1,7)  = 0.5d0
-      ce(1,8)  = 0.02d0
-      ce(1,9)  = 0.01d0
-      ce(1,10) = 0.03d0
-      ce(1,11) = 0.5d0
-      ce(1,12) = 0.4d0
-      ce(1,13) = 0.3d0
-      
-      ce(2,1)  = 1.0d0
-      ce(2,2)  = 0.0d0
-      ce(2,3)  = 0.0d0
-      ce(2,4)  = 0.0d0
-      ce(2,5)  = 1.0d0
-      ce(2,6)  = 2.0d0
-      ce(2,7)  = 3.0d0
-      ce(2,8)  = 0.01d0
-      ce(2,9)  = 0.03d0
-      ce(2,10) = 0.02d0
-      ce(2,11) = 0.4d0
-      ce(2,12) = 0.3d0
-      ce(2,13) = 0.5d0
-
-      ce(3,1)  = 2.0d0
-      ce(3,2)  = 2.0d0
-      ce(3,3)  = 0.0d0
-      ce(3,4)  = 0.0d0
-      ce(3,5)  = 0.0d0
-      ce(3,6)  = 2.0d0
-      ce(3,7)  = 3.0d0
-      ce(3,8)  = 0.04d0
-      ce(3,9)  = 0.03d0
-      ce(3,10) = 0.05d0
-      ce(3,11) = 0.3d0
-      ce(3,12) = 0.5d0
-      ce(3,13) = 0.4d0
-
-      ce(4,1)  = 2.0d0
-      ce(4,2)  = 2.0d0
-      ce(4,3)  = 0.0d0
-      ce(4,4)  = 0.0d0
-      ce(4,5)  = 0.0d0
-      ce(4,6)  = 2.0d0
-      ce(4,7)  = 3.0d0
-      ce(4,8)  = 0.03d0
-      ce(4,9)  = 0.05d0
-      ce(4,10) = 0.04d0
-      ce(4,11) = 0.2d0
-      ce(4,12) = 0.1d0
-      ce(4,13) = 0.3d0
-
-      ce(5,1)  = 5.0d0
-      ce(5,2)  = 4.0d0
-      ce(5,3)  = 3.0d0
-      ce(5,4)  = 2.0d0
-      ce(5,5)  = 0.1d0
-      ce(5,6)  = 0.4d0
-      ce(5,7)  = 0.3d0
-      ce(5,8)  = 0.05d0
-      ce(5,9)  = 0.04d0
-      ce(5,10) = 0.03d0
-      ce(5,11) = 0.1d0
-      ce(5,12) = 0.3d0
-      ce(5,13) = 0.2d0
-
-      c1 = 1.4d0
-      c2 = 0.4d0
-      c3 = 0.1d0
-      c4 = 1.0d0
-      c5 = 1.4d0
-
-      bt = dsqrt(0.5d0)
-
-      dnxm1 = 1.0d0 / dble(grid_points(1)-1)
-      dnym1 = 1.0d0 / dble(grid_points(2)-1)
-      dnzm1 = 1.0d0 / dble(grid_points(3)-1)
-
-      c1c2 = c1 * c2
-      c1c5 = c1 * c5
-      c3c4 = c3 * c4
-      c1345 = c1c5 * c3c4
-
-      conz1 = (1.0d0-c1c5)
-
-      tx1 = 1.0d0 / (dnxm1 * dnxm1)
-      tx2 = 1.0d0 / (2.0d0 * dnxm1)
-      tx3 = 1.0d0 / dnxm1
-
-      ty1 = 1.0d0 / (dnym1 * dnym1)
-      ty2 = 1.0d0 / (2.0d0 * dnym1)
-      ty3 = 1.0d0 / dnym1
-      
-      tz1 = 1.0d0 / (dnzm1 * dnzm1)
-      tz2 = 1.0d0 / (2.0d0 * dnzm1)
-      tz3 = 1.0d0 / dnzm1
-
-      dx1 = 0.75d0
-      dx2 = 0.75d0
-      dx3 = 0.75d0
-      dx4 = 0.75d0
-      dx5 = 0.75d0
-
-      dy1 = 0.75d0
-      dy2 = 0.75d0
-      dy3 = 0.75d0
-      dy4 = 0.75d0
-      dy5 = 0.75d0
-
-      dz1 = 1.0d0
-      dz2 = 1.0d0
-      dz3 = 1.0d0
-      dz4 = 1.0d0
-      dz5 = 1.0d0
-
-      dxmax = dmax1(dx3, dx4)
-      dymax = dmax1(dy2, dy4)
-      dzmax = dmax1(dz2, dz3)
-
-      dssp = 0.25d0 * dmax1(dx1, dmax1(dy1, dz1) )
-
-      c4dssp = 4.0d0 * dssp
-      c5dssp = 5.0d0 * dssp
-
-      dttx1 = dt*tx1
-      dttx2 = dt*tx2
-      dtty1 = dt*ty1
-      dtty2 = dt*ty2
-      dttz1 = dt*tz1
-      dttz2 = dt*tz2
-
-      c2dttx1 = 2.0d0*dttx1
-      c2dtty1 = 2.0d0*dtty1
-      c2dttz1 = 2.0d0*dttz1
-
-      dtdssp = dt*dssp
-
-      comz1  = dtdssp
-      comz4  = 4.0d0*dtdssp
-      comz5  = 5.0d0*dtdssp
-      comz6  = 6.0d0*dtdssp
-
-      c3c4tx3 = c3c4*tx3
-      c3c4ty3 = c3c4*ty3
-      c3c4tz3 = c3c4*tz3
-
-      dx1tx1 = dx1*tx1
-      dx2tx1 = dx2*tx1
-      dx3tx1 = dx3*tx1
-      dx4tx1 = dx4*tx1
-      dx5tx1 = dx5*tx1
-      
-      dy1ty1 = dy1*ty1
-      dy2ty1 = dy2*ty1
-      dy3ty1 = dy3*ty1
-      dy4ty1 = dy4*ty1
-      dy5ty1 = dy5*ty1
-      
-      dz1tz1 = dz1*tz1
-      dz2tz1 = dz2*tz1
-      dz3tz1 = dz3*tz1
-      dz4tz1 = dz4*tz1
-      dz5tz1 = dz5*tz1
-
-      c2iv  = 2.5d0
-      con43 = 4.0d0/3.0d0
-      con16 = 1.0d0/6.0d0
-      
-      xxcon1 = c3c4tx3*con43*tx3
-      xxcon2 = c3c4tx3*tx3
-      xxcon3 = c3c4tx3*conz1*tx3
-      xxcon4 = c3c4tx3*con16*tx3
-      xxcon5 = c3c4tx3*c1c5*tx3
-
-      yycon1 = c3c4ty3*con43*ty3
-      yycon2 = c3c4ty3*ty3
-      yycon3 = c3c4ty3*conz1*ty3
-      yycon4 = c3c4ty3*con16*ty3
-      yycon5 = c3c4ty3*c1c5*ty3
-
-      zzcon1 = c3c4tz3*con43*tz3
-      zzcon2 = c3c4tz3*tz3
-      zzcon3 = c3c4tz3*conz1*tz3
-      zzcon4 = c3c4tz3*con16*tz3
-      zzcon5 = c3c4tz3*c1c5*tz3
-
-      return
-      end
diff --git a/examples/smpi/NAS/BT/setup_mpi.f b/examples/smpi/NAS/BT/setup_mpi.f
deleted file mode 100644 (file)
index 987c6bf..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup_mpi
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c set up MPI stuff
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'mpinpb.h'
-      include 'npbparams.h'
-      integer error, color, nc
-
-      call mpi_init(error)
-      
-      call mpi_comm_size(MPI_COMM_WORLD, total_nodes, error)
-      call mpi_comm_rank(MPI_COMM_WORLD, node, error)
-
-      if (.not. convertdouble) then
-         dp_type = MPI_DOUBLE_PRECISION
-      else
-         dp_type = MPI_REAL
-      endif
-
-c---------------------------------------------------------------------
-c     compute square root; add small number to allow for roundoff
-c---------------------------------------------------------------------
-      nc = dint(dsqrt(dble(total_nodes) + 0.00001d0))
-
-c---------------------------------------------------------------------
-c We handle a non-square number of nodes by making the excess nodes
-c inactive. However, we can never handle more cells than were compiled
-c in. 
-c---------------------------------------------------------------------
-
-      if (nc .gt. maxcells) nc = maxcells
-      if (node .ge. nc*nc) then
-         active = .false.
-         color = 1
-      else
-         active = .true.
-         color = 0
-      end if
-      
-      call mpi_comm_split(MPI_COMM_WORLD,color,node,comm_setup,error)
-      if (.not. active) return
-
-      call mpi_comm_size(comm_setup, no_nodes, error)
-      call mpi_comm_dup(comm_setup, comm_solve, error)
-      call mpi_comm_dup(comm_setup, comm_rhs, error)
-      
-c---------------------------------------------------------------------
-c     let node 0 be the root for the group (there is only one)
-c---------------------------------------------------------------------
-      root = 0
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/BT/simple_mpiio.f b/examples/smpi/NAS/BT/simple_mpiio.f
deleted file mode 100644 (file)
index 02e2700..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup_btio
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer m, ierr
-
-      iseek=0
-
-      if (node .eq. root) then
-          call MPI_File_delete(filenm, MPI_INFO_NULL, ierr)
-      endif
-
-      call MPI_Barrier(comm_solve, ierr)
-
-      call MPI_File_open(comm_solve,
-     $          filenm,
-     $          MPI_MODE_RDWR + MPI_MODE_CREATE,
-     $          MPI_INFO_NULL,
-     $          fp,
-     $          ierr)
-
-      call MPI_File_set_view(fp,
-     $          iseek, MPI_DOUBLE_PRECISION, MPI_DOUBLE_PRECISION,
-     $          'native', MPI_INFO_NULL, ierr)
-
-      if (ierr .ne. MPI_SUCCESS) then
-          print *, 'Error opening file'
-          stop
-      endif
-
-      do m = 1, 5
-         xce_sub(m) = 0.d0
-      end do
-
-      idump_sub = 0
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine output_timestep
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer count, jio, kio, cio, aio
-      integer ierr
-      integer mstatus(MPI_STATUS_SIZE)
-
-      do cio=1,ncells
-          do kio=0, cell_size(3,cio)-1
-              do jio=0, cell_size(2,cio)-1
-                  iseek=5*(cell_low(1,cio) +
-     $                   PROBLEM_SIZE*((cell_low(2,cio)+jio) +
-     $                   PROBLEM_SIZE*((cell_low(3,cio)+kio) +
-     $                   PROBLEM_SIZE*idump_sub)))
-
-                  count=5*cell_size(1,cio)
-
-                  call MPI_File_write_at(fp, iseek,
-     $                  u(1,0,jio,kio,cio),
-     $                  count, MPI_DOUBLE_PRECISION,
-     $                  mstatus, ierr)
-
-                  if (ierr .ne. MPI_SUCCESS) then
-                      print *, 'Error writing to file'
-                      stop
-                  endif
-              enddo
-          enddo
-      enddo
-
-      idump_sub = idump_sub + 1
-      if (rd_interval .gt. 0) then
-         if (idump_sub .ge. rd_interval) then
-
-            call acc_sub_norms(idump+1)
-
-            idump_sub = 0
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine acc_sub_norms(idump_cur)
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer idump_cur
-
-      integer count, jio, kio, cio, ii, m, ichunk
-      integer ierr
-      integer mstatus(MPI_STATUS_SIZE)
-      double precision xce_single(5)
-
-      ichunk = idump_cur - idump_sub + 1
-      do ii=0, idump_sub-1
-        do cio=1,ncells
-          do kio=0, cell_size(3,cio)-1
-              do jio=0, cell_size(2,cio)-1
-                  iseek=5*(cell_low(1,cio) +
-     $                   PROBLEM_SIZE*((cell_low(2,cio)+jio) +
-     $                   PROBLEM_SIZE*((cell_low(3,cio)+kio) +
-     $                   PROBLEM_SIZE*ii)))
-
-                  count=5*cell_size(1,cio)
-
-                  call MPI_File_read_at(fp, iseek,
-     $                  u(1,0,jio,kio,cio),
-     $                  count, MPI_DOUBLE_PRECISION,
-     $                  mstatus, ierr)
-
-                  if (ierr .ne. MPI_SUCCESS) then
-                      print *, 'Error reading back file'
-                      call MPI_File_close(fp, ierr)
-                      stop
-                  endif
-              enddo
-          enddo
-        enddo
-
-        if (node .eq. root) print *, 'Reading data set ', ii+ichunk
-
-        call error_norm(xce_single)
-        do m = 1, 5
-           xce_sub(m) = xce_sub(m) + xce_single(m)
-        end do
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine btio_cleanup
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ierr
-
-      call MPI_File_close(fp, ierr)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine accumulate_norms(xce_acc)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      double precision xce_acc(5)
-      integer m, ierr
-
-      if (rd_interval .gt. 0) goto 20
-
-      call MPI_File_open(comm_solve,
-     $          filenm,
-     $          MPI_MODE_RDONLY,
-     $          MPI_INFO_NULL,
-     $          fp,
-     $          ierr)
-
-      iseek = 0
-      call MPI_File_set_view(fp,
-     $          iseek, MPI_DOUBLE_PRECISION, MPI_DOUBLE_PRECISION,
-     $          'native', MPI_INFO_NULL, ierr)
-
-c     clear the last time step
-
-      call clear_timestep
-
-c     read back the time steps and accumulate norms
-
-      call acc_sub_norms(idump)
-
-      call MPI_File_close(fp, ierr)
-
- 20   continue
-      do m = 1, 5
-         xce_acc(m) = xce_sub(m) / dble(idump)
-      end do
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/BT/solve_subs.f b/examples/smpi/NAS/BT/solve_subs.f
deleted file mode 100644 (file)
index 351489a..0000000
+++ /dev/null
@@ -1,642 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine matvec_sub(ablock,avec,bvec)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     subtracts bvec=bvec - ablock*avec
-c---------------------------------------------------------------------
-
-      implicit none
-
-      double precision ablock,avec,bvec
-      dimension ablock(5,5),avec(5),bvec(5)
-
-c---------------------------------------------------------------------
-c            rhs(i,ic,jc,kc,ccell) = rhs(i,ic,jc,kc,ccell) 
-c     $           - lhs(i,1,ablock,ia,ja,ka,acell)*
-c---------------------------------------------------------------------
-         bvec(1) = bvec(1) - ablock(1,1)*avec(1)
-     >                     - ablock(1,2)*avec(2)
-     >                     - ablock(1,3)*avec(3)
-     >                     - ablock(1,4)*avec(4)
-     >                     - ablock(1,5)*avec(5)
-         bvec(2) = bvec(2) - ablock(2,1)*avec(1)
-     >                     - ablock(2,2)*avec(2)
-     >                     - ablock(2,3)*avec(3)
-     >                     - ablock(2,4)*avec(4)
-     >                     - ablock(2,5)*avec(5)
-         bvec(3) = bvec(3) - ablock(3,1)*avec(1)
-     >                     - ablock(3,2)*avec(2)
-     >                     - ablock(3,3)*avec(3)
-     >                     - ablock(3,4)*avec(4)
-     >                     - ablock(3,5)*avec(5)
-         bvec(4) = bvec(4) - ablock(4,1)*avec(1)
-     >                     - ablock(4,2)*avec(2)
-     >                     - ablock(4,3)*avec(3)
-     >                     - ablock(4,4)*avec(4)
-     >                     - ablock(4,5)*avec(5)
-         bvec(5) = bvec(5) - ablock(5,1)*avec(1)
-     >                     - ablock(5,2)*avec(2)
-     >                     - ablock(5,3)*avec(3)
-     >                     - ablock(5,4)*avec(4)
-     >                     - ablock(5,5)*avec(5)
-
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine matmul_sub(ablock, bblock, cblock)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     subtracts a(i,j,k) X b(i,j,k) from c(i,j,k)
-c---------------------------------------------------------------------
-
-      implicit none
-
-      double precision ablock, bblock, cblock
-      dimension ablock(5,5), bblock(5,5), cblock(5,5)
-
-
-         cblock(1,1) = cblock(1,1) - ablock(1,1)*bblock(1,1)
-     >                             - ablock(1,2)*bblock(2,1)
-     >                             - ablock(1,3)*bblock(3,1)
-     >                             - ablock(1,4)*bblock(4,1)
-     >                             - ablock(1,5)*bblock(5,1)
-         cblock(2,1) = cblock(2,1) - ablock(2,1)*bblock(1,1)
-     >                             - ablock(2,2)*bblock(2,1)
-     >                             - ablock(2,3)*bblock(3,1)
-     >                             - ablock(2,4)*bblock(4,1)
-     >                             - ablock(2,5)*bblock(5,1)
-         cblock(3,1) = cblock(3,1) - ablock(3,1)*bblock(1,1)
-     >                             - ablock(3,2)*bblock(2,1)
-     >                             - ablock(3,3)*bblock(3,1)
-     >                             - ablock(3,4)*bblock(4,1)
-     >                             - ablock(3,5)*bblock(5,1)
-         cblock(4,1) = cblock(4,1) - ablock(4,1)*bblock(1,1)
-     >                             - ablock(4,2)*bblock(2,1)
-     >                             - ablock(4,3)*bblock(3,1)
-     >                             - ablock(4,4)*bblock(4,1)
-     >                             - ablock(4,5)*bblock(5,1)
-         cblock(5,1) = cblock(5,1) - ablock(5,1)*bblock(1,1)
-     >                             - ablock(5,2)*bblock(2,1)
-     >                             - ablock(5,3)*bblock(3,1)
-     >                             - ablock(5,4)*bblock(4,1)
-     >                             - ablock(5,5)*bblock(5,1)
-         cblock(1,2) = cblock(1,2) - ablock(1,1)*bblock(1,2)
-     >                             - ablock(1,2)*bblock(2,2)
-     >                             - ablock(1,3)*bblock(3,2)
-     >                             - ablock(1,4)*bblock(4,2)
-     >                             - ablock(1,5)*bblock(5,2)
-         cblock(2,2) = cblock(2,2) - ablock(2,1)*bblock(1,2)
-     >                             - ablock(2,2)*bblock(2,2)
-     >                             - ablock(2,3)*bblock(3,2)
-     >                             - ablock(2,4)*bblock(4,2)
-     >                             - ablock(2,5)*bblock(5,2)
-         cblock(3,2) = cblock(3,2) - ablock(3,1)*bblock(1,2)
-     >                             - ablock(3,2)*bblock(2,2)
-     >                             - ablock(3,3)*bblock(3,2)
-     >                             - ablock(3,4)*bblock(4,2)
-     >                             - ablock(3,5)*bblock(5,2)
-         cblock(4,2) = cblock(4,2) - ablock(4,1)*bblock(1,2)
-     >                             - ablock(4,2)*bblock(2,2)
-     >                             - ablock(4,3)*bblock(3,2)
-     >                             - ablock(4,4)*bblock(4,2)
-     >                             - ablock(4,5)*bblock(5,2)
-         cblock(5,2) = cblock(5,2) - ablock(5,1)*bblock(1,2)
-     >                             - ablock(5,2)*bblock(2,2)
-     >                             - ablock(5,3)*bblock(3,2)
-     >                             - ablock(5,4)*bblock(4,2)
-     >                             - ablock(5,5)*bblock(5,2)
-         cblock(1,3) = cblock(1,3) - ablock(1,1)*bblock(1,3)
-     >                             - ablock(1,2)*bblock(2,3)
-     >                             - ablock(1,3)*bblock(3,3)
-     >                             - ablock(1,4)*bblock(4,3)
-     >                             - ablock(1,5)*bblock(5,3)
-         cblock(2,3) = cblock(2,3) - ablock(2,1)*bblock(1,3)
-     >                             - ablock(2,2)*bblock(2,3)
-     >                             - ablock(2,3)*bblock(3,3)
-     >                             - ablock(2,4)*bblock(4,3)
-     >                             - ablock(2,5)*bblock(5,3)
-         cblock(3,3) = cblock(3,3) - ablock(3,1)*bblock(1,3)
-     >                             - ablock(3,2)*bblock(2,3)
-     >                             - ablock(3,3)*bblock(3,3)
-     >                             - ablock(3,4)*bblock(4,3)
-     >                             - ablock(3,5)*bblock(5,3)
-         cblock(4,3) = cblock(4,3) - ablock(4,1)*bblock(1,3)
-     >                             - ablock(4,2)*bblock(2,3)
-     >                             - ablock(4,3)*bblock(3,3)
-     >                             - ablock(4,4)*bblock(4,3)
-     >                             - ablock(4,5)*bblock(5,3)
-         cblock(5,3) = cblock(5,3) - ablock(5,1)*bblock(1,3)
-     >                             - ablock(5,2)*bblock(2,3)
-     >                             - ablock(5,3)*bblock(3,3)
-     >                             - ablock(5,4)*bblock(4,3)
-     >                             - ablock(5,5)*bblock(5,3)
-         cblock(1,4) = cblock(1,4) - ablock(1,1)*bblock(1,4)
-     >                             - ablock(1,2)*bblock(2,4)
-     >                             - ablock(1,3)*bblock(3,4)
-     >                             - ablock(1,4)*bblock(4,4)
-     >                             - ablock(1,5)*bblock(5,4)
-         cblock(2,4) = cblock(2,4) - ablock(2,1)*bblock(1,4)
-     >                             - ablock(2,2)*bblock(2,4)
-     >                             - ablock(2,3)*bblock(3,4)
-     >                             - ablock(2,4)*bblock(4,4)
-     >                             - ablock(2,5)*bblock(5,4)
-         cblock(3,4) = cblock(3,4) - ablock(3,1)*bblock(1,4)
-     >                             - ablock(3,2)*bblock(2,4)
-     >                             - ablock(3,3)*bblock(3,4)
-     >                             - ablock(3,4)*bblock(4,4)
-     >                             - ablock(3,5)*bblock(5,4)
-         cblock(4,4) = cblock(4,4) - ablock(4,1)*bblock(1,4)
-     >                             - ablock(4,2)*bblock(2,4)
-     >                             - ablock(4,3)*bblock(3,4)
-     >                             - ablock(4,4)*bblock(4,4)
-     >                             - ablock(4,5)*bblock(5,4)
-         cblock(5,4) = cblock(5,4) - ablock(5,1)*bblock(1,4)
-     >                             - ablock(5,2)*bblock(2,4)
-     >                             - ablock(5,3)*bblock(3,4)
-     >                             - ablock(5,4)*bblock(4,4)
-     >                             - ablock(5,5)*bblock(5,4)
-         cblock(1,5) = cblock(1,5) - ablock(1,1)*bblock(1,5)
-     >                             - ablock(1,2)*bblock(2,5)
-     >                             - ablock(1,3)*bblock(3,5)
-     >                             - ablock(1,4)*bblock(4,5)
-     >                             - ablock(1,5)*bblock(5,5)
-         cblock(2,5) = cblock(2,5) - ablock(2,1)*bblock(1,5)
-     >                             - ablock(2,2)*bblock(2,5)
-     >                             - ablock(2,3)*bblock(3,5)
-     >                             - ablock(2,4)*bblock(4,5)
-     >                             - ablock(2,5)*bblock(5,5)
-         cblock(3,5) = cblock(3,5) - ablock(3,1)*bblock(1,5)
-     >                             - ablock(3,2)*bblock(2,5)
-     >                             - ablock(3,3)*bblock(3,5)
-     >                             - ablock(3,4)*bblock(4,5)
-     >                             - ablock(3,5)*bblock(5,5)
-         cblock(4,5) = cblock(4,5) - ablock(4,1)*bblock(1,5)
-     >                             - ablock(4,2)*bblock(2,5)
-     >                             - ablock(4,3)*bblock(3,5)
-     >                             - ablock(4,4)*bblock(4,5)
-     >                             - ablock(4,5)*bblock(5,5)
-         cblock(5,5) = cblock(5,5) - ablock(5,1)*bblock(1,5)
-     >                             - ablock(5,2)*bblock(2,5)
-     >                             - ablock(5,3)*bblock(3,5)
-     >                             - ablock(5,4)*bblock(4,5)
-     >                             - ablock(5,5)*bblock(5,5)
-
-              
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine binvcrhs( lhs,c,r )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     
-c---------------------------------------------------------------------
-
-      implicit none
-
-      double precision pivot, coeff, lhs
-      dimension lhs(5,5)
-      double precision c(5,5), r(5)
-
-c---------------------------------------------------------------------
-c     
-c---------------------------------------------------------------------
-
-      pivot = 1.00d0/lhs(1,1)
-      lhs(1,2) = lhs(1,2)*pivot
-      lhs(1,3) = lhs(1,3)*pivot
-      lhs(1,4) = lhs(1,4)*pivot
-      lhs(1,5) = lhs(1,5)*pivot
-      c(1,1) = c(1,1)*pivot
-      c(1,2) = c(1,2)*pivot
-      c(1,3) = c(1,3)*pivot
-      c(1,4) = c(1,4)*pivot
-      c(1,5) = c(1,5)*pivot
-      r(1)   = r(1)  *pivot
-
-      coeff = lhs(2,1)
-      lhs(2,2)= lhs(2,2) - coeff*lhs(1,2)
-      lhs(2,3)= lhs(2,3) - coeff*lhs(1,3)
-      lhs(2,4)= lhs(2,4) - coeff*lhs(1,4)
-      lhs(2,5)= lhs(2,5) - coeff*lhs(1,5)
-      c(2,1) = c(2,1) - coeff*c(1,1)
-      c(2,2) = c(2,2) - coeff*c(1,2)
-      c(2,3) = c(2,3) - coeff*c(1,3)
-      c(2,4) = c(2,4) - coeff*c(1,4)
-      c(2,5) = c(2,5) - coeff*c(1,5)
-      r(2)   = r(2)   - coeff*r(1)
-
-      coeff = lhs(3,1)
-      lhs(3,2)= lhs(3,2) - coeff*lhs(1,2)
-      lhs(3,3)= lhs(3,3) - coeff*lhs(1,3)
-      lhs(3,4)= lhs(3,4) - coeff*lhs(1,4)
-      lhs(3,5)= lhs(3,5) - coeff*lhs(1,5)
-      c(3,1) = c(3,1) - coeff*c(1,1)
-      c(3,2) = c(3,2) - coeff*c(1,2)
-      c(3,3) = c(3,3) - coeff*c(1,3)
-      c(3,4) = c(3,4) - coeff*c(1,4)
-      c(3,5) = c(3,5) - coeff*c(1,5)
-      r(3)   = r(3)   - coeff*r(1)
-
-      coeff = lhs(4,1)
-      lhs(4,2)= lhs(4,2) - coeff*lhs(1,2)
-      lhs(4,3)= lhs(4,3) - coeff*lhs(1,3)
-      lhs(4,4)= lhs(4,4) - coeff*lhs(1,4)
-      lhs(4,5)= lhs(4,5) - coeff*lhs(1,5)
-      c(4,1) = c(4,1) - coeff*c(1,1)
-      c(4,2) = c(4,2) - coeff*c(1,2)
-      c(4,3) = c(4,3) - coeff*c(1,3)
-      c(4,4) = c(4,4) - coeff*c(1,4)
-      c(4,5) = c(4,5) - coeff*c(1,5)
-      r(4)   = r(4)   - coeff*r(1)
-
-      coeff = lhs(5,1)
-      lhs(5,2)= lhs(5,2) - coeff*lhs(1,2)
-      lhs(5,3)= lhs(5,3) - coeff*lhs(1,3)
-      lhs(5,4)= lhs(5,4) - coeff*lhs(1,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(1,5)
-      c(5,1) = c(5,1) - coeff*c(1,1)
-      c(5,2) = c(5,2) - coeff*c(1,2)
-      c(5,3) = c(5,3) - coeff*c(1,3)
-      c(5,4) = c(5,4) - coeff*c(1,4)
-      c(5,5) = c(5,5) - coeff*c(1,5)
-      r(5)   = r(5)   - coeff*r(1)
-
-
-      pivot = 1.00d0/lhs(2,2)
-      lhs(2,3) = lhs(2,3)*pivot
-      lhs(2,4) = lhs(2,4)*pivot
-      lhs(2,5) = lhs(2,5)*pivot
-      c(2,1) = c(2,1)*pivot
-      c(2,2) = c(2,2)*pivot
-      c(2,3) = c(2,3)*pivot
-      c(2,4) = c(2,4)*pivot
-      c(2,5) = c(2,5)*pivot
-      r(2)   = r(2)  *pivot
-
-      coeff = lhs(1,2)
-      lhs(1,3)= lhs(1,3) - coeff*lhs(2,3)
-      lhs(1,4)= lhs(1,4) - coeff*lhs(2,4)
-      lhs(1,5)= lhs(1,5) - coeff*lhs(2,5)
-      c(1,1) = c(1,1) - coeff*c(2,1)
-      c(1,2) = c(1,2) - coeff*c(2,2)
-      c(1,3) = c(1,3) - coeff*c(2,3)
-      c(1,4) = c(1,4) - coeff*c(2,4)
-      c(1,5) = c(1,5) - coeff*c(2,5)
-      r(1)   = r(1)   - coeff*r(2)
-
-      coeff = lhs(3,2)
-      lhs(3,3)= lhs(3,3) - coeff*lhs(2,3)
-      lhs(3,4)= lhs(3,4) - coeff*lhs(2,4)
-      lhs(3,5)= lhs(3,5) - coeff*lhs(2,5)
-      c(3,1) = c(3,1) - coeff*c(2,1)
-      c(3,2) = c(3,2) - coeff*c(2,2)
-      c(3,3) = c(3,3) - coeff*c(2,3)
-      c(3,4) = c(3,4) - coeff*c(2,4)
-      c(3,5) = c(3,5) - coeff*c(2,5)
-      r(3)   = r(3)   - coeff*r(2)
-
-      coeff = lhs(4,2)
-      lhs(4,3)= lhs(4,3) - coeff*lhs(2,3)
-      lhs(4,4)= lhs(4,4) - coeff*lhs(2,4)
-      lhs(4,5)= lhs(4,5) - coeff*lhs(2,5)
-      c(4,1) = c(4,1) - coeff*c(2,1)
-      c(4,2) = c(4,2) - coeff*c(2,2)
-      c(4,3) = c(4,3) - coeff*c(2,3)
-      c(4,4) = c(4,4) - coeff*c(2,4)
-      c(4,5) = c(4,5) - coeff*c(2,5)
-      r(4)   = r(4)   - coeff*r(2)
-
-      coeff = lhs(5,2)
-      lhs(5,3)= lhs(5,3) - coeff*lhs(2,3)
-      lhs(5,4)= lhs(5,4) - coeff*lhs(2,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(2,5)
-      c(5,1) = c(5,1) - coeff*c(2,1)
-      c(5,2) = c(5,2) - coeff*c(2,2)
-      c(5,3) = c(5,3) - coeff*c(2,3)
-      c(5,4) = c(5,4) - coeff*c(2,4)
-      c(5,5) = c(5,5) - coeff*c(2,5)
-      r(5)   = r(5)   - coeff*r(2)
-
-
-      pivot = 1.00d0/lhs(3,3)
-      lhs(3,4) = lhs(3,4)*pivot
-      lhs(3,5) = lhs(3,5)*pivot
-      c(3,1) = c(3,1)*pivot
-      c(3,2) = c(3,2)*pivot
-      c(3,3) = c(3,3)*pivot
-      c(3,4) = c(3,4)*pivot
-      c(3,5) = c(3,5)*pivot
-      r(3)   = r(3)  *pivot
-
-      coeff = lhs(1,3)
-      lhs(1,4)= lhs(1,4) - coeff*lhs(3,4)
-      lhs(1,5)= lhs(1,5) - coeff*lhs(3,5)
-      c(1,1) = c(1,1) - coeff*c(3,1)
-      c(1,2) = c(1,2) - coeff*c(3,2)
-      c(1,3) = c(1,3) - coeff*c(3,3)
-      c(1,4) = c(1,4) - coeff*c(3,4)
-      c(1,5) = c(1,5) - coeff*c(3,5)
-      r(1)   = r(1)   - coeff*r(3)
-
-      coeff = lhs(2,3)
-      lhs(2,4)= lhs(2,4) - coeff*lhs(3,4)
-      lhs(2,5)= lhs(2,5) - coeff*lhs(3,5)
-      c(2,1) = c(2,1) - coeff*c(3,1)
-      c(2,2) = c(2,2) - coeff*c(3,2)
-      c(2,3) = c(2,3) - coeff*c(3,3)
-      c(2,4) = c(2,4) - coeff*c(3,4)
-      c(2,5) = c(2,5) - coeff*c(3,5)
-      r(2)   = r(2)   - coeff*r(3)
-
-      coeff = lhs(4,3)
-      lhs(4,4)= lhs(4,4) - coeff*lhs(3,4)
-      lhs(4,5)= lhs(4,5) - coeff*lhs(3,5)
-      c(4,1) = c(4,1) - coeff*c(3,1)
-      c(4,2) = c(4,2) - coeff*c(3,2)
-      c(4,3) = c(4,3) - coeff*c(3,3)
-      c(4,4) = c(4,4) - coeff*c(3,4)
-      c(4,5) = c(4,5) - coeff*c(3,5)
-      r(4)   = r(4)   - coeff*r(3)
-
-      coeff = lhs(5,3)
-      lhs(5,4)= lhs(5,4) - coeff*lhs(3,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(3,5)
-      c(5,1) = c(5,1) - coeff*c(3,1)
-      c(5,2) = c(5,2) - coeff*c(3,2)
-      c(5,3) = c(5,3) - coeff*c(3,3)
-      c(5,4) = c(5,4) - coeff*c(3,4)
-      c(5,5) = c(5,5) - coeff*c(3,5)
-      r(5)   = r(5)   - coeff*r(3)
-
-
-      pivot = 1.00d0/lhs(4,4)
-      lhs(4,5) = lhs(4,5)*pivot
-      c(4,1) = c(4,1)*pivot
-      c(4,2) = c(4,2)*pivot
-      c(4,3) = c(4,3)*pivot
-      c(4,4) = c(4,4)*pivot
-      c(4,5) = c(4,5)*pivot
-      r(4)   = r(4)  *pivot
-
-      coeff = lhs(1,4)
-      lhs(1,5)= lhs(1,5) - coeff*lhs(4,5)
-      c(1,1) = c(1,1) - coeff*c(4,1)
-      c(1,2) = c(1,2) - coeff*c(4,2)
-      c(1,3) = c(1,3) - coeff*c(4,3)
-      c(1,4) = c(1,4) - coeff*c(4,4)
-      c(1,5) = c(1,5) - coeff*c(4,5)
-      r(1)   = r(1)   - coeff*r(4)
-
-      coeff = lhs(2,4)
-      lhs(2,5)= lhs(2,5) - coeff*lhs(4,5)
-      c(2,1) = c(2,1) - coeff*c(4,1)
-      c(2,2) = c(2,2) - coeff*c(4,2)
-      c(2,3) = c(2,3) - coeff*c(4,3)
-      c(2,4) = c(2,4) - coeff*c(4,4)
-      c(2,5) = c(2,5) - coeff*c(4,5)
-      r(2)   = r(2)   - coeff*r(4)
-
-      coeff = lhs(3,4)
-      lhs(3,5)= lhs(3,5) - coeff*lhs(4,5)
-      c(3,1) = c(3,1) - coeff*c(4,1)
-      c(3,2) = c(3,2) - coeff*c(4,2)
-      c(3,3) = c(3,3) - coeff*c(4,3)
-      c(3,4) = c(3,4) - coeff*c(4,4)
-      c(3,5) = c(3,5) - coeff*c(4,5)
-      r(3)   = r(3)   - coeff*r(4)
-
-      coeff = lhs(5,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(4,5)
-      c(5,1) = c(5,1) - coeff*c(4,1)
-      c(5,2) = c(5,2) - coeff*c(4,2)
-      c(5,3) = c(5,3) - coeff*c(4,3)
-      c(5,4) = c(5,4) - coeff*c(4,4)
-      c(5,5) = c(5,5) - coeff*c(4,5)
-      r(5)   = r(5)   - coeff*r(4)
-
-
-      pivot = 1.00d0/lhs(5,5)
-      c(5,1) = c(5,1)*pivot
-      c(5,2) = c(5,2)*pivot
-      c(5,3) = c(5,3)*pivot
-      c(5,4) = c(5,4)*pivot
-      c(5,5) = c(5,5)*pivot
-      r(5)   = r(5)  *pivot
-
-      coeff = lhs(1,5)
-      c(1,1) = c(1,1) - coeff*c(5,1)
-      c(1,2) = c(1,2) - coeff*c(5,2)
-      c(1,3) = c(1,3) - coeff*c(5,3)
-      c(1,4) = c(1,4) - coeff*c(5,4)
-      c(1,5) = c(1,5) - coeff*c(5,5)
-      r(1)   = r(1)   - coeff*r(5)
-
-      coeff = lhs(2,5)
-      c(2,1) = c(2,1) - coeff*c(5,1)
-      c(2,2) = c(2,2) - coeff*c(5,2)
-      c(2,3) = c(2,3) - coeff*c(5,3)
-      c(2,4) = c(2,4) - coeff*c(5,4)
-      c(2,5) = c(2,5) - coeff*c(5,5)
-      r(2)   = r(2)   - coeff*r(5)
-
-      coeff = lhs(3,5)
-      c(3,1) = c(3,1) - coeff*c(5,1)
-      c(3,2) = c(3,2) - coeff*c(5,2)
-      c(3,3) = c(3,3) - coeff*c(5,3)
-      c(3,4) = c(3,4) - coeff*c(5,4)
-      c(3,5) = c(3,5) - coeff*c(5,5)
-      r(3)   = r(3)   - coeff*r(5)
-
-      coeff = lhs(4,5)
-      c(4,1) = c(4,1) - coeff*c(5,1)
-      c(4,2) = c(4,2) - coeff*c(5,2)
-      c(4,3) = c(4,3) - coeff*c(5,3)
-      c(4,4) = c(4,4) - coeff*c(5,4)
-      c(4,5) = c(4,5) - coeff*c(5,5)
-      r(4)   = r(4)   - coeff*r(5)
-
-
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine binvrhs( lhs,r )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     
-c---------------------------------------------------------------------
-
-      implicit none
-
-      double precision pivot, coeff, lhs
-      dimension lhs(5,5)
-      double precision r(5)
-
-c---------------------------------------------------------------------
-c     
-c---------------------------------------------------------------------
-
-
-      pivot = 1.00d0/lhs(1,1)
-      lhs(1,2) = lhs(1,2)*pivot
-      lhs(1,3) = lhs(1,3)*pivot
-      lhs(1,4) = lhs(1,4)*pivot
-      lhs(1,5) = lhs(1,5)*pivot
-      r(1)   = r(1)  *pivot
-
-      coeff = lhs(2,1)
-      lhs(2,2)= lhs(2,2) - coeff*lhs(1,2)
-      lhs(2,3)= lhs(2,3) - coeff*lhs(1,3)
-      lhs(2,4)= lhs(2,4) - coeff*lhs(1,4)
-      lhs(2,5)= lhs(2,5) - coeff*lhs(1,5)
-      r(2)   = r(2)   - coeff*r(1)
-
-      coeff = lhs(3,1)
-      lhs(3,2)= lhs(3,2) - coeff*lhs(1,2)
-      lhs(3,3)= lhs(3,3) - coeff*lhs(1,3)
-      lhs(3,4)= lhs(3,4) - coeff*lhs(1,4)
-      lhs(3,5)= lhs(3,5) - coeff*lhs(1,5)
-      r(3)   = r(3)   - coeff*r(1)
-
-      coeff = lhs(4,1)
-      lhs(4,2)= lhs(4,2) - coeff*lhs(1,2)
-      lhs(4,3)= lhs(4,3) - coeff*lhs(1,3)
-      lhs(4,4)= lhs(4,4) - coeff*lhs(1,4)
-      lhs(4,5)= lhs(4,5) - coeff*lhs(1,5)
-      r(4)   = r(4)   - coeff*r(1)
-
-      coeff = lhs(5,1)
-      lhs(5,2)= lhs(5,2) - coeff*lhs(1,2)
-      lhs(5,3)= lhs(5,3) - coeff*lhs(1,3)
-      lhs(5,4)= lhs(5,4) - coeff*lhs(1,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(1,5)
-      r(5)   = r(5)   - coeff*r(1)
-
-
-      pivot = 1.00d0/lhs(2,2)
-      lhs(2,3) = lhs(2,3)*pivot
-      lhs(2,4) = lhs(2,4)*pivot
-      lhs(2,5) = lhs(2,5)*pivot
-      r(2)   = r(2)  *pivot
-
-      coeff = lhs(1,2)
-      lhs(1,3)= lhs(1,3) - coeff*lhs(2,3)
-      lhs(1,4)= lhs(1,4) - coeff*lhs(2,4)
-      lhs(1,5)= lhs(1,5) - coeff*lhs(2,5)
-      r(1)   = r(1)   - coeff*r(2)
-
-      coeff = lhs(3,2)
-      lhs(3,3)= lhs(3,3) - coeff*lhs(2,3)
-      lhs(3,4)= lhs(3,4) - coeff*lhs(2,4)
-      lhs(3,5)= lhs(3,5) - coeff*lhs(2,5)
-      r(3)   = r(3)   - coeff*r(2)
-
-      coeff = lhs(4,2)
-      lhs(4,3)= lhs(4,3) - coeff*lhs(2,3)
-      lhs(4,4)= lhs(4,4) - coeff*lhs(2,4)
-      lhs(4,5)= lhs(4,5) - coeff*lhs(2,5)
-      r(4)   = r(4)   - coeff*r(2)
-
-      coeff = lhs(5,2)
-      lhs(5,3)= lhs(5,3) - coeff*lhs(2,3)
-      lhs(5,4)= lhs(5,4) - coeff*lhs(2,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(2,5)
-      r(5)   = r(5)   - coeff*r(2)
-
-
-      pivot = 1.00d0/lhs(3,3)
-      lhs(3,4) = lhs(3,4)*pivot
-      lhs(3,5) = lhs(3,5)*pivot
-      r(3)   = r(3)  *pivot
-
-      coeff = lhs(1,3)
-      lhs(1,4)= lhs(1,4) - coeff*lhs(3,4)
-      lhs(1,5)= lhs(1,5) - coeff*lhs(3,5)
-      r(1)   = r(1)   - coeff*r(3)
-
-      coeff = lhs(2,3)
-      lhs(2,4)= lhs(2,4) - coeff*lhs(3,4)
-      lhs(2,5)= lhs(2,5) - coeff*lhs(3,5)
-      r(2)   = r(2)   - coeff*r(3)
-
-      coeff = lhs(4,3)
-      lhs(4,4)= lhs(4,4) - coeff*lhs(3,4)
-      lhs(4,5)= lhs(4,5) - coeff*lhs(3,5)
-      r(4)   = r(4)   - coeff*r(3)
-
-      coeff = lhs(5,3)
-      lhs(5,4)= lhs(5,4) - coeff*lhs(3,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(3,5)
-      r(5)   = r(5)   - coeff*r(3)
-
-
-      pivot = 1.00d0/lhs(4,4)
-      lhs(4,5) = lhs(4,5)*pivot
-      r(4)   = r(4)  *pivot
-
-      coeff = lhs(1,4)
-      lhs(1,5)= lhs(1,5) - coeff*lhs(4,5)
-      r(1)   = r(1)   - coeff*r(4)
-
-      coeff = lhs(2,4)
-      lhs(2,5)= lhs(2,5) - coeff*lhs(4,5)
-      r(2)   = r(2)   - coeff*r(4)
-
-      coeff = lhs(3,4)
-      lhs(3,5)= lhs(3,5) - coeff*lhs(4,5)
-      r(3)   = r(3)   - coeff*r(4)
-
-      coeff = lhs(5,4)
-      lhs(5,5)= lhs(5,5) - coeff*lhs(4,5)
-      r(5)   = r(5)   - coeff*r(4)
-
-
-      pivot = 1.00d0/lhs(5,5)
-      r(5)   = r(5)  *pivot
-
-      coeff = lhs(1,5)
-      r(1)   = r(1)   - coeff*r(5)
-
-      coeff = lhs(2,5)
-      r(2)   = r(2)   - coeff*r(5)
-
-      coeff = lhs(3,5)
-      r(3)   = r(3)   - coeff*r(5)
-
-      coeff = lhs(4,5)
-      r(4)   = r(4)   - coeff*r(5)
-
-
-      return
-      end
-
-
-
diff --git a/examples/smpi/NAS/BT/verify.f b/examples/smpi/NAS/BT/verify.f
deleted file mode 100644 (file)
index 7dbc8a9..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-        subroutine verify(no_time_steps, class, verified)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c  verification routine                         
-c---------------------------------------------------------------------
-
-        include 'header.h'
-        include 'mpinpb.h'
-
-        double precision xcrref(5),xceref(5),xcrdif(5),xcedif(5), 
-     >                   epsilon, xce(5), xcr(5), dtref
-        integer m, no_time_steps
-        character class
-        logical verified
-
-c---------------------------------------------------------------------
-c   tolerance level
-c---------------------------------------------------------------------
-        epsilon = 1.0d-08
-        verified = .true.
-
-c---------------------------------------------------------------------
-c   compute the error norm and the residual norm, and exit if not printing
-c---------------------------------------------------------------------
-
-        if (iotype .ne. 0) then
-           call accumulate_norms(xce)
-        else
-           call error_norm(xce)
-        endif
-
-        call copy_faces
-
-        call rhs_norm(xcr)
-
-        do m = 1, 5
-           xcr(m) = xcr(m) / dt
-        enddo
-
-        if (node .ne. 0) return
-
-        class = 'U'
-
-        do m = 1,5
-           xcrref(m) = 1.0
-           xceref(m) = 1.0
-        end do
-
-c---------------------------------------------------------------------
-c    reference data for 12X12X12 grids after 60 time steps, with DT = 1.0d-02
-c---------------------------------------------------------------------
-        if ( (grid_points(1)  .eq. 12     ) .and. 
-     >       (grid_points(2)  .eq. 12     ) .and.
-     >       (grid_points(3)  .eq. 12     ) .and.
-     >       (no_time_steps   .eq. 60    ))  then
-
-           class = 'S'
-           dtref = 1.0d-2
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-         xcrref(1) = 1.7034283709541311d-01
-         xcrref(2) = 1.2975252070034097d-02
-         xcrref(3) = 3.2527926989486055d-02
-         xcrref(4) = 2.6436421275166801d-02
-         xcrref(5) = 1.9211784131744430d-01
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-
-         if (iotype .eq. 0) then
-           xceref(1) = 4.9976913345811579d-04
-           xceref(2) = 4.5195666782961927d-05
-           xceref(3) = 7.3973765172921357d-05
-           xceref(4) = 7.3821238632439731d-05
-           xceref(5) = 8.9269630987491446d-04
-         else
-           xceref(1) = 0.1149036328945d+02
-           xceref(2) = 0.9156788904727d+00
-           xceref(3) = 0.2857899428614d+01
-           xceref(4) = 0.2598273346734d+01
-           xceref(5) = 0.2652795397547d+02
-         endif
-
-c---------------------------------------------------------------------
-c    reference data for 24X24X24 grids after 200 time steps, with DT = 0.8d-3
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 24) .and. 
-     >           (grid_points(2) .eq. 24) .and.
-     >           (grid_points(3) .eq. 24) .and.
-     >           (no_time_steps . eq. 200) ) then
-
-           class = 'W'
-           dtref = 0.8d-3
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 0.1125590409344d+03
-           xcrref(2) = 0.1180007595731d+02
-           xcrref(3) = 0.2710329767846d+02
-           xcrref(4) = 0.2469174937669d+02
-           xcrref(5) = 0.2638427874317d+03
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-
-         if (iotype .eq. 0) then
-           xceref(1) = 0.4419655736008d+01
-           xceref(2) = 0.4638531260002d+00
-           xceref(3) = 0.1011551749967d+01
-           xceref(4) = 0.9235878729944d+00
-           xceref(5) = 0.1018045837718d+02
-         else
-           xceref(1) = 0.6729594398612d+02
-           xceref(2) = 0.5264523081690d+01
-           xceref(3) = 0.1677107142637d+02
-           xceref(4) = 0.1508721463436d+02
-           xceref(5) = 0.1477018363393d+03
-         endif
-
-
-c---------------------------------------------------------------------
-c    reference data for 64X64X64 grids after 200 time steps, with DT = 0.8d-3
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 64) .and. 
-     >           (grid_points(2) .eq. 64) .and.
-     >           (grid_points(3) .eq. 64) .and.
-     >           (no_time_steps . eq. 200) ) then
-
-           class = 'A'
-           dtref = 0.8d-3
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-         xcrref(1) = 1.0806346714637264d+02
-         xcrref(2) = 1.1319730901220813d+01
-         xcrref(3) = 2.5974354511582465d+01
-         xcrref(4) = 2.3665622544678910d+01
-         xcrref(5) = 2.5278963211748344d+02
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-
-         if (iotype .eq. 0) then
-           xceref(1) = 4.2348416040525025d+00
-           xceref(2) = 4.4390282496995698d-01
-           xceref(3) = 9.6692480136345650d-01
-           xceref(4) = 8.8302063039765474d-01
-           xceref(5) = 9.7379901770829278d+00
-         else
-           xceref(1) = 0.6482218724961d+02
-           xceref(2) = 0.5066461714527d+01
-           xceref(3) = 0.1613931961359d+02
-           xceref(4) = 0.1452010201481d+02
-           xceref(5) = 0.1420099377681d+03
-         endif
-
-c---------------------------------------------------------------------
-c    reference data for 102X102X102 grids after 200 time steps,
-c    with DT = 3.0d-04
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 102) .and. 
-     >           (grid_points(2) .eq. 102) .and.
-     >           (grid_points(3) .eq. 102) .and.
-     >           (no_time_steps . eq. 200) ) then
-
-           class = 'B'
-           dtref = 3.0d-4
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-         xcrref(1) = 1.4233597229287254d+03
-         xcrref(2) = 9.9330522590150238d+01
-         xcrref(3) = 3.5646025644535285d+02
-         xcrref(4) = 3.2485447959084092d+02
-         xcrref(5) = 3.2707541254659363d+03
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-
-         if (iotype .eq. 0) then
-           xceref(1) = 5.2969847140936856d+01
-           xceref(2) = 4.4632896115670668d+00
-           xceref(3) = 1.3122573342210174d+01
-           xceref(4) = 1.2006925323559144d+01
-           xceref(5) = 1.2459576151035986d+02
-         else
-           xceref(1) = 0.1477545106464d+03
-           xceref(2) = 0.1108895555053d+02
-           xceref(3) = 0.3698065590331d+02
-           xceref(4) = 0.3310505581440d+02
-           xceref(5) = 0.3157928282563d+03
-         endif
-
-c---------------------------------------------------------------------
-c    reference data for 162X162X162 grids after 200 time steps,
-c    with DT = 1.0d-04
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 162) .and. 
-     >           (grid_points(2) .eq. 162) .and.
-     >           (grid_points(3) .eq. 162) .and.
-     >           (no_time_steps . eq. 200) ) then
-
-           class = 'C'
-           dtref = 1.0d-4
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-         xcrref(1) = 0.62398116551764615d+04
-         xcrref(2) = 0.50793239190423964d+03
-         xcrref(3) = 0.15423530093013596d+04
-         xcrref(4) = 0.13302387929291190d+04
-         xcrref(5) = 0.11604087428436455d+05
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-
-         if (iotype .eq. 0) then
-           xceref(1) = 0.16462008369091265d+03
-           xceref(2) = 0.11497107903824313d+02
-           xceref(3) = 0.41207446207461508d+02
-           xceref(4) = 0.37087651059694167d+02
-           xceref(5) = 0.36211053051841265d+03
-         else
-           xceref(1) = 0.2597156483475d+03
-           xceref(2) = 0.1985384289495d+02
-           xceref(3) = 0.6517950485788d+02
-           xceref(4) = 0.5757235541520d+02
-           xceref(5) = 0.5215668188726d+03
-         endif 
-
-
-c---------------------------------------------------------------------
-c    reference data for 408x408x408 grids after 250 time steps,
-c    with DT = 0.2d-04
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 408) .and. 
-     >           (grid_points(2) .eq. 408) .and.
-     >           (grid_points(3) .eq. 408) .and.
-     >           (no_time_steps . eq. 250) ) then
-
-           class = 'D'
-           dtref = 0.2d-4
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-         xcrref(1) = 0.2533188551738d+05
-         xcrref(2) = 0.2346393716980d+04
-         xcrref(3) = 0.6294554366904d+04
-         xcrref(4) = 0.5352565376030d+04
-         xcrref(5) = 0.3905864038618d+05
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-
-         if (iotype .eq. 0) then
-           xceref(1) = 0.3100009377557d+03
-           xceref(2) = 0.2424086324913d+02
-           xceref(3) = 0.7782212022645d+02
-           xceref(4) = 0.6835623860116d+02
-           xceref(5) = 0.6065737200368d+03
-         else
-           xceref(1) = 0.3813781566713d+03
-           xceref(2) = 0.3160872966198d+02
-           xceref(3) = 0.9593576357290d+02
-           xceref(4) = 0.8363391989815d+02
-           xceref(5) = 0.7063466087423d+03
-         endif
-
-
-c---------------------------------------------------------------------
-c    reference data for 1020x1020x1020 grids after 250 time steps,
-c    with DT = 0.4d-05
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 1020) .and. 
-     >           (grid_points(2) .eq. 1020) .and.
-     >           (grid_points(3) .eq. 1020) .and.
-     >           (no_time_steps . eq. 250) ) then
-
-           class = 'E'
-           dtref = 0.4d-5
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-         xcrref(1) = 0.9795372484517d+05
-         xcrref(2) = 0.9739814511521d+04
-         xcrref(3) = 0.2467606342965d+05
-         xcrref(4) = 0.2092419572860d+05
-         xcrref(5) = 0.1392138856939d+06
-
-c---------------------------------------------------------------------
-c  Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-
-         if (iotype .eq. 0) then
-           xceref(1) = 0.4327562208414d+03
-           xceref(2) = 0.3699051964887d+02
-           xceref(3) = 0.1089845040954d+03
-           xceref(4) = 0.9462517622043d+02
-           xceref(5) = 0.7765512765309d+03
-         else
-c  wr_interval = 5
-           xceref(1) = 0.4729898413058d+03
-           xceref(2) = 0.4145899331704d+02
-           xceref(3) = 0.1192850917138d+03
-           xceref(4) = 0.1032746026932d+03
-           xceref(5) = 0.8270322177634d+03
-c  wr_interval = 10
-c          xceref(1) = 0.4718135916251d+03
-c          xceref(2) = 0.4132620259096d+02
-c          xceref(3) = 0.1189831133503d+03
-c          xceref(4) = 0.1030212798803d+03
-c          xceref(5) = 0.8255924078458d+03
-        endif
-
-        else
-           verified = .false.
-        endif
-
-c---------------------------------------------------------------------
-c    verification test for residuals if gridsize is one of 
-c    the defined grid sizes above (class .ne. 'U')
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c    Compute the difference of solution values and the known reference 
-c    values.
-c---------------------------------------------------------------------
-        do m = 1, 5
-           
-           xcrdif(m) = dabs((xcr(m)-xcrref(m))/xcrref(m)) 
-           xcedif(m) = dabs((xce(m)-xceref(m))/xceref(m))
-           
-        enddo
-
-c---------------------------------------------------------------------
-c    Output the comparison of computed results to known cases.
-c---------------------------------------------------------------------
-
-        if (class .ne. 'U') then
-           write(*, 1990) class
- 1990      format(' Verification being performed for class ', a)
-           write (*,2000) epsilon
- 2000      format(' accuracy setting for epsilon = ', E20.13)
-           verified = (dabs(dt-dtref) .le. epsilon)
-           if (.not.verified) then  
-              verified = .false.
-              class = 'U'
-              write (*,1000) dtref
- 1000         format(' DT does not match the reference value of ', 
-     >                 E15.8)
-           endif
-        else 
-           write(*, 1995)
- 1995      format(' Unknown class')
-        endif
-
-
-        if (class .ne. 'U') then
-           write (*,2001) 
-        else
-           write (*, 2005)
-        endif
-
- 2001   format(' Comparison of RMS-norms of residual')
- 2005   format(' RMS-norms of residual')
-        do m = 1, 5
-           if (class .eq. 'U') then
-              write(*, 2015) m, xcr(m)
-           else if (xcrdif(m) .le. epsilon) then
-              write (*,2011) m,xcr(m),xcrref(m),xcrdif(m)
-           else 
-              verified = .false.
-              write (*,2010) m,xcr(m),xcrref(m),xcrdif(m)
-           endif
-        enddo
-
-        if (class .ne. 'U') then
-           write (*,2002)
-        else
-           write (*,2006)
-        endif
- 2002   format(' Comparison of RMS-norms of solution error')
- 2006   format(' RMS-norms of solution error')
-        
-        do m = 1, 5
-           if (class .eq. 'U') then
-              write(*, 2015) m, xce(m)
-           else if (xcedif(m) .le. epsilon) then
-              write (*,2011) m,xce(m),xceref(m),xcedif(m)
-           else
-              verified = .false.
-              write (*,2010) m,xce(m),xceref(m),xcedif(m)
-           endif
-        enddo
-        
- 2010   format(' FAILURE: ', i2, E20.13, E20.13, E20.13)
- 2011   format('          ', i2, E20.13, E20.13, E20.13)
- 2015   format('          ', i2, E20.13)
-        
-        if (class .eq. 'U') then
-           write(*, 2022)
-           write(*, 2023)
- 2022      format(' No reference values provided')
- 2023      format(' No verification performed')
-        else if (verified) then
-           write(*, 2020)
- 2020      format(' Verification Successful')
-        else
-           write(*, 2021)
- 2021      format(' Verification failed')
-        endif
-
-        return
-
-
-        end
diff --git a/examples/smpi/NAS/BT/work_lhs.h b/examples/smpi/NAS/BT/work_lhs.h
deleted file mode 100644 (file)
index d9bc9e4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-c
-c  work_lhs.h
-c
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      double precision fjac(5, 5, -2:MAX_CELL_DIM+1),
-     >                 njac(5, 5, -2:MAX_CELL_DIM+1),
-     >                 lhsa(5, 5, -1:MAX_CELL_DIM),
-     >                 lhsb(5, 5, -1:MAX_CELL_DIM),
-     >                 tmp1, tmp2, tmp3
-      common /work_lhs/ fjac, njac, lhsa, lhsb, tmp1, tmp2, tmp3
diff --git a/examples/smpi/NAS/BT/work_lhs_vec.h b/examples/smpi/NAS/BT/work_lhs_vec.h
deleted file mode 100644 (file)
index a97054f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-c
-c  work_lhs_vec.h
-c
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      double precision fjac(5, 5, -2:MAX_CELL_DIM+1, -2:MAX_CELL_DIM+1),
-     >                 njac(5, 5, -2:MAX_CELL_DIM+1, -2:MAX_CELL_DIM+1),
-     >                 lhsa(5, 5, -1:MAX_CELL_DIM,   -1:MAX_CELL_DIM),
-     >                 lhsb(5, 5, -1:MAX_CELL_DIM,   -1:MAX_CELL_DIM),
-     >                 tmp1, tmp2, tmp3
-      common /work_lhs/ fjac, njac, lhsa, lhsb, tmp1, tmp2, tmp3
diff --git a/examples/smpi/NAS/BT/x_solve.f b/examples/smpi/NAS/BT/x_solve.f
deleted file mode 100644 (file)
index 5386732..0000000
+++ /dev/null
@@ -1,761 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     
-c     Performs line solves in X direction by first factoring
-c     the block-tridiagonal matrix into an upper triangular matrix, 
-c     and then performing back substitution to solve for the unknow
-c     vectors of each line.  
-c     
-c     Make sure we treat elements zero to cell_size in the direction
-c     of the sweep.
-c     
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-      integer  c, istart, stage,
-     >     first, last, recv_id, error, r_status(MPI_STATUS_SIZE),
-     >     isize,jsize,ksize,send_id
-
-      istart = 0
-
-c---------------------------------------------------------------------
-c     in our terminology stage is the number of the cell in the x-direction
-c     i.e. stage = 1 means the start of the line stage=ncells means end
-c---------------------------------------------------------------------
-      do stage = 1,ncells
-         c = slice(1,stage)
-         isize = cell_size(1,c) - 1
-         jsize = cell_size(2,c) - 1
-         ksize = cell_size(3,c) - 1
-         
-c---------------------------------------------------------------------
-c     set last-cell flag
-c---------------------------------------------------------------------
-         if (stage .eq. ncells) then
-            last = 1
-         else
-            last = 0
-         endif
-
-         if (stage .eq. 1) then
-c---------------------------------------------------------------------
-c     This is the first cell, so solve without receiving data
-c---------------------------------------------------------------------
-            first = 1
-c            call lhsx(c)
-            call x_solve_cell(first,last,c)
-         else
-c---------------------------------------------------------------------
-c     Not the first cell of this line, so receive info from
-c     processor working on preceeding cell
-c---------------------------------------------------------------------
-            first = 0
-            call x_receive_solve_info(recv_id,c)
-c---------------------------------------------------------------------
-c     overlap computations and communications
-c---------------------------------------------------------------------
-c            call lhsx(c)
-c---------------------------------------------------------------------
-c     wait for completion
-c---------------------------------------------------------------------
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-c---------------------------------------------------------------------
-c     install C'(istart) and rhs'(istart) to be used in this cell
-c---------------------------------------------------------------------
-            call x_unpack_solve_info(c)
-            call x_solve_cell(first,last,c)
-         endif
-
-         if (last .eq. 0) call x_send_solve_info(send_id,c)
-      enddo
-
-c---------------------------------------------------------------------
-c     now perform backsubstitution in reverse direction
-c---------------------------------------------------------------------
-      do stage = ncells, 1, -1
-         c = slice(1,stage)
-         first = 0
-         last = 0
-         if (stage .eq. 1) first = 1
-         if (stage .eq. ncells) then
-            last = 1
-c---------------------------------------------------------------------
-c     last cell, so perform back substitute without waiting
-c---------------------------------------------------------------------
-            call x_backsubstitute(first, last,c)
-         else
-            call x_receive_backsub_info(recv_id,c)
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-            call x_unpack_backsub_info(c)
-            call x_backsubstitute(first,last,c)
-         endif
-         if (first .eq. 0) call x_send_backsub_info(send_id,c)
-      enddo
-
-
-      return
-      end
-      
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_unpack_solve_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack C'(-1) and rhs'(-1) for
-c     all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      integer j,k,m,n,ptr,c,istart 
-
-      istart = 0
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  lhsc(m,n,istart-1,j,k,c) = out_buffer(ptr+n)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               rhs(n,istart-1,j,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine x_send_solve_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send C'(iend) and rhs'(iend) for
-c     all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer j,k,m,n,isize,ptr,c,jp,kp
-      integer error,send_id,buffer_size 
-
-      isize = cell_size(1,c)-1
-      jp = cell_coord(2,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-
-c---------------------------------------------------------------------
-c     pack up buffer
-c---------------------------------------------------------------------
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  in_buffer(ptr+n) = lhsc(m,n,isize,j,k,c)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,isize,j,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     send buffer 
-c---------------------------------------------------------------------
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, successor(1),
-     >     WEST+jp+kp*NCELLS, comm_solve,
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_send_backsub_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send U(istart) for all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer j,k,n,ptr,c,istart,jp,kp
-      integer error,send_id,buffer_size
-
-c---------------------------------------------------------------------
-c     Send element 0 to previous processor
-c---------------------------------------------------------------------
-      istart = 0
-      jp = cell_coord(2,c)-1
-      kp = cell_coord(3,c)-1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,istart,j,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, predecessor(1), 
-     >     EAST+jp+kp*NCELLS, comm_solve, 
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_unpack_backsub_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack U(isize) for all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      integer j,k,n,ptr,c
-
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do n=1,BLOCK_SIZE
-               backsub_info(n,j,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_receive_backsub_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer error,recv_id,jp,kp,c,buffer_size
-      jp = cell_coord(2,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, successor(1), 
-     >     EAST+jp+kp*NCELLS, comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_receive_solve_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives 
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer jp,kp,recv_id,error,c,buffer_size
-      jp = cell_coord(2,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, predecessor(1), 
-     >     WEST+jp+kp*NCELLS,  comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine x_backsubstitute(first, last, c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     back solve: if last cell, then generate U(isize)=rhs(isize)
-c     else assume U(isize) is loaded in un pack backsub_info
-c     so just use it
-c     after call u(istart) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer first, last, c, i, j, k
-      integer m,n,isize,jsize,ksize,istart
-      
-      istart = 0
-      isize = cell_size(1,c)-1
-      jsize = cell_size(2,c)-end(2,c)-1      
-      ksize = cell_size(3,c)-end(3,c)-1
-      if (last .eq. 0) then
-         do k=start(3,c),ksize
-            do j=start(2,c),jsize
-c---------------------------------------------------------------------
-c     U(isize) uses info from previous cell if not last cell
-c---------------------------------------------------------------------
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,isize,j,k,c) = rhs(m,isize,j,k,c) 
-     >                    - lhsc(m,n,isize,j,k,c)*
-     >                    backsub_info(n,j,k,c)
-c---------------------------------------------------------------------
-c     rhs(m,isize,j,k,c) = rhs(m,isize,j,k,c) 
-c     $                    - lhsc(m,n,isize,j,k,c)*rhs(n,isize+1,j,k,c)
-c---------------------------------------------------------------------
-                  enddo
-               enddo
-            enddo
-         enddo
-      endif
-      do k=start(3,c),ksize
-         do j=start(2,c),jsize
-            do i=isize-1,istart,-1
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) 
-     >                    - lhsc(m,n,i,j,k,c)*rhs(n,i+1,j,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_solve_cell(first,last,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     performs guaussian elimination on this cell.
-c     
-c     assumes that unpacking routines for non-first cells 
-c     preload C' and rhs' from previous cell.
-c     
-c     assumed send happens outside this routine, but that
-c     c'(IMAX) and rhs'(IMAX) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'work_lhs.h'
-
-      integer first,last,c
-      integer i,j,k,isize,ksize,jsize,istart
-
-      istart = 0
-      isize = cell_size(1,c)-1
-      jsize = cell_size(2,c)-end(2,c)-1
-      ksize = cell_size(3,c)-end(3,c)-1
-
-      call lhsabinit(lhsa, lhsb, isize)
-
-      do k=start(3,c),ksize 
-         do j=start(2,c),jsize
-
-c---------------------------------------------------------------------
-c     This function computes the left hand side in the xi-direction
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     determine a (labeled f) and n jacobians for cell c
-c---------------------------------------------------------------------
-            do i = start(1,c)-1, cell_size(1,c) - end(1,c)
-
-               tmp1 = rho_i(i,j,k,c)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-c---------------------------------------------------------------------
-c     
-c---------------------------------------------------------------------
-               fjac(1,1,i) = 0.0d+00
-               fjac(1,2,i) = 1.0d+00
-               fjac(1,3,i) = 0.0d+00
-               fjac(1,4,i) = 0.0d+00
-               fjac(1,5,i) = 0.0d+00
-
-               fjac(2,1,i) = -(u(2,i,j,k,c) * tmp2 * 
-     >              u(2,i,j,k,c))
-     >              + c2 * qs(i,j,k,c)
-               fjac(2,2,i) = ( 2.0d+00 - c2 )
-     >              * ( u(2,i,j,k,c) * tmp1 )
-               fjac(2,3,i) = - c2 * ( u(3,i,j,k,c) * tmp1 )
-               fjac(2,4,i) = - c2 * ( u(4,i,j,k,c) * tmp1 )
-               fjac(2,5,i) = c2
-
-               fjac(3,1,i) = - ( u(2,i,j,k,c)*u(3,i,j,k,c) ) * tmp2
-               fjac(3,2,i) = u(3,i,j,k,c) * tmp1
-               fjac(3,3,i) = u(2,i,j,k,c) * tmp1
-               fjac(3,4,i) = 0.0d+00
-               fjac(3,5,i) = 0.0d+00
-
-               fjac(4,1,i) = - ( u(2,i,j,k,c)*u(4,i,j,k,c) ) * tmp2
-               fjac(4,2,i) = u(4,i,j,k,c) * tmp1
-               fjac(4,3,i) = 0.0d+00
-               fjac(4,4,i) = u(2,i,j,k,c) * tmp1
-               fjac(4,5,i) = 0.0d+00
-
-               fjac(5,1,i) = ( c2 * 2.0d0 * qs(i,j,k,c)
-     >              - c1 * ( u(5,i,j,k,c) * tmp1 ) )
-     >              * ( u(2,i,j,k,c) * tmp1 )
-               fjac(5,2,i) = c1 *  u(5,i,j,k,c) * tmp1 
-     >              - c2
-     >              * ( u(2,i,j,k,c)*u(2,i,j,k,c) * tmp2
-     >              + qs(i,j,k,c) )
-               fjac(5,3,i) = - c2 * ( u(3,i,j,k,c)*u(2,i,j,k,c) )
-     >              * tmp2
-               fjac(5,4,i) = - c2 * ( u(4,i,j,k,c)*u(2,i,j,k,c) )
-     >              * tmp2
-               fjac(5,5,i) = c1 * ( u(2,i,j,k,c) * tmp1 )
-
-               njac(1,1,i) = 0.0d+00
-               njac(1,2,i) = 0.0d+00
-               njac(1,3,i) = 0.0d+00
-               njac(1,4,i) = 0.0d+00
-               njac(1,5,i) = 0.0d+00
-
-               njac(2,1,i) = - con43 * c3c4 * tmp2 * u(2,i,j,k,c)
-               njac(2,2,i) =   con43 * c3c4 * tmp1
-               njac(2,3,i) =   0.0d+00
-               njac(2,4,i) =   0.0d+00
-               njac(2,5,i) =   0.0d+00
-
-               njac(3,1,i) = - c3c4 * tmp2 * u(3,i,j,k,c)
-               njac(3,2,i) =   0.0d+00
-               njac(3,3,i) =   c3c4 * tmp1
-               njac(3,4,i) =   0.0d+00
-               njac(3,5,i) =   0.0d+00
-
-               njac(4,1,i) = - c3c4 * tmp2 * u(4,i,j,k,c)
-               njac(4,2,i) =   0.0d+00 
-               njac(4,3,i) =   0.0d+00
-               njac(4,4,i) =   c3c4 * tmp1
-               njac(4,5,i) =   0.0d+00
-
-               njac(5,1,i) = - ( con43 * c3c4
-     >              - c1345 ) * tmp3 * (u(2,i,j,k,c)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (u(3,i,j,k,c)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (u(4,i,j,k,c)**2)
-     >              - c1345 * tmp2 * u(5,i,j,k,c)
-
-               njac(5,2,i) = ( con43 * c3c4
-     >              - c1345 ) * tmp2 * u(2,i,j,k,c)
-               njac(5,3,i) = ( c3c4 - c1345 ) * tmp2 * u(3,i,j,k,c)
-               njac(5,4,i) = ( c3c4 - c1345 ) * tmp2 * u(4,i,j,k,c)
-               njac(5,5,i) = ( c1345 ) * tmp1
-
-            enddo
-c---------------------------------------------------------------------
-c     now jacobians set, so form left hand side in x direction
-c---------------------------------------------------------------------
-            do i = start(1,c), isize - end(1,c)
-
-               tmp1 = dt * tx1
-               tmp2 = dt * tx2
-
-               lhsa(1,1,i) = - tmp2 * fjac(1,1,i-1)
-     >              - tmp1 * njac(1,1,i-1)
-     >              - tmp1 * dx1 
-               lhsa(1,2,i) = - tmp2 * fjac(1,2,i-1)
-     >              - tmp1 * njac(1,2,i-1)
-               lhsa(1,3,i) = - tmp2 * fjac(1,3,i-1)
-     >              - tmp1 * njac(1,3,i-1)
-               lhsa(1,4,i) = - tmp2 * fjac(1,4,i-1)
-     >              - tmp1 * njac(1,4,i-1)
-               lhsa(1,5,i) = - tmp2 * fjac(1,5,i-1)
-     >              - tmp1 * njac(1,5,i-1)
-
-               lhsa(2,1,i) = - tmp2 * fjac(2,1,i-1)
-     >              - tmp1 * njac(2,1,i-1)
-               lhsa(2,2,i) = - tmp2 * fjac(2,2,i-1)
-     >              - tmp1 * njac(2,2,i-1)
-     >              - tmp1 * dx2
-               lhsa(2,3,i) = - tmp2 * fjac(2,3,i-1)
-     >              - tmp1 * njac(2,3,i-1)
-               lhsa(2,4,i) = - tmp2 * fjac(2,4,i-1)
-     >              - tmp1 * njac(2,4,i-1)
-               lhsa(2,5,i) = - tmp2 * fjac(2,5,i-1)
-     >              - tmp1 * njac(2,5,i-1)
-
-               lhsa(3,1,i) = - tmp2 * fjac(3,1,i-1)
-     >              - tmp1 * njac(3,1,i-1)
-               lhsa(3,2,i) = - tmp2 * fjac(3,2,i-1)
-     >              - tmp1 * njac(3,2,i-1)
-               lhsa(3,3,i) = - tmp2 * fjac(3,3,i-1)
-     >              - tmp1 * njac(3,3,i-1)
-     >              - tmp1 * dx3 
-               lhsa(3,4,i) = - tmp2 * fjac(3,4,i-1)
-     >              - tmp1 * njac(3,4,i-1)
-               lhsa(3,5,i) = - tmp2 * fjac(3,5,i-1)
-     >              - tmp1 * njac(3,5,i-1)
-
-               lhsa(4,1,i) = - tmp2 * fjac(4,1,i-1)
-     >              - tmp1 * njac(4,1,i-1)
-               lhsa(4,2,i) = - tmp2 * fjac(4,2,i-1)
-     >              - tmp1 * njac(4,2,i-1)
-               lhsa(4,3,i) = - tmp2 * fjac(4,3,i-1)
-     >              - tmp1 * njac(4,3,i-1)
-               lhsa(4,4,i) = - tmp2 * fjac(4,4,i-1)
-     >              - tmp1 * njac(4,4,i-1)
-     >              - tmp1 * dx4
-               lhsa(4,5,i) = - tmp2 * fjac(4,5,i-1)
-     >              - tmp1 * njac(4,5,i-1)
-
-               lhsa(5,1,i) = - tmp2 * fjac(5,1,i-1)
-     >              - tmp1 * njac(5,1,i-1)
-               lhsa(5,2,i) = - tmp2 * fjac(5,2,i-1)
-     >              - tmp1 * njac(5,2,i-1)
-               lhsa(5,3,i) = - tmp2 * fjac(5,3,i-1)
-     >              - tmp1 * njac(5,3,i-1)
-               lhsa(5,4,i) = - tmp2 * fjac(5,4,i-1)
-     >              - tmp1 * njac(5,4,i-1)
-               lhsa(5,5,i) = - tmp2 * fjac(5,5,i-1)
-     >              - tmp1 * njac(5,5,i-1)
-     >              - tmp1 * dx5
-
-               lhsb(1,1,i) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(1,1,i)
-     >              + tmp1 * 2.0d+00 * dx1
-               lhsb(1,2,i) = tmp1 * 2.0d+00 * njac(1,2,i)
-               lhsb(1,3,i) = tmp1 * 2.0d+00 * njac(1,3,i)
-               lhsb(1,4,i) = tmp1 * 2.0d+00 * njac(1,4,i)
-               lhsb(1,5,i) = tmp1 * 2.0d+00 * njac(1,5,i)
-
-               lhsb(2,1,i) = tmp1 * 2.0d+00 * njac(2,1,i)
-               lhsb(2,2,i) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(2,2,i)
-     >              + tmp1 * 2.0d+00 * dx2
-               lhsb(2,3,i) = tmp1 * 2.0d+00 * njac(2,3,i)
-               lhsb(2,4,i) = tmp1 * 2.0d+00 * njac(2,4,i)
-               lhsb(2,5,i) = tmp1 * 2.0d+00 * njac(2,5,i)
-
-               lhsb(3,1,i) = tmp1 * 2.0d+00 * njac(3,1,i)
-               lhsb(3,2,i) = tmp1 * 2.0d+00 * njac(3,2,i)
-               lhsb(3,3,i) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(3,3,i)
-     >              + tmp1 * 2.0d+00 * dx3
-               lhsb(3,4,i) = tmp1 * 2.0d+00 * njac(3,4,i)
-               lhsb(3,5,i) = tmp1 * 2.0d+00 * njac(3,5,i)
-
-               lhsb(4,1,i) = tmp1 * 2.0d+00 * njac(4,1,i)
-               lhsb(4,2,i) = tmp1 * 2.0d+00 * njac(4,2,i)
-               lhsb(4,3,i) = tmp1 * 2.0d+00 * njac(4,3,i)
-               lhsb(4,4,i) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(4,4,i)
-     >              + tmp1 * 2.0d+00 * dx4
-               lhsb(4,5,i) = tmp1 * 2.0d+00 * njac(4,5,i)
-
-               lhsb(5,1,i) = tmp1 * 2.0d+00 * njac(5,1,i)
-               lhsb(5,2,i) = tmp1 * 2.0d+00 * njac(5,2,i)
-               lhsb(5,3,i) = tmp1 * 2.0d+00 * njac(5,3,i)
-               lhsb(5,4,i) = tmp1 * 2.0d+00 * njac(5,4,i)
-               lhsb(5,5,i) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(5,5,i)
-     >              + tmp1 * 2.0d+00 * dx5
-
-               lhsc(1,1,i,j,k,c) =  tmp2 * fjac(1,1,i+1)
-     >              - tmp1 * njac(1,1,i+1)
-     >              - tmp1 * dx1
-               lhsc(1,2,i,j,k,c) =  tmp2 * fjac(1,2,i+1)
-     >              - tmp1 * njac(1,2,i+1)
-               lhsc(1,3,i,j,k,c) =  tmp2 * fjac(1,3,i+1)
-     >              - tmp1 * njac(1,3,i+1)
-               lhsc(1,4,i,j,k,c) =  tmp2 * fjac(1,4,i+1)
-     >              - tmp1 * njac(1,4,i+1)
-               lhsc(1,5,i,j,k,c) =  tmp2 * fjac(1,5,i+1)
-     >              - tmp1 * njac(1,5,i+1)
-
-               lhsc(2,1,i,j,k,c) =  tmp2 * fjac(2,1,i+1)
-     >              - tmp1 * njac(2,1,i+1)
-               lhsc(2,2,i,j,k,c) =  tmp2 * fjac(2,2,i+1)
-     >              - tmp1 * njac(2,2,i+1)
-     >              - tmp1 * dx2
-               lhsc(2,3,i,j,k,c) =  tmp2 * fjac(2,3,i+1)
-     >              - tmp1 * njac(2,3,i+1)
-               lhsc(2,4,i,j,k,c) =  tmp2 * fjac(2,4,i+1)
-     >              - tmp1 * njac(2,4,i+1)
-               lhsc(2,5,i,j,k,c) =  tmp2 * fjac(2,5,i+1)
-     >              - tmp1 * njac(2,5,i+1)
-
-               lhsc(3,1,i,j,k,c) =  tmp2 * fjac(3,1,i+1)
-     >              - tmp1 * njac(3,1,i+1)
-               lhsc(3,2,i,j,k,c) =  tmp2 * fjac(3,2,i+1)
-     >              - tmp1 * njac(3,2,i+1)
-               lhsc(3,3,i,j,k,c) =  tmp2 * fjac(3,3,i+1)
-     >              - tmp1 * njac(3,3,i+1)
-     >              - tmp1 * dx3
-               lhsc(3,4,i,j,k,c) =  tmp2 * fjac(3,4,i+1)
-     >              - tmp1 * njac(3,4,i+1)
-               lhsc(3,5,i,j,k,c) =  tmp2 * fjac(3,5,i+1)
-     >              - tmp1 * njac(3,5,i+1)
-
-               lhsc(4,1,i,j,k,c) =  tmp2 * fjac(4,1,i+1)
-     >              - tmp1 * njac(4,1,i+1)
-               lhsc(4,2,i,j,k,c) =  tmp2 * fjac(4,2,i+1)
-     >              - tmp1 * njac(4,2,i+1)
-               lhsc(4,3,i,j,k,c) =  tmp2 * fjac(4,3,i+1)
-     >              - tmp1 * njac(4,3,i+1)
-               lhsc(4,4,i,j,k,c) =  tmp2 * fjac(4,4,i+1)
-     >              - tmp1 * njac(4,4,i+1)
-     >              - tmp1 * dx4
-               lhsc(4,5,i,j,k,c) =  tmp2 * fjac(4,5,i+1)
-     >              - tmp1 * njac(4,5,i+1)
-
-               lhsc(5,1,i,j,k,c) =  tmp2 * fjac(5,1,i+1)
-     >              - tmp1 * njac(5,1,i+1)
-               lhsc(5,2,i,j,k,c) =  tmp2 * fjac(5,2,i+1)
-     >              - tmp1 * njac(5,2,i+1)
-               lhsc(5,3,i,j,k,c) =  tmp2 * fjac(5,3,i+1)
-     >              - tmp1 * njac(5,3,i+1)
-               lhsc(5,4,i,j,k,c) =  tmp2 * fjac(5,4,i+1)
-     >              - tmp1 * njac(5,4,i+1)
-               lhsc(5,5,i,j,k,c) =  tmp2 * fjac(5,5,i+1)
-     >              - tmp1 * njac(5,5,i+1)
-     >              - tmp1 * dx5
-
-            enddo
-
-
-c---------------------------------------------------------------------
-c     outer most do loops - sweeping in i direction
-c---------------------------------------------------------------------
-            if (first .eq. 1) then 
-
-c---------------------------------------------------------------------
-c     multiply c(istart,j,k) by b_inverse and copy back to c
-c     multiply rhs(istart) by b_inverse(istart) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,istart),
-     >                        lhsc(1,1,istart,j,k,c),
-     >                        rhs(1,istart,j,k,c) )
-
-            endif
-
-c---------------------------------------------------------------------
-c     begin inner most do loop
-c     do all the elements of the cell unless last 
-c---------------------------------------------------------------------
-            do i=istart+first,isize-last
-
-c---------------------------------------------------------------------
-c     rhs(i) = rhs(i) - A*rhs(i-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,i),
-     >                         rhs(1,i-1,j,k,c),rhs(1,i,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(i) = B(i) - C(i-1)*A(i)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,i),
-     >                         lhsc(1,1,i-1,j,k,c),
-     >                         lhsb(1,1,i))
-
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,k) by b_inverse and copy back to c
-c     multiply rhs(1,j,k) by b_inverse(1,j,k) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,i),
-     >                        lhsc(1,1,i,j,k,c),
-     >                        rhs(1,i,j,k,c) )
-
-            enddo
-
-c---------------------------------------------------------------------
-c     Now finish up special cases for last cell
-c---------------------------------------------------------------------
-            if (last .eq. 1) then
-
-c---------------------------------------------------------------------
-c     rhs(isize) = rhs(isize) - A*rhs(isize-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,isize),
-     >                         rhs(1,isize-1,j,k,c),rhs(1,isize,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(isize) = B(isize) - C(isize-1)*A(isize)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,isize),
-     >                         lhsc(1,1,isize-1,j,k,c),
-     >                         lhsb(1,1,isize))
-
-c---------------------------------------------------------------------
-c     multiply rhs() by b_inverse() and copy to rhs
-c---------------------------------------------------------------------
-               call binvrhs( lhsb(1,1,isize),
-     >                       rhs(1,isize,j,k,c) )
-
-            endif
-         enddo
-      enddo
-
-
-      return
-      end
-      
diff --git a/examples/smpi/NAS/BT/x_solve_vec.f b/examples/smpi/NAS/BT/x_solve_vec.f
deleted file mode 100644 (file)
index 8f1c137..0000000
+++ /dev/null
@@ -1,789 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     
-c     Performs line solves in X direction by first factoring
-c     the block-tridiagonal matrix into an upper triangular matrix, 
-c     and then performing back substitution to solve for the unknow
-c     vectors of each line.  
-c     
-c     Make sure we treat elements zero to cell_size in the direction
-c     of the sweep.
-c     
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-      integer  c, istart, stage,
-     >     first, last, recv_id, error, r_status(MPI_STATUS_SIZE),
-     >     isize,jsize,ksize,send_id
-
-      istart = 0
-
-c---------------------------------------------------------------------
-c     in our terminology stage is the number of the cell in the x-direct
-c     i.e. stage = 1 means the start of the line stage=ncells means end
-c---------------------------------------------------------------------
-      do stage = 1,ncells
-         c = slice(1,stage)
-         isize = cell_size(1,c) - 1
-         jsize = cell_size(2,c) - 1
-         ksize = cell_size(3,c) - 1
-         
-c---------------------------------------------------------------------
-c     set last-cell flag
-c---------------------------------------------------------------------
-         if (stage .eq. ncells) then
-            last = 1
-         else
-            last = 0
-         endif
-
-         if (stage .eq. 1) then
-c---------------------------------------------------------------------
-c     This is the first cell, so solve without receiving data
-c---------------------------------------------------------------------
-            first = 1
-c            call lhsx(c)
-            call x_solve_cell(first,last,c)
-         else
-c---------------------------------------------------------------------
-c     Not the first cell of this line, so receive info from
-c     processor working on preceeding cell
-c---------------------------------------------------------------------
-            first = 0
-            call x_receive_solve_info(recv_id,c)
-c---------------------------------------------------------------------
-c     overlap computations and communications
-c---------------------------------------------------------------------
-c            call lhsx(c)
-c---------------------------------------------------------------------
-c     wait for completion
-c---------------------------------------------------------------------
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-c---------------------------------------------------------------------
-c     install C'(istart) and rhs'(istart) to be used in this cell
-c---------------------------------------------------------------------
-            call x_unpack_solve_info(c)
-            call x_solve_cell(first,last,c)
-         endif
-
-         if (last .eq. 0) call x_send_solve_info(send_id,c)
-      enddo
-
-c---------------------------------------------------------------------
-c     now perform backsubstitution in reverse direction
-c---------------------------------------------------------------------
-      do stage = ncells, 1, -1
-         c = slice(1,stage)
-         first = 0
-         last = 0
-         if (stage .eq. 1) first = 1
-         if (stage .eq. ncells) then
-            last = 1
-c---------------------------------------------------------------------
-c     last cell, so perform back substitute without waiting
-c---------------------------------------------------------------------
-            call x_backsubstitute(first, last,c)
-         else
-            call x_receive_backsub_info(recv_id,c)
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-            call x_unpack_backsub_info(c)
-            call x_backsubstitute(first,last,c)
-         endif
-         if (first .eq. 0) call x_send_backsub_info(send_id,c)
-      enddo
-
-
-      return
-      end
-      
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_unpack_solve_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack C'(-1) and rhs'(-1) for
-c     all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      integer j,k,m,n,ptr,c,istart 
-
-      istart = 0
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  lhsc(m,n,istart-1,j,k,c) = out_buffer(ptr+n)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               rhs(n,istart-1,j,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine x_send_solve_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send C'(iend) and rhs'(iend) for
-c     all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer j,k,m,n,isize,ptr,c,jp,kp
-      integer error,send_id,buffer_size 
-
-      isize = cell_size(1,c)-1
-      jp = cell_coord(2,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-
-c---------------------------------------------------------------------
-c     pack up buffer
-c---------------------------------------------------------------------
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  in_buffer(ptr+n) = lhsc(m,n,isize,j,k,c)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,isize,j,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     send buffer 
-c---------------------------------------------------------------------
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, successor(1),
-     >     WEST+jp+kp*NCELLS, comm_solve,
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_send_backsub_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send U(istart) for all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer j,k,n,ptr,c,istart,jp,kp
-      integer error,send_id,buffer_size
-
-c---------------------------------------------------------------------
-c     Send element 0 to previous processor
-c---------------------------------------------------------------------
-      istart = 0
-      jp = cell_coord(2,c)-1
-      kp = cell_coord(3,c)-1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,istart,j,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, predecessor(1), 
-     >     EAST+jp+kp*NCELLS, comm_solve, 
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_unpack_backsub_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack U(isize) for all j and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      integer j,k,n,ptr,c
-
-      ptr = 0
-      do k=0,KMAX-1
-         do j=0,JMAX-1
-            do n=1,BLOCK_SIZE
-               backsub_info(n,j,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_receive_backsub_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer error,recv_id,jp,kp,c,buffer_size
-      jp = cell_coord(2,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, successor(1), 
-     >     EAST+jp+kp*NCELLS, comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_receive_solve_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives 
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer jp,kp,recv_id,error,c,buffer_size
-      jp = cell_coord(2,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, predecessor(1), 
-     >     WEST+jp+kp*NCELLS,  comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine x_backsubstitute(first, last, c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     back solve: if last cell, then generate U(isize)=rhs(isize)
-c     else assume U(isize) is loaded in un pack backsub_info
-c     so just use it
-c     after call u(istart) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer first, last, c, i, j, k
-      integer m,n,isize,jsize,ksize,istart
-      
-      istart = 0
-      isize = cell_size(1,c)-1
-      jsize = cell_size(2,c)-end(2,c)-1      
-      ksize = cell_size(3,c)-end(3,c)-1
-      if (last .eq. 0) then
-         do k=start(3,c),ksize
-            do j=start(2,c),jsize
-c---------------------------------------------------------------------
-c     U(isize) uses info from previous cell if not last cell
-c---------------------------------------------------------------------
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,isize,j,k,c) = rhs(m,isize,j,k,c) 
-     >                    - lhsc(m,n,isize,j,k,c)*
-     >                    backsub_info(n,j,k,c)
-c---------------------------------------------------------------------
-c     rhs(m,isize,j,k,c) = rhs(m,isize,j,k,c) 
-c     $                    - lhsc(m,n,isize,j,k,c)*rhs(n,isize+1,j,k,c)
-c---------------------------------------------------------------------
-                  enddo
-               enddo
-            enddo
-         enddo
-      endif
-      do k=start(3,c),ksize
-         do j=start(2,c),jsize
-            do i=isize-1,istart,-1
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) 
-     >                    - lhsc(m,n,i,j,k,c)*rhs(n,i+1,j,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine x_solve_cell(first,last,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     performs guaussian elimination on this cell.
-c     
-c     assumes that unpacking routines for non-first cells 
-c     preload C' and rhs' from previous cell.
-c     
-c     assumed send happens outside this routine, but that
-c     c'(IMAX) and rhs'(IMAX) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'work_lhs_vec.h'
-
-      integer first,last,c
-      integer i,j,k,m,n,isize,ksize,jsize,istart
-
-      istart = 0
-      isize = cell_size(1,c)-1
-      jsize = cell_size(2,c)-end(2,c)-1
-      ksize = cell_size(3,c)-end(3,c)-1
-
-c---------------------------------------------------------------------
-c     zero the left hand side for starters
-c     set diagonal values to 1. This is overkill, but convenient
-c---------------------------------------------------------------------
-      do j = 0, jsize
-         do m = 1, 5
-            do n = 1, 5
-               lhsa(m,n,0,j) = 0.0d0
-               lhsb(m,n,0,j) = 0.0d0
-               lhsa(m,n,isize,j) = 0.0d0
-               lhsb(m,n,isize,j) = 0.0d0
-            enddo
-            lhsb(m,m,0,j) = 1.0d0
-            lhsb(m,m,isize,j) = 1.0d0
-         enddo
-      enddo
-
-      do k=start(3,c),ksize 
-
-c---------------------------------------------------------------------
-c     This function computes the left hand side in the xi-direction
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     determine a (labeled f) and n jacobians for cell c
-c---------------------------------------------------------------------
-         do j=start(2,c),jsize
-            do i = start(1,c)-1, cell_size(1,c) - end(1,c)
-
-               tmp1 = rho_i(i,j,k,c)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-c---------------------------------------------------------------------
-c     
-c---------------------------------------------------------------------
-               fjac(1,1,i,j) = 0.0d+00
-               fjac(1,2,i,j) = 1.0d+00
-               fjac(1,3,i,j) = 0.0d+00
-               fjac(1,4,i,j) = 0.0d+00
-               fjac(1,5,i,j) = 0.0d+00
-
-               fjac(2,1,i,j) = -(u(2,i,j,k,c) * tmp2 * 
-     >              u(2,i,j,k,c))
-     >              + c2 * qs(i,j,k,c)
-               fjac(2,2,i,j) = ( 2.0d+00 - c2 )
-     >              * ( u(2,i,j,k,c) * tmp1 )
-               fjac(2,3,i,j) = - c2 * ( u(3,i,j,k,c) * tmp1 )
-               fjac(2,4,i,j) = - c2 * ( u(4,i,j,k,c) * tmp1 )
-               fjac(2,5,i,j) = c2
-
-               fjac(3,1,i,j) = - ( u(2,i,j,k,c)*u(3,i,j,k,c) ) * tmp2
-               fjac(3,2,i,j) = u(3,i,j,k,c) * tmp1
-               fjac(3,3,i,j) = u(2,i,j,k,c) * tmp1
-               fjac(3,4,i,j) = 0.0d+00
-               fjac(3,5,i,j) = 0.0d+00
-
-               fjac(4,1,i,j) = - ( u(2,i,j,k,c)*u(4,i,j,k,c) ) * tmp2
-               fjac(4,2,i,j) = u(4,i,j,k,c) * tmp1
-               fjac(4,3,i,j) = 0.0d+00
-               fjac(4,4,i,j) = u(2,i,j,k,c) * tmp1
-               fjac(4,5,i,j) = 0.0d+00
-
-               fjac(5,1,i,j) = ( c2 * 2.0d0 * qs(i,j,k,c)
-     >              - c1 * ( u(5,i,j,k,c) * tmp1 ) )
-     >              * ( u(2,i,j,k,c) * tmp1 )
-               fjac(5,2,i,j) = c1 *  u(5,i,j,k,c) * tmp1 
-     >              - c2
-     >              * ( u(2,i,j,k,c)*u(2,i,j,k,c) * tmp2
-     >              + qs(i,j,k,c) )
-               fjac(5,3,i,j) = - c2 * ( u(3,i,j,k,c)*u(2,i,j,k,c) )
-     >              * tmp2
-               fjac(5,4,i,j) = - c2 * ( u(4,i,j,k,c)*u(2,i,j,k,c) )
-     >              * tmp2
-               fjac(5,5,i,j) = c1 * ( u(2,i,j,k,c) * tmp1 )
-
-               njac(1,1,i,j) = 0.0d+00
-               njac(1,2,i,j) = 0.0d+00
-               njac(1,3,i,j) = 0.0d+00
-               njac(1,4,i,j) = 0.0d+00
-               njac(1,5,i,j) = 0.0d+00
-
-               njac(2,1,i,j) = - con43 * c3c4 * tmp2 * u(2,i,j,k,c)
-               njac(2,2,i,j) =   con43 * c3c4 * tmp1
-               njac(2,3,i,j) =   0.0d+00
-               njac(2,4,i,j) =   0.0d+00
-               njac(2,5,i,j) =   0.0d+00
-
-               njac(3,1,i,j) = - c3c4 * tmp2 * u(3,i,j,k,c)
-               njac(3,2,i,j) =   0.0d+00
-               njac(3,3,i,j) =   c3c4 * tmp1
-               njac(3,4,i,j) =   0.0d+00
-               njac(3,5,i,j) =   0.0d+00
-
-               njac(4,1,i,j) = - c3c4 * tmp2 * u(4,i,j,k,c)
-               njac(4,2,i,j) =   0.0d+00 
-               njac(4,3,i,j) =   0.0d+00
-               njac(4,4,i,j) =   c3c4 * tmp1
-               njac(4,5,i,j) =   0.0d+00
-
-               njac(5,1,i,j) = - ( con43 * c3c4
-     >              - c1345 ) * tmp3 * (u(2,i,j,k,c)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (u(3,i,j,k,c)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (u(4,i,j,k,c)**2)
-     >              - c1345 * tmp2 * u(5,i,j,k,c)
-
-               njac(5,2,i,j) = ( con43 * c3c4
-     >              - c1345 ) * tmp2 * u(2,i,j,k,c)
-               njac(5,3,i,j) = ( c3c4 - c1345 ) * tmp2 * u(3,i,j,k,c)
-               njac(5,4,i,j) = ( c3c4 - c1345 ) * tmp2 * u(4,i,j,k,c)
-               njac(5,5,i,j) = ( c1345 ) * tmp1
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     now jacobians set, so form left hand side in x direction
-c---------------------------------------------------------------------
-         do j=start(2,c),jsize
-            do i = start(1,c), isize - end(1,c)
-
-               tmp1 = dt * tx1
-               tmp2 = dt * tx2
-
-               lhsa(1,1,i,j) = - tmp2 * fjac(1,1,i-1,j)
-     >              - tmp1 * njac(1,1,i-1,j)
-     >              - tmp1 * dx1 
-               lhsa(1,2,i,j) = - tmp2 * fjac(1,2,i-1,j)
-     >              - tmp1 * njac(1,2,i-1,j)
-               lhsa(1,3,i,j) = - tmp2 * fjac(1,3,i-1,j)
-     >              - tmp1 * njac(1,3,i-1,j)
-               lhsa(1,4,i,j) = - tmp2 * fjac(1,4,i-1,j)
-     >              - tmp1 * njac(1,4,i-1,j)
-               lhsa(1,5,i,j) = - tmp2 * fjac(1,5,i-1,j)
-     >              - tmp1 * njac(1,5,i-1,j)
-
-               lhsa(2,1,i,j) = - tmp2 * fjac(2,1,i-1,j)
-     >              - tmp1 * njac(2,1,i-1,j)
-               lhsa(2,2,i,j) = - tmp2 * fjac(2,2,i-1,j)
-     >              - tmp1 * njac(2,2,i-1,j)
-     >              - tmp1 * dx2
-               lhsa(2,3,i,j) = - tmp2 * fjac(2,3,i-1,j)
-     >              - tmp1 * njac(2,3,i-1,j)
-               lhsa(2,4,i,j) = - tmp2 * fjac(2,4,i-1,j)
-     >              - tmp1 * njac(2,4,i-1,j)
-               lhsa(2,5,i,j) = - tmp2 * fjac(2,5,i-1,j)
-     >              - tmp1 * njac(2,5,i-1,j)
-
-               lhsa(3,1,i,j) = - tmp2 * fjac(3,1,i-1,j)
-     >              - tmp1 * njac(3,1,i-1,j)
-               lhsa(3,2,i,j) = - tmp2 * fjac(3,2,i-1,j)
-     >              - tmp1 * njac(3,2,i-1,j)
-               lhsa(3,3,i,j) = - tmp2 * fjac(3,3,i-1,j)
-     >              - tmp1 * njac(3,3,i-1,j)
-     >              - tmp1 * dx3 
-               lhsa(3,4,i,j) = - tmp2 * fjac(3,4,i-1,j)
-     >              - tmp1 * njac(3,4,i-1,j)
-               lhsa(3,5,i,j) = - tmp2 * fjac(3,5,i-1,j)
-     >              - tmp1 * njac(3,5,i-1,j)
-
-               lhsa(4,1,i,j) = - tmp2 * fjac(4,1,i-1,j)
-     >              - tmp1 * njac(4,1,i-1,j)
-               lhsa(4,2,i,j) = - tmp2 * fjac(4,2,i-1,j)
-     >              - tmp1 * njac(4,2,i-1,j)
-               lhsa(4,3,i,j) = - tmp2 * fjac(4,3,i-1,j)
-     >              - tmp1 * njac(4,3,i-1,j)
-               lhsa(4,4,i,j) = - tmp2 * fjac(4,4,i-1,j)
-     >              - tmp1 * njac(4,4,i-1,j)
-     >              - tmp1 * dx4
-               lhsa(4,5,i,j) = - tmp2 * fjac(4,5,i-1,j)
-     >              - tmp1 * njac(4,5,i-1,j)
-
-               lhsa(5,1,i,j) = - tmp2 * fjac(5,1,i-1,j)
-     >              - tmp1 * njac(5,1,i-1,j)
-               lhsa(5,2,i,j) = - tmp2 * fjac(5,2,i-1,j)
-     >              - tmp1 * njac(5,2,i-1,j)
-               lhsa(5,3,i,j) = - tmp2 * fjac(5,3,i-1,j)
-     >              - tmp1 * njac(5,3,i-1,j)
-               lhsa(5,4,i,j) = - tmp2 * fjac(5,4,i-1,j)
-     >              - tmp1 * njac(5,4,i-1,j)
-               lhsa(5,5,i,j) = - tmp2 * fjac(5,5,i-1,j)
-     >              - tmp1 * njac(5,5,i-1,j)
-     >              - tmp1 * dx5
-
-               lhsb(1,1,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(1,1,i,j)
-     >              + tmp1 * 2.0d+00 * dx1
-               lhsb(1,2,i,j) = tmp1 * 2.0d+00 * njac(1,2,i,j)
-               lhsb(1,3,i,j) = tmp1 * 2.0d+00 * njac(1,3,i,j)
-               lhsb(1,4,i,j) = tmp1 * 2.0d+00 * njac(1,4,i,j)
-               lhsb(1,5,i,j) = tmp1 * 2.0d+00 * njac(1,5,i,j)
-
-               lhsb(2,1,i,j) = tmp1 * 2.0d+00 * njac(2,1,i,j)
-               lhsb(2,2,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(2,2,i,j)
-     >              + tmp1 * 2.0d+00 * dx2
-               lhsb(2,3,i,j) = tmp1 * 2.0d+00 * njac(2,3,i,j)
-               lhsb(2,4,i,j) = tmp1 * 2.0d+00 * njac(2,4,i,j)
-               lhsb(2,5,i,j) = tmp1 * 2.0d+00 * njac(2,5,i,j)
-
-               lhsb(3,1,i,j) = tmp1 * 2.0d+00 * njac(3,1,i,j)
-               lhsb(3,2,i,j) = tmp1 * 2.0d+00 * njac(3,2,i,j)
-               lhsb(3,3,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(3,3,i,j)
-     >              + tmp1 * 2.0d+00 * dx3
-               lhsb(3,4,i,j) = tmp1 * 2.0d+00 * njac(3,4,i,j)
-               lhsb(3,5,i,j) = tmp1 * 2.0d+00 * njac(3,5,i,j)
-
-               lhsb(4,1,i,j) = tmp1 * 2.0d+00 * njac(4,1,i,j)
-               lhsb(4,2,i,j) = tmp1 * 2.0d+00 * njac(4,2,i,j)
-               lhsb(4,3,i,j) = tmp1 * 2.0d+00 * njac(4,3,i,j)
-               lhsb(4,4,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(4,4,i,j)
-     >              + tmp1 * 2.0d+00 * dx4
-               lhsb(4,5,i,j) = tmp1 * 2.0d+00 * njac(4,5,i,j)
-
-               lhsb(5,1,i,j) = tmp1 * 2.0d+00 * njac(5,1,i,j)
-               lhsb(5,2,i,j) = tmp1 * 2.0d+00 * njac(5,2,i,j)
-               lhsb(5,3,i,j) = tmp1 * 2.0d+00 * njac(5,3,i,j)
-               lhsb(5,4,i,j) = tmp1 * 2.0d+00 * njac(5,4,i,j)
-               lhsb(5,5,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(5,5,i,j)
-     >              + tmp1 * 2.0d+00 * dx5
-
-               lhsc(1,1,i,j,k,c) =  tmp2 * fjac(1,1,i+1,j)
-     >              - tmp1 * njac(1,1,i+1,j)
-     >              - tmp1 * dx1
-               lhsc(1,2,i,j,k,c) =  tmp2 * fjac(1,2,i+1,j)
-     >              - tmp1 * njac(1,2,i+1,j)
-               lhsc(1,3,i,j,k,c) =  tmp2 * fjac(1,3,i+1,j)
-     >              - tmp1 * njac(1,3,i+1,j)
-               lhsc(1,4,i,j,k,c) =  tmp2 * fjac(1,4,i+1,j)
-     >              - tmp1 * njac(1,4,i+1,j)
-               lhsc(1,5,i,j,k,c) =  tmp2 * fjac(1,5,i+1,j)
-     >              - tmp1 * njac(1,5,i+1,j)
-
-               lhsc(2,1,i,j,k,c) =  tmp2 * fjac(2,1,i+1,j)
-     >              - tmp1 * njac(2,1,i+1,j)
-               lhsc(2,2,i,j,k,c) =  tmp2 * fjac(2,2,i+1,j)
-     >              - tmp1 * njac(2,2,i+1,j)
-     >              - tmp1 * dx2
-               lhsc(2,3,i,j,k,c) =  tmp2 * fjac(2,3,i+1,j)
-     >              - tmp1 * njac(2,3,i+1,j)
-               lhsc(2,4,i,j,k,c) =  tmp2 * fjac(2,4,i+1,j)
-     >              - tmp1 * njac(2,4,i+1,j)
-               lhsc(2,5,i,j,k,c) =  tmp2 * fjac(2,5,i+1,j)
-     >              - tmp1 * njac(2,5,i+1,j)
-
-               lhsc(3,1,i,j,k,c) =  tmp2 * fjac(3,1,i+1,j)
-     >              - tmp1 * njac(3,1,i+1,j)
-               lhsc(3,2,i,j,k,c) =  tmp2 * fjac(3,2,i+1,j)
-     >              - tmp1 * njac(3,2,i+1,j)
-               lhsc(3,3,i,j,k,c) =  tmp2 * fjac(3,3,i+1,j)
-     >              - tmp1 * njac(3,3,i+1,j)
-     >              - tmp1 * dx3
-               lhsc(3,4,i,j,k,c) =  tmp2 * fjac(3,4,i+1,j)
-     >              - tmp1 * njac(3,4,i+1,j)
-               lhsc(3,5,i,j,k,c) =  tmp2 * fjac(3,5,i+1,j)
-     >              - tmp1 * njac(3,5,i+1,j)
-
-               lhsc(4,1,i,j,k,c) =  tmp2 * fjac(4,1,i+1,j)
-     >              - tmp1 * njac(4,1,i+1,j)
-               lhsc(4,2,i,j,k,c) =  tmp2 * fjac(4,2,i+1,j)
-     >              - tmp1 * njac(4,2,i+1,j)
-               lhsc(4,3,i,j,k,c) =  tmp2 * fjac(4,3,i+1,j)
-     >              - tmp1 * njac(4,3,i+1,j)
-               lhsc(4,4,i,j,k,c) =  tmp2 * fjac(4,4,i+1,j)
-     >              - tmp1 * njac(4,4,i+1,j)
-     >              - tmp1 * dx4
-               lhsc(4,5,i,j,k,c) =  tmp2 * fjac(4,5,i+1,j)
-     >              - tmp1 * njac(4,5,i+1,j)
-
-               lhsc(5,1,i,j,k,c) =  tmp2 * fjac(5,1,i+1,j)
-     >              - tmp1 * njac(5,1,i+1,j)
-               lhsc(5,2,i,j,k,c) =  tmp2 * fjac(5,2,i+1,j)
-     >              - tmp1 * njac(5,2,i+1,j)
-               lhsc(5,3,i,j,k,c) =  tmp2 * fjac(5,3,i+1,j)
-     >              - tmp1 * njac(5,3,i+1,j)
-               lhsc(5,4,i,j,k,c) =  tmp2 * fjac(5,4,i+1,j)
-     >              - tmp1 * njac(5,4,i+1,j)
-               lhsc(5,5,i,j,k,c) =  tmp2 * fjac(5,5,i+1,j)
-     >              - tmp1 * njac(5,5,i+1,j)
-     >              - tmp1 * dx5
-
-            enddo
-         enddo
-
-
-c---------------------------------------------------------------------
-c     outer most do loops - sweeping in i direction
-c---------------------------------------------------------------------
-         if (first .eq. 1) then 
-
-c---------------------------------------------------------------------
-c     multiply c(istart,j,k) by b_inverse and copy back to c
-c     multiply rhs(istart) by b_inverse(istart) and copy to rhs
-c---------------------------------------------------------------------
-!dir$ ivdep
-            do j=start(2,c),jsize
-               call binvcrhs( lhsb(1,1,istart,j),
-     >                        lhsc(1,1,istart,j,k,c),
-     >                        rhs(1,istart,j,k,c) )
-            enddo
-
-         endif
-
-c---------------------------------------------------------------------
-c     begin inner most do loop
-c     do all the elements of the cell unless last 
-c---------------------------------------------------------------------
-!dir$ ivdep
-!dir$ interchange(i,j)
-         do j=start(2,c),jsize
-            do i=istart+first,isize-last
-
-c---------------------------------------------------------------------
-c     rhs(i) = rhs(i) - A*rhs(i-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,i,j),
-     >                         rhs(1,i-1,j,k,c),rhs(1,i,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(i) = B(i) - C(i-1)*A(i)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,i,j),
-     >                         lhsc(1,1,i-1,j,k,c),
-     >                         lhsb(1,1,i,j))
-
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,k) by b_inverse and copy back to c
-c     multiply rhs(1,j,k) by b_inverse(1,j,k) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,i,j),
-     >                        lhsc(1,1,i,j,k,c),
-     >                        rhs(1,i,j,k,c) )
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     Now finish up special cases for last cell
-c---------------------------------------------------------------------
-         if (last .eq. 1) then
-
-!dir$ ivdep
-            do j=start(2,c),jsize
-c---------------------------------------------------------------------
-c     rhs(isize) = rhs(isize) - A*rhs(isize-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,isize,j),
-     >                         rhs(1,isize-1,j,k,c),rhs(1,isize,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(isize) = B(isize) - C(isize-1)*A(isize)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,isize,j),
-     >                         lhsc(1,1,isize-1,j,k,c),
-     >                         lhsb(1,1,isize,j))
-
-c---------------------------------------------------------------------
-c     multiply rhs() by b_inverse() and copy to rhs
-c---------------------------------------------------------------------
-               call binvrhs( lhsb(1,1,isize,j),
-     >                       rhs(1,isize,j,k,c) )
-            enddo
-
-         endif
-      enddo
-
-
-      return
-      end
-      
diff --git a/examples/smpi/NAS/BT/y_solve.f b/examples/smpi/NAS/BT/y_solve.f
deleted file mode 100644 (file)
index 33e2ebc..0000000
+++ /dev/null
@@ -1,771 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Performs line solves in Y direction by first factoring
-c     the block-tridiagonal matrix into an upper triangular matrix, 
-c     and then performing back substitution to solve for the unknow
-c     vectors of each line.  
-c     
-c     Make sure we treat elements zero to cell_size in the direction
-c     of the sweep.
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer 
-     >     c, jstart, stage,
-     >     first, last, recv_id, error, r_status(MPI_STATUS_SIZE),
-     >     isize,jsize,ksize,send_id
-
-      jstart = 0
-
-c---------------------------------------------------------------------
-c     in our terminology stage is the number of the cell in the y-direction
-c     i.e. stage = 1 means the start of the line stage=ncells means end
-c---------------------------------------------------------------------
-      do stage = 1,ncells
-         c = slice(2,stage)
-         isize = cell_size(1,c) - 1
-         jsize = cell_size(2,c) - 1
-         ksize = cell_size(3,c) - 1
-
-c---------------------------------------------------------------------
-c     set last-cell flag
-c---------------------------------------------------------------------
-         if (stage .eq. ncells) then
-            last = 1
-         else
-            last = 0
-         endif
-
-         if (stage .eq. 1) then
-c---------------------------------------------------------------------
-c     This is the first cell, so solve without receiving data
-c---------------------------------------------------------------------
-            first = 1
-c            call lhsy(c)
-            call y_solve_cell(first,last,c)
-         else
-c---------------------------------------------------------------------
-c     Not the first cell of this line, so receive info from
-c     processor working on preceeding cell
-c---------------------------------------------------------------------
-            first = 0
-            call y_receive_solve_info(recv_id,c)
-c---------------------------------------------------------------------
-c     overlap computations and communications
-c---------------------------------------------------------------------
-c            call lhsy(c)
-c---------------------------------------------------------------------
-c     wait for completion
-c---------------------------------------------------------------------
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-c---------------------------------------------------------------------
-c     install C'(jstart+1) and rhs'(jstart+1) to be used in this cell
-c---------------------------------------------------------------------
-            call y_unpack_solve_info(c)
-            call y_solve_cell(first,last,c)
-         endif
-
-         if (last .eq. 0) call y_send_solve_info(send_id,c)
-      enddo
-
-c---------------------------------------------------------------------
-c     now perform backsubstitution in reverse direction
-c---------------------------------------------------------------------
-      do stage = ncells, 1, -1
-         c = slice(2,stage)
-         first = 0
-         last = 0
-         if (stage .eq. 1) first = 1
-         if (stage .eq. ncells) then
-            last = 1
-c---------------------------------------------------------------------
-c     last cell, so perform back substitute without waiting
-c---------------------------------------------------------------------
-            call y_backsubstitute(first, last,c)
-         else
-            call y_receive_backsub_info(recv_id,c)
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-            call y_unpack_backsub_info(c)
-            call y_backsubstitute(first,last,c)
-         endif
-         if (first .eq. 0) call y_send_backsub_info(send_id,c)
-      enddo
-
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine y_unpack_solve_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack C'(-1) and rhs'(-1) for
-c     all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,k,m,n,ptr,c,jstart 
-
-      jstart = 0
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  lhsc(m,n,i,jstart-1,k,c) = out_buffer(ptr+n)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               rhs(n,i,jstart-1,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine y_send_solve_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send C'(jend) and rhs'(jend) for
-c     all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,k,m,n,jsize,ptr,c,ip,kp
-      integer error,send_id,buffer_size 
-
-      jsize = cell_size(2,c)-1
-      ip = cell_coord(1,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-
-c---------------------------------------------------------------------
-c     pack up buffer
-c---------------------------------------------------------------------
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  in_buffer(ptr+n) = lhsc(m,n,i,jsize,k,c)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,jsize,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     send buffer 
-c---------------------------------------------------------------------
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, successor(2),
-     >     SOUTH+ip+kp*NCELLS, comm_solve,
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_send_backsub_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send U(jstart) for all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,k,n,ptr,c,jstart,ip,kp
-      integer error,send_id,buffer_size
-
-c---------------------------------------------------------------------
-c     Send element 0 to previous processor
-c---------------------------------------------------------------------
-      jstart = 0
-      ip = cell_coord(1,c)-1
-      kp = cell_coord(3,c)-1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,jstart,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, predecessor(2), 
-     >     NORTH+ip+kp*NCELLS, comm_solve, 
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_unpack_backsub_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack U(jsize) for all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,k,n,ptr,c 
-
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               backsub_info(n,i,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_receive_backsub_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer error,recv_id,ip,kp,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, successor(2), 
-     >     NORTH+ip+kp*NCELLS, comm_solve, 
-     >     recv_id, error)
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_receive_solve_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives 
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ip,kp,recv_id,error,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-      call mpi_irecv(out_buffer, buffer_size, 
-     >     dp_type, predecessor(2), 
-     >     SOUTH+ip+kp*NCELLS,  comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_backsubstitute(first, last, c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     back solve: if last cell, then generate U(jsize)=rhs(jsize)
-c     else assume U(jsize) is loaded in un pack backsub_info
-c     so just use it
-c     after call u(jstart) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer first, last, c, i, k
-      integer m,n,j,jsize,isize,ksize,jstart
-      
-      jstart = 0
-      isize = cell_size(1,c)-end(1,c)-1      
-      jsize = cell_size(2,c)-1
-      ksize = cell_size(3,c)-end(3,c)-1
-      if (last .eq. 0) then
-         do k=start(3,c),ksize
-            do i=start(1,c),isize
-c---------------------------------------------------------------------
-c     U(jsize) uses info from previous cell if not last cell
-c---------------------------------------------------------------------
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,jsize,k,c) = rhs(m,i,jsize,k,c) 
-     >                    - lhsc(m,n,i,jsize,k,c)*
-     >                    backsub_info(n,i,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      endif
-      do k=start(3,c),ksize
-         do j=jsize-1,jstart,-1
-            do i=start(1,c),isize
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) 
-     >                    - lhsc(m,n,i,j,k,c)*rhs(n,i,j+1,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_solve_cell(first,last,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     performs guaussian elimination on this cell.
-c     
-c     assumes that unpacking routines for non-first cells 
-c     preload C' and rhs' from previous cell.
-c     
-c     assumed send happens outside this routine, but that
-c     c'(JMAX) and rhs'(JMAX) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'work_lhs.h'
-
-      integer first,last,c
-      integer i,j,k,isize,ksize,jsize,jstart
-      double precision utmp(6,-2:JMAX+1)
-
-      jstart = 0
-      isize = cell_size(1,c)-end(1,c)-1
-      jsize = cell_size(2,c)-1
-      ksize = cell_size(3,c)-end(3,c)-1
-
-      call lhsabinit(lhsa, lhsb, jsize)
-
-      do k=start(3,c),ksize 
-         do i=start(1,c),isize
-
-c---------------------------------------------------------------------
-c     This function computes the left hand side for the three y-factors   
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Compute the indices for storing the tri-diagonal matrix;
-c     determine a (labeled f) and n jacobians for cell c
-c---------------------------------------------------------------------
-            do j = start(2,c)-1, cell_size(2,c)-end(2,c)
-               utmp(1,j) = 1.0d0 / u(1,i,j,k,c)
-               utmp(2,j) = u(2,i,j,k,c)
-               utmp(3,j) = u(3,i,j,k,c)
-               utmp(4,j) = u(4,i,j,k,c)
-               utmp(5,j) = u(5,i,j,k,c)
-               utmp(6,j) = qs(i,j,k,c)
-            end do
-
-            do j = start(2,c)-1, cell_size(2,c)-end(2,c)
-
-               tmp1 = utmp(1,j)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               fjac(1,1,j) = 0.0d+00
-               fjac(1,2,j) = 0.0d+00
-               fjac(1,3,j) = 1.0d+00
-               fjac(1,4,j) = 0.0d+00
-               fjac(1,5,j) = 0.0d+00
-
-               fjac(2,1,j) = - ( utmp(2,j)*utmp(3,j) )
-     >              * tmp2
-               fjac(2,2,j) = utmp(3,j) * tmp1
-               fjac(2,3,j) = utmp(2,j) * tmp1
-               fjac(2,4,j) = 0.0d+00
-               fjac(2,5,j) = 0.0d+00
-
-               fjac(3,1,j) = - ( utmp(3,j)*utmp(3,j)*tmp2)
-     >              + c2 * utmp(6,j)
-               fjac(3,2,j) = - c2 *  utmp(2,j) * tmp1
-               fjac(3,3,j) = ( 2.0d+00 - c2 )
-     >              *  utmp(3,j) * tmp1 
-               fjac(3,4,j) = - c2 * utmp(4,j) * tmp1 
-               fjac(3,5,j) = c2
-
-               fjac(4,1,j) = - ( utmp(3,j)*utmp(4,j) )
-     >              * tmp2
-               fjac(4,2,j) = 0.0d+00
-               fjac(4,3,j) = utmp(4,j) * tmp1
-               fjac(4,4,j) = utmp(3,j) * tmp1
-               fjac(4,5,j) = 0.0d+00
-
-               fjac(5,1,j) = ( c2 * 2.0d0 * utmp(6,j)
-     >              - c1 * utmp(5,j) * tmp1 ) 
-     >              * utmp(3,j) * tmp1 
-               fjac(5,2,j) = - c2 * utmp(2,j)*utmp(3,j) 
-     >              * tmp2
-               fjac(5,3,j) = c1 * utmp(5,j) * tmp1 
-     >              - c2 * ( utmp(6,j)
-     >              + utmp(3,j)*utmp(3,j) * tmp2 )
-               fjac(5,4,j) = - c2 * ( utmp(3,j)*utmp(4,j) )
-     >              * tmp2
-               fjac(5,5,j) = c1 * utmp(3,j) * tmp1 
-
-               njac(1,1,j) = 0.0d+00
-               njac(1,2,j) = 0.0d+00
-               njac(1,3,j) = 0.0d+00
-               njac(1,4,j) = 0.0d+00
-               njac(1,5,j) = 0.0d+00
-
-               njac(2,1,j) = - c3c4 * tmp2 * utmp(2,j)
-               njac(2,2,j) =   c3c4 * tmp1
-               njac(2,3,j) =   0.0d+00
-               njac(2,4,j) =   0.0d+00
-               njac(2,5,j) =   0.0d+00
-
-               njac(3,1,j) = - con43 * c3c4 * tmp2 * utmp(3,j)
-               njac(3,2,j) =   0.0d+00
-               njac(3,3,j) =   con43 * c3c4 * tmp1
-               njac(3,4,j) =   0.0d+00
-               njac(3,5,j) =   0.0d+00
-
-               njac(4,1,j) = - c3c4 * tmp2 * utmp(4,j)
-               njac(4,2,j) =   0.0d+00
-               njac(4,3,j) =   0.0d+00
-               njac(4,4,j) =   c3c4 * tmp1
-               njac(4,5,j) =   0.0d+00
-
-               njac(5,1,j) = - (  c3c4
-     >              - c1345 ) * tmp3 * (utmp(2,j)**2)
-     >              - ( con43 * c3c4
-     >              - c1345 ) * tmp3 * (utmp(3,j)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (utmp(4,j)**2)
-     >              - c1345 * tmp2 * utmp(5,j)
-
-               njac(5,2,j) = (  c3c4 - c1345 ) * tmp2 * utmp(2,j)
-               njac(5,3,j) = ( con43 * c3c4
-     >              - c1345 ) * tmp2 * utmp(3,j)
-               njac(5,4,j) = ( c3c4 - c1345 ) * tmp2 * utmp(4,j)
-               njac(5,5,j) = ( c1345 ) * tmp1
-
-            enddo
-
-c---------------------------------------------------------------------
-c     now joacobians set, so form left hand side in y direction
-c---------------------------------------------------------------------
-            do j = start(2,c), jsize-end(2,c)
-
-               tmp1 = dt * ty1
-               tmp2 = dt * ty2
-
-               lhsa(1,1,j) = - tmp2 * fjac(1,1,j-1)
-     >              - tmp1 * njac(1,1,j-1)
-     >              - tmp1 * dy1 
-               lhsa(1,2,j) = - tmp2 * fjac(1,2,j-1)
-     >              - tmp1 * njac(1,2,j-1)
-               lhsa(1,3,j) = - tmp2 * fjac(1,3,j-1)
-     >              - tmp1 * njac(1,3,j-1)
-               lhsa(1,4,j) = - tmp2 * fjac(1,4,j-1)
-     >              - tmp1 * njac(1,4,j-1)
-               lhsa(1,5,j) = - tmp2 * fjac(1,5,j-1)
-     >              - tmp1 * njac(1,5,j-1)
-
-               lhsa(2,1,j) = - tmp2 * fjac(2,1,j-1)
-     >              - tmp1 * njac(2,1,j-1)
-               lhsa(2,2,j) = - tmp2 * fjac(2,2,j-1)
-     >              - tmp1 * njac(2,2,j-1)
-     >              - tmp1 * dy2
-               lhsa(2,3,j) = - tmp2 * fjac(2,3,j-1)
-     >              - tmp1 * njac(2,3,j-1)
-               lhsa(2,4,j) = - tmp2 * fjac(2,4,j-1)
-     >              - tmp1 * njac(2,4,j-1)
-               lhsa(2,5,j) = - tmp2 * fjac(2,5,j-1)
-     >              - tmp1 * njac(2,5,j-1)
-
-               lhsa(3,1,j) = - tmp2 * fjac(3,1,j-1)
-     >              - tmp1 * njac(3,1,j-1)
-               lhsa(3,2,j) = - tmp2 * fjac(3,2,j-1)
-     >              - tmp1 * njac(3,2,j-1)
-               lhsa(3,3,j) = - tmp2 * fjac(3,3,j-1)
-     >              - tmp1 * njac(3,3,j-1)
-     >              - tmp1 * dy3 
-               lhsa(3,4,j) = - tmp2 * fjac(3,4,j-1)
-     >              - tmp1 * njac(3,4,j-1)
-               lhsa(3,5,j) = - tmp2 * fjac(3,5,j-1)
-     >              - tmp1 * njac(3,5,j-1)
-
-               lhsa(4,1,j) = - tmp2 * fjac(4,1,j-1)
-     >              - tmp1 * njac(4,1,j-1)
-               lhsa(4,2,j) = - tmp2 * fjac(4,2,j-1)
-     >              - tmp1 * njac(4,2,j-1)
-               lhsa(4,3,j) = - tmp2 * fjac(4,3,j-1)
-     >              - tmp1 * njac(4,3,j-1)
-               lhsa(4,4,j) = - tmp2 * fjac(4,4,j-1)
-     >              - tmp1 * njac(4,4,j-1)
-     >              - tmp1 * dy4
-               lhsa(4,5,j) = - tmp2 * fjac(4,5,j-1)
-     >              - tmp1 * njac(4,5,j-1)
-
-               lhsa(5,1,j) = - tmp2 * fjac(5,1,j-1)
-     >              - tmp1 * njac(5,1,j-1)
-               lhsa(5,2,j) = - tmp2 * fjac(5,2,j-1)
-     >              - tmp1 * njac(5,2,j-1)
-               lhsa(5,3,j) = - tmp2 * fjac(5,3,j-1)
-     >              - tmp1 * njac(5,3,j-1)
-               lhsa(5,4,j) = - tmp2 * fjac(5,4,j-1)
-     >              - tmp1 * njac(5,4,j-1)
-               lhsa(5,5,j) = - tmp2 * fjac(5,5,j-1)
-     >              - tmp1 * njac(5,5,j-1)
-     >              - tmp1 * dy5
-
-               lhsb(1,1,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(1,1,j)
-     >              + tmp1 * 2.0d+00 * dy1
-               lhsb(1,2,j) = tmp1 * 2.0d+00 * njac(1,2,j)
-               lhsb(1,3,j) = tmp1 * 2.0d+00 * njac(1,3,j)
-               lhsb(1,4,j) = tmp1 * 2.0d+00 * njac(1,4,j)
-               lhsb(1,5,j) = tmp1 * 2.0d+00 * njac(1,5,j)
-
-               lhsb(2,1,j) = tmp1 * 2.0d+00 * njac(2,1,j)
-               lhsb(2,2,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(2,2,j)
-     >              + tmp1 * 2.0d+00 * dy2
-               lhsb(2,3,j) = tmp1 * 2.0d+00 * njac(2,3,j)
-               lhsb(2,4,j) = tmp1 * 2.0d+00 * njac(2,4,j)
-               lhsb(2,5,j) = tmp1 * 2.0d+00 * njac(2,5,j)
-
-               lhsb(3,1,j) = tmp1 * 2.0d+00 * njac(3,1,j)
-               lhsb(3,2,j) = tmp1 * 2.0d+00 * njac(3,2,j)
-               lhsb(3,3,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(3,3,j)
-     >              + tmp1 * 2.0d+00 * dy3
-               lhsb(3,4,j) = tmp1 * 2.0d+00 * njac(3,4,j)
-               lhsb(3,5,j) = tmp1 * 2.0d+00 * njac(3,5,j)
-
-               lhsb(4,1,j) = tmp1 * 2.0d+00 * njac(4,1,j)
-               lhsb(4,2,j) = tmp1 * 2.0d+00 * njac(4,2,j)
-               lhsb(4,3,j) = tmp1 * 2.0d+00 * njac(4,3,j)
-               lhsb(4,4,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(4,4,j)
-     >              + tmp1 * 2.0d+00 * dy4
-               lhsb(4,5,j) = tmp1 * 2.0d+00 * njac(4,5,j)
-
-               lhsb(5,1,j) = tmp1 * 2.0d+00 * njac(5,1,j)
-               lhsb(5,2,j) = tmp1 * 2.0d+00 * njac(5,2,j)
-               lhsb(5,3,j) = tmp1 * 2.0d+00 * njac(5,3,j)
-               lhsb(5,4,j) = tmp1 * 2.0d+00 * njac(5,4,j)
-               lhsb(5,5,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(5,5,j) 
-     >              + tmp1 * 2.0d+00 * dy5
-
-               lhsc(1,1,i,j,k,c) =  tmp2 * fjac(1,1,j+1)
-     >              - tmp1 * njac(1,1,j+1)
-     >              - tmp1 * dy1
-               lhsc(1,2,i,j,k,c) =  tmp2 * fjac(1,2,j+1)
-     >              - tmp1 * njac(1,2,j+1)
-               lhsc(1,3,i,j,k,c) =  tmp2 * fjac(1,3,j+1)
-     >              - tmp1 * njac(1,3,j+1)
-               lhsc(1,4,i,j,k,c) =  tmp2 * fjac(1,4,j+1)
-     >              - tmp1 * njac(1,4,j+1)
-               lhsc(1,5,i,j,k,c) =  tmp2 * fjac(1,5,j+1)
-     >              - tmp1 * njac(1,5,j+1)
-
-               lhsc(2,1,i,j,k,c) =  tmp2 * fjac(2,1,j+1)
-     >              - tmp1 * njac(2,1,j+1)
-               lhsc(2,2,i,j,k,c) =  tmp2 * fjac(2,2,j+1)
-     >              - tmp1 * njac(2,2,j+1)
-     >              - tmp1 * dy2
-               lhsc(2,3,i,j,k,c) =  tmp2 * fjac(2,3,j+1)
-     >              - tmp1 * njac(2,3,j+1)
-               lhsc(2,4,i,j,k,c) =  tmp2 * fjac(2,4,j+1)
-     >              - tmp1 * njac(2,4,j+1)
-               lhsc(2,5,i,j,k,c) =  tmp2 * fjac(2,5,j+1)
-     >              - tmp1 * njac(2,5,j+1)
-
-               lhsc(3,1,i,j,k,c) =  tmp2 * fjac(3,1,j+1)
-     >              - tmp1 * njac(3,1,j+1)
-               lhsc(3,2,i,j,k,c) =  tmp2 * fjac(3,2,j+1)
-     >              - tmp1 * njac(3,2,j+1)
-               lhsc(3,3,i,j,k,c) =  tmp2 * fjac(3,3,j+1)
-     >              - tmp1 * njac(3,3,j+1)
-     >              - tmp1 * dy3
-               lhsc(3,4,i,j,k,c) =  tmp2 * fjac(3,4,j+1)
-     >              - tmp1 * njac(3,4,j+1)
-               lhsc(3,5,i,j,k,c) =  tmp2 * fjac(3,5,j+1)
-     >              - tmp1 * njac(3,5,j+1)
-
-               lhsc(4,1,i,j,k,c) =  tmp2 * fjac(4,1,j+1)
-     >              - tmp1 * njac(4,1,j+1)
-               lhsc(4,2,i,j,k,c) =  tmp2 * fjac(4,2,j+1)
-     >              - tmp1 * njac(4,2,j+1)
-               lhsc(4,3,i,j,k,c) =  tmp2 * fjac(4,3,j+1)
-     >              - tmp1 * njac(4,3,j+1)
-               lhsc(4,4,i,j,k,c) =  tmp2 * fjac(4,4,j+1)
-     >              - tmp1 * njac(4,4,j+1)
-     >              - tmp1 * dy4
-               lhsc(4,5,i,j,k,c) =  tmp2 * fjac(4,5,j+1)
-     >              - tmp1 * njac(4,5,j+1)
-
-               lhsc(5,1,i,j,k,c) =  tmp2 * fjac(5,1,j+1)
-     >              - tmp1 * njac(5,1,j+1)
-               lhsc(5,2,i,j,k,c) =  tmp2 * fjac(5,2,j+1)
-     >              - tmp1 * njac(5,2,j+1)
-               lhsc(5,3,i,j,k,c) =  tmp2 * fjac(5,3,j+1)
-     >              - tmp1 * njac(5,3,j+1)
-               lhsc(5,4,i,j,k,c) =  tmp2 * fjac(5,4,j+1)
-     >              - tmp1 * njac(5,4,j+1)
-               lhsc(5,5,i,j,k,c) =  tmp2 * fjac(5,5,j+1)
-     >              - tmp1 * njac(5,5,j+1)
-     >              - tmp1 * dy5
-
-            enddo
-
-
-c---------------------------------------------------------------------
-c     outer most do loops - sweeping in i direction
-c---------------------------------------------------------------------
-            if (first .eq. 1) then 
-
-c---------------------------------------------------------------------
-c     multiply c(i,jstart,k) by b_inverse and copy back to c
-c     multiply rhs(jstart) by b_inverse(jstart) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,jstart),
-     >                        lhsc(1,1,i,jstart,k,c),
-     >                        rhs(1,i,jstart,k,c) )
-
-            endif
-
-c---------------------------------------------------------------------
-c     begin inner most do loop
-c     do all the elements of the cell unless last 
-c---------------------------------------------------------------------
-            do j=jstart+first,jsize-last
-
-c---------------------------------------------------------------------
-c     subtract A*lhs_vector(j-1) from lhs_vector(j)
-c     
-c     rhs(j) = rhs(j) - A*rhs(j-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,j),
-     >                         rhs(1,i,j-1,k,c),rhs(1,i,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(j) = B(j) - C(j-1)*A(j)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,j),
-     >                         lhsc(1,1,i,j-1,k,c),
-     >                         lhsb(1,1,j))
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,k) by b_inverse and copy back to c
-c     multiply rhs(i,1,k) by b_inverse(i,1,k) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,j),
-     >                        lhsc(1,1,i,j,k,c),
-     >                        rhs(1,i,j,k,c) )
-
-            enddo
-
-c---------------------------------------------------------------------
-c     Now finish up special cases for last cell
-c---------------------------------------------------------------------
-            if (last .eq. 1) then
-
-c---------------------------------------------------------------------
-c     rhs(jsize) = rhs(jsize) - A*rhs(jsize-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,jsize),
-     >                         rhs(1,i,jsize-1,k,c),rhs(1,i,jsize,k,c))
-
-c---------------------------------------------------------------------
-c     B(jsize) = B(jsize) - C(jsize-1)*A(jsize)
-c     call matmul_sub(aa,i,jsize,k,c,
-c     $              cc,i,jsize-1,k,c,bb,i,jsize,k,c)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,jsize),
-     >                         lhsc(1,1,i,jsize-1,k,c),
-     >                         lhsb(1,1,jsize))
-
-c---------------------------------------------------------------------
-c     multiply rhs(jsize) by b_inverse(jsize) and copy to rhs
-c---------------------------------------------------------------------
-               call binvrhs( lhsb(1,1,jsize),
-     >                       rhs(1,i,jsize,k,c) )
-
-            endif
-         enddo
-      enddo
-
-
-      return
-      end
-      
-
-
diff --git a/examples/smpi/NAS/BT/y_solve_vec.f b/examples/smpi/NAS/BT/y_solve_vec.f
deleted file mode 100644 (file)
index e21cfa3..0000000
+++ /dev/null
@@ -1,788 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Performs line solves in Y direction by first factoring
-c     the block-tridiagonal matrix into an upper triangular matrix, 
-c     and then performing back substitution to solve for the unknow
-c     vectors of each line.  
-c     
-c     Make sure we treat elements zero to cell_size in the direction
-c     of the sweep.
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer 
-     >     c, jstart, stage,
-     >     first, last, recv_id, error, r_status(MPI_STATUS_SIZE),
-     >     isize,jsize,ksize,send_id
-
-      jstart = 0
-
-c---------------------------------------------------------------------
-c     in our terminology stage is the number of the cell in the y-direct
-c     i.e. stage = 1 means the start of the line stage=ncells means end
-c---------------------------------------------------------------------
-      do stage = 1,ncells
-         c = slice(2,stage)
-         isize = cell_size(1,c) - 1
-         jsize = cell_size(2,c) - 1
-         ksize = cell_size(3,c) - 1
-
-c---------------------------------------------------------------------
-c     set last-cell flag
-c---------------------------------------------------------------------
-         if (stage .eq. ncells) then
-            last = 1
-         else
-            last = 0
-         endif
-
-         if (stage .eq. 1) then
-c---------------------------------------------------------------------
-c     This is the first cell, so solve without receiving data
-c---------------------------------------------------------------------
-            first = 1
-c            call lhsy(c)
-            call y_solve_cell(first,last,c)
-         else
-c---------------------------------------------------------------------
-c     Not the first cell of this line, so receive info from
-c     processor working on preceeding cell
-c---------------------------------------------------------------------
-            first = 0
-            call y_receive_solve_info(recv_id,c)
-c---------------------------------------------------------------------
-c     overlap computations and communications
-c---------------------------------------------------------------------
-c            call lhsy(c)
-c---------------------------------------------------------------------
-c     wait for completion
-c---------------------------------------------------------------------
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-c---------------------------------------------------------------------
-c     install C'(jstart+1) and rhs'(jstart+1) to be used in this cell
-c---------------------------------------------------------------------
-            call y_unpack_solve_info(c)
-            call y_solve_cell(first,last,c)
-         endif
-
-         if (last .eq. 0) call y_send_solve_info(send_id,c)
-      enddo
-
-c---------------------------------------------------------------------
-c     now perform backsubstitution in reverse direction
-c---------------------------------------------------------------------
-      do stage = ncells, 1, -1
-         c = slice(2,stage)
-         first = 0
-         last = 0
-         if (stage .eq. 1) first = 1
-         if (stage .eq. ncells) then
-            last = 1
-c---------------------------------------------------------------------
-c     last cell, so perform back substitute without waiting
-c---------------------------------------------------------------------
-            call y_backsubstitute(first, last,c)
-         else
-            call y_receive_backsub_info(recv_id,c)
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-            call y_unpack_backsub_info(c)
-            call y_backsubstitute(first,last,c)
-         endif
-         if (first .eq. 0) call y_send_backsub_info(send_id,c)
-      enddo
-
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine y_unpack_solve_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack C'(-1) and rhs'(-1) for
-c     all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,k,m,n,ptr,c,jstart 
-
-      jstart = 0
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  lhsc(m,n,i,jstart-1,k,c) = out_buffer(ptr+n)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               rhs(n,i,jstart-1,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine y_send_solve_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send C'(jend) and rhs'(jend) for
-c     all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,k,m,n,jsize,ptr,c,ip,kp
-      integer error,send_id,buffer_size 
-
-      jsize = cell_size(2,c)-1
-      ip = cell_coord(1,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-
-c---------------------------------------------------------------------
-c     pack up buffer
-c---------------------------------------------------------------------
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  in_buffer(ptr+n) = lhsc(m,n,i,jsize,k,c)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,jsize,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     send buffer 
-c---------------------------------------------------------------------
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, successor(2),
-     >     SOUTH+ip+kp*NCELLS, comm_solve,
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_send_backsub_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send U(jstart) for all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,k,n,ptr,c,jstart,ip,kp
-      integer error,send_id,buffer_size
-
-c---------------------------------------------------------------------
-c     Send element 0 to previous processor
-c---------------------------------------------------------------------
-      jstart = 0
-      ip = cell_coord(1,c)-1
-      kp = cell_coord(3,c)-1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,jstart,k,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, predecessor(2), 
-     >     NORTH+ip+kp*NCELLS, comm_solve, 
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_unpack_backsub_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack U(jsize) for all i and k
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,k,n,ptr,c 
-
-      ptr = 0
-      do k=0,KMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               backsub_info(n,i,k,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_receive_backsub_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer error,recv_id,ip,kp,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, successor(2), 
-     >     NORTH+ip+kp*NCELLS, comm_solve, 
-     >     recv_id, error)
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_receive_solve_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives 
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ip,kp,recv_id,error,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      kp = cell_coord(3,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-      call mpi_irecv(out_buffer, buffer_size, 
-     >     dp_type, predecessor(2), 
-     >     SOUTH+ip+kp*NCELLS,  comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_backsubstitute(first, last, c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     back solve: if last cell, then generate U(jsize)=rhs(jsize)
-c     else assume U(jsize) is loaded in un pack backsub_info
-c     so just use it
-c     after call u(jstart) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer first, last, c, i, k
-      integer m,n,j,jsize,isize,ksize,jstart
-      
-      jstart = 0
-      isize = cell_size(1,c)-end(1,c)-1      
-      jsize = cell_size(2,c)-1
-      ksize = cell_size(3,c)-end(3,c)-1
-      if (last .eq. 0) then
-         do k=start(3,c),ksize
-            do i=start(1,c),isize
-c---------------------------------------------------------------------
-c     U(jsize) uses info from previous cell if not last cell
-c---------------------------------------------------------------------
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,jsize,k,c) = rhs(m,i,jsize,k,c) 
-     >                    - lhsc(m,n,i,jsize,k,c)*
-     >                    backsub_info(n,i,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      endif
-      do k=start(3,c),ksize
-         do j=jsize-1,jstart,-1
-            do i=start(1,c),isize
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) 
-     >                    - lhsc(m,n,i,j,k,c)*rhs(n,i,j+1,k,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine y_solve_cell(first,last,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     performs guaussian elimination on this cell.
-c     
-c     assumes that unpacking routines for non-first cells 
-c     preload C' and rhs' from previous cell.
-c     
-c     assumed send happens outside this routine, but that
-c     c'(JMAX) and rhs'(JMAX) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'work_lhs_vec.h'
-
-      integer first,last,c
-      integer i,j,k,m,n,isize,ksize,jsize,jstart
-
-      jstart = 0
-      isize = cell_size(1,c)-end(1,c)-1
-      jsize = cell_size(2,c)-1
-      ksize = cell_size(3,c)-end(3,c)-1
-
-c---------------------------------------------------------------------
-c     zero the left hand side for starters
-c     set diagonal values to 1. This is overkill, but convenient
-c---------------------------------------------------------------------
-      do i = 0, isize
-         do m = 1, 5
-            do n = 1, 5
-               lhsa(m,n,i,0) = 0.0d0
-               lhsb(m,n,i,0) = 0.0d0
-               lhsa(m,n,i,jsize) = 0.0d0
-               lhsb(m,n,i,jsize) = 0.0d0
-            enddo
-            lhsb(m,m,i,0) = 1.0d0
-            lhsb(m,m,i,jsize) = 1.0d0
-         enddo
-      enddo
-
-      do k=start(3,c),ksize 
-
-c---------------------------------------------------------------------
-c     This function computes the left hand side for the three y-factors 
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Compute the indices for storing the tri-diagonal matrix;
-c     determine a (labeled f) and n jacobians for cell c
-c---------------------------------------------------------------------
-
-         do j = start(2,c)-1, cell_size(2,c)-end(2,c)
-            do i=start(1,c),isize
-
-               tmp1 = 1.0d0 / u(1,i,j,k,c)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               fjac(1,1,i,j) = 0.0d+00
-               fjac(1,2,i,j) = 0.0d+00
-               fjac(1,3,i,j) = 1.0d+00
-               fjac(1,4,i,j) = 0.0d+00
-               fjac(1,5,i,j) = 0.0d+00
-
-               fjac(2,1,i,j) = - ( u(2,i,j,k,c)*u(3,i,j,k,c) )
-     >              * tmp2
-               fjac(2,2,i,j) = u(3,i,j,k,c) * tmp1
-               fjac(2,3,i,j) = u(2,i,j,k,c) * tmp1
-               fjac(2,4,i,j) = 0.0d+00
-               fjac(2,5,i,j) = 0.0d+00
-
-               fjac(3,1,i,j) = - ( u(3,i,j,k,c)*u(3,i,j,k,c)*tmp2)
-     >              + c2 * qs(i,j,k,c)
-               fjac(3,2,i,j) = - c2 *  u(2,i,j,k,c) * tmp1
-               fjac(3,3,i,j) = ( 2.0d+00 - c2 )
-     >              *  u(3,i,j,k,c) * tmp1 
-               fjac(3,4,i,j) = - c2 * u(4,i,j,k,c) * tmp1 
-               fjac(3,5,i,j) = c2
-
-               fjac(4,1,i,j) = - ( u(3,i,j,k,c)*u(4,i,j,k,c) )
-     >              * tmp2
-               fjac(4,2,i,j) = 0.0d+00
-               fjac(4,3,i,j) = u(4,i,j,k,c) * tmp1
-               fjac(4,4,i,j) = u(3,i,j,k,c) * tmp1
-               fjac(4,5,i,j) = 0.0d+00
-
-               fjac(5,1,i,j) = ( c2 * 2.0d0 * qs(i,j,k,c)
-     >              - c1 * u(5,i,j,k,c) * tmp1 ) 
-     >              * u(3,i,j,k,c) * tmp1 
-               fjac(5,2,i,j) = - c2 * u(2,i,j,k,c)*u(3,i,j,k,c) 
-     >              * tmp2
-               fjac(5,3,i,j) = c1 * u(5,i,j,k,c) * tmp1 
-     >              - c2 * ( qs(i,j,k,c)
-     >              + u(3,i,j,k,c)*u(3,i,j,k,c) * tmp2 )
-               fjac(5,4,i,j) = - c2 * ( u(3,i,j,k,c)*u(4,i,j,k,c) )
-     >              * tmp2
-               fjac(5,5,i,j) = c1 * u(3,i,j,k,c) * tmp1 
-
-               njac(1,1,i,j) = 0.0d+00
-               njac(1,2,i,j) = 0.0d+00
-               njac(1,3,i,j) = 0.0d+00
-               njac(1,4,i,j) = 0.0d+00
-               njac(1,5,i,j) = 0.0d+00
-
-               njac(2,1,i,j) = - c3c4 * tmp2 * u(2,i,j,k,c)
-               njac(2,2,i,j) =   c3c4 * tmp1
-               njac(2,3,i,j) =   0.0d+00
-               njac(2,4,i,j) =   0.0d+00
-               njac(2,5,i,j) =   0.0d+00
-
-               njac(3,1,i,j) = - con43 * c3c4 * tmp2 * u(3,i,j,k,c)
-               njac(3,2,i,j) =   0.0d+00
-               njac(3,3,i,j) =   con43 * c3c4 * tmp1
-               njac(3,4,i,j) =   0.0d+00
-               njac(3,5,i,j) =   0.0d+00
-
-               njac(4,1,i,j) = - c3c4 * tmp2 * u(4,i,j,k,c)
-               njac(4,2,i,j) =   0.0d+00
-               njac(4,3,i,j) =   0.0d+00
-               njac(4,4,i,j) =   c3c4 * tmp1
-               njac(4,5,i,j) =   0.0d+00
-
-               njac(5,1,i,j) = - (  c3c4
-     >              - c1345 ) * tmp3 * (u(2,i,j,k,c)**2)
-     >              - ( con43 * c3c4
-     >              - c1345 ) * tmp3 * (u(3,i,j,k,c)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (u(4,i,j,k,c)**2)
-     >              - c1345 * tmp2 * u(5,i,j,k,c)
-
-               njac(5,2,i,j) = (  c3c4 - c1345 ) * tmp2 * u(2,i,j,k,c)
-               njac(5,3,i,j) = ( con43 * c3c4
-     >              - c1345 ) * tmp2 * u(3,i,j,k,c)
-               njac(5,4,i,j) = ( c3c4 - c1345 ) * tmp2 * u(4,i,j,k,c)
-               njac(5,5,i,j) = ( c1345 ) * tmp1
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     now joacobians set, so form left hand side in y direction
-c---------------------------------------------------------------------
-         do j = start(2,c), jsize-end(2,c)
-            do i=start(1,c),isize
-
-               tmp1 = dt * ty1
-               tmp2 = dt * ty2
-
-               lhsa(1,1,i,j) = - tmp2 * fjac(1,1,i,j-1)
-     >              - tmp1 * njac(1,1,i,j-1)
-     >              - tmp1 * dy1 
-               lhsa(1,2,i,j) = - tmp2 * fjac(1,2,i,j-1)
-     >              - tmp1 * njac(1,2,i,j-1)
-               lhsa(1,3,i,j) = - tmp2 * fjac(1,3,i,j-1)
-     >              - tmp1 * njac(1,3,i,j-1)
-               lhsa(1,4,i,j) = - tmp2 * fjac(1,4,i,j-1)
-     >              - tmp1 * njac(1,4,i,j-1)
-               lhsa(1,5,i,j) = - tmp2 * fjac(1,5,i,j-1)
-     >              - tmp1 * njac(1,5,i,j-1)
-
-               lhsa(2,1,i,j) = - tmp2 * fjac(2,1,i,j-1)
-     >              - tmp1 * njac(2,1,i,j-1)
-               lhsa(2,2,i,j) = - tmp2 * fjac(2,2,i,j-1)
-     >              - tmp1 * njac(2,2,i,j-1)
-     >              - tmp1 * dy2
-               lhsa(2,3,i,j) = - tmp2 * fjac(2,3,i,j-1)
-     >              - tmp1 * njac(2,3,i,j-1)
-               lhsa(2,4,i,j) = - tmp2 * fjac(2,4,i,j-1)
-     >              - tmp1 * njac(2,4,i,j-1)
-               lhsa(2,5,i,j) = - tmp2 * fjac(2,5,i,j-1)
-     >              - tmp1 * njac(2,5,i,j-1)
-
-               lhsa(3,1,i,j) = - tmp2 * fjac(3,1,i,j-1)
-     >              - tmp1 * njac(3,1,i,j-1)
-               lhsa(3,2,i,j) = - tmp2 * fjac(3,2,i,j-1)
-     >              - tmp1 * njac(3,2,i,j-1)
-               lhsa(3,3,i,j) = - tmp2 * fjac(3,3,i,j-1)
-     >              - tmp1 * njac(3,3,i,j-1)
-     >              - tmp1 * dy3 
-               lhsa(3,4,i,j) = - tmp2 * fjac(3,4,i,j-1)
-     >              - tmp1 * njac(3,4,i,j-1)
-               lhsa(3,5,i,j) = - tmp2 * fjac(3,5,i,j-1)
-     >              - tmp1 * njac(3,5,i,j-1)
-
-               lhsa(4,1,i,j) = - tmp2 * fjac(4,1,i,j-1)
-     >              - tmp1 * njac(4,1,i,j-1)
-               lhsa(4,2,i,j) = - tmp2 * fjac(4,2,i,j-1)
-     >              - tmp1 * njac(4,2,i,j-1)
-               lhsa(4,3,i,j) = - tmp2 * fjac(4,3,i,j-1)
-     >              - tmp1 * njac(4,3,i,j-1)
-               lhsa(4,4,i,j) = - tmp2 * fjac(4,4,i,j-1)
-     >              - tmp1 * njac(4,4,i,j-1)
-     >              - tmp1 * dy4
-               lhsa(4,5,i,j) = - tmp2 * fjac(4,5,i,j-1)
-     >              - tmp1 * njac(4,5,i,j-1)
-
-               lhsa(5,1,i,j) = - tmp2 * fjac(5,1,i,j-1)
-     >              - tmp1 * njac(5,1,i,j-1)
-               lhsa(5,2,i,j) = - tmp2 * fjac(5,2,i,j-1)
-     >              - tmp1 * njac(5,2,i,j-1)
-               lhsa(5,3,i,j) = - tmp2 * fjac(5,3,i,j-1)
-     >              - tmp1 * njac(5,3,i,j-1)
-               lhsa(5,4,i,j) = - tmp2 * fjac(5,4,i,j-1)
-     >              - tmp1 * njac(5,4,i,j-1)
-               lhsa(5,5,i,j) = - tmp2 * fjac(5,5,i,j-1)
-     >              - tmp1 * njac(5,5,i,j-1)
-     >              - tmp1 * dy5
-
-               lhsb(1,1,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(1,1,i,j)
-     >              + tmp1 * 2.0d+00 * dy1
-               lhsb(1,2,i,j) = tmp1 * 2.0d+00 * njac(1,2,i,j)
-               lhsb(1,3,i,j) = tmp1 * 2.0d+00 * njac(1,3,i,j)
-               lhsb(1,4,i,j) = tmp1 * 2.0d+00 * njac(1,4,i,j)
-               lhsb(1,5,i,j) = tmp1 * 2.0d+00 * njac(1,5,i,j)
-
-               lhsb(2,1,i,j) = tmp1 * 2.0d+00 * njac(2,1,i,j)
-               lhsb(2,2,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(2,2,i,j)
-     >              + tmp1 * 2.0d+00 * dy2
-               lhsb(2,3,i,j) = tmp1 * 2.0d+00 * njac(2,3,i,j)
-               lhsb(2,4,i,j) = tmp1 * 2.0d+00 * njac(2,4,i,j)
-               lhsb(2,5,i,j) = tmp1 * 2.0d+00 * njac(2,5,i,j)
-
-               lhsb(3,1,i,j) = tmp1 * 2.0d+00 * njac(3,1,i,j)
-               lhsb(3,2,i,j) = tmp1 * 2.0d+00 * njac(3,2,i,j)
-               lhsb(3,3,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(3,3,i,j)
-     >              + tmp1 * 2.0d+00 * dy3
-               lhsb(3,4,i,j) = tmp1 * 2.0d+00 * njac(3,4,i,j)
-               lhsb(3,5,i,j) = tmp1 * 2.0d+00 * njac(3,5,i,j)
-
-               lhsb(4,1,i,j) = tmp1 * 2.0d+00 * njac(4,1,i,j)
-               lhsb(4,2,i,j) = tmp1 * 2.0d+00 * njac(4,2,i,j)
-               lhsb(4,3,i,j) = tmp1 * 2.0d+00 * njac(4,3,i,j)
-               lhsb(4,4,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(4,4,i,j)
-     >              + tmp1 * 2.0d+00 * dy4
-               lhsb(4,5,i,j) = tmp1 * 2.0d+00 * njac(4,5,i,j)
-
-               lhsb(5,1,i,j) = tmp1 * 2.0d+00 * njac(5,1,i,j)
-               lhsb(5,2,i,j) = tmp1 * 2.0d+00 * njac(5,2,i,j)
-               lhsb(5,3,i,j) = tmp1 * 2.0d+00 * njac(5,3,i,j)
-               lhsb(5,4,i,j) = tmp1 * 2.0d+00 * njac(5,4,i,j)
-               lhsb(5,5,i,j) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(5,5,i,j) 
-     >              + tmp1 * 2.0d+00 * dy5
-
-               lhsc(1,1,i,j,k,c) =  tmp2 * fjac(1,1,i,j+1)
-     >              - tmp1 * njac(1,1,i,j+1)
-     >              - tmp1 * dy1
-               lhsc(1,2,i,j,k,c) =  tmp2 * fjac(1,2,i,j+1)
-     >              - tmp1 * njac(1,2,i,j+1)
-               lhsc(1,3,i,j,k,c) =  tmp2 * fjac(1,3,i,j+1)
-     >              - tmp1 * njac(1,3,i,j+1)
-               lhsc(1,4,i,j,k,c) =  tmp2 * fjac(1,4,i,j+1)
-     >              - tmp1 * njac(1,4,i,j+1)
-               lhsc(1,5,i,j,k,c) =  tmp2 * fjac(1,5,i,j+1)
-     >              - tmp1 * njac(1,5,i,j+1)
-
-               lhsc(2,1,i,j,k,c) =  tmp2 * fjac(2,1,i,j+1)
-     >              - tmp1 * njac(2,1,i,j+1)
-               lhsc(2,2,i,j,k,c) =  tmp2 * fjac(2,2,i,j+1)
-     >              - tmp1 * njac(2,2,i,j+1)
-     >              - tmp1 * dy2
-               lhsc(2,3,i,j,k,c) =  tmp2 * fjac(2,3,i,j+1)
-     >              - tmp1 * njac(2,3,i,j+1)
-               lhsc(2,4,i,j,k,c) =  tmp2 * fjac(2,4,i,j+1)
-     >              - tmp1 * njac(2,4,i,j+1)
-               lhsc(2,5,i,j,k,c) =  tmp2 * fjac(2,5,i,j+1)
-     >              - tmp1 * njac(2,5,i,j+1)
-
-               lhsc(3,1,i,j,k,c) =  tmp2 * fjac(3,1,i,j+1)
-     >              - tmp1 * njac(3,1,i,j+1)
-               lhsc(3,2,i,j,k,c) =  tmp2 * fjac(3,2,i,j+1)
-     >              - tmp1 * njac(3,2,i,j+1)
-               lhsc(3,3,i,j,k,c) =  tmp2 * fjac(3,3,i,j+1)
-     >              - tmp1 * njac(3,3,i,j+1)
-     >              - tmp1 * dy3
-               lhsc(3,4,i,j,k,c) =  tmp2 * fjac(3,4,i,j+1)
-     >              - tmp1 * njac(3,4,i,j+1)
-               lhsc(3,5,i,j,k,c) =  tmp2 * fjac(3,5,i,j+1)
-     >              - tmp1 * njac(3,5,i,j+1)
-
-               lhsc(4,1,i,j,k,c) =  tmp2 * fjac(4,1,i,j+1)
-     >              - tmp1 * njac(4,1,i,j+1)
-               lhsc(4,2,i,j,k,c) =  tmp2 * fjac(4,2,i,j+1)
-     >              - tmp1 * njac(4,2,i,j+1)
-               lhsc(4,3,i,j,k,c) =  tmp2 * fjac(4,3,i,j+1)
-     >              - tmp1 * njac(4,3,i,j+1)
-               lhsc(4,4,i,j,k,c) =  tmp2 * fjac(4,4,i,j+1)
-     >              - tmp1 * njac(4,4,i,j+1)
-     >              - tmp1 * dy4
-               lhsc(4,5,i,j,k,c) =  tmp2 * fjac(4,5,i,j+1)
-     >              - tmp1 * njac(4,5,i,j+1)
-
-               lhsc(5,1,i,j,k,c) =  tmp2 * fjac(5,1,i,j+1)
-     >              - tmp1 * njac(5,1,i,j+1)
-               lhsc(5,2,i,j,k,c) =  tmp2 * fjac(5,2,i,j+1)
-     >              - tmp1 * njac(5,2,i,j+1)
-               lhsc(5,3,i,j,k,c) =  tmp2 * fjac(5,3,i,j+1)
-     >              - tmp1 * njac(5,3,i,j+1)
-               lhsc(5,4,i,j,k,c) =  tmp2 * fjac(5,4,i,j+1)
-     >              - tmp1 * njac(5,4,i,j+1)
-               lhsc(5,5,i,j,k,c) =  tmp2 * fjac(5,5,i,j+1)
-     >              - tmp1 * njac(5,5,i,j+1)
-     >              - tmp1 * dy5
-
-            enddo
-         enddo
-
-
-c---------------------------------------------------------------------
-c     outer most do loops - sweeping in i direction
-c---------------------------------------------------------------------
-         if (first .eq. 1) then 
-
-c---------------------------------------------------------------------
-c     multiply c(i,jstart,k) by b_inverse and copy back to c
-c     multiply rhs(jstart) by b_inverse(jstart) and copy to rhs
-c---------------------------------------------------------------------
-!dir$ ivdep
-            do i=start(1,c),isize
-               call binvcrhs( lhsb(1,1,i,jstart),
-     >                        lhsc(1,1,i,jstart,k,c),
-     >                        rhs(1,i,jstart,k,c) )
-            enddo
-
-         endif
-
-c---------------------------------------------------------------------
-c     begin inner most do loop
-c     do all the elements of the cell unless last 
-c---------------------------------------------------------------------
-         do j=jstart+first,jsize-last
-!dir$ ivdep
-            do i=start(1,c),isize
-
-c---------------------------------------------------------------------
-c     subtract A*lhs_vector(j-1) from lhs_vector(j)
-c     
-c     rhs(j) = rhs(j) - A*rhs(j-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,i,j),
-     >                         rhs(1,i,j-1,k,c),rhs(1,i,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(j) = B(j) - C(j-1)*A(j)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,i,j),
-     >                         lhsc(1,1,i,j-1,k,c),
-     >                         lhsb(1,1,i,j))
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,k) by b_inverse and copy back to c
-c     multiply rhs(i,1,k) by b_inverse(i,1,k) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,i,j),
-     >                        lhsc(1,1,i,j,k,c),
-     >                        rhs(1,i,j,k,c) )
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     Now finish up special cases for last cell
-c---------------------------------------------------------------------
-         if (last .eq. 1) then
-
-!dir$ ivdep
-            do i=start(1,c),isize
-c---------------------------------------------------------------------
-c     rhs(jsize) = rhs(jsize) - A*rhs(jsize-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,i,jsize),
-     >                         rhs(1,i,jsize-1,k,c),rhs(1,i,jsize,k,c))
-
-c---------------------------------------------------------------------
-c     B(jsize) = B(jsize) - C(jsize-1)*A(jsize)
-c     call matmul_sub(aa,i,jsize,k,c,
-c     $              cc,i,jsize-1,k,c,bb,i,jsize,k,c)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,i,jsize),
-     >                         lhsc(1,1,i,jsize-1,k,c),
-     >                         lhsb(1,1,i,jsize))
-
-c---------------------------------------------------------------------
-c     multiply rhs(jsize) by b_inverse(jsize) and copy to rhs
-c---------------------------------------------------------------------
-               call binvrhs( lhsb(1,1,i,jsize),
-     >                       rhs(1,i,jsize,k,c) )
-            enddo
-
-         endif
-      enddo
-
-
-      return
-      end
-      
-
-
diff --git a/examples/smpi/NAS/BT/z_solve.f b/examples/smpi/NAS/BT/z_solve.f
deleted file mode 100644 (file)
index d7a5a2f..0000000
+++ /dev/null
@@ -1,776 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Performs line solves in Z direction by first factoring
-c     the block-tridiagonal matrix into an upper triangular matrix, 
-c     and then performing back substitution to solve for the unknow
-c     vectors of each line.  
-c     
-c     Make sure we treat elements zero to cell_size in the direction
-c     of the sweep.
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer c, kstart, stage,
-     >     first, last, recv_id, error, r_status(MPI_STATUS_SIZE),
-     >     isize,jsize,ksize,send_id
-
-      kstart = 0
-
-c---------------------------------------------------------------------
-c     in our terminology stage is the number of the cell in the y-direction
-c     i.e. stage = 1 means the start of the line stage=ncells means end
-c---------------------------------------------------------------------
-      do stage = 1,ncells
-         c = slice(3,stage)
-         isize = cell_size(1,c) - 1
-         jsize = cell_size(2,c) - 1
-         ksize = cell_size(3,c) - 1
-c---------------------------------------------------------------------
-c     set last-cell flag
-c---------------------------------------------------------------------
-         if (stage .eq. ncells) then
-            last = 1
-         else
-            last = 0
-         endif
-
-         if (stage .eq. 1) then
-c---------------------------------------------------------------------
-c     This is the first cell, so solve without receiving data
-c---------------------------------------------------------------------
-            first = 1
-c            call lhsz(c)
-            call z_solve_cell(first,last,c)
-         else
-c---------------------------------------------------------------------
-c     Not the first cell of this line, so receive info from
-c     processor working on preceeding cell
-c---------------------------------------------------------------------
-            first = 0
-            call z_receive_solve_info(recv_id,c)
-c---------------------------------------------------------------------
-c     overlap computations and communications
-c---------------------------------------------------------------------
-c            call lhsz(c)
-c---------------------------------------------------------------------
-c     wait for completion
-c---------------------------------------------------------------------
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-c---------------------------------------------------------------------
-c     install C'(kstart+1) and rhs'(kstart+1) to be used in this cell
-c---------------------------------------------------------------------
-            call z_unpack_solve_info(c)
-            call z_solve_cell(first,last,c)
-         endif
-
-         if (last .eq. 0) call z_send_solve_info(send_id,c)
-      enddo
-
-c---------------------------------------------------------------------
-c     now perform backsubstitution in reverse direction
-c---------------------------------------------------------------------
-      do stage = ncells, 1, -1
-         c = slice(3,stage)
-         first = 0
-         last = 0
-         if (stage .eq. 1) first = 1
-         if (stage .eq. ncells) then
-            last = 1
-c---------------------------------------------------------------------
-c     last cell, so perform back substitute without waiting
-c---------------------------------------------------------------------
-            call z_backsubstitute(first, last,c)
-         else
-            call z_receive_backsub_info(recv_id,c)
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-            call z_unpack_backsub_info(c)
-            call z_backsubstitute(first,last,c)
-         endif
-         if (first .eq. 0) call z_send_backsub_info(send_id,c)
-      enddo
-
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine z_unpack_solve_info(c)
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack C'(-1) and rhs'(-1) for
-c     all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,j,m,n,ptr,c,kstart 
-
-      kstart = 0
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  lhsc(m,n,i,j,kstart-1,c) = out_buffer(ptr+n)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               rhs(n,i,j,kstart-1,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine z_send_solve_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send C'(kend) and rhs'(kend) for
-c     all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,j,m,n,ksize,ptr,c,ip,jp
-      integer error,send_id,buffer_size
-
-      ksize = cell_size(3,c)-1
-      ip = cell_coord(1,c) - 1
-      jp = cell_coord(2,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-
-c---------------------------------------------------------------------
-c     pack up buffer
-c---------------------------------------------------------------------
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  in_buffer(ptr+n) = lhsc(m,n,i,j,ksize,c)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,j,ksize,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     send buffer 
-c---------------------------------------------------------------------
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, successor(3),
-     >     BOTTOM+ip+jp*NCELLS, comm_solve,
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_send_backsub_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send U(jstart) for all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,j,n,ptr,c,kstart,ip,jp
-      integer error,send_id,buffer_size
-
-c---------------------------------------------------------------------
-c     Send element 0 to previous processor
-c---------------------------------------------------------------------
-      kstart = 0
-      ip = cell_coord(1,c)-1
-      jp = cell_coord(2,c)-1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,j,kstart,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, predecessor(3), 
-     >     TOP+ip+jp*NCELLS, comm_solve, 
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_unpack_backsub_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack U(ksize) for all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,j,n,ptr,c
-
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               backsub_info(n,i,j,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_receive_backsub_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer error,recv_id,ip,jp,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      jp = cell_coord(2,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, successor(3), 
-     >     TOP+ip+jp*NCELLS, comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_receive_solve_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives 
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ip,jp,recv_id,error,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      jp = cell_coord(2,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, predecessor(3), 
-     >     BOTTOM+ip+jp*NCELLS, comm_solve,
-     >     recv_id, error)
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_backsubstitute(first, last, c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     back solve: if last cell, then generate U(ksize)=rhs(ksize)
-c     else assume U(ksize) is loaded in un pack backsub_info
-c     so just use it
-c     after call u(kstart) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer first, last, c, i, k
-      integer m,n,j,jsize,isize,ksize,kstart
-      
-      kstart = 0
-      isize = cell_size(1,c)-end(1,c)-1      
-      jsize = cell_size(2,c)-end(2,c)-1
-      ksize = cell_size(3,c)-1
-      if (last .eq. 0) then
-         do j=start(2,c),jsize
-            do i=start(1,c),isize
-c---------------------------------------------------------------------
-c     U(jsize) uses info from previous cell if not last cell
-c---------------------------------------------------------------------
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,ksize,c) = rhs(m,i,j,ksize,c) 
-     >                    - lhsc(m,n,i,j,ksize,c)*
-     >                    backsub_info(n,i,j,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      endif
-      do k=ksize-1,kstart,-1
-         do j=start(2,c),jsize
-            do i=start(1,c),isize
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) 
-     >                    - lhsc(m,n,i,j,k,c)*rhs(n,i,j,k+1,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_solve_cell(first,last,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     performs guaussian elimination on this cell.
-c     
-c     assumes that unpacking routines for non-first cells 
-c     preload C' and rhs' from previous cell.
-c     
-c     assumed send happens outside this routine, but that
-c     c'(KMAX) and rhs'(KMAX) will be sent to next cell.
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'work_lhs.h'
-
-      integer first,last,c
-      integer i,j,k,isize,ksize,jsize,kstart
-      double precision utmp(6,-2:KMAX+1)
-
-      kstart = 0
-      isize = cell_size(1,c)-end(1,c)-1
-      jsize = cell_size(2,c)-end(2,c)-1
-      ksize = cell_size(3,c)-1
-
-      call lhsabinit(lhsa, lhsb, ksize)
-
-      do j=start(2,c),jsize 
-         do i=start(1,c),isize
-
-c---------------------------------------------------------------------
-c     This function computes the left hand side for the three z-factors   
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Compute the indices for storing the block-diagonal matrix;
-c     determine c (labeled f) and s jacobians for cell c
-c---------------------------------------------------------------------
-            do k = start(3,c)-1, cell_size(3,c)-end(3,c)
-               utmp(1,k) = 1.0d0 / u(1,i,j,k,c)
-               utmp(2,k) = u(2,i,j,k,c)
-               utmp(3,k) = u(3,i,j,k,c)
-               utmp(4,k) = u(4,i,j,k,c)
-               utmp(5,k) = u(5,i,j,k,c)
-               utmp(6,k) = qs(i,j,k,c)
-            end do
-
-            do k = start(3,c)-1, cell_size(3,c)-end(3,c)
-
-               tmp1 = utmp(1,k)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               fjac(1,1,k) = 0.0d+00
-               fjac(1,2,k) = 0.0d+00
-               fjac(1,3,k) = 0.0d+00
-               fjac(1,4,k) = 1.0d+00
-               fjac(1,5,k) = 0.0d+00
-
-               fjac(2,1,k) = - ( utmp(2,k)*utmp(4,k) ) 
-     >              * tmp2 
-               fjac(2,2,k) = utmp(4,k) * tmp1
-               fjac(2,3,k) = 0.0d+00
-               fjac(2,4,k) = utmp(2,k) * tmp1
-               fjac(2,5,k) = 0.0d+00
-
-               fjac(3,1,k) = - ( utmp(3,k)*utmp(4,k) )
-     >              * tmp2 
-               fjac(3,2,k) = 0.0d+00
-               fjac(3,3,k) = utmp(4,k) * tmp1
-               fjac(3,4,k) = utmp(3,k) * tmp1
-               fjac(3,5,k) = 0.0d+00
-
-               fjac(4,1,k) = - (utmp(4,k)*utmp(4,k) * tmp2 ) 
-     >              + c2 * utmp(6,k)
-               fjac(4,2,k) = - c2 *  utmp(2,k) * tmp1 
-               fjac(4,3,k) = - c2 *  utmp(3,k) * tmp1
-               fjac(4,4,k) = ( 2.0d+00 - c2 )
-     >              *  utmp(4,k) * tmp1 
-               fjac(4,5,k) = c2
-
-               fjac(5,1,k) = ( c2 * 2.0d0 * utmp(6,k)
-     >              - c1 * ( utmp(5,k) * tmp1 ) )
-     >              * ( utmp(4,k) * tmp1 )
-               fjac(5,2,k) = - c2 * ( utmp(2,k)*utmp(4,k) )
-     >              * tmp2 
-               fjac(5,3,k) = - c2 * ( utmp(3,k)*utmp(4,k) )
-     >              * tmp2
-               fjac(5,4,k) = c1 * ( utmp(5,k) * tmp1 )
-     >              - c2 * ( utmp(6,k)
-     >              + utmp(4,k)*utmp(4,k) * tmp2 )
-               fjac(5,5,k) = c1 * utmp(4,k) * tmp1
-
-               njac(1,1,k) = 0.0d+00
-               njac(1,2,k) = 0.0d+00
-               njac(1,3,k) = 0.0d+00
-               njac(1,4,k) = 0.0d+00
-               njac(1,5,k) = 0.0d+00
-
-               njac(2,1,k) = - c3c4 * tmp2 * utmp(2,k)
-               njac(2,2,k) =   c3c4 * tmp1
-               njac(2,3,k) =   0.0d+00
-               njac(2,4,k) =   0.0d+00
-               njac(2,5,k) =   0.0d+00
-
-               njac(3,1,k) = - c3c4 * tmp2 * utmp(3,k)
-               njac(3,2,k) =   0.0d+00
-               njac(3,3,k) =   c3c4 * tmp1
-               njac(3,4,k) =   0.0d+00
-               njac(3,5,k) =   0.0d+00
-
-               njac(4,1,k) = - con43 * c3c4 * tmp2 * utmp(4,k)
-               njac(4,2,k) =   0.0d+00
-               njac(4,3,k) =   0.0d+00
-               njac(4,4,k) =   con43 * c3 * c4 * tmp1
-               njac(4,5,k) =   0.0d+00
-
-               njac(5,1,k) = - (  c3c4
-     >              - c1345 ) * tmp3 * (utmp(2,k)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (utmp(3,k)**2)
-     >              - ( con43 * c3c4
-     >              - c1345 ) * tmp3 * (utmp(4,k)**2)
-     >              - c1345 * tmp2 * utmp(5,k)
-
-               njac(5,2,k) = (  c3c4 - c1345 ) * tmp2 * utmp(2,k)
-               njac(5,3,k) = (  c3c4 - c1345 ) * tmp2 * utmp(3,k)
-               njac(5,4,k) = ( con43 * c3c4
-     >              - c1345 ) * tmp2 * utmp(4,k)
-               njac(5,5,k) = ( c1345 )* tmp1
-
-
-            enddo
-
-c---------------------------------------------------------------------
-c     now joacobians set, so form left hand side in z direction
-c---------------------------------------------------------------------
-            do k = start(3,c), ksize-end(3,c)
-
-               tmp1 = dt * tz1
-               tmp2 = dt * tz2
-
-               lhsa(1,1,k) = - tmp2 * fjac(1,1,k-1)
-     >              - tmp1 * njac(1,1,k-1)
-     >              - tmp1 * dz1 
-               lhsa(1,2,k) = - tmp2 * fjac(1,2,k-1)
-     >              - tmp1 * njac(1,2,k-1)
-               lhsa(1,3,k) = - tmp2 * fjac(1,3,k-1)
-     >              - tmp1 * njac(1,3,k-1)
-               lhsa(1,4,k) = - tmp2 * fjac(1,4,k-1)
-     >              - tmp1 * njac(1,4,k-1)
-               lhsa(1,5,k) = - tmp2 * fjac(1,5,k-1)
-     >              - tmp1 * njac(1,5,k-1)
-
-               lhsa(2,1,k) = - tmp2 * fjac(2,1,k-1)
-     >              - tmp1 * njac(2,1,k-1)
-               lhsa(2,2,k) = - tmp2 * fjac(2,2,k-1)
-     >              - tmp1 * njac(2,2,k-1)
-     >              - tmp1 * dz2
-               lhsa(2,3,k) = - tmp2 * fjac(2,3,k-1)
-     >              - tmp1 * njac(2,3,k-1)
-               lhsa(2,4,k) = - tmp2 * fjac(2,4,k-1)
-     >              - tmp1 * njac(2,4,k-1)
-               lhsa(2,5,k) = - tmp2 * fjac(2,5,k-1)
-     >              - tmp1 * njac(2,5,k-1)
-
-               lhsa(3,1,k) = - tmp2 * fjac(3,1,k-1)
-     >              - tmp1 * njac(3,1,k-1)
-               lhsa(3,2,k) = - tmp2 * fjac(3,2,k-1)
-     >              - tmp1 * njac(3,2,k-1)
-               lhsa(3,3,k) = - tmp2 * fjac(3,3,k-1)
-     >              - tmp1 * njac(3,3,k-1)
-     >              - tmp1 * dz3 
-               lhsa(3,4,k) = - tmp2 * fjac(3,4,k-1)
-     >              - tmp1 * njac(3,4,k-1)
-               lhsa(3,5,k) = - tmp2 * fjac(3,5,k-1)
-     >              - tmp1 * njac(3,5,k-1)
-
-               lhsa(4,1,k) = - tmp2 * fjac(4,1,k-1)
-     >              - tmp1 * njac(4,1,k-1)
-               lhsa(4,2,k) = - tmp2 * fjac(4,2,k-1)
-     >              - tmp1 * njac(4,2,k-1)
-               lhsa(4,3,k) = - tmp2 * fjac(4,3,k-1)
-     >              - tmp1 * njac(4,3,k-1)
-               lhsa(4,4,k) = - tmp2 * fjac(4,4,k-1)
-     >              - tmp1 * njac(4,4,k-1)
-     >              - tmp1 * dz4
-               lhsa(4,5,k) = - tmp2 * fjac(4,5,k-1)
-     >              - tmp1 * njac(4,5,k-1)
-
-               lhsa(5,1,k) = - tmp2 * fjac(5,1,k-1)
-     >              - tmp1 * njac(5,1,k-1)
-               lhsa(5,2,k) = - tmp2 * fjac(5,2,k-1)
-     >              - tmp1 * njac(5,2,k-1)
-               lhsa(5,3,k) = - tmp2 * fjac(5,3,k-1)
-     >              - tmp1 * njac(5,3,k-1)
-               lhsa(5,4,k) = - tmp2 * fjac(5,4,k-1)
-     >              - tmp1 * njac(5,4,k-1)
-               lhsa(5,5,k) = - tmp2 * fjac(5,5,k-1)
-     >              - tmp1 * njac(5,5,k-1)
-     >              - tmp1 * dz5
-
-               lhsb(1,1,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(1,1,k)
-     >              + tmp1 * 2.0d+00 * dz1
-               lhsb(1,2,k) = tmp1 * 2.0d+00 * njac(1,2,k)
-               lhsb(1,3,k) = tmp1 * 2.0d+00 * njac(1,3,k)
-               lhsb(1,4,k) = tmp1 * 2.0d+00 * njac(1,4,k)
-               lhsb(1,5,k) = tmp1 * 2.0d+00 * njac(1,5,k)
-
-               lhsb(2,1,k) = tmp1 * 2.0d+00 * njac(2,1,k)
-               lhsb(2,2,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(2,2,k)
-     >              + tmp1 * 2.0d+00 * dz2
-               lhsb(2,3,k) = tmp1 * 2.0d+00 * njac(2,3,k)
-               lhsb(2,4,k) = tmp1 * 2.0d+00 * njac(2,4,k)
-               lhsb(2,5,k) = tmp1 * 2.0d+00 * njac(2,5,k)
-
-               lhsb(3,1,k) = tmp1 * 2.0d+00 * njac(3,1,k)
-               lhsb(3,2,k) = tmp1 * 2.0d+00 * njac(3,2,k)
-               lhsb(3,3,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(3,3,k)
-     >              + tmp1 * 2.0d+00 * dz3
-               lhsb(3,4,k) = tmp1 * 2.0d+00 * njac(3,4,k)
-               lhsb(3,5,k) = tmp1 * 2.0d+00 * njac(3,5,k)
-
-               lhsb(4,1,k) = tmp1 * 2.0d+00 * njac(4,1,k)
-               lhsb(4,2,k) = tmp1 * 2.0d+00 * njac(4,2,k)
-               lhsb(4,3,k) = tmp1 * 2.0d+00 * njac(4,3,k)
-               lhsb(4,4,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(4,4,k)
-     >              + tmp1 * 2.0d+00 * dz4
-               lhsb(4,5,k) = tmp1 * 2.0d+00 * njac(4,5,k)
-
-               lhsb(5,1,k) = tmp1 * 2.0d+00 * njac(5,1,k)
-               lhsb(5,2,k) = tmp1 * 2.0d+00 * njac(5,2,k)
-               lhsb(5,3,k) = tmp1 * 2.0d+00 * njac(5,3,k)
-               lhsb(5,4,k) = tmp1 * 2.0d+00 * njac(5,4,k)
-               lhsb(5,5,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(5,5,k) 
-     >              + tmp1 * 2.0d+00 * dz5
-
-               lhsc(1,1,i,j,k,c) =  tmp2 * fjac(1,1,k+1)
-     >              - tmp1 * njac(1,1,k+1)
-     >              - tmp1 * dz1
-               lhsc(1,2,i,j,k,c) =  tmp2 * fjac(1,2,k+1)
-     >              - tmp1 * njac(1,2,k+1)
-               lhsc(1,3,i,j,k,c) =  tmp2 * fjac(1,3,k+1)
-     >              - tmp1 * njac(1,3,k+1)
-               lhsc(1,4,i,j,k,c) =  tmp2 * fjac(1,4,k+1)
-     >              - tmp1 * njac(1,4,k+1)
-               lhsc(1,5,i,j,k,c) =  tmp2 * fjac(1,5,k+1)
-     >              - tmp1 * njac(1,5,k+1)
-
-               lhsc(2,1,i,j,k,c) =  tmp2 * fjac(2,1,k+1)
-     >              - tmp1 * njac(2,1,k+1)
-               lhsc(2,2,i,j,k,c) =  tmp2 * fjac(2,2,k+1)
-     >              - tmp1 * njac(2,2,k+1)
-     >              - tmp1 * dz2
-               lhsc(2,3,i,j,k,c) =  tmp2 * fjac(2,3,k+1)
-     >              - tmp1 * njac(2,3,k+1)
-               lhsc(2,4,i,j,k,c) =  tmp2 * fjac(2,4,k+1)
-     >              - tmp1 * njac(2,4,k+1)
-               lhsc(2,5,i,j,k,c) =  tmp2 * fjac(2,5,k+1)
-     >              - tmp1 * njac(2,5,k+1)
-
-               lhsc(3,1,i,j,k,c) =  tmp2 * fjac(3,1,k+1)
-     >              - tmp1 * njac(3,1,k+1)
-               lhsc(3,2,i,j,k,c) =  tmp2 * fjac(3,2,k+1)
-     >              - tmp1 * njac(3,2,k+1)
-               lhsc(3,3,i,j,k,c) =  tmp2 * fjac(3,3,k+1)
-     >              - tmp1 * njac(3,3,k+1)
-     >              - tmp1 * dz3
-               lhsc(3,4,i,j,k,c) =  tmp2 * fjac(3,4,k+1)
-     >              - tmp1 * njac(3,4,k+1)
-               lhsc(3,5,i,j,k,c) =  tmp2 * fjac(3,5,k+1)
-     >              - tmp1 * njac(3,5,k+1)
-
-               lhsc(4,1,i,j,k,c) =  tmp2 * fjac(4,1,k+1)
-     >              - tmp1 * njac(4,1,k+1)
-               lhsc(4,2,i,j,k,c) =  tmp2 * fjac(4,2,k+1)
-     >              - tmp1 * njac(4,2,k+1)
-               lhsc(4,3,i,j,k,c) =  tmp2 * fjac(4,3,k+1)
-     >              - tmp1 * njac(4,3,k+1)
-               lhsc(4,4,i,j,k,c) =  tmp2 * fjac(4,4,k+1)
-     >              - tmp1 * njac(4,4,k+1)
-     >              - tmp1 * dz4
-               lhsc(4,5,i,j,k,c) =  tmp2 * fjac(4,5,k+1)
-     >              - tmp1 * njac(4,5,k+1)
-
-               lhsc(5,1,i,j,k,c) =  tmp2 * fjac(5,1,k+1)
-     >              - tmp1 * njac(5,1,k+1)
-               lhsc(5,2,i,j,k,c) =  tmp2 * fjac(5,2,k+1)
-     >              - tmp1 * njac(5,2,k+1)
-               lhsc(5,3,i,j,k,c) =  tmp2 * fjac(5,3,k+1)
-     >              - tmp1 * njac(5,3,k+1)
-               lhsc(5,4,i,j,k,c) =  tmp2 * fjac(5,4,k+1)
-     >              - tmp1 * njac(5,4,k+1)
-               lhsc(5,5,i,j,k,c) =  tmp2 * fjac(5,5,k+1)
-     >              - tmp1 * njac(5,5,k+1)
-     >              - tmp1 * dz5
-
-            enddo
-
-
-c---------------------------------------------------------------------
-c     outer most do loops - sweeping in i direction
-c---------------------------------------------------------------------
-            if (first .eq. 1) then 
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,kstart) by b_inverse and copy back to c
-c     multiply rhs(kstart) by b_inverse(kstart) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,kstart),
-     >                        lhsc(1,1,i,j,kstart,c),
-     >                        rhs(1,i,j,kstart,c) )
-
-            endif
-
-c---------------------------------------------------------------------
-c     begin inner most do loop
-c     do all the elements of the cell unless last 
-c---------------------------------------------------------------------
-            do k=kstart+first,ksize-last
-
-c---------------------------------------------------------------------
-c     subtract A*lhs_vector(k-1) from lhs_vector(k)
-c     
-c     rhs(k) = rhs(k) - A*rhs(k-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,k),
-     >                         rhs(1,i,j,k-1,c),rhs(1,i,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(k) = B(k) - C(k-1)*A(k)
-c     call matmul_sub(aa,i,j,k,c,cc,i,j,k-1,c,bb,i,j,k,c)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,k),
-     >                         lhsc(1,1,i,j,k-1,c),
-     >                         lhsb(1,1,k))
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,k) by b_inverse and copy back to c
-c     multiply rhs(i,j,1) by b_inverse(i,j,1) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,k),
-     >                        lhsc(1,1,i,j,k,c),
-     >                        rhs(1,i,j,k,c) )
-
-            enddo
-
-c---------------------------------------------------------------------
-c     Now finish up special cases for last cell
-c---------------------------------------------------------------------
-            if (last .eq. 1) then
-
-c---------------------------------------------------------------------
-c     rhs(ksize) = rhs(ksize) - A*rhs(ksize-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,ksize),
-     >                         rhs(1,i,j,ksize-1,c),rhs(1,i,j,ksize,c))
-
-c---------------------------------------------------------------------
-c     B(ksize) = B(ksize) - C(ksize-1)*A(ksize)
-c     call matmul_sub(aa,i,j,ksize,c,
-c     $              cc,i,j,ksize-1,c,bb,i,j,ksize,c)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,ksize),
-     >                         lhsc(1,1,i,j,ksize-1,c),
-     >                         lhsb(1,1,ksize))
-
-c---------------------------------------------------------------------
-c     multiply rhs(ksize) by b_inverse(ksize) and copy to rhs
-c---------------------------------------------------------------------
-               call binvrhs( lhsb(1,1,ksize),
-     >                       rhs(1,i,j,ksize,c) )
-
-            endif
-         enddo
-      enddo
-
-
-      return
-      end
-      
-
-
-
-
-
diff --git a/examples/smpi/NAS/BT/z_solve_vec.f b/examples/smpi/NAS/BT/z_solve_vec.f
deleted file mode 100644 (file)
index 2c27fb0..0000000
+++ /dev/null
@@ -1,793 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Performs line solves in Z direction by first factoring
-c     the block-tridiagonal matrix into an upper triangular matrix, 
-c     and then performing back substitution to solve for the unknow
-c     vectors of each line.  
-c     
-c     Make sure we treat elements zero to cell_size in the direction
-c     of the sweep.
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer c, kstart, stage,
-     >     first, last, recv_id, error, r_status(MPI_STATUS_SIZE),
-     >     isize,jsize,ksize,send_id
-
-      kstart = 0
-
-c---------------------------------------------------------------------
-c     in our terminology stage is the number of the cell in the y-direct
-c     i.e. stage = 1 means the start of the line stage=ncells means end
-c---------------------------------------------------------------------
-      do stage = 1,ncells
-         c = slice(3,stage)
-         isize = cell_size(1,c) - 1
-         jsize = cell_size(2,c) - 1
-         ksize = cell_size(3,c) - 1
-c---------------------------------------------------------------------
-c     set last-cell flag
-c---------------------------------------------------------------------
-         if (stage .eq. ncells) then
-            last = 1
-         else
-            last = 0
-         endif
-
-         if (stage .eq. 1) then
-c---------------------------------------------------------------------
-c     This is the first cell, so solve without receiving data
-c---------------------------------------------------------------------
-            first = 1
-c            call lhsz(c)
-            call z_solve_cell(first,last,c)
-         else
-c---------------------------------------------------------------------
-c     Not the first cell of this line, so receive info from
-c     processor working on preceeding cell
-c---------------------------------------------------------------------
-            first = 0
-            call z_receive_solve_info(recv_id,c)
-c---------------------------------------------------------------------
-c     overlap computations and communications
-c---------------------------------------------------------------------
-c            call lhsz(c)
-c---------------------------------------------------------------------
-c     wait for completion
-c---------------------------------------------------------------------
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-c---------------------------------------------------------------------
-c     install C'(kstart+1) and rhs'(kstart+1) to be used in this cell
-c---------------------------------------------------------------------
-            call z_unpack_solve_info(c)
-            call z_solve_cell(first,last,c)
-         endif
-
-         if (last .eq. 0) call z_send_solve_info(send_id,c)
-      enddo
-
-c---------------------------------------------------------------------
-c     now perform backsubstitution in reverse direction
-c---------------------------------------------------------------------
-      do stage = ncells, 1, -1
-         c = slice(3,stage)
-         first = 0
-         last = 0
-         if (stage .eq. 1) first = 1
-         if (stage .eq. ncells) then
-            last = 1
-c---------------------------------------------------------------------
-c     last cell, so perform back substitute without waiting
-c---------------------------------------------------------------------
-            call z_backsubstitute(first, last,c)
-         else
-            call z_receive_backsub_info(recv_id,c)
-            call mpi_wait(send_id,r_status,error)
-            call mpi_wait(recv_id,r_status,error)
-            call z_unpack_backsub_info(c)
-            call z_backsubstitute(first,last,c)
-         endif
-         if (first .eq. 0) call z_send_backsub_info(send_id,c)
-      enddo
-
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine z_unpack_solve_info(c)
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack C'(-1) and rhs'(-1) for
-c     all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,j,m,n,ptr,c,kstart 
-
-      kstart = 0
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  lhsc(m,n,i,j,kstart-1,c) = out_buffer(ptr+n)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               rhs(n,i,j,kstart-1,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      
-      subroutine z_send_solve_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send C'(kend) and rhs'(kend) for
-c     all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,j,m,n,ksize,ptr,c,ip,jp
-      integer error,send_id,buffer_size
-
-      ksize = cell_size(3,c)-1
-      ip = cell_coord(1,c) - 1
-      jp = cell_coord(2,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-
-c---------------------------------------------------------------------
-c     pack up buffer
-c---------------------------------------------------------------------
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do m=1,BLOCK_SIZE
-               do n=1,BLOCK_SIZE
-                  in_buffer(ptr+n) = lhsc(m,n,i,j,ksize,c)
-               enddo
-               ptr = ptr+BLOCK_SIZE
-            enddo
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,j,ksize,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     send buffer 
-c---------------------------------------------------------------------
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, successor(3),
-     >     BOTTOM+ip+jp*NCELLS, comm_solve,
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_send_backsub_info(send_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     pack up and send U(jstart) for all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer i,j,n,ptr,c,kstart,ip,jp
-      integer error,send_id,buffer_size
-
-c---------------------------------------------------------------------
-c     Send element 0 to previous processor
-c---------------------------------------------------------------------
-      kstart = 0
-      ip = cell_coord(1,c)-1
-      jp = cell_coord(2,c)-1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               in_buffer(ptr+n) = rhs(n,i,j,kstart,c)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      call mpi_isend(in_buffer, buffer_size,
-     >     dp_type, predecessor(3), 
-     >     TOP+ip+jp*NCELLS, comm_solve, 
-     >     send_id,error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_unpack_backsub_info(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     unpack U(ksize) for all i and j
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer i,j,n,ptr,c
-
-      ptr = 0
-      do j=0,JMAX-1
-         do i=0,IMAX-1
-            do n=1,BLOCK_SIZE
-               backsub_info(n,i,j,c) = out_buffer(ptr+n)
-            enddo
-            ptr = ptr+BLOCK_SIZE
-         enddo
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_receive_backsub_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer error,recv_id,ip,jp,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      jp = cell_coord(2,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*BLOCK_SIZE
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, successor(3), 
-     >     TOP+ip+jp*NCELLS, comm_solve, 
-     >     recv_id, error)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_receive_solve_info(recv_id,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     post mpi receives 
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'mpinpb.h'
-
-      integer ip,jp,recv_id,error,c,buffer_size
-      ip = cell_coord(1,c) - 1
-      jp = cell_coord(2,c) - 1
-      buffer_size=MAX_CELL_DIM*MAX_CELL_DIM*
-     >     (BLOCK_SIZE*BLOCK_SIZE + BLOCK_SIZE)
-      call mpi_irecv(out_buffer, buffer_size,
-     >     dp_type, predecessor(3), 
-     >     BOTTOM+ip+jp*NCELLS, comm_solve,
-     >     recv_id, error)
-
-      return
-      end
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_backsubstitute(first, last, c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     back solve: if last cell, then generate U(ksize)=rhs(ksize)
-c     else assume U(ksize) is loaded in un pack backsub_info
-c     so just use it
-c     after call u(kstart) will be sent to next cell
-c---------------------------------------------------------------------
-
-      include 'header.h'
-
-      integer first, last, c, i, k
-      integer m,n,j,jsize,isize,ksize,kstart
-      
-      kstart = 0
-      isize = cell_size(1,c)-end(1,c)-1      
-      jsize = cell_size(2,c)-end(2,c)-1
-      ksize = cell_size(3,c)-1
-      if (last .eq. 0) then
-         do j=start(2,c),jsize
-            do i=start(1,c),isize
-c---------------------------------------------------------------------
-c     U(jsize) uses info from previous cell if not last cell
-c---------------------------------------------------------------------
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,ksize,c) = rhs(m,i,j,ksize,c) 
-     >                    - lhsc(m,n,i,j,ksize,c)*
-     >                    backsub_info(n,i,j,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      endif
-      do k=ksize-1,kstart,-1
-         do j=start(2,c),jsize
-            do i=start(1,c),isize
-               do m=1,BLOCK_SIZE
-                  do n=1,BLOCK_SIZE
-                     rhs(m,i,j,k,c) = rhs(m,i,j,k,c) 
-     >                    - lhsc(m,n,i,j,k,c)*rhs(n,i,j,k+1,c)
-                  enddo
-               enddo
-            enddo
-         enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine z_solve_cell(first,last,c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     performs guaussian elimination on this cell.
-c     
-c     assumes that unpacking routines for non-first cells 
-c     preload C' and rhs' from previous cell.
-c     
-c     assumed send happens outside this routine, but that
-c     c'(KMAX) and rhs'(KMAX) will be sent to next cell.
-c---------------------------------------------------------------------
-
-      include 'header.h'
-      include 'work_lhs_vec.h'
-
-      integer first,last,c
-      integer i,j,k,m,n,isize,ksize,jsize,kstart
-
-      kstart = 0
-      isize = cell_size(1,c)-end(1,c)-1
-      jsize = cell_size(2,c)-end(2,c)-1
-      ksize = cell_size(3,c)-1
-
-c---------------------------------------------------------------------
-c     zero the left hand side for starters
-c     set diagonal values to 1. This is overkill, but convenient
-c---------------------------------------------------------------------
-      do i = 0, isize
-         do m = 1, 5
-            do n = 1, 5
-               lhsa(m,n,i,0) = 0.0d0
-               lhsb(m,n,i,0) = 0.0d0
-               lhsa(m,n,i,ksize) = 0.0d0
-               lhsb(m,n,i,ksize) = 0.0d0
-            enddo
-            lhsb(m,m,i,0) = 1.0d0
-            lhsb(m,m,i,ksize) = 1.0d0
-         enddo
-      enddo
-
-      do j=start(2,c),jsize 
-
-c---------------------------------------------------------------------
-c     This function computes the left hand side for the three z-factors 
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     Compute the indices for storing the block-diagonal matrix;
-c     determine c (labeled f) and s jacobians for cell c
-c---------------------------------------------------------------------
-
-         do k = start(3,c)-1, cell_size(3,c)-end(3,c)
-            do i=start(1,c),isize
-
-               tmp1 = 1.0d0 / u(1,i,j,k,c)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               fjac(1,1,i,k) = 0.0d+00
-               fjac(1,2,i,k) = 0.0d+00
-               fjac(1,3,i,k) = 0.0d+00
-               fjac(1,4,i,k) = 1.0d+00
-               fjac(1,5,i,k) = 0.0d+00
-
-               fjac(2,1,i,k) = - ( u(2,i,j,k,c)*u(4,i,j,k,c) ) 
-     >              * tmp2 
-               fjac(2,2,i,k) = u(4,i,j,k,c) * tmp1
-               fjac(2,3,i,k) = 0.0d+00
-               fjac(2,4,i,k) = u(2,i,j,k,c) * tmp1
-               fjac(2,5,i,k) = 0.0d+00
-
-               fjac(3,1,i,k) = - ( u(3,i,j,k,c)*u(4,i,j,k,c) )
-     >              * tmp2 
-               fjac(3,2,i,k) = 0.0d+00
-               fjac(3,3,i,k) = u(4,i,j,k,c) * tmp1
-               fjac(3,4,i,k) = u(3,i,j,k,c) * tmp1
-               fjac(3,5,i,k) = 0.0d+00
-
-               fjac(4,1,i,k) = - (u(4,i,j,k,c)*u(4,i,j,k,c) * tmp2 ) 
-     >              + c2 * qs(i,j,k,c)
-               fjac(4,2,i,k) = - c2 *  u(2,i,j,k,c) * tmp1 
-               fjac(4,3,i,k) = - c2 *  u(3,i,j,k,c) * tmp1
-               fjac(4,4,i,k) = ( 2.0d+00 - c2 )
-     >              *  u(4,i,j,k,c) * tmp1 
-               fjac(4,5,i,k) = c2
-
-               fjac(5,1,i,k) = ( c2 * 2.0d0 * qs(i,j,k,c)
-     >              - c1 * ( u(5,i,j,k,c) * tmp1 ) )
-     >              * ( u(4,i,j,k,c) * tmp1 )
-               fjac(5,2,i,k) = - c2 * ( u(2,i,j,k,c)*u(4,i,j,k,c) )
-     >              * tmp2 
-               fjac(5,3,i,k) = - c2 * ( u(3,i,j,k,c)*u(4,i,j,k,c) )
-     >              * tmp2
-               fjac(5,4,i,k) = c1 * ( u(5,i,j,k,c) * tmp1 )
-     >              - c2 * ( qs(i,j,k,c)
-     >              + u(4,i,j,k,c)*u(4,i,j,k,c) * tmp2 )
-               fjac(5,5,i,k) = c1 * u(4,i,j,k,c) * tmp1
-
-               njac(1,1,i,k) = 0.0d+00
-               njac(1,2,i,k) = 0.0d+00
-               njac(1,3,i,k) = 0.0d+00
-               njac(1,4,i,k) = 0.0d+00
-               njac(1,5,i,k) = 0.0d+00
-
-               njac(2,1,i,k) = - c3c4 * tmp2 * u(2,i,j,k,c)
-               njac(2,2,i,k) =   c3c4 * tmp1
-               njac(2,3,i,k) =   0.0d+00
-               njac(2,4,i,k) =   0.0d+00
-               njac(2,5,i,k) =   0.0d+00
-
-               njac(3,1,i,k) = - c3c4 * tmp2 * u(3,i,j,k,c)
-               njac(3,2,i,k) =   0.0d+00
-               njac(3,3,i,k) =   c3c4 * tmp1
-               njac(3,4,i,k) =   0.0d+00
-               njac(3,5,i,k) =   0.0d+00
-
-               njac(4,1,i,k) = - con43 * c3c4 * tmp2 * u(4,i,j,k,c)
-               njac(4,2,i,k) =   0.0d+00
-               njac(4,3,i,k) =   0.0d+00
-               njac(4,4,i,k) =   con43 * c3 * c4 * tmp1
-               njac(4,5,i,k) =   0.0d+00
-
-               njac(5,1,i,k) = - (  c3c4
-     >              - c1345 ) * tmp3 * (u(2,i,j,k,c)**2)
-     >              - ( c3c4 - c1345 ) * tmp3 * (u(3,i,j,k,c)**2)
-     >              - ( con43 * c3c4
-     >              - c1345 ) * tmp3 * (u(4,i,j,k,c)**2)
-     >              - c1345 * tmp2 * u(5,i,j,k,c)
-
-               njac(5,2,i,k) = (  c3c4 - c1345 ) * tmp2 * u(2,i,j,k,c)
-               njac(5,3,i,k) = (  c3c4 - c1345 ) * tmp2 * u(3,i,j,k,c)
-               njac(5,4,i,k) = ( con43 * c3c4
-     >              - c1345 ) * tmp2 * u(4,i,j,k,c)
-               njac(5,5,i,k) = ( c1345 )* tmp1
-
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     now joacobians set, so form left hand side in z direction
-c---------------------------------------------------------------------
-         do k = start(3,c), ksize-end(3,c)
-            do i=start(1,c),isize
-
-               tmp1 = dt * tz1
-               tmp2 = dt * tz2
-
-               lhsa(1,1,i,k) = - tmp2 * fjac(1,1,i,k-1)
-     >              - tmp1 * njac(1,1,i,k-1)
-     >              - tmp1 * dz1 
-               lhsa(1,2,i,k) = - tmp2 * fjac(1,2,i,k-1)
-     >              - tmp1 * njac(1,2,i,k-1)
-               lhsa(1,3,i,k) = - tmp2 * fjac(1,3,i,k-1)
-     >              - tmp1 * njac(1,3,i,k-1)
-               lhsa(1,4,i,k) = - tmp2 * fjac(1,4,i,k-1)
-     >              - tmp1 * njac(1,4,i,k-1)
-               lhsa(1,5,i,k) = - tmp2 * fjac(1,5,i,k-1)
-     >              - tmp1 * njac(1,5,i,k-1)
-
-               lhsa(2,1,i,k) = - tmp2 * fjac(2,1,i,k-1)
-     >              - tmp1 * njac(2,1,i,k-1)
-               lhsa(2,2,i,k) = - tmp2 * fjac(2,2,i,k-1)
-     >              - tmp1 * njac(2,2,i,k-1)
-     >              - tmp1 * dz2
-               lhsa(2,3,i,k) = - tmp2 * fjac(2,3,i,k-1)
-     >              - tmp1 * njac(2,3,i,k-1)
-               lhsa(2,4,i,k) = - tmp2 * fjac(2,4,i,k-1)
-     >              - tmp1 * njac(2,4,i,k-1)
-               lhsa(2,5,i,k) = - tmp2 * fjac(2,5,i,k-1)
-     >              - tmp1 * njac(2,5,i,k-1)
-
-               lhsa(3,1,i,k) = - tmp2 * fjac(3,1,i,k-1)
-     >              - tmp1 * njac(3,1,i,k-1)
-               lhsa(3,2,i,k) = - tmp2 * fjac(3,2,i,k-1)
-     >              - tmp1 * njac(3,2,i,k-1)
-               lhsa(3,3,i,k) = - tmp2 * fjac(3,3,i,k-1)
-     >              - tmp1 * njac(3,3,i,k-1)
-     >              - tmp1 * dz3 
-               lhsa(3,4,i,k) = - tmp2 * fjac(3,4,i,k-1)
-     >              - tmp1 * njac(3,4,i,k-1)
-               lhsa(3,5,i,k) = - tmp2 * fjac(3,5,i,k-1)
-     >              - tmp1 * njac(3,5,i,k-1)
-
-               lhsa(4,1,i,k) = - tmp2 * fjac(4,1,i,k-1)
-     >              - tmp1 * njac(4,1,i,k-1)
-               lhsa(4,2,i,k) = - tmp2 * fjac(4,2,i,k-1)
-     >              - tmp1 * njac(4,2,i,k-1)
-               lhsa(4,3,i,k) = - tmp2 * fjac(4,3,i,k-1)
-     >              - tmp1 * njac(4,3,i,k-1)
-               lhsa(4,4,i,k) = - tmp2 * fjac(4,4,i,k-1)
-     >              - tmp1 * njac(4,4,i,k-1)
-     >              - tmp1 * dz4
-               lhsa(4,5,i,k) = - tmp2 * fjac(4,5,i,k-1)
-     >              - tmp1 * njac(4,5,i,k-1)
-
-               lhsa(5,1,i,k) = - tmp2 * fjac(5,1,i,k-1)
-     >              - tmp1 * njac(5,1,i,k-1)
-               lhsa(5,2,i,k) = - tmp2 * fjac(5,2,i,k-1)
-     >              - tmp1 * njac(5,2,i,k-1)
-               lhsa(5,3,i,k) = - tmp2 * fjac(5,3,i,k-1)
-     >              - tmp1 * njac(5,3,i,k-1)
-               lhsa(5,4,i,k) = - tmp2 * fjac(5,4,i,k-1)
-     >              - tmp1 * njac(5,4,i,k-1)
-               lhsa(5,5,i,k) = - tmp2 * fjac(5,5,i,k-1)
-     >              - tmp1 * njac(5,5,i,k-1)
-     >              - tmp1 * dz5
-
-               lhsb(1,1,i,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(1,1,i,k)
-     >              + tmp1 * 2.0d+00 * dz1
-               lhsb(1,2,i,k) = tmp1 * 2.0d+00 * njac(1,2,i,k)
-               lhsb(1,3,i,k) = tmp1 * 2.0d+00 * njac(1,3,i,k)
-               lhsb(1,4,i,k) = tmp1 * 2.0d+00 * njac(1,4,i,k)
-               lhsb(1,5,i,k) = tmp1 * 2.0d+00 * njac(1,5,i,k)
-
-               lhsb(2,1,i,k) = tmp1 * 2.0d+00 * njac(2,1,i,k)
-               lhsb(2,2,i,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(2,2,i,k)
-     >              + tmp1 * 2.0d+00 * dz2
-               lhsb(2,3,i,k) = tmp1 * 2.0d+00 * njac(2,3,i,k)
-               lhsb(2,4,i,k) = tmp1 * 2.0d+00 * njac(2,4,i,k)
-               lhsb(2,5,i,k) = tmp1 * 2.0d+00 * njac(2,5,i,k)
-
-               lhsb(3,1,i,k) = tmp1 * 2.0d+00 * njac(3,1,i,k)
-               lhsb(3,2,i,k) = tmp1 * 2.0d+00 * njac(3,2,i,k)
-               lhsb(3,3,i,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(3,3,i,k)
-     >              + tmp1 * 2.0d+00 * dz3
-               lhsb(3,4,i,k) = tmp1 * 2.0d+00 * njac(3,4,i,k)
-               lhsb(3,5,i,k) = tmp1 * 2.0d+00 * njac(3,5,i,k)
-
-               lhsb(4,1,i,k) = tmp1 * 2.0d+00 * njac(4,1,i,k)
-               lhsb(4,2,i,k) = tmp1 * 2.0d+00 * njac(4,2,i,k)
-               lhsb(4,3,i,k) = tmp1 * 2.0d+00 * njac(4,3,i,k)
-               lhsb(4,4,i,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(4,4,i,k)
-     >              + tmp1 * 2.0d+00 * dz4
-               lhsb(4,5,i,k) = tmp1 * 2.0d+00 * njac(4,5,i,k)
-
-               lhsb(5,1,i,k) = tmp1 * 2.0d+00 * njac(5,1,i,k)
-               lhsb(5,2,i,k) = tmp1 * 2.0d+00 * njac(5,2,i,k)
-               lhsb(5,3,i,k) = tmp1 * 2.0d+00 * njac(5,3,i,k)
-               lhsb(5,4,i,k) = tmp1 * 2.0d+00 * njac(5,4,i,k)
-               lhsb(5,5,i,k) = 1.0d+00
-     >              + tmp1 * 2.0d+00 * njac(5,5,i,k) 
-     >              + tmp1 * 2.0d+00 * dz5
-
-               lhsc(1,1,i,j,k,c) =  tmp2 * fjac(1,1,i,k+1)
-     >              - tmp1 * njac(1,1,i,k+1)
-     >              - tmp1 * dz1
-               lhsc(1,2,i,j,k,c) =  tmp2 * fjac(1,2,i,k+1)
-     >              - tmp1 * njac(1,2,i,k+1)
-               lhsc(1,3,i,j,k,c) =  tmp2 * fjac(1,3,i,k+1)
-     >              - tmp1 * njac(1,3,i,k+1)
-               lhsc(1,4,i,j,k,c) =  tmp2 * fjac(1,4,i,k+1)
-     >              - tmp1 * njac(1,4,i,k+1)
-               lhsc(1,5,i,j,k,c) =  tmp2 * fjac(1,5,i,k+1)
-     >              - tmp1 * njac(1,5,i,k+1)
-
-               lhsc(2,1,i,j,k,c) =  tmp2 * fjac(2,1,i,k+1)
-     >              - tmp1 * njac(2,1,i,k+1)
-               lhsc(2,2,i,j,k,c) =  tmp2 * fjac(2,2,i,k+1)
-     >              - tmp1 * njac(2,2,i,k+1)
-     >              - tmp1 * dz2
-               lhsc(2,3,i,j,k,c) =  tmp2 * fjac(2,3,i,k+1)
-     >              - tmp1 * njac(2,3,i,k+1)
-               lhsc(2,4,i,j,k,c) =  tmp2 * fjac(2,4,i,k+1)
-     >              - tmp1 * njac(2,4,i,k+1)
-               lhsc(2,5,i,j,k,c) =  tmp2 * fjac(2,5,i,k+1)
-     >              - tmp1 * njac(2,5,i,k+1)
-
-               lhsc(3,1,i,j,k,c) =  tmp2 * fjac(3,1,i,k+1)
-     >              - tmp1 * njac(3,1,i,k+1)
-               lhsc(3,2,i,j,k,c) =  tmp2 * fjac(3,2,i,k+1)
-     >              - tmp1 * njac(3,2,i,k+1)
-               lhsc(3,3,i,j,k,c) =  tmp2 * fjac(3,3,i,k+1)
-     >              - tmp1 * njac(3,3,i,k+1)
-     >              - tmp1 * dz3
-               lhsc(3,4,i,j,k,c) =  tmp2 * fjac(3,4,i,k+1)
-     >              - tmp1 * njac(3,4,i,k+1)
-               lhsc(3,5,i,j,k,c) =  tmp2 * fjac(3,5,i,k+1)
-     >              - tmp1 * njac(3,5,i,k+1)
-
-               lhsc(4,1,i,j,k,c) =  tmp2 * fjac(4,1,i,k+1)
-     >              - tmp1 * njac(4,1,i,k+1)
-               lhsc(4,2,i,j,k,c) =  tmp2 * fjac(4,2,i,k+1)
-     >              - tmp1 * njac(4,2,i,k+1)
-               lhsc(4,3,i,j,k,c) =  tmp2 * fjac(4,3,i,k+1)
-     >              - tmp1 * njac(4,3,i,k+1)
-               lhsc(4,4,i,j,k,c) =  tmp2 * fjac(4,4,i,k+1)
-     >              - tmp1 * njac(4,4,i,k+1)
-     >              - tmp1 * dz4
-               lhsc(4,5,i,j,k,c) =  tmp2 * fjac(4,5,i,k+1)
-     >              - tmp1 * njac(4,5,i,k+1)
-
-               lhsc(5,1,i,j,k,c) =  tmp2 * fjac(5,1,i,k+1)
-     >              - tmp1 * njac(5,1,i,k+1)
-               lhsc(5,2,i,j,k,c) =  tmp2 * fjac(5,2,i,k+1)
-     >              - tmp1 * njac(5,2,i,k+1)
-               lhsc(5,3,i,j,k,c) =  tmp2 * fjac(5,3,i,k+1)
-     >              - tmp1 * njac(5,3,i,k+1)
-               lhsc(5,4,i,j,k,c) =  tmp2 * fjac(5,4,i,k+1)
-     >              - tmp1 * njac(5,4,i,k+1)
-               lhsc(5,5,i,j,k,c) =  tmp2 * fjac(5,5,i,k+1)
-     >              - tmp1 * njac(5,5,i,k+1)
-     >              - tmp1 * dz5
-
-            enddo
-         enddo
-
-
-c---------------------------------------------------------------------
-c     outer most do loops - sweeping in i direction
-c---------------------------------------------------------------------
-         if (first .eq. 1) then 
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,kstart) by b_inverse and copy back to c
-c     multiply rhs(kstart) by b_inverse(kstart) and copy to rhs
-c---------------------------------------------------------------------
-!dir$ ivdep
-            do i=start(1,c),isize
-               call binvcrhs( lhsb(1,1,i,kstart),
-     >                        lhsc(1,1,i,j,kstart,c),
-     >                        rhs(1,i,j,kstart,c) )
-            enddo
-
-         endif
-
-c---------------------------------------------------------------------
-c     begin inner most do loop
-c     do all the elements of the cell unless last 
-c---------------------------------------------------------------------
-         do k=kstart+first,ksize-last
-!dir$ ivdep
-            do i=start(1,c),isize
-
-c---------------------------------------------------------------------
-c     subtract A*lhs_vector(k-1) from lhs_vector(k)
-c     
-c     rhs(k) = rhs(k) - A*rhs(k-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,i,k),
-     >                         rhs(1,i,j,k-1,c),rhs(1,i,j,k,c))
-
-c---------------------------------------------------------------------
-c     B(k) = B(k) - C(k-1)*A(k)
-c     call matmul_sub(aa,i,j,k,c,cc,i,j,k-1,c,bb,i,j,k,c)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,i,k),
-     >                         lhsc(1,1,i,j,k-1,c),
-     >                         lhsb(1,1,i,k))
-
-c---------------------------------------------------------------------
-c     multiply c(i,j,k) by b_inverse and copy back to c
-c     multiply rhs(i,j,1) by b_inverse(i,j,1) and copy to rhs
-c---------------------------------------------------------------------
-               call binvcrhs( lhsb(1,1,i,k),
-     >                        lhsc(1,1,i,j,k,c),
-     >                        rhs(1,i,j,k,c) )
-
-            enddo
-         enddo
-
-c---------------------------------------------------------------------
-c     Now finish up special cases for last cell
-c---------------------------------------------------------------------
-         if (last .eq. 1) then
-
-!dir$ ivdep
-            do i=start(1,c),isize
-c---------------------------------------------------------------------
-c     rhs(ksize) = rhs(ksize) - A*rhs(ksize-1)
-c---------------------------------------------------------------------
-               call matvec_sub(lhsa(1,1,i,ksize),
-     >                         rhs(1,i,j,ksize-1,c),rhs(1,i,j,ksize,c))
-
-c---------------------------------------------------------------------
-c     B(ksize) = B(ksize) - C(ksize-1)*A(ksize)
-c     call matmul_sub(aa,i,j,ksize,c,
-c     $              cc,i,j,ksize-1,c,bb,i,j,ksize,c)
-c---------------------------------------------------------------------
-               call matmul_sub(lhsa(1,1,i,ksize),
-     >                         lhsc(1,1,i,j,ksize-1,c),
-     >                         lhsb(1,1,i,ksize))
-
-c---------------------------------------------------------------------
-c     multiply rhs(ksize) by b_inverse(ksize) and copy to rhs
-c---------------------------------------------------------------------
-               call binvrhs( lhsb(1,1,i,ksize),
-     >                       rhs(1,i,j,ksize,c) )
-            enddo
-
-         endif
-      enddo
-
-
-      return
-      end
-      
-
-
-
-
-
diff --git a/examples/smpi/NAS/CG/Makefile b/examples/smpi/NAS/CG/Makefile
deleted file mode 100644 (file)
index 33e52c6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SHELL=/bin/sh
-BENCHMARK=cg
-BENCHMARKU=CG
-
-include ../config/make.def
-
-OBJS = cg.o ${COMMON}/print_results.o  \
-       ${COMMON}/${RAND}.o ${COMMON}/timers.o
-
-include ../sys/make.common
-
-${PROGRAM}: config ${OBJS}
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${FMPI_LIB}
-
-cg.o:          cg.f  mpinpb.h npbparams.h
-       ${FCOMPILE} cg.f
-
-clean:
-       - rm -f *.o *~ 
-       - rm -f npbparams.h core
-
-
-
diff --git a/examples/smpi/NAS/CG/cg.f b/examples/smpi/NAS/CG/cg.f
deleted file mode 100644 (file)
index 0d425d7..0000000
+++ /dev/null
@@ -1,1787 +0,0 @@
-!-------------------------------------------------------------------------!
-!                                                                         !
-!        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3         !
-!                                                                         !
-!                                   C G                                   !
-!                                                                         !
-!-------------------------------------------------------------------------!
-!                                                                         !
-!    This benchmark is part of the NAS Parallel Benchmark 3.3 suite.      !
-!    It is described in NAS Technical Reports 95-020 and 02-007           !
-!                                                                         !
-!    Permission to use, copy, distribute and modify this software         !
-!    for any purpose with or without fee is hereby granted.  We           !
-!    request, however, that all derived work reference the NAS            !
-!    Parallel Benchmarks 3.3. This software is provided "as is"           !
-!    without express or implied warranty.                                 !
-!                                                                         !
-!    Information on NPB 3.3, including the technical report, the          !
-!    original specifications, source code, results and information        !
-!    on how to submit new results, is available at:                       !
-!                                                                         !
-!           http://www.nas.nasa.gov/Software/NPB/                         !
-!                                                                         !
-!    Send comments or suggestions to  npb@nas.nasa.gov                    !
-!                                                                         !
-!          NAS Parallel Benchmarks Group                                  !
-!          NASA Ames Research Center                                      !
-!          Mail Stop: T27A-1                                              !
-!          Moffett Field, CA   94035-1000                                 !
-!                                                                         !
-!          E-mail:  npb@nas.nasa.gov                                      !
-!          Fax:     (650) 604-3957                                        !
-!                                                                         !
-!-------------------------------------------------------------------------!
-
-
-c---------------------------------------------------------------------
-c
-c Authors: M. Yarrow
-c          C. Kuszmaul
-c          R. F. Van der Wijngaart
-c          H. Jin
-c
-c---------------------------------------------------------------------
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      program cg
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-
-      implicit none
-
-      include 'mpinpb.h'
-      integer status(MPI_STATUS_SIZE), request, ierr
-
-      include 'npbparams.h'
-
-c---------------------------------------------------------------------
-c  num_procs must be a power of 2, and num_procs=num_proc_cols*num_proc_rows.
-c  num_proc_cols and num_proc_cols are to be found in npbparams.h.
-c  When num_procs is not square, then num_proc_cols must be = 2*num_proc_rows.
-c---------------------------------------------------------------------
-      integer    num_procs 
-      parameter( num_procs = num_proc_cols * num_proc_rows )
-
-
-
-c---------------------------------------------------------------------
-c  Class specific parameters: 
-c  It appears here for reference only.
-c  These are their values, however, this info is imported in the npbparams.h
-c  include file, which is written by the sys/setparams.c program.
-c---------------------------------------------------------------------
-
-C----------
-C  Class S:
-C----------
-CC       parameter( na=1400, 
-CC      >           nonzer=7, 
-CC      >           shift=10., 
-CC      >           niter=15,
-CC      >           rcond=1.0d-1 )
-C----------
-C  Class W:
-C----------
-CC       parameter( na=7000,
-CC      >           nonzer=8, 
-CC      >           shift=12., 
-CC      >           niter=15,
-CC      >           rcond=1.0d-1 )
-C----------
-C  Class A:
-C----------
-CC       parameter( na=14000,
-CC      >           nonzer=11, 
-CC      >           shift=20., 
-CC      >           niter=15,
-CC      >           rcond=1.0d-1 )
-C----------
-C  Class B:
-C----------
-CC       parameter( na=75000, 
-CC      >           nonzer=13, 
-CC      >           shift=60., 
-CC      >           niter=75,
-CC      >           rcond=1.0d-1 )
-C----------
-C  Class C:
-C----------
-CC       parameter( na=150000, 
-CC      >           nonzer=15, 
-CC      >           shift=110., 
-CC      >           niter=75,
-CC      >           rcond=1.0d-1 )
-C----------
-C  Class D:
-C----------
-CC       parameter( na=1500000, 
-CC      >           nonzer=21, 
-CC      >           shift=500., 
-CC      >           niter=100,
-CC      >           rcond=1.0d-1 )
-C----------
-C  Class E:
-C----------
-CC       parameter( na=9000000, 
-CC      >           nonzer=26, 
-CC      >           shift=1500., 
-CC      >           niter=100,
-CC      >           rcond=1.0d-1 )
-
-
-
-      integer    nz
-      parameter( nz = na*(nonzer+1)/num_procs*(nonzer+1)+nonzer
-     >              + na*(nonzer+2+num_procs/256)/num_proc_cols )
-
-
-
-      common / partit_size  /  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-      integer                  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-
-
-      common / main_int_mem /  colidx,     rowstr,
-     >                         iv,         arow,     acol
-      integer                  colidx(nz), rowstr(na+1),
-     >                         iv(2*na+1), arow(nz), acol(nz)
-
-
-      common / main_flt_mem /  v,       aelt,     a,
-     >                         x,
-     >                         z,
-     >                         p,
-     >                         q,
-     >                         r,
-     >                         w
-      double precision         v(na+1), aelt(nz), a(nz),
-     >                         x(na/num_proc_rows+2),
-     >                         z(na/num_proc_rows+2),
-     >                         p(na/num_proc_rows+2),
-     >                         q(na/num_proc_rows+2),
-     >                         r(na/num_proc_rows+2),
-     >                         w(na/num_proc_rows+2)
-
-
-      common /urando/          amult, tran
-      double precision         amult, tran
-
-
-
-      integer            l2npcols
-      integer            reduce_exch_proc(num_proc_cols)
-      integer            reduce_send_starts(num_proc_cols)
-      integer            reduce_send_lengths(num_proc_cols)
-      integer            reduce_recv_starts(num_proc_cols)
-      integer            reduce_recv_lengths(num_proc_cols)
-
-      integer            i, j, k, it
-
-      double precision   zeta, randlc
-      external           randlc
-      double precision   rnorm
-      double precision   norm_temp1(2), norm_temp2(2)
-
-      double precision   t, tmax, mflops
-      external           timer_read
-      double precision   timer_read
-      character          class
-      logical            verified
-      double precision   zeta_verify_value, epsilon, err
-
-
-c---------------------------------------------------------------------
-c  Set up mpi initialization and number of proc testing
-c---------------------------------------------------------------------
-      call initialize_mpi
-
-
-      if( na .eq. 1400 .and. 
-     &    nonzer .eq. 7 .and. 
-     &    niter .eq. 15 .and.
-     &    shift .eq. 10.d0 ) then
-         class = 'S'
-         zeta_verify_value = 8.5971775078648d0
-      else if( na .eq. 7000 .and. 
-     &         nonzer .eq. 8 .and. 
-     &         niter .eq. 15 .and.
-     &         shift .eq. 12.d0 ) then
-         class = 'W'
-         zeta_verify_value = 10.362595087124d0
-      else if( na .eq. 14000 .and. 
-     &         nonzer .eq. 11 .and. 
-     &         niter .eq. 15 .and.
-     &         shift .eq. 20.d0 ) then
-         class = 'A'
-         zeta_verify_value = 17.130235054029d0
-      else if( na .eq. 75000 .and. 
-     &         nonzer .eq. 13 .and. 
-     &         niter .eq. 75 .and.
-     &         shift .eq. 60.d0 ) then
-         class = 'B'
-         zeta_verify_value = 22.712745482631d0
-      else if( na .eq. 150000 .and. 
-     &         nonzer .eq. 15 .and. 
-     &         niter .eq. 75 .and.
-     &         shift .eq. 110.d0 ) then
-         class = 'C'
-         zeta_verify_value = 28.973605592845d0
-      else if( na .eq. 1500000 .and. 
-     &         nonzer .eq. 21 .and. 
-     &         niter .eq. 100 .and.
-     &         shift .eq. 500.d0 ) then
-         class = 'D'
-         zeta_verify_value = 52.514532105794d0
-      else if( na .eq. 9000000 .and. 
-     &         nonzer .eq. 26 .and. 
-     &         niter .eq. 100 .and.
-     &         shift .eq. 1.5d3 ) then
-         class = 'E'
-         zeta_verify_value = 77.522164599383d0
-      else
-         class = 'U'
-      endif
-
-      if( me .eq. root )then
-         write( *,1000 ) 
-         write( *,1001 ) na
-         write( *,1002 ) niter
-         write( *,1003 ) nprocs
-         write( *,1004 ) nonzer
-         write( *,1005 ) shift
- 1000 format(//,' NAS Parallel Benchmarks 3.3 -- CG Benchmark', /)
- 1001 format(' Size: ', i10 )
- 1002 format(' Iterations: ', i5 )
- 1003 format(' Number of active processes: ', i5 )
- 1004 format(' Number of nonzeroes per row: ', i8)
- 1005 format(' Eigenvalue shift: ', e8.3)
-      endif
-
-      if (.not. convertdouble) then
-         dp_type = MPI_DOUBLE_PRECISION
-      else
-         dp_type = MPI_REAL
-      endif
-
-
-      naa = na
-      nzz = nz
-
-
-c---------------------------------------------------------------------
-c  Set up processor info, such as whether sq num of procs, etc
-c---------------------------------------------------------------------
-      call setup_proc_info( num_procs, 
-     >                      num_proc_rows, 
-     >                      num_proc_cols )
-
-
-c---------------------------------------------------------------------
-c  Set up partition's submatrix info: firstcol, lastcol, firstrow, lastrow
-c---------------------------------------------------------------------
-      call setup_submatrix_info( l2npcols,
-     >                           reduce_exch_proc,
-     >                           reduce_send_starts,
-     >                           reduce_send_lengths,
-     >                           reduce_recv_starts,
-     >                           reduce_recv_lengths )
-
-
-
-c---------------------------------------------------------------------
-c  Inialize random number generator
-c---------------------------------------------------------------------
-      tran    = 314159265.0D0
-      amult   = 1220703125.0D0
-      zeta    = randlc( tran, amult )
-
-c---------------------------------------------------------------------
-c  Set up partition's sparse random matrix for given class size
-c---------------------------------------------------------------------
-      call makea(naa, nzz, a, colidx, rowstr, nonzer,
-     >           firstrow, lastrow, firstcol, lastcol, 
-     >           rcond, arow, acol, aelt, v, iv, shift)
-
-
-
-c---------------------------------------------------------------------
-c  Note: as a result of the above call to makea:
-c        values of j used in indexing rowstr go from 1 --> lastrow-firstrow+1
-c        values of colidx which are col indexes go from firstcol --> lastcol
-c        So:
-c        Shift the col index vals from actual (firstcol --> lastcol ) 
-c        to local, i.e., (1 --> lastcol-firstcol+1)
-c---------------------------------------------------------------------
-      do j=1,lastrow-firstrow+1
-         do k=rowstr(j),rowstr(j+1)-1
-            colidx(k) = colidx(k) - firstcol + 1
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c  set starting vector to (1, 1, .... 1)
-c---------------------------------------------------------------------
-      do i = 1, na/num_proc_rows+1
-         x(i) = 1.0D0
-      enddo
-
-      zeta  = 0.0d0
-
-c---------------------------------------------------------------------
-c---->
-c  Do one iteration untimed to init all code and data page tables
-c---->                    (then reinit, start timing, to niter its)
-c---------------------------------------------------------------------
-      do it = 1, 1
-
-c---------------------------------------------------------------------
-c  The call to the conjugate gradient routine:
-c---------------------------------------------------------------------
-         call conj_grad ( colidx,
-     >                    rowstr,
-     >                    x,
-     >                    z,
-     >                    a,
-     >                    p,
-     >                    q,
-     >                    r,
-     >                    w,
-     >                    rnorm, 
-     >                    l2npcols,
-     >                    reduce_exch_proc,
-     >                    reduce_send_starts,
-     >                    reduce_send_lengths,
-     >                    reduce_recv_starts,
-     >                    reduce_recv_lengths )
-
-c---------------------------------------------------------------------
-c  zeta = shift + 1/(x.z)
-c  So, first: (x.z)
-c  Also, find norm of z
-c  So, first: (z.z)
-c---------------------------------------------------------------------
-         norm_temp1(1) = 0.0d0
-         norm_temp1(2) = 0.0d0
-         do j=1, lastcol-firstcol+1
-            norm_temp1(1) = norm_temp1(1) + x(j)*z(j)
-            norm_temp1(2) = norm_temp1(2) + z(j)*z(j)
-         enddo
-
-         do i = 1, l2npcols
-            call mpi_irecv( norm_temp2,
-     >                      2, 
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      request,
-     >                      ierr )
-            call mpi_send(  norm_temp1,
-     >                      2, 
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      ierr )
-            call mpi_wait( request, status, ierr )
-
-            norm_temp1(1) = norm_temp1(1) + norm_temp2(1)
-            norm_temp1(2) = norm_temp1(2) + norm_temp2(2)
-         enddo
-
-         norm_temp1(2) = 1.0d0 / sqrt( norm_temp1(2) )
-
-
-c---------------------------------------------------------------------
-c  Normalize z to obtain x
-c---------------------------------------------------------------------
-         do j=1, lastcol-firstcol+1      
-            x(j) = norm_temp1(2)*z(j)    
-         enddo                           
-
-
-      enddo                              ! end of do one iteration untimed
-
-
-c---------------------------------------------------------------------
-c  set starting vector to (1, 1, .... 1)
-c---------------------------------------------------------------------
-c
-c  NOTE: a questionable limit on size:  should this be na/num_proc_cols+1 ?
-c
-      do i = 1, na/num_proc_rows+1
-         x(i) = 1.0D0
-      enddo
-
-      zeta  = 0.0d0
-
-c---------------------------------------------------------------------
-c  Synchronize and start timing
-c---------------------------------------------------------------------
-      call mpi_barrier( mpi_comm_world,
-     >                  ierr )
-
-      call timer_clear( 1 )
-      call timer_start( 1 )
-
-c---------------------------------------------------------------------
-c---->
-c  Main Iteration for inverse power method
-c---->
-c---------------------------------------------------------------------
-      do it = 1, niter
-
-c---------------------------------------------------------------------
-c  The call to the conjugate gradient routine:
-c---------------------------------------------------------------------
-         call conj_grad ( colidx,
-     >                    rowstr,
-     >                    x,
-     >                    z,
-     >                    a,
-     >                    p,
-     >                    q,
-     >                    r,
-     >                    w,
-     >                    rnorm, 
-     >                    l2npcols,
-     >                    reduce_exch_proc,
-     >                    reduce_send_starts,
-     >                    reduce_send_lengths,
-     >                    reduce_recv_starts,
-     >                    reduce_recv_lengths )
-
-
-c---------------------------------------------------------------------
-c  zeta = shift + 1/(x.z)
-c  So, first: (x.z)
-c  Also, find norm of z
-c  So, first: (z.z)
-c---------------------------------------------------------------------
-         norm_temp1(1) = 0.0d0
-         norm_temp1(2) = 0.0d0
-         do j=1, lastcol-firstcol+1
-            norm_temp1(1) = norm_temp1(1) + x(j)*z(j)
-            norm_temp1(2) = norm_temp1(2) + z(j)*z(j)
-         enddo
-
-         do i = 1, l2npcols
-            call mpi_irecv( norm_temp2,
-     >                      2, 
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      request,
-     >                      ierr )
-            call mpi_send(  norm_temp1,
-     >                      2, 
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      ierr )
-            call mpi_wait( request, status, ierr )
-
-            norm_temp1(1) = norm_temp1(1) + norm_temp2(1)
-            norm_temp1(2) = norm_temp1(2) + norm_temp2(2)
-         enddo
-
-         norm_temp1(2) = 1.0d0 / sqrt( norm_temp1(2) )
-
-
-         if( me .eq. root )then
-            zeta = shift + 1.0d0 / norm_temp1(1)
-            if( it .eq. 1 ) write( *,9000 )
-            write( *,9001 ) it, rnorm, zeta
-         endif
- 9000 format( /,'   iteration           ||r||                 zeta' )
- 9001 format( 4x, i5, 7x, e20.14, f20.13 )
-
-c---------------------------------------------------------------------
-c  Normalize z to obtain x
-c---------------------------------------------------------------------
-         do j=1, lastcol-firstcol+1      
-            x(j) = norm_temp1(2)*z(j)    
-         enddo                           
-
-
-      enddo                              ! end of main iter inv pow meth
-
-      call timer_stop( 1 )
-
-c---------------------------------------------------------------------
-c  End of timed section
-c---------------------------------------------------------------------
-
-      t = timer_read( 1 )
-
-      call mpi_reduce( t,
-     >                 tmax,
-     >                 1, 
-     >                 dp_type,
-     >                 MPI_MAX,
-     >                 root,
-     >                 mpi_comm_world,
-     >                 ierr )
-
-      if( me .eq. root )then
-         write(*,100)
- 100     format(' Benchmark completed ')
-
-         epsilon = 1.d-10
-         if (class .ne. 'U') then
-
-            err = abs( zeta - zeta_verify_value )/zeta_verify_value
-            if( err .le. epsilon ) then
-               verified = .TRUE.
-               write(*, 200)
-               write(*, 201) zeta
-               write(*, 202) err
- 200           format(' VERIFICATION SUCCESSFUL ')
- 201           format(' Zeta is    ', E20.13)
- 202           format(' Error is   ', E20.13)
-            else
-               verified = .FALSE.
-               write(*, 300) 
-               write(*, 301) zeta
-               write(*, 302) zeta_verify_value
- 300           format(' VERIFICATION FAILED')
- 301           format(' Zeta                ', E20.13)
- 302           format(' The correct zeta is ', E20.13)
-            endif
-         else
-            verified = .FALSE.
-            write (*, 400)
-            write (*, 401)
-            write (*, 201) zeta
- 400        format(' Problem size unknown')
- 401        format(' NO VERIFICATION PERFORMED')
-         endif
-
-
-         if( tmax .ne. 0. ) then
-            mflops = float( 2*niter*na )
-     &                  * ( 3.+float( nonzer*(nonzer+1) )
-     &                    + 25.*(5.+float( nonzer*(nonzer+1) ))
-     &                    + 3. ) / tmax / 1000000.0
-         else
-            mflops = 0.0
-         endif
-
-         call print_results('CG', class, na, 0, 0,
-     >                      niter, nnodes_compiled, nprocs, tmax,
-     >                      mflops, '          floating point', 
-     >                      verified, npbversion, compiletime,
-     >                      cs1, cs2, cs3, cs4, cs5, cs6, cs7)
-
-
-      endif
-
-
-      call mpi_finalize(ierr)
-
-
-
-      end                              ! end main
-
-
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine initialize_mpi
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer   ierr
-
-
-      call mpi_init( ierr )
-      call mpi_comm_rank( mpi_comm_world, me, ierr )
-      call mpi_comm_size( mpi_comm_world, nprocs, ierr )
-      root = 0
-
-
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine setup_proc_info( num_procs, 
-     >                            num_proc_rows, 
-     >                            num_proc_cols )
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-
-      common / partit_size  /  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-      integer                  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-
-      integer   num_procs, num_proc_cols, num_proc_rows
-      integer   i, ierr
-      integer   log2nprocs
-
-c---------------------------------------------------------------------
-c  num_procs must be a power of 2, and num_procs=num_proc_cols*num_proc_rows
-c  When num_procs is not square, then num_proc_cols = 2*num_proc_rows
-c---------------------------------------------------------------------
-c  First, number of procs must be power of two. 
-c---------------------------------------------------------------------
-      if( nprocs .ne. num_procs )then
-          if( me .eq. root ) write( *,9000 ) nprocs, num_procs
- 9000     format(      /,'Error: ',/,'num of procs allocated   (', 
-     >                 i4, ' )',
-     >                 /,'is not equal to',/,
-     >                 'compiled number of procs (',
-     >                 i4, ' )',/   )
-          call mpi_finalize(ierr)
-          stop
-      endif
-
-
-      i = num_proc_cols
- 100  continue
-          if( i .ne. 1 .and. i/2*2 .ne. i )then
-              if ( me .eq. root ) then  
-                 write( *,* ) 'Error: num_proc_cols is ',
-     >                         num_proc_cols,
-     >                        ' which is not a power of two'
-              endif
-              call mpi_finalize(ierr)
-              stop
-          endif
-          i = i / 2
-          if( i .ne. 0 )then
-              goto 100
-          endif
-      
-      i = num_proc_rows
- 200  continue
-          if( i .ne. 1 .and. i/2*2 .ne. i )then
-              if ( me .eq. root ) then 
-                 write( *,* ) 'Error: num_proc_rows is ',
-     >                         num_proc_rows,
-     >                        ' which is not a power of two'
-              endif
-              call mpi_finalize(ierr)
-              stop
-          endif
-          i = i / 2
-          if( i .ne. 0 )then
-              goto 200
-          endif
-      
-      log2nprocs = 0
-      i = nprocs
- 300  continue
-          if( i .ne. 1 .and. i/2*2 .ne. i )then
-              write( *,* ) 'Error: nprocs is ',
-     >                      nprocs,
-     >                      ' which is not a power of two'
-              call mpi_finalize(ierr)
-              stop
-          endif
-          i = i / 2
-          if( i .ne. 0 )then
-              log2nprocs = log2nprocs + 1
-              goto 300
-          endif
-
-CC       write( *,* ) 'nprocs, log2nprocs: ',nprocs,log2nprocs
-
-      
-      npcols = num_proc_cols
-      nprows = num_proc_rows
-
-
-      return
-      end
-
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine setup_submatrix_info( l2npcols,
-     >                                 reduce_exch_proc,
-     >                                 reduce_send_starts,
-     >                                 reduce_send_lengths,
-     >                                 reduce_recv_starts,
-     >                                 reduce_recv_lengths )
-     >                                 
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer      col_size, row_size
-
-      common / partit_size  /  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-      integer                  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-
-      integer   reduce_exch_proc(*)
-      integer   reduce_send_starts(*)
-      integer   reduce_send_lengths(*)
-      integer   reduce_recv_starts(*)
-      integer   reduce_recv_lengths(*)
-
-      integer   i, j
-      integer   div_factor
-      integer   l2npcols
-
-
-      proc_row = me / npcols
-      proc_col = me - proc_row*npcols
-
-
-
-c---------------------------------------------------------------------
-c  If naa evenly divisible by npcols, then it is evenly divisible 
-c  by nprows 
-c---------------------------------------------------------------------
-
-      if( naa/npcols*npcols .eq. naa )then
-          col_size = naa/npcols
-          firstcol = proc_col*col_size + 1
-          lastcol  = firstcol - 1 + col_size
-          row_size = naa/nprows
-          firstrow = proc_row*row_size + 1
-          lastrow  = firstrow - 1 + row_size
-c---------------------------------------------------------------------
-c  If naa not evenly divisible by npcols, then first subdivide for nprows
-c  and then, if npcols not equal to nprows (i.e., not a sq number of procs), 
-c  get col subdivisions by dividing by 2 each row subdivision.
-c---------------------------------------------------------------------
-      else
-          if( proc_row .lt. naa - naa/nprows*nprows)then
-              row_size = naa/nprows+ 1
-              firstrow = proc_row*row_size + 1
-              lastrow  = firstrow - 1 + row_size
-          else
-              row_size = naa/nprows
-              firstrow = (naa - naa/nprows*nprows)*(row_size+1)
-     >                 + (proc_row-(naa-naa/nprows*nprows))
-     >                     *row_size + 1
-              lastrow  = firstrow - 1 + row_size
-          endif
-          if( npcols .eq. nprows )then
-              if( proc_col .lt. naa - naa/npcols*npcols )then
-                  col_size = naa/npcols+ 1
-                  firstcol = proc_col*col_size + 1
-                  lastcol  = firstcol - 1 + col_size
-              else
-                  col_size = naa/npcols
-                  firstcol = (naa - naa/npcols*npcols)*(col_size+1)
-     >                     + (proc_col-(naa-naa/npcols*npcols))
-     >                         *col_size + 1
-                  lastcol  = firstcol - 1 + col_size
-              endif
-          else
-              if( (proc_col/2) .lt. 
-     >                           naa - naa/(npcols/2)*(npcols/2) )then
-                  col_size = naa/(npcols/2) + 1
-                  firstcol = (proc_col/2)*col_size + 1
-                  lastcol  = firstcol - 1 + col_size
-              else
-                  col_size = naa/(npcols/2)
-                  firstcol = (naa - naa/(npcols/2)*(npcols/2))
-     >                                                 *(col_size+1)
-     >               + ((proc_col/2)-(naa-naa/(npcols/2)*(npcols/2)))
-     >                         *col_size + 1
-                  lastcol  = firstcol - 1 + col_size
-              endif
-CC               write( *,* ) col_size,firstcol,lastcol
-              if( mod( me,2 ) .eq. 0 )then
-                  lastcol  = firstcol - 1 + (col_size-1)/2 + 1
-              else
-                  firstcol = firstcol + (col_size-1)/2 + 1
-                  lastcol  = firstcol - 1 + col_size/2
-CC                   write( *,* ) firstcol,lastcol
-              endif
-          endif
-      endif
-
-
-
-      if( npcols .eq. nprows )then
-          send_start = 1
-          send_len   = lastrow - firstrow + 1
-      else
-          if( mod( me,2 ) .eq. 0 )then
-              send_start = 1
-              send_len   = (1 + lastrow-firstrow+1)/2
-          else
-              send_start = (1 + lastrow-firstrow+1)/2 + 1
-              send_len   = (lastrow-firstrow+1)/2
-          endif
-      endif
-          
-
-
-
-c---------------------------------------------------------------------
-c  Transpose exchange processor
-c---------------------------------------------------------------------
-
-      if( npcols .eq. nprows )then
-          exch_proc = mod( me,nprows )*nprows + me/nprows
-      else
-          exch_proc = 2*(mod( me/2,nprows )*nprows + me/2/nprows)
-     >                 + mod( me,2 )
-      endif
-
-
-
-      i = npcols / 2
-      l2npcols = 0
-      do while( i .gt. 0 )
-         l2npcols = l2npcols + 1
-         i = i / 2
-      enddo
-
-
-c---------------------------------------------------------------------
-c  Set up the reduce phase schedules...
-c---------------------------------------------------------------------
-
-      div_factor = npcols
-      do i = 1, l2npcols
-
-         j = mod( proc_col+div_factor/2, div_factor )
-     >     + proc_col / div_factor * div_factor
-         reduce_exch_proc(i) = proc_row*npcols + j
-
-         div_factor = div_factor / 2
-
-      enddo
-
-
-      do i = l2npcols, 1, -1
-
-            if( nprows .eq. npcols )then
-               reduce_send_starts(i)  = send_start
-               reduce_send_lengths(i) = send_len
-               reduce_recv_lengths(i) = lastrow - firstrow + 1
-            else
-               reduce_recv_lengths(i) = send_len
-               if( i .eq. l2npcols )then
-                  reduce_send_lengths(i) = lastrow-firstrow+1 - send_len
-                  if( me/2*2 .eq. me )then
-                     reduce_send_starts(i) = send_start + send_len
-                  else
-                     reduce_send_starts(i) = 1
-                  endif
-               else
-                  reduce_send_lengths(i) = send_len
-                  reduce_send_starts(i)  = send_start
-               endif
-            endif
-            reduce_recv_starts(i) = send_start
-
-      enddo
-
-
-      exch_recv_length = lastcol - firstcol + 1
-
-
-      return
-      end
-
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine conj_grad ( colidx,
-     >                       rowstr,
-     >                       x,
-     >                       z,
-     >                       a,
-     >                       p,
-     >                       q,
-     >                       r,
-     >                       w,
-     >                       rnorm, 
-     >                       l2npcols,
-     >                       reduce_exch_proc,
-     >                       reduce_send_starts,
-     >                       reduce_send_lengths,
-     >                       reduce_recv_starts,
-     >                       reduce_recv_lengths )
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c  Floaging point arrays here are named as in NPB1 spec discussion of 
-c  CG algorithm
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer status(MPI_STATUS_SIZE ), request
-
-
-      common / partit_size  /  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-      integer                  naa, nzz, 
-     >                         npcols, nprows,
-     >                         proc_col, proc_row,
-     >                         firstrow, 
-     >                         lastrow, 
-     >                         firstcol, 
-     >                         lastcol,
-     >                         exch_proc,
-     >                         exch_recv_length,
-     >                         send_start,
-     >                         send_len
-
-
-
-      double precision   x(*),
-     >                   z(*),
-     >                   a(nzz)
-      integer            colidx(nzz), rowstr(naa+1)
-
-      double precision   p(*),
-     >                   q(*),
-     >                   r(*),               
-     >                   w(*)                ! used as work temporary
-
-      integer   l2npcols
-      integer   reduce_exch_proc(l2npcols)
-      integer   reduce_send_starts(l2npcols)
-      integer   reduce_send_lengths(l2npcols)
-      integer   reduce_recv_starts(l2npcols)
-      integer   reduce_recv_lengths(l2npcols)
-
-      integer   i, j, k, ierr
-      integer   cgit, cgitmax
-
-      double precision   d, sum, rho, rho0, alpha, beta, rnorm
-
-      external         timer_read
-      double precision timer_read
-
-      data      cgitmax / 25 /
-
-
-c---------------------------------------------------------------------
-c  Initialize the CG algorithm:
-c---------------------------------------------------------------------
-      do j=1,naa/nprows+1
-         q(j) = 0.0d0
-         z(j) = 0.0d0
-         r(j) = x(j)
-         p(j) = r(j)
-         w(j) = 0.0d0                 
-      enddo
-
-
-c---------------------------------------------------------------------
-c  rho = r.r
-c  Now, obtain the norm of r: First, sum squares of r elements locally...
-c---------------------------------------------------------------------
-      sum = 0.0d0
-      do j=1, lastcol-firstcol+1
-         sum = sum + r(j)*r(j)
-      enddo
-
-c---------------------------------------------------------------------
-c  Exchange and sum with procs identified in reduce_exch_proc
-c  (This is equivalent to mpi_allreduce.)
-c  Sum the partial sums of rho, leaving rho on all processors
-c---------------------------------------------------------------------
-      do i = 1, l2npcols
-         call mpi_irecv( rho,
-     >                   1,
-     >                   dp_type,
-     >                   reduce_exch_proc(i),
-     >                   i,
-     >                   mpi_comm_world,
-     >                   request,
-     >                   ierr )
-         call mpi_send(  sum,
-     >                   1,
-     >                   dp_type,
-     >                   reduce_exch_proc(i),
-     >                   i,
-     >                   mpi_comm_world,
-     >                   ierr )
-         call mpi_wait( request, status, ierr )
-
-         sum = sum + rho
-      enddo
-      rho = sum
-
-
-
-c---------------------------------------------------------------------
-c---->
-c  The conj grad iteration loop
-c---->
-c---------------------------------------------------------------------
-      do cgit = 1, cgitmax
-
-
-c---------------------------------------------------------------------
-c  q = A.p
-c  The partition submatrix-vector multiply: use workspace w
-c---------------------------------------------------------------------
-         do j=1,lastrow-firstrow+1
-            sum = 0.d0
-            do k=rowstr(j),rowstr(j+1)-1
-               sum = sum + a(k)*p(colidx(k))
-            enddo
-            w(j) = sum
-         enddo
-
-c---------------------------------------------------------------------
-c  Sum the partition submatrix-vec A.p's across rows
-c  Exchange and sum piece of w with procs identified in reduce_exch_proc
-c---------------------------------------------------------------------
-         do i = l2npcols, 1, -1
-            call mpi_irecv( q(reduce_recv_starts(i)),
-     >                      reduce_recv_lengths(i),
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      request,
-     >                      ierr )
-            call mpi_send(  w(reduce_send_starts(i)),
-     >                      reduce_send_lengths(i),
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      ierr )
-            call mpi_wait( request, status, ierr )
-            do j=send_start,send_start + reduce_recv_lengths(i) - 1
-               w(j) = w(j) + q(j)
-            enddo
-         enddo
-      
-
-c---------------------------------------------------------------------
-c  Exchange piece of q with transpose processor:
-c---------------------------------------------------------------------
-         if( l2npcols .ne. 0 )then
-            call mpi_irecv( q,               
-     >                      exch_recv_length,
-     >                      dp_type,
-     >                      exch_proc,
-     >                      1,
-     >                      mpi_comm_world,
-     >                      request,
-     >                      ierr )
-
-            call mpi_send(  w(send_start),   
-     >                      send_len,
-     >                      dp_type,
-     >                      exch_proc,
-     >                      1,
-     >                      mpi_comm_world,
-     >                      ierr )
-            call mpi_wait( request, status, ierr )
-         else
-            do j=1,exch_recv_length
-               q(j) = w(j)
-            enddo
-         endif
-
-
-c---------------------------------------------------------------------
-c  Clear w for reuse...
-c---------------------------------------------------------------------
-         do j=1, max( lastrow-firstrow+1, lastcol-firstcol+1 )
-            w(j) = 0.0d0
-         enddo
-         
-
-c---------------------------------------------------------------------
-c  Obtain p.q
-c---------------------------------------------------------------------
-         sum = 0.0d0
-         do j=1, lastcol-firstcol+1
-            sum = sum + p(j)*q(j)
-         enddo
-
-c---------------------------------------------------------------------
-c  Obtain d with a sum-reduce
-c---------------------------------------------------------------------
-         do i = 1, l2npcols
-            call mpi_irecv( d,
-     >                      1,
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      request,
-     >                      ierr )
-            call mpi_send(  sum,
-     >                      1,
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      ierr )
-
-            call mpi_wait( request, status, ierr )
-
-            sum = sum + d
-         enddo
-         d = sum
-
-
-c---------------------------------------------------------------------
-c  Obtain alpha = rho / (p.q)
-c---------------------------------------------------------------------
-         alpha = rho / d
-
-c---------------------------------------------------------------------
-c  Save a temporary of rho
-c---------------------------------------------------------------------
-         rho0 = rho
-
-c---------------------------------------------------------------------
-c  Obtain z = z + alpha*p
-c  and    r = r - alpha*q
-c---------------------------------------------------------------------
-         do j=1, lastcol-firstcol+1
-            z(j) = z(j) + alpha*p(j)
-            r(j) = r(j) - alpha*q(j)
-         enddo
-            
-c---------------------------------------------------------------------
-c  rho = r.r
-c  Now, obtain the norm of r: First, sum squares of r elements locally...
-c---------------------------------------------------------------------
-         sum = 0.0d0
-         do j=1, lastcol-firstcol+1
-            sum = sum + r(j)*r(j)
-         enddo
-
-c---------------------------------------------------------------------
-c  Obtain rho with a sum-reduce
-c---------------------------------------------------------------------
-         do i = 1, l2npcols
-            call mpi_irecv( rho,
-     >                      1,
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      request,
-     >                      ierr )
-            call mpi_send(  sum,
-     >                      1,
-     >                      dp_type,
-     >                      reduce_exch_proc(i),
-     >                      i,
-     >                      mpi_comm_world,
-     >                      ierr )
-            call mpi_wait( request, status, ierr )
-
-            sum = sum + rho
-         enddo
-         rho = sum
-
-c---------------------------------------------------------------------
-c  Obtain beta:
-c---------------------------------------------------------------------
-         beta = rho / rho0
-
-c---------------------------------------------------------------------
-c  p = r + beta*p
-c---------------------------------------------------------------------
-         do j=1, lastcol-firstcol+1
-            p(j) = r(j) + beta*p(j)
-         enddo
-
-
-
-      enddo                             ! end of do cgit=1,cgitmax
-
-
-
-c---------------------------------------------------------------------
-c  Compute residual norm explicitly:  ||r|| = ||x - A.z||
-c  First, form A.z
-c  The partition submatrix-vector multiply
-c---------------------------------------------------------------------
-      do j=1,lastrow-firstrow+1
-         sum = 0.d0
-         do k=rowstr(j),rowstr(j+1)-1
-            sum = sum + a(k)*z(colidx(k))
-         enddo
-         w(j) = sum
-      enddo
-
-
-
-c---------------------------------------------------------------------
-c  Sum the partition submatrix-vec A.z's across rows
-c---------------------------------------------------------------------
-      do i = l2npcols, 1, -1
-         call mpi_irecv( r(reduce_recv_starts(i)),
-     >                   reduce_recv_lengths(i),
-     >                   dp_type,
-     >                   reduce_exch_proc(i),
-     >                   i,
-     >                   mpi_comm_world,
-     >                   request,
-     >                   ierr )
-         call mpi_send(  w(reduce_send_starts(i)),
-     >                   reduce_send_lengths(i),
-     >                   dp_type,
-     >                   reduce_exch_proc(i),
-     >                   i,
-     >                   mpi_comm_world,
-     >                   ierr )
-         call mpi_wait( request, status, ierr )
-
-         do j=send_start,send_start + reduce_recv_lengths(i) - 1
-            w(j) = w(j) + r(j)
-         enddo
-      enddo
-      
-
-c---------------------------------------------------------------------
-c  Exchange piece of q with transpose processor:
-c---------------------------------------------------------------------
-      if( l2npcols .ne. 0 )then
-         call mpi_irecv( r,               
-     >                   exch_recv_length,
-     >                   dp_type,
-     >                   exch_proc,
-     >                   1,
-     >                   mpi_comm_world,
-     >                   request,
-     >                   ierr )
-   
-         call mpi_send(  w(send_start),   
-     >                   send_len,
-     >                   dp_type,
-     >                   exch_proc,
-     >                   1,
-     >                   mpi_comm_world,
-     >                   ierr )
-         call mpi_wait( request, status, ierr )
-      else
-         do j=1,exch_recv_length
-            r(j) = w(j)
-         enddo
-      endif
-
-
-c---------------------------------------------------------------------
-c  At this point, r contains A.z
-c---------------------------------------------------------------------
-         sum = 0.0d0
-         do j=1, lastcol-firstcol+1
-            d   = x(j) - r(j)         
-            sum = sum + d*d
-         enddo
-         
-c---------------------------------------------------------------------
-c  Obtain d with a sum-reduce
-c---------------------------------------------------------------------
-      do i = 1, l2npcols
-         call mpi_irecv( d,
-     >                   1,
-     >                   dp_type,
-     >                   reduce_exch_proc(i),
-     >                   i,
-     >                   mpi_comm_world,
-     >                   request,
-     >                   ierr )
-         call mpi_send(  sum,
-     >                   1,
-     >                   dp_type,
-     >                   reduce_exch_proc(i),
-     >                   i,
-     >                   mpi_comm_world,
-     >                   ierr )
-         call mpi_wait( request, status, ierr )
-
-         sum = sum + d
-      enddo
-      d = sum
-
-
-      if( me .eq. root ) rnorm = sqrt( d )
-
-
-
-      return
-      end                               ! end of routine conj_grad
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine makea( n, nz, a, colidx, rowstr, nonzer,
-     >                  firstrow, lastrow, firstcol, lastcol,
-     >                  rcond, arow, acol, aelt, v, iv, shift )
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      integer             n, nz
-      integer             firstrow, lastrow, firstcol, lastcol
-      integer             colidx(nz), rowstr(n+1)
-      integer             iv(2*n+1), arow(nz), acol(nz)
-      double precision    v(n+1), aelt(nz)
-      double precision    rcond, a(nz), shift
-
-c---------------------------------------------------------------------
-c       generate the test problem for benchmark 6
-c       makea generates a sparse matrix with a
-c       prescribed sparsity distribution
-c
-c       parameter    type        usage
-c
-c       input
-c
-c       n            i           number of cols/rows of matrix
-c       nz           i           nonzeros as declared array size
-c       rcond        r*8         condition number
-c       shift        r*8         main diagonal shift
-c
-c       output
-c
-c       a            r*8         array for nonzeros
-c       colidx       i           col indices
-c       rowstr       i           row pointers
-c
-c       workspace
-c
-c       iv, arow, acol i
-c       v, aelt        r*8
-c---------------------------------------------------------------------
-
-      integer i, nnza, iouter, ivelt, ivelt1, irow, nzv, NONZER
-
-c---------------------------------------------------------------------
-c      nonzer is approximately  (int(sqrt(nnza /n)));
-c---------------------------------------------------------------------
-
-      double precision  size, ratio, scale
-      external          sparse, sprnvc, vecset
-
-      size = 1.0D0
-      ratio = rcond ** (1.0D0 / dfloat(n))
-      nnza = 0
-
-c---------------------------------------------------------------------
-c  Initialize iv(n+1 .. 2n) to zero.
-c  Used by sprnvc to mark nonzero positions
-c---------------------------------------------------------------------
-
-      do i = 1, n
-           iv(n+i) = 0
-      enddo
-      do iouter = 1, n
-         nzv = nonzer
-         call sprnvc( n, nzv, v, colidx, iv(1), iv(n+1) )
-         call vecset( n, v, colidx, nzv, iouter, .5D0 )
-         do ivelt = 1, nzv
-              jcol = colidx(ivelt)
-              if (jcol.ge.firstcol .and. jcol.le.lastcol) then
-                 scale = size * v(ivelt)
-                 do ivelt1 = 1, nzv
-                    irow = colidx(ivelt1)
-                    if (irow.ge.firstrow .and. irow.le.lastrow) then
-                       nnza = nnza + 1
-                       if (nnza .gt. nz) goto 9999
-                       acol(nnza) = jcol
-                       arow(nnza) = irow
-                       aelt(nnza) = v(ivelt1) * scale
-                    endif
-                 enddo
-              endif
-         enddo
-         size = size * ratio
-      enddo
-
-
-c---------------------------------------------------------------------
-c       ... add the identity * rcond to the generated matrix to bound
-c           the smallest eigenvalue from below by rcond
-c---------------------------------------------------------------------
-        do i = firstrow, lastrow
-           if (i.ge.firstcol .and. i.le.lastcol) then
-              iouter = n + i
-              nnza = nnza + 1
-              if (nnza .gt. nz) goto 9999
-              acol(nnza) = i
-              arow(nnza) = i
-              aelt(nnza) = rcond - shift
-           endif
-        enddo
-
-
-c---------------------------------------------------------------------
-c       ... make the sparse matrix from list of elements with duplicates
-c           (v and iv are used as  workspace)
-c---------------------------------------------------------------------
-      call sparse( a, colidx, rowstr, n, arow, acol, aelt,
-     >             firstrow, lastrow,
-     >             v, iv(1), iv(n+1), nnza )
-      return
-
- 9999 continue
-      write(*,*) 'Space for matrix elements exceeded in makea'
-      write(*,*) 'nnza, nzmax = ',nnza, nz
-      write(*,*) ' iouter = ',iouter
-
-      stop
-      end
-c-------end   of makea------------------------------
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine sparse( a, colidx, rowstr, n, arow, acol, aelt,
-     >                   firstrow, lastrow,
-     >                   x, mark, nzloc, nnza )
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit           logical (a-z)
-      integer            colidx(*), rowstr(*)
-      integer            firstrow, lastrow
-      integer            n, arow(*), acol(*), nnza
-      double precision   a(*), aelt(*)
-
-c---------------------------------------------------------------------
-c       rows range from firstrow to lastrow
-c       the rowstr pointers are defined for nrows = lastrow-firstrow+1 values
-c---------------------------------------------------------------------
-      integer            nzloc(n), nrows
-      double precision   x(n)
-      logical            mark(n)
-
-c---------------------------------------------------
-c       generate a sparse matrix from a list of
-c       [col, row, element] tri
-c---------------------------------------------------
-
-      integer            i, j, jajp1, nza, k, nzrow
-      double precision   xi
-
-c---------------------------------------------------------------------
-c    how many rows of result
-c---------------------------------------------------------------------
-      nrows = lastrow - firstrow + 1
-
-c---------------------------------------------------------------------
-c     ...count the number of triples in each row
-c---------------------------------------------------------------------
-      do j = 1, n
-         rowstr(j) = 0
-         mark(j) = .false.
-      enddo
-      rowstr(n+1) = 0
-
-      do nza = 1, nnza
-         j = (arow(nza) - firstrow + 1) + 1
-         rowstr(j) = rowstr(j) + 1
-      enddo
-
-      rowstr(1) = 1
-      do j = 2, nrows+1
-         rowstr(j) = rowstr(j) + rowstr(j-1)
-      enddo
-
-
-c---------------------------------------------------------------------
-c     ... rowstr(j) now is the location of the first nonzero
-c           of row j of a
-c---------------------------------------------------------------------
-
-
-c---------------------------------------------------------------------
-c     ... do a bucket sort of the triples on the row index
-c---------------------------------------------------------------------
-      do nza = 1, nnza
-         j = arow(nza) - firstrow + 1
-         k = rowstr(j)
-         a(k) = aelt(nza)
-         colidx(k) = acol(nza)
-         rowstr(j) = rowstr(j) + 1
-      enddo
-
-
-c---------------------------------------------------------------------
-c       ... rowstr(j) now points to the first element of row j+1
-c---------------------------------------------------------------------
-      do j = nrows, 1, -1
-          rowstr(j+1) = rowstr(j)
-      enddo
-      rowstr(1) = 1
-
-
-c---------------------------------------------------------------------
-c       ... generate the actual output rows by adding elements
-c---------------------------------------------------------------------
-      nza = 0
-      do i = 1, n
-          x(i)    = 0.0
-          mark(i) = .false.
-      enddo
-
-      jajp1 = rowstr(1)
-      do j = 1, nrows
-         nzrow = 0
-
-c---------------------------------------------------------------------
-c          ...loop over the jth row of a
-c---------------------------------------------------------------------
-         do k = jajp1 , rowstr(j+1)-1
-            i = colidx(k)
-            x(i) = x(i) + a(k)
-            if ( (.not. mark(i)) .and. (x(i) .ne. 0.D0)) then
-             mark(i) = .true.
-             nzrow = nzrow + 1
-             nzloc(nzrow) = i
-            endif
-         enddo
-
-c---------------------------------------------------------------------
-c          ... extract the nonzeros of this row
-c---------------------------------------------------------------------
-         do k = 1, nzrow
-            i = nzloc(k)
-            mark(i) = .false.
-            xi = x(i)
-            x(i) = 0.D0
-            if (xi .ne. 0.D0) then
-             nza = nza + 1
-             a(nza) = xi
-             colidx(nza) = i
-            endif
-         enddo
-         jajp1 = rowstr(j+1)
-         rowstr(j+1) = nza + rowstr(1)
-      enddo
-CC       write (*, 11000) nza
-      return
-11000   format ( //,'final nonzero count in sparse ',
-     1            /,'number of nonzeros       = ', i16 )
-      end
-c-------end   of sparse-----------------------------
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine sprnvc( n, nz, v, iv, nzloc, mark )
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit           logical (a-z)
-      double precision   v(*)
-      integer            n, nz, iv(*), nzloc(n), nn1
-      integer mark(n)
-      common /urando/    amult, tran
-      double precision   amult, tran
-
-
-c---------------------------------------------------------------------
-c       generate a sparse n-vector (v, iv)
-c       having nzv nonzeros
-c
-c       mark(i) is set to 1 if position i is nonzero.
-c       mark is all zero on entry and is reset to all zero before exit
-c       this corrects a performance bug found by John G. Lewis, caused by
-c       reinitialization of mark on every one of the n calls to sprnvc
-c---------------------------------------------------------------------
-
-        integer            nzrow, nzv, ii, i, icnvrt
-
-        external           randlc, icnvrt
-        double precision   randlc, vecelt, vecloc
-
-
-        nzv = 0
-        nzrow = 0
-        nn1 = 1
- 50     continue
-          nn1 = 2 * nn1
-          if (nn1 .lt. n) goto 50
-
-c---------------------------------------------------------------------
-c    nn1 is the smallest power of two not less than n
-c---------------------------------------------------------------------
-
-100     continue
-        if (nzv .ge. nz) goto 110
-         vecelt = randlc( tran, amult )
-
-c---------------------------------------------------------------------
-c   generate an integer between 1 and n in a portable manner
-c---------------------------------------------------------------------
-         vecloc = randlc(tran, amult)
-         i = icnvrt(vecloc, nn1) + 1
-         if (i .gt. n) goto 100
-
-c---------------------------------------------------------------------
-c  was this integer generated already?
-c---------------------------------------------------------------------
-         if (mark(i) .eq. 0) then
-            mark(i) = 1
-            nzrow = nzrow + 1
-            nzloc(nzrow) = i
-            nzv = nzv + 1
-            v(nzv) = vecelt
-            iv(nzv) = i
-         endif
-         goto 100
-110      continue
-      do ii = 1, nzrow
-         i = nzloc(ii)
-         mark(i) = 0
-      enddo
-      return
-      end
-c-------end   of sprnvc-----------------------------
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      function icnvrt(x, ipwr2)
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit           logical (a-z)
-      double precision   x
-      integer            ipwr2, icnvrt
-
-c---------------------------------------------------------------------
-c    scale a double precision number x in (0,1) by a power of 2 and chop it
-c---------------------------------------------------------------------
-      icnvrt = int(ipwr2 * x)
-
-      return
-      end
-c-------end   of icnvrt-----------------------------
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine vecset(n, v, iv, nzv, i, val)
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit           logical (a-z)
-      integer            n, iv(*), nzv, i, k
-      double precision   v(*), val
-
-c---------------------------------------------------------------------
-c       set ith element of sparse vector (v, iv) with
-c       nzv nonzeros to val
-c---------------------------------------------------------------------
-
-      logical set
-
-      set = .false.
-      do k = 1, nzv
-         if (iv(k) .eq. i) then
-            v(k) = val
-            set  = .true.
-         endif
-      enddo
-      if (.not. set) then
-         nzv     = nzv + 1
-         v(nzv)  = val
-         iv(nzv) = i
-      endif
-      return
-      end
-c-------end   of vecset-----------------------------
-
diff --git a/examples/smpi/NAS/CG/mpinpb.h b/examples/smpi/NAS/CG/mpinpb.h
deleted file mode 100644 (file)
index 1f0368c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include           'mpif.h'
-
-      integer           me, nprocs, root, dp_type
-      common /mpistuff/ me, nprocs, root, dp_type
-
diff --git a/examples/smpi/NAS/FT/Makefile b/examples/smpi/NAS/FT/Makefile
deleted file mode 100644 (file)
index 1cc6e14..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SHELL=/bin/sh
-BENCHMARK=ft
-BENCHMARKU=FT
-
-include ../config/make.def
-
-include ../sys/make.common
-
-OBJS = ft.o ${COMMON}/${RAND}.o ${COMMON}/print_results.o ${COMMON}/timers.o
-
-${PROGRAM}: config ${OBJS}
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${FMPI_LIB}
-
-
-
-.f.o:
-       ${FCOMPILE} $<
-
-ft.o:             ft.f  global.h mpinpb.h npbparams.h
-
-clean:
-       - rm -f *.o *~ mputil*
-       - rm -f ft npbparams.h core
diff --git a/examples/smpi/NAS/FT/README b/examples/smpi/NAS/FT/README
deleted file mode 100644 (file)
index ab08b36..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-This code implements the time integration of a three-dimensional
-partial differential equation using the Fast Fourier Transform.
-Some of the dimension statements are not F77 conforming and will
-not work using the g77 compiler. All dimension statements,
-however, are legal F90.
\ No newline at end of file
diff --git a/examples/smpi/NAS/FT/ft.f b/examples/smpi/NAS/FT/ft.f
deleted file mode 100644 (file)
index 5e3a3b0..0000000
+++ /dev/null
@@ -1,1998 +0,0 @@
-!-------------------------------------------------------------------------!
-!                                                                         !
-!        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3         !
-!                                                                         !
-!                                   F T                                   !
-!                                                                         !
-!-------------------------------------------------------------------------!
-!                                                                         !
-!    This benchmark is part of the NAS Parallel Benchmark 3.3 suite.      !
-!    It is described in NAS Technical Reports 95-020 and 02-007           !
-!                                                                         !
-!    Permission to use, copy, distribute and modify this software         !
-!    for any purpose with or without fee is hereby granted.  We           !
-!    request, however, that all derived work reference the NAS            !
-!    Parallel Benchmarks 3.3. This software is provided "as is"           !
-!    without express or implied warranty.                                 !
-!                                                                         !
-!    Information on NPB 3.3, including the technical report, the          !
-!    original specifications, source code, results and information        !
-!    on how to submit new results, is available at:                       !
-!                                                                         !
-!           http://www.nas.nasa.gov/Software/NPB/                         !
-!                                                                         !
-!    Send comments or suggestions to  npb@nas.nasa.gov                    !
-!                                                                         !
-!          NAS Parallel Benchmarks Group                                  !
-!          NASA Ames Research Center                                      !
-!          Mail Stop: T27A-1                                              !
-!          Moffett Field, CA   94035-1000                                 !
-!                                                                         !
-!          E-mail:  npb@nas.nasa.gov                                      !
-!          Fax:     (650) 604-3957                                        !
-!                                                                         !
-!-------------------------------------------------------------------------!
-
-!TO REDUCE THE AMOUNT OF MEMORY REQUIRED BY THE BENCHMARK WE NO LONGER
-!STORE THE ENTIRE TIME EVOLUTION ARRAY "EX" FOR ALL TIME STEPS, BUT
-!JUST FOR THE FIRST. ALSO, IT IS STORED ONLY FOR THE PART OF THE GRID
-!FOR WHICH THE CALLING PROCESSOR IS RESPONSIBLE, SO THAT THE MEMORY 
-!USAGE BECOMES SCALABLE. THIS NEW ARRAY IS CALLED "TWIDDLE" (SEE
-!NPB3.0-SER)
-
-!TO AVOID PROBLEMS WITH VERY LARGE ARRAY SIZES THAT ARE COMPUTED BY
-!MULTIPLYING GRID DIMENSIONS (CAUSING INTEGER OVERFLOW IN THE VARIABLE
-!NTOTAL) AND SUBSEQUENTLY DIVIDING BY THE NUMBER OF PROCESSORS, WE
-!COMPUTE THE SIZE OF ARRAY PARTITIONS MORE CONSERVATIVELY AS
-!((NX*NY)/NP)*NZ, WHERE NX, NY, AND NZ ARE GRID DIMENSIONS AND NP IS
-!THE NUMBER OF PROCESSORS, THE RESULT IS STORED IN "NTDIVNP". FOR THE 
-!PERFORMANCE CALCULATION WE STORE THE TOTAL NUMBER OF GRID POINTS IN A 
-!FLOATING POINT NUMBER "NTOTAL_F" INSTEAD OF AN INTEGER.
-!THIS FIX WILL FAIL IF THE NUMBER OF PROCESSORS IS SMALL.
-
-!UGLY HACK OF SUBROUTINE IPOW46: FOR VERY LARGE GRIDS THE SINGLE EXPONENT
-!FROM NPB2.3 MAY NOT FIT IN A 32-BIT INTEGER. HOWEVER, WE KNOW THAT THE
-!"EXPONENT" ARGUMENT OF THIS ROUTINE CAN ALWAYS BE FACTORED INTO A TERM 
-!DIVISIBLE BY NX (EXP_1) AND ANOTHER TERM (EXP_2). NX IS USUALLY A POWER
-!OF TWO, SO WE CAN KEEP HALVING IT UNTIL THE PRODUCT OF EXP_1
-!AND EXP_2 IS SMALL ENOUGH (NAMELY EXP_2 ITSELF). THIS UPDATED VERSION
-!OF IPWO46, WHICH NOW TAKES THE TWO FACTORS OF "EXPONENT" AS SEPARATE
-!ARGUMENTS, MAY BREAK DOWN IF EXP_1 DOES NOT CONTAIN A LARGE POWER OF TWO.
-
-c---------------------------------------------------------------------
-c
-c Authors: D. Bailey
-c          W. Saphir
-c          R. F. Van der Wijngaart
-c
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c FT benchmark
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      program ft
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpif.h'
-      include 'global.h'
-      integer i, ierr
-      
-c---------------------------------------------------------------------
-c u0, u1, u2 are the main arrays in the problem. 
-c Depending on the decomposition, these arrays will have different 
-c dimensions. To accomodate all possibilities, we allocate them as 
-c one-dimensional arrays and pass them to subroutines for different 
-c views
-c  - u0 contains the initial (transformed) initial condition
-c  - u1 and u2 are working arrays
-c---------------------------------------------------------------------
-
-      double complex   u0(ntdivnp), 
-     >                 u1(ntdivnp), 
-     >                 u2(ntdivnp)
-      double precision twiddle(ntdivnp)
-c---------------------------------------------------------------------
-c Large arrays are in common so that they are allocated on the
-c heap rather than the stack. This common block is not
-c referenced directly anywhere else. Padding is to avoid accidental 
-c cache problems, since all array sizes are powers of two.
-c---------------------------------------------------------------------
-
-      double complex pad1(3), pad2(3), pad3(3)
-      common /bigarrays/ u0, pad1, u1, pad2, u2, pad3, twiddle
-
-      integer iter
-      double precision total_time, mflops
-      logical verified
-      character class
-
-      call MPI_Init(ierr)
-
-c---------------------------------------------------------------------
-c Run the entire problem once to make sure all data is touched. 
-c This reduces variable startup costs, which is important for such a 
-c short benchmark. The other NPB 2 implementations are similar. 
-c---------------------------------------------------------------------
-      do i = 1, t_max
-         call timer_clear(i)
-      end do
-
-      call setup()
-      call compute_indexmap(twiddle, dims(1,3), dims(2,3), dims(3,3))
-      call compute_initial_conditions(u1, dims(1,1), dims(2,1), 
-     >                                dims(3,1))
-      call fft_init (dims(1,1))
-      call fft(1, u1, u0)
-
-c---------------------------------------------------------------------
-c Start over from the beginning. Note that all operations must
-c be timed, in contrast to other benchmarks. 
-c---------------------------------------------------------------------
-      do i = 1, t_max
-         call timer_clear(i)
-      end do
-      call MPI_Barrier(MPI_COMM_WORLD, ierr)
-
-      call timer_start(T_total)
-      if (timers_enabled) call timer_start(T_setup)
-
-      call compute_indexmap(twiddle, dims(1,3), dims(2,3), dims(3,3))
-      call compute_initial_conditions(u1, dims(1,1), dims(2,1), 
-     >                                dims(3,1))
-      call fft_init (dims(1,1))
-
-      if (timers_enabled) call synchup()
-      if (timers_enabled) call timer_stop(T_setup)
-
-      if (timers_enabled) call timer_start(T_fft)
-      call fft(1, u1, u0)
-      if (timers_enabled) call timer_stop(T_fft)
-
-      do iter = 1, niter
-         if (timers_enabled) call timer_start(T_evolve)
-         call evolve(u0, u1, twiddle, dims(1,1), dims(2,1), dims(3,1))
-         if (timers_enabled) call timer_stop(T_evolve)
-         if (timers_enabled) call timer_start(T_fft)
-         call fft(-1, u1, u2)
-         if (timers_enabled) call timer_stop(T_fft)
-         if (timers_enabled) call synchup()
-         if (timers_enabled) call timer_start(T_checksum)
-         call checksum(iter, u2, dims(1,1), dims(2,1), dims(3,1))
-         if (timers_enabled) call timer_stop(T_checksum)
-      end do
-
-      call verify(nx, ny, nz, niter, verified, class)
-      call timer_stop(t_total)
-      if (np .ne. np_min) verified = .false.
-      total_time = timer_read(t_total)
-
-      if( total_time .ne. 0. ) then
-         mflops = 1.0d-6*ntotal_f *
-     >             (14.8157+7.19641*log(ntotal_f)
-     >          +  (5.23518+7.21113*log(ntotal_f))*niter)
-     >                 /total_time
-      else
-         mflops = 0.0
-      endif
-      if (me .eq. 0) then
-         call print_results('FT', class, nx, ny, nz, niter, np_min, np,
-     >     total_time, mflops, '          floating point', verified, 
-     >     npbversion, compiletime, cs1, cs2, cs3, cs4, cs5, cs6, cs7)
-      endif
-      if (timers_enabled) call print_timers()
-      call MPI_Finalize(ierr)
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine evolve(u0, u1, twiddle, d1, d2, d3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c evolve u0 -> u1 (t time steps) in fourier space
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer d1, d2, d3
-      double precision exi
-      double complex u0(d1,d2,d3)
-      double complex u1(d1,d2,d3)
-      double precision twiddle(d1,d2,d3)
-      integer i, j, k
-
-      do k = 1, d3
-         do j = 1, d2
-            do i = 1, d1
-               u0(i,j,k) = u0(i,j,k)*(twiddle(i,j,k))
-               u1(i,j,k) = u0(i,j,k)
-            end do
-         end do
-      end do
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine compute_initial_conditions(u0, d1, d2, d3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c Fill in array u0 with initial conditions from 
-c random number generator 
-c---------------------------------------------------------------------
-      implicit none
-      include 'global.h'
-      integer d1, d2, d3
-      double complex u0(d1, d2, d3)
-      integer k
-      double precision x0, start, an, dummy
-      
-c---------------------------------------------------------------------
-c 0-D and 1-D layouts are easy because each processor gets a contiguous
-c chunk of the array, in the Fortran ordering sense. 
-c For a 2-D layout, it's a bit more complicated. We always
-c have entire x-lines (contiguous) in processor. 
-c We can do ny/np1 of them at a time since we have
-c ny/np1 contiguous in y-direction. But then we jump
-c by z-planes (nz/np2 of them, total). 
-c For the 0-D and 1-D layouts we could do larger chunks, but
-c this turns out to have no measurable impact on performance. 
-c---------------------------------------------------------------------
-
-
-      start = seed                                    
-c---------------------------------------------------------------------
-c Jump to the starting element for our first plane.
-c---------------------------------------------------------------------
-      call ipow46(a, 2*nx, (zstart(1)-1)*ny + (ystart(1)-1), an)
-      dummy = randlc(start, an)
-      call ipow46(a, 2*nx, ny, an)
-      
-c---------------------------------------------------------------------
-c Go through by z planes filling in one square at a time.
-c---------------------------------------------------------------------
-      do k = 1, dims(3, 1) ! nz/np2
-         x0 = start
-         call vranlc(2*nx*dims(2, 1), x0, a, u0(1, 1, k))
-         if (k .ne. dims(3, 1)) dummy = randlc(start, an)
-      end do
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine ipow46(a, exp_1, exp_2, result)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c compute a^exponent mod 2^46
-c---------------------------------------------------------------------
-
-      implicit none
-      double precision a, result, dummy, q, r
-      integer exp_1, exp_2, n, n2, ierr
-      external randlc
-      double precision randlc
-      logical  two_pow
-c---------------------------------------------------------------------
-c Use
-c   a^n = a^(n/2)*a^(n/2) if n even else
-c   a^n = a*a^(n-1)       if n odd
-c---------------------------------------------------------------------
-      result = 1
-      if (exp_2 .eq. 0 .or. exp_1 .eq. 0) return
-      q = a
-      r = 1
-      n = exp_1
-      two_pow = .true.
-
-      do while (two_pow)
-         n2 = n/2
-         if (n2 * 2 .eq. n) then
-            dummy = randlc(q, q)
-            n = n2
-         else
-            n = n * exp_2
-            two_pow = .false.
-         endif
-      end do
-
-      do while (n .gt. 1)
-         n2 = n/2
-         if (n2 * 2 .eq. n) then
-            dummy = randlc(q, q) 
-            n = n2
-         else
-            dummy = randlc(r, q)
-            n = n-1
-         endif
-      end do
-      dummy = randlc(r, q)
-      result = r
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'mpinpb.h'
-      include 'global.h'
-
-      integer ierr, i, j, fstatus
-      debug = .FALSE.
-      
-      call MPI_Comm_size(MPI_COMM_WORLD, np, ierr)
-      call MPI_Comm_rank(MPI_COMM_WORLD, me, ierr)
-
-      if (.not. convertdouble) then
-         dc_type = MPI_DOUBLE_COMPLEX
-      else
-         dc_type = MPI_COMPLEX
-      endif
-
-
-      if (me .eq. 0) then
-         write(*, 1000)
-         open (unit=2,file='inputft.data',status='old', iostat=fstatus)
-
-         if (fstatus .eq. 0) then
-            write(*,233) 
- 233        format(' Reading from input file inputft.data')
-            read (2,*) niter
-            read (2,*) layout_type
-            read (2,*) np1, np2
-            close(2)
-
-c---------------------------------------------------------------------
-c check to make sure input data is consistent
-c---------------------------------------------------------------------
-
-    
-c---------------------------------------------------------------------
-c 1. product of processor grid dims must equal number of processors
-c---------------------------------------------------------------------
-
-            if (np1 * np2 .ne. np) then
-               write(*, 238)
- 238           format(' np1 and np2 given in input file are not valid.')
-               write(*, 239) np1*np2, np
- 239           format(' Product is ', i5, ' and should be ', i5)
-               call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
-               stop
-            endif
-
-c---------------------------------------------------------------------
-c 2. layout type must be valid
-c---------------------------------------------------------------------
-
-            if (layout_type .ne. layout_0D .and.
-     >          layout_type .ne. layout_1D .and.
-     >          layout_type .ne. layout_2D) then
-               write(*, 240)
- 240           format(' Layout type specified in inputft.data is 
-     >                  invalid ')
-               call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
-               stop
-            endif
-
-c---------------------------------------------------------------------
-c 3. 0D layout must be 1x1 grid
-c---------------------------------------------------------------------
-
-            if (layout_type .eq. layout_0D .and.
-     >            (np1 .ne.1 .or. np2 .ne. 1)) then
-               write(*, 241)
- 241           format(' For 0D layout, both np1 and np2 must be 1 ')
-               call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
-               stop
-            endif
-c---------------------------------------------------------------------
-c 4. 1D layout must be 1xN grid
-c---------------------------------------------------------------------
-
-            if (layout_type .eq. layout_1D .and. np1 .ne. 1) then
-               write(*, 242)
- 242           format(' For 1D layout, np1 must be 1 ')
-               call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
-               stop
-            endif
-
-         else
-            write(*,234) 
-            niter = niter_default
-            if (np .eq. 1) then
-               np1 = 1
-               np2 = 1
-               layout_type = layout_0D
-            else if (np .le. nz) then
-               np1 = 1
-               np2 = np
-               layout_type = layout_1D
-            else
-               np1 = nz
-               np2 = np/nz
-               layout_type = layout_2D
-            endif
-         endif
-
-         if (np .lt. np_min) then
-            write(*, 10) np_min
- 10         format(' Error: Compiled for ', I5, ' processors. ')
-            write(*, 11) np
- 11         format(' Only ',  i5, ' processors found ')
-            call MPI_Abort(MPI_COMM_WORLD, 1, ierr)
-            stop
-         endif
-
- 234     format(' No input file inputft.data. Using compiled defaults')
-         write(*, 1001) nx, ny, nz
-         write(*, 1002) niter
-         write(*, 1004) np
-         write(*, 1005) np1, np2
-         if (np .ne. np_min) write(*, 1006) np_min
-
-         if (layout_type .eq. layout_0D) then
-            write(*, 1010) '0D'
-         else if (layout_type .eq. layout_1D) then
-            write(*, 1010) '1D'
-         else
-            write(*, 1010) '2D'
-         endif
-
- 1000 format(//,' NAS Parallel Benchmarks 3.3 -- FT Benchmark',/)
- 1001    format(' Size                : ', i4, 'x', i4, 'x', i4)
- 1002    format(' Iterations          : ', 7x, i7)
- 1004    format(' Number of processes : ', 7x, i7)
- 1005    format(' Processor array     : ', 5x, i4, 'x', i4)
- 1006    format(' WARNING: compiled for ', i5, ' processes. ',
-     >          ' Will not verify. ')
- 1010    format(' Layout type         : ', 9x, A5)
-      endif
-
-
-c---------------------------------------------------------------------
-c Since np1, np2 and layout_type are in a common block, 
-c this sends all three. 
-c---------------------------------------------------------------------
-      call MPI_BCAST(np1, 3, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(niter, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
-
-      if (np1 .eq. 1 .and. np2 .eq. 1) then
-        layout_type = layout_0D
-      else if (np1 .eq. 1) then
-         layout_type = layout_1D
-      else
-         layout_type = layout_2D
-      endif
-
-      if (layout_type .eq. layout_0D) then
-         do i = 1, 3
-            dims(1, i) = nx
-            dims(2, i) = ny
-            dims(3, i) = nz
-         end do
-      else if (layout_type .eq. layout_1D) then
-         dims(1, 1) = nx
-         dims(2, 1) = ny
-         dims(3, 1) = nz
-
-         dims(1, 2) = nx
-         dims(2, 2) = ny
-         dims(3, 2) = nz
-
-         dims(1, 3) = nz
-         dims(2, 3) = nx
-         dims(3, 3) = ny
-      else if (layout_type .eq. layout_2D) then
-         dims(1, 1) = nx
-         dims(2, 1) = ny
-         dims(3, 1) = nz
-
-         dims(1, 2) = ny
-         dims(2, 2) = nx
-         dims(3, 2) = nz
-
-         dims(1, 3) = nz
-         dims(2, 3) = nx
-         dims(3, 3) = ny
-
-      endif
-      do i = 1, 3
-         dims(2, i) = dims(2, i) / np1
-         dims(3, i) = dims(3, i) / np2
-      end do
-
-
-c---------------------------------------------------------------------
-c Determine processor coordinates of this processor
-c Processor grid is np1xnp2. 
-c Arrays are always (n1, n2/np1, n3/np2)
-c Processor coords are zero-based. 
-c---------------------------------------------------------------------
-      me2 = mod(me, np2)  ! goes from 0...np2-1
-      me1 = me/np2        ! goes from 0...np1-1
-c---------------------------------------------------------------------
-c Communicators for rows/columns of processor grid. 
-c commslice1 is communicator of all procs with same me1, ranked as me2
-c commslice2 is communicator of all procs with same me2, ranked as me1
-c mpi_comm_split(comm, color, key, ...)
-c---------------------------------------------------------------------
-      call MPI_Comm_split(MPI_COMM_WORLD, me1, me2, commslice1, ierr)
-      call MPI_Comm_split(MPI_COMM_WORLD, me2, me1, commslice2, ierr)
-      if (timers_enabled) call synchup()
-
-      if (debug) print *, 'proc coords: ', me, me1, me2
-
-c---------------------------------------------------------------------
-c Determine which section of the grid is owned by this
-c processor. 
-c---------------------------------------------------------------------
-      if (layout_type .eq. layout_0d) then
-
-         do i = 1, 3
-            xstart(i) = 1
-            xend(i)   = nx
-            ystart(i) = 1
-            yend(i)   = ny
-            zstart(i) = 1
-            zend(i)   = nz
-         end do
-
-      else if (layout_type .eq. layout_1d) then
-
-         xstart(1) = 1
-         xend(1)   = nx
-         ystart(1) = 1
-         yend(1)   = ny
-         zstart(1) = 1 + me2 * nz/np2
-         zend(1)   = (me2+1) * nz/np2
-
-         xstart(2) = 1
-         xend(2)   = nx
-         ystart(2) = 1
-         yend(2)   = ny
-         zstart(2) = 1 + me2 * nz/np2
-         zend(2)   = (me2+1) * nz/np2
-
-         xstart(3) = 1
-         xend(3)   = nx
-         ystart(3) = 1 + me2 * ny/np2
-         yend(3)   = (me2+1) * ny/np2
-         zstart(3) = 1
-         zend(3)   = nz
-
-      else if (layout_type .eq. layout_2d) then
-
-         xstart(1) = 1
-         xend(1)   = nx
-         ystart(1) = 1 + me1 * ny/np1
-         yend(1)   = (me1+1) * ny/np1
-         zstart(1) = 1 + me2 * nz/np2
-         zend(1)   = (me2+1) * nz/np2
-
-         xstart(2) = 1 + me1 * nx/np1
-         xend(2)   = (me1+1)*nx/np1
-         ystart(2) = 1
-         yend(2)   = ny
-         zstart(2) = zstart(1)
-         zend(2)   = zend(1)
-
-         xstart(3) = xstart(2)
-         xend(3)   = xend(2)
-         ystart(3) = 1 + me2 *ny/np2
-         yend(3)   = (me2+1)*ny/np2
-         zstart(3) = 1
-         zend(3)   = nz
-      endif
-
-c---------------------------------------------------------------------
-c Set up info for blocking of ffts and transposes.  This improves
-c performance on cache-based systems. Blocking involves
-c working on a chunk of the problem at a time, taking chunks
-c along the first, second, or third dimension. 
-c
-c - In cffts1 blocking is on 2nd dimension (with fft on 1st dim)
-c - In cffts2/3 blocking is on 1st dimension (with fft on 2nd and 3rd dims)
-
-c Since 1st dim is always in processor, we'll assume it's long enough 
-c (default blocking factor is 16 so min size for 1st dim is 16)
-c The only case we have to worry about is cffts1 in a 2d decomposition. 
-c so the blocking factor should not be larger than the 2nd dimension. 
-c---------------------------------------------------------------------
-
-      fftblock = fftblock_default
-      fftblockpad = fftblockpad_default
-
-      if (layout_type .eq. layout_2d) then
-         if (dims(2, 1) .lt. fftblock) fftblock = dims(2, 1)
-         if (dims(2, 2) .lt. fftblock) fftblock = dims(2, 2)
-         if (dims(2, 3) .lt. fftblock) fftblock = dims(2, 3)
-      endif
-      
-      if (fftblock .ne. fftblock_default) fftblockpad = fftblock+3
-
-      return
-      end
-
-      
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine compute_indexmap(twiddle, d1, d2, d3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c compute function from local (i,j,k) to ibar^2+jbar^2+kbar^2 
-c for time evolution exponent. 
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'mpinpb.h'
-      include 'global.h'
-      integer d1, d2, d3
-      integer i, j, k, ii, ii2, jj, ij2, kk
-      double precision ap, twiddle(d1, d2, d3)
-
-c---------------------------------------------------------------------
-c this function is very different depending on whether 
-c we are in the 0d, 1d or 2d layout. Compute separately. 
-c basically we want to convert the fortran indices 
-c   1 2 3 4 5 6 7 8 
-c to 
-c   0 1 2 3 -4 -3 -2 -1
-c The following magic formula does the trick:
-c mod(i-1+n/2, n) - n/2
-c---------------------------------------------------------------------
-
-      ap = - 4.d0 * alpha * pi *pi
-
-      if (layout_type .eq. layout_0d) then ! xyz layout
-         do i = 1, dims(1,3)
-            ii =  mod(i+xstart(3)-2+nx/2, nx) - nx/2
-            ii2 = ii*ii
-            do j = 1, dims(2,3)
-               jj = mod(j+ystart(3)-2+ny/2, ny) - ny/2
-               ij2 = jj*jj+ii2
-               do k = 1, dims(3,3)
-                  kk = mod(k+zstart(3)-2+nz/2, nz) - nz/2
-                  twiddle(i,j,k) = dexp(ap*dfloat(kk*kk+ij2))
-               end do
-            end do
-         end do
-      else if (layout_type .eq. layout_1d) then ! zxy layout 
-         do i = 1,dims(2,3)
-            ii =  mod(i+xstart(3)-2+nx/2, nx) - nx/2
-            ii2 = ii*ii
-            do j = 1,dims(3,3)
-               jj = mod(j+ystart(3)-2+ny/2, ny) - ny/2
-               ij2 = jj*jj+ii2
-               do k = 1,dims(1,3)
-                  kk = mod(k+zstart(3)-2+nz/2, nz) - nz/2
-                  twiddle(k,i,j) = dexp(ap*dfloat(kk*kk+ij2))
-               end do
-            end do
-         end do
-      else if (layout_type .eq. layout_2d) then ! zxy layout
-         do i = 1,dims(2,3)
-            ii =  mod(i+xstart(3)-2+nx/2, nx) - nx/2
-            ii2 = ii*ii
-            do j = 1, dims(3,3)
-               jj = mod(j+ystart(3)-2+ny/2, ny) - ny/2
-               ij2 = jj*jj+ii2
-               do k =1,dims(1,3)
-                  kk = mod(k+zstart(3)-2+nz/2, nz) - nz/2
-                  twiddle(k,i,j) = dexp(ap*dfloat(kk*kk+ij2))
-               end do
-            end do
-         end do
-      else
-         print *, ' Unknown layout type ', layout_type
-         stop
-      endif
-
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine print_timers()
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      integer i
-      include 'global.h'
-      character*25 tstrings(T_max)
-      data tstrings / '          total ', 
-     >                '          setup ', 
-     >                '            fft ', 
-     >                '         evolve ', 
-     >                '       checksum ', 
-     >                '         fftlow ', 
-     >                '        fftcopy ', 
-     >                '      transpose ', 
-     >                ' transpose1_loc ', 
-     >                ' transpose1_glo ', 
-     >                ' transpose1_fin ', 
-     >                ' transpose2_loc ', 
-     >                ' transpose2_glo ', 
-     >                ' transpose2_fin ', 
-     >                '           sync ' /
-
-      if (me .ne. 0) return
-      do i = 1, t_max
-         if (timer_read(i) .ne. 0.0d0) then
-            write(*, 100) i, tstrings(i), timer_read(i)
-         endif
-      end do
- 100  format(' timer ', i2, '(', A16,  ') :', F10.6)
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine fft(dir, x1, x2)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer dir
-      double complex x1(ntdivnp), x2(ntdivnp)
-
-      double complex scratch(fftblockpad_default*maxdim*2)
-
-c---------------------------------------------------------------------
-c note: args x1, x2 must be different arrays
-c note: args for cfftsx are (direction, layout, xin, xout, scratch)
-c       xin/xout may be the same and it can be somewhat faster
-c       if they are
-c note: args for transpose are (layout1, layout2, xin, xout)
-c       xin/xout must be different
-c---------------------------------------------------------------------
-
-      if (dir .eq. 1) then
-         if (layout_type .eq. layout_0d) then
-            call cffts1(1, dims(1,1), dims(2,1), dims(3,1), 
-     >                  x1, x1, scratch)
-            call cffts2(1, dims(1,2), dims(2,2), dims(3,2), 
-     >                  x1, x1, scratch)
-            call cffts3(1, dims(1,3), dims(2,3), dims(3,3), 
-     >                  x1, x2, scratch)
-         else if (layout_type .eq. layout_1d) then
-            call cffts1(1, dims(1,1), dims(2,1), dims(3,1), 
-     >                  x1, x1, scratch)
-            call cffts2(1, dims(1,2), dims(2,2), dims(3,2), 
-     >                  x1, x1, scratch)
-            if (timers_enabled) call timer_start(T_transpose)
-            call transpose_xy_z(2, 3, x1, x2)
-            if (timers_enabled) call timer_stop(T_transpose)
-            call cffts1(1, dims(1,3), dims(2,3), dims(3,3), 
-     >                  x2, x2, scratch)
-         else if (layout_type .eq. layout_2d) then
-            call cffts1(1, dims(1,1), dims(2,1), dims(3,1), 
-     >                  x1, x1, scratch)
-            if (timers_enabled) call timer_start(T_transpose)
-            call transpose_x_y(1, 2, x1, x2)
-            if (timers_enabled) call timer_stop(T_transpose)
-            call cffts1(1, dims(1,2), dims(2,2), dims(3,2), 
-     >                  x2, x2, scratch)
-            if (timers_enabled) call timer_start(T_transpose)
-            call transpose_x_z(2, 3, x2, x1)
-            if (timers_enabled) call timer_stop(T_transpose)
-            call cffts1(1, dims(1,3), dims(2,3), dims(3,3), 
-     >                  x1, x2, scratch)
-         endif
-      else
-         if (layout_type .eq. layout_0d) then
-            call cffts3(-1, dims(1,3), dims(2,3), dims(3,3), 
-     >                  x1, x1, scratch)
-            call cffts2(-1, dims(1,2), dims(2,2), dims(3,2), 
-     >                  x1, x1, scratch)
-            call cffts1(-1, dims(1,1), dims(2,1), dims(3,1), 
-     >                  x1, x2, scratch)
-         else if (layout_type .eq. layout_1d) then
-            call cffts1(-1, dims(1,3), dims(2,3), dims(3,3), 
-     >                  x1, x1, scratch)
-            if (timers_enabled) call timer_start(T_transpose)
-            call transpose_x_yz(3, 2, x1, x2)
-            if (timers_enabled) call timer_stop(T_transpose)
-            call cffts2(-1, dims(1,2), dims(2,2), dims(3,2), 
-     >                  x2, x2, scratch)
-            call cffts1(-1, dims(1,1), dims(2,1), dims(3,1), 
-     >                  x2, x2, scratch)
-         else if (layout_type .eq. layout_2d) then
-            call cffts1(-1, dims(1,3), dims(2,3), dims(3,3), 
-     >                  x1, x1, scratch)
-            if (timers_enabled) call timer_start(T_transpose)
-            call transpose_x_z(3, 2, x1, x2)
-            if (timers_enabled) call timer_stop(T_transpose)
-            call cffts1(-1, dims(1,2), dims(2,2), dims(3,2), 
-     >                  x2, x2, scratch)
-            if (timers_enabled) call timer_start(T_transpose)
-            call transpose_x_y(2, 1, x2, x1)
-            if (timers_enabled) call timer_stop(T_transpose)
-            call cffts1(-1, dims(1,1), dims(2,1), dims(3,1), 
-     >                  x1, x2, scratch)
-         endif
-      endif
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine cffts1(is, d1, d2, d3, x, xout, y)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'global.h'
-      integer is, d1, d2, d3, logd1
-      double complex x(d1,d2,d3)
-      double complex xout(d1,d2,d3)
-      double complex y(fftblockpad, d1, 2) 
-      integer i, j, k, jj
-
-      logd1 = ilog2(d1)
-
-      do k = 1, d3
-         do jj = 0, d2 - fftblock, fftblock
-            if (timers_enabled) call timer_start(T_fftcopy)
-            do j = 1, fftblock
-               do i = 1, d1
-                  y(j,i,1) = x(i,j+jj,k)
-               enddo
-            enddo
-            if (timers_enabled) call timer_stop(T_fftcopy)
-            
-            if (timers_enabled) call timer_start(T_fftlow)
-            call cfftz (is, logd1, d1, y, y(1,1,2))
-            if (timers_enabled) call timer_stop(T_fftlow)
-
-            if (timers_enabled) call timer_start(T_fftcopy)
-            do j = 1, fftblock
-               do i = 1, d1
-                  xout(i,j+jj,k) = y(j,i,1)
-               enddo
-            enddo
-            if (timers_enabled) call timer_stop(T_fftcopy)
-         enddo
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine cffts2(is, d1, d2, d3, x, xout, y)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'global.h'
-      integer is, d1, d2, d3, logd2
-      double complex x(d1,d2,d3)
-      double complex xout(d1,d2,d3)
-      double complex y(fftblockpad, d2, 2) 
-      integer i, j, k, ii
-
-      logd2 = ilog2(d2)
-
-      do k = 1, d3
-        do ii = 0, d1 - fftblock, fftblock
-           if (timers_enabled) call timer_start(T_fftcopy)
-           do j = 1, d2
-              do i = 1, fftblock
-                 y(i,j,1) = x(i+ii,j,k)
-              enddo
-           enddo
-           if (timers_enabled) call timer_stop(T_fftcopy)
-
-           if (timers_enabled) call timer_start(T_fftlow)
-           call cfftz (is, logd2, d2, y, y(1, 1, 2))
-           if (timers_enabled) call timer_stop(T_fftlow)
-
-           if (timers_enabled) call timer_start(T_fftcopy)
-           do j = 1, d2
-              do i = 1, fftblock
-                 xout(i+ii,j,k) = y(i,j,1)
-              enddo
-           enddo
-           if (timers_enabled) call timer_stop(T_fftcopy)
-        enddo
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine cffts3(is, d1, d2, d3, x, xout, y)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'global.h'
-      integer is, d1, d2, d3, logd3
-      double complex x(d1,d2,d3)
-      double complex xout(d1,d2,d3)
-      double complex y(fftblockpad, d3, 2) 
-      integer i, j, k, ii
-
-      logd3 = ilog2(d3)
-
-      do j = 1, d2
-        do ii = 0, d1 - fftblock, fftblock
-           if (timers_enabled) call timer_start(T_fftcopy)
-           do k = 1, d3
-              do i = 1, fftblock
-                 y(i,k,1) = x(i+ii,j,k)
-              enddo
-           enddo
-           if (timers_enabled) call timer_stop(T_fftcopy)
-
-           if (timers_enabled) call timer_start(T_fftlow)
-           call cfftz (is, logd3, d3, y, y(1, 1, 2))
-           if (timers_enabled) call timer_stop(T_fftlow)
-
-           if (timers_enabled) call timer_start(T_fftcopy)
-           do k = 1, d3
-              do i = 1, fftblock
-                 xout(i+ii,j,k) = y(i,k,1)
-              enddo
-           enddo
-           if (timers_enabled) call timer_stop(T_fftcopy)
-        enddo
-      enddo
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine fft_init (n)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c compute the roots-of-unity array that will be used for subsequent FFTs. 
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-
-      integer m,n,nu,ku,i,j,ln
-      double precision t, ti
-
-
-c---------------------------------------------------------------------
-c   Initialize the U array with sines and cosines in a manner that permits
-c   stride one access at each FFT iteration.
-c---------------------------------------------------------------------
-      nu = n
-      m = ilog2(n)
-      u(1) = m
-      ku = 2
-      ln = 1
-
-      do j = 1, m
-         t = pi / ln
-         
-         do i = 0, ln - 1
-            ti = i * t
-            u(i+ku) = dcmplx (cos (ti), sin(ti))
-         enddo
-         
-         ku = ku + ln
-         ln = 2 * ln
-      enddo
-      
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine cfftz (is, m, n, x, y)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   Computes NY N-point complex-to-complex FFTs of X using an algorithm due
-c   to Swarztrauber.  X is both the input and the output array, while Y is a 
-c   scratch array.  It is assumed that N = 2^M.  Before calling CFFTZ to 
-c   perform FFTs, the array U must be initialized by calling CFFTZ with IS 
-c   set to 0 and M set to MX, where MX is the maximum value of M for any 
-c   subsequent call.
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-
-      integer is,m,n,i,j,l,mx
-      double complex x, y
-
-      dimension x(fftblockpad,n), y(fftblockpad,n)
-
-c---------------------------------------------------------------------
-c   Check if input parameters are invalid.
-c---------------------------------------------------------------------
-      mx = u(1)
-      if ((is .ne. 1 .and. is .ne. -1) .or. m .lt. 1 .or. m .gt. mx)    
-     >  then
-        write (*, 1)  is, m, mx
- 1      format ('CFFTZ: Either U has not been initialized, or else'/    
-     >    'one of the input parameters is invalid', 3I5)
-        stop
-      endif
-
-c---------------------------------------------------------------------
-c   Perform one variant of the Stockham FFT.
-c---------------------------------------------------------------------
-      do l = 1, m, 2
-        call fftz2 (is, l, m, n, fftblock, fftblockpad, u, x, y)
-        if (l .eq. m) goto 160
-        call fftz2 (is, l + 1, m, n, fftblock, fftblockpad, u, y, x)
-      enddo
-
-      goto 180
-
-c---------------------------------------------------------------------
-c   Copy Y to X.
-c---------------------------------------------------------------------
- 160  do j = 1, n
-        do i = 1, fftblock
-          x(i,j) = y(i,j)
-        enddo
-      enddo
-
- 180  continue
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine fftz2 (is, l, m, n, ny, ny1, u, x, y)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   Performs the L-th iteration of the second variant of the Stockham FFT.
-c---------------------------------------------------------------------
-
-      implicit none
-
-      integer is,k,l,m,n,ny,ny1,n1,li,lj,lk,ku,i,j,i11,i12,i21,i22
-      double complex u,x,y,u1,x11,x21
-      dimension u(n), x(ny1,n), y(ny1,n)
-
-
-c---------------------------------------------------------------------
-c   Set initial parameters.
-c---------------------------------------------------------------------
-
-      n1 = n / 2
-      lk = 2 ** (l - 1)
-      li = 2 ** (m - l)
-      lj = 2 * lk
-      ku = li + 1
-
-      do i = 0, li - 1
-        i11 = i * lk + 1
-        i12 = i11 + n1
-        i21 = i * lj + 1
-        i22 = i21 + lk
-        if (is .ge. 1) then
-          u1 = u(ku+i)
-        else
-          u1 = dconjg (u(ku+i))
-        endif
-
-c---------------------------------------------------------------------
-c   This loop is vectorizable.
-c---------------------------------------------------------------------
-        do k = 0, lk - 1
-          do j = 1, ny
-            x11 = x(j,i11+k)
-            x21 = x(j,i12+k)
-            y(j,i21+k) = x11 + x21
-            y(j,i22+k) = u1 * (x11 - x21)
-          enddo
-        enddo
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      integer function ilog2(n)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      integer n, nn, lg
-      if (n .eq. 1) then
-         ilog2=0
-         return
-      endif
-      lg = 1
-      nn = 2
-      do while (nn .lt. n)
-         nn = nn*2
-         lg = lg+1
-      end do
-      ilog2 = lg
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_yz(l1, l2, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer l1, l2
-      double complex xin(ntdivnp), xout(ntdivnp)
-
-      call transpose2_local(dims(1,l1),dims(2, l1)*dims(3, l1),
-     >                          xin, xout)
-
-      call transpose2_global(xout, xin)
-
-      call transpose2_finish(dims(1,l1),dims(2, l1)*dims(3, l1),
-     >                          xin, xout)
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_xy_z(l1, l2, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer l1, l2
-      double complex xin(ntdivnp), xout(ntdivnp)
-
-      call transpose2_local(dims(1,l1)*dims(2, l1),dims(3, l1),
-     >                          xin, xout)
-      call transpose2_global(xout, xin)
-      call transpose2_finish(dims(1,l1)*dims(2, l1),dims(3, l1),
-     >                          xin, xout)
-
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose2_local(n1, n2, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'mpinpb.h'
-      include 'global.h'
-      integer n1, n2
-      double complex xin(n1, n2), xout(n2, n1)
-      
-      double complex z(transblockpad, transblock)
-
-      integer i, j, ii, jj
-
-      if (timers_enabled) call timer_start(T_transxzloc)
-
-c---------------------------------------------------------------------
-c If possible, block the transpose for cache memory systems. 
-c How much does this help? Example: R8000 Power Challenge (90 MHz)
-c Blocked version decreases time spend in this routine 
-c from 14 seconds to 5.2 seconds on 8 nodes class A.
-c---------------------------------------------------------------------
-
-      if (n1 .lt. transblock .or. n2 .lt. transblock) then
-         if (n1 .ge. n2) then 
-            do j = 1, n2
-               do i = 1, n1
-                  xout(j, i) = xin(i, j)
-               end do
-            end do
-         else
-            do i = 1, n1
-               do j = 1, n2
-                  xout(j, i) = xin(i, j)
-               end do
-            end do
-         endif
-      else
-         do j = 0, n2-1, transblock
-            do i = 0, n1-1, transblock
-               
-c---------------------------------------------------------------------
-c Note: compiler should be able to take j+jj out of inner loop
-c---------------------------------------------------------------------
-               do jj = 1, transblock
-                  do ii = 1, transblock
-                     z(jj,ii) = xin(i+ii, j+jj)
-                  end do
-               end do
-               
-               do ii = 1, transblock
-                  do jj = 1, transblock
-                     xout(j+jj, i+ii) = z(jj,ii)
-                  end do
-               end do
-               
-            end do
-         end do
-      endif
-      if (timers_enabled) call timer_stop(T_transxzloc)
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose2_global(xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      include 'mpinpb.h'
-      double complex xin(ntdivnp)
-      double complex xout(ntdivnp) 
-      integer ierr
-
-      if (timers_enabled) call synchup()
-
-      if (timers_enabled) call timer_start(T_transxzglo)
-      call mpi_alltoall(xin, ntdivnp/np, dc_type,
-     >                  xout, ntdivnp/np, dc_type,
-     >                  commslice1, ierr)
-      if (timers_enabled) call timer_stop(T_transxzglo)
-
-      return
-      end
-
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose2_finish(n1, n2, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer n1, n2, ioff
-      double complex xin(n2, n1/np2, 0:np2-1), xout(n2*np2, n1/np2)
-      
-      integer i, j, p
-
-      if (timers_enabled) call timer_start(T_transxzfin)
-      do p = 0, np2-1
-         ioff = p*n2
-         do j = 1, n1/np2
-            do i = 1, n2
-               xout(i+ioff, j) = xin(i, j, p)
-            end do
-         end do
-      end do
-      if (timers_enabled) call timer_stop(T_transxzfin)
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_z(l1, l2, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer l1, l2
-      double complex xin(ntdivnp), xout(ntdivnp)
-
-      call transpose_x_z_local(dims(1,l1),dims(2,l1),dims(3,l1),
-     >                         xin, xout)
-      call transpose_x_z_global(dims(1,l1),dims(2,l1),dims(3,l1), 
-     >                          xout, xin)
-      call transpose_x_z_finish(dims(1,l2),dims(2,l2),dims(3,l2), 
-     >                          xin, xout)
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_z_local(d1, d2, d3, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer d1, d2, d3
-      double complex xin(d1,d2,d3)
-      double complex xout(d3,d2,d1)
-      integer block1, block3
-      integer i, j, k, kk, ii, i1, k1
-
-      double complex buf(transblockpad, maxdim)
-      if (timers_enabled) call timer_start(T_transxzloc)
-      if (d1 .lt. 32) goto 100
-      block3 = d3
-      if (block3 .eq. 1)  goto 100
-      if (block3 .gt. transblock) block3 = transblock
-      block1 = d1
-      if (block1*block3 .gt. transblock*transblock) 
-     >          block1 = transblock*transblock/block3
-c---------------------------------------------------------------------
-c blocked transpose
-c---------------------------------------------------------------------
-      do j = 1, d2
-         do kk = 0, d3-block3, block3
-            do ii = 0, d1-block1, block1
-               
-               do k = 1, block3
-                  k1 = k + kk
-                  do i = 1, block1
-                     buf(k, i) = xin(i+ii, j, k1)
-                  end do
-               end do
-
-               do i = 1, block1
-                  i1 = i + ii
-                  do k = 1, block3
-                     xout(k+kk, j, i1) = buf(k, i)
-                  end do
-               end do
-
-            end do
-         end do
-      end do
-      goto 200
-      
-
-c---------------------------------------------------------------------
-c basic transpose
-c---------------------------------------------------------------------
- 100  continue
-      
-      do j = 1, d2
-         do k = 1, d3
-            do i = 1, d1
-               xout(k, j, i) = xin(i, j, k)
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c all done
-c---------------------------------------------------------------------
- 200  continue
-
-      if (timers_enabled) call timer_stop(T_transxzloc)
-      return 
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_z_global(d1, d2, d3, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      include 'mpinpb.h'
-      integer d1, d2, d3
-      double complex xin(d3,d2,d1)
-      double complex xout(d3,d2,d1) ! not real layout, but right size
-      integer ierr
-
-      if (timers_enabled) call synchup()
-
-c---------------------------------------------------------------------
-c do transpose among all  processes with same 1-coord (me1)
-c---------------------------------------------------------------------
-      if (timers_enabled)call timer_start(T_transxzglo)
-      call mpi_alltoall(xin, d1*d2*d3/np2, dc_type,
-     >                  xout, d1*d2*d3/np2, dc_type,
-     >                  commslice1, ierr)
-      if (timers_enabled) call timer_stop(T_transxzglo)
-      return
-      end
-      
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_z_finish(d1, d2, d3, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer d1, d2, d3
-      double complex xin(d1/np2, d2, d3, 0:np2-1)
-      double complex xout(d1,d2,d3)
-      integer i, j, k, p, ioff
-      if (timers_enabled) call timer_start(T_transxzfin)
-c---------------------------------------------------------------------
-c this is the most straightforward way of doing it. the
-c calculation in the inner loop doesn't help. 
-c      do i = 1, d1/np2
-c         do j = 1, d2
-c            do k = 1, d3
-c               do p = 0, np2-1
-c                  ii = i + p*d1/np2
-c                  xout(ii, j, k) = xin(i, j, k, p)
-c               end do
-c            end do
-c         end do
-c      end do
-c---------------------------------------------------------------------
-
-      do p = 0, np2-1
-         ioff = p*d1/np2
-         do k = 1, d3
-            do j = 1, d2
-               do i = 1, d1/np2
-                  xout(i+ioff, j, k) = xin(i, j, k, p)
-               end do
-            end do
-         end do
-      end do
-      if (timers_enabled) call timer_stop(T_transxzfin)
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_y(l1, l2, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer l1, l2
-      double complex xin(ntdivnp), xout(ntdivnp)
-
-c---------------------------------------------------------------------
-c xy transpose is a little tricky, since we don't want
-c to touch 3rd axis. But alltoall must involve 3rd axis (most 
-c slowly varying) to be efficient. So we do
-c (nx, ny/np1, nz/np2) -> (ny/np1, nz/np2, nx) (local)
-c (ny/np1, nz/np2, nx) -> ((ny/np1*nz/np2)*np1, nx/np1) (global)
-c then local finish. 
-c---------------------------------------------------------------------
-
-
-      call transpose_x_y_local(dims(1,l1),dims(2,l1),dims(3,l1),
-     >                         xin, xout)
-      call transpose_x_y_global(dims(1,l1),dims(2,l1),dims(3,l1), 
-     >                          xout, xin)
-      call transpose_x_y_finish(dims(1,l2),dims(2,l2),dims(3,l2), 
-     >                          xin, xout)
-
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_y_local(d1, d2, d3, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer d1, d2, d3
-      double complex xin(d1, d2, d3)
-      double complex xout(d2, d3, d1)
-      integer i, j, k
-      if (timers_enabled) call timer_start(T_transxyloc)
-
-      do k = 1, d3
-         do i = 1, d1
-            do j = 1, d2
-               xout(j,k,i)=xin(i,j,k)
-            end do
-         end do
-      end do
-      if (timers_enabled) call timer_stop(T_transxyloc)
-      return 
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_y_global(d1, d2, d3, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      include 'mpinpb.h'
-      integer d1, d2, d3
-c---------------------------------------------------------------------
-c array is in form (ny/np1, nz/np2, nx)
-c---------------------------------------------------------------------
-      double complex xin(d2,d3,d1)
-      double complex xout(d2,d3,d1) ! not real layout but right size
-      integer ierr
-
-      if (timers_enabled) call synchup()
-
-c---------------------------------------------------------------------
-c do transpose among all processes with same 1-coord (me1)
-c---------------------------------------------------------------------
-      if (timers_enabled) call timer_start(T_transxyglo)
-      call mpi_alltoall(xin, d1*d2*d3/np1, dc_type,
-     >                  xout, d1*d2*d3/np1, dc_type,
-     >                  commslice2, ierr)
-      if (timers_enabled) call timer_stop(T_transxyglo)
-
-      return
-      end
-      
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine transpose_x_y_finish(d1, d2, d3, xin, xout)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      integer d1, d2, d3
-      double complex xin(d1/np1, d3, d2, 0:np1-1)
-      double complex xout(d1,d2,d3)
-      integer i, j, k, p, ioff
-      if (timers_enabled) call timer_start(T_transxyfin)
-c---------------------------------------------------------------------
-c this is the most straightforward way of doing it. the
-c calculation in the inner loop doesn't help. 
-c      do i = 1, d1/np1
-c         do j = 1, d2
-c            do k = 1, d3
-c               do p = 0, np1-1
-c                  ii = i + p*d1/np1
-c note order is screwy bcz we have (ny/np1, nz/np2, nx) -> (ny, nx/np1, nz/np2)
-c                  xout(ii, j, k) = xin(i, k, j, p)
-c               end do
-c            end do
-c         end do
-c      end do
-c---------------------------------------------------------------------
-
-      do p = 0, np1-1
-         ioff = p*d1/np1
-         do k = 1, d3
-            do j = 1, d2
-               do i = 1, d1/np1
-                  xout(i+ioff, j, k) = xin(i, k, j, p)
-               end do
-            end do
-         end do
-      end do
-      if (timers_enabled) call timer_stop(T_transxyfin)
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine checksum(i, u1, d1, d2, d3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      include 'mpinpb.h'
-      integer i, d1, d2, d3
-      double complex u1(d1, d2, d3)
-      integer j, q,r,s, ierr
-      double complex chk,allchk
-      chk = (0.0,0.0)
-
-      do j=1,1024
-         q = mod(j, nx)+1
-         if (q .ge. xstart(1) .and. q .le. xend(1)) then
-            r = mod(3*j,ny)+1
-            if (r .ge. ystart(1) .and. r .le. yend(1)) then
-               s = mod(5*j,nz)+1
-               if (s .ge. zstart(1) .and. s .le. zend(1)) then
-                  chk=chk+u1(q-xstart(1)+1,r-ystart(1)+1,s-zstart(1)+1)
-               end if
-            end if
-         end if
-      end do
-      chk = chk/ntotal_f
-      
-      call MPI_Reduce(chk, allchk, 1, dc_type, MPI_SUM, 
-     >                0, MPI_COMM_WORLD, ierr)      
-      if (me .eq. 0) then
-            write (*, 30) i, allchk
- 30         format (' T =',I5,5X,'Checksum =',1P2D22.12)
-      endif
-
-c      sums(i) = allchk
-c     If we compute the checksum for diagnostic purposes, we let i be
-c     negative, so the result will not be stored in an array
-      if (i .gt. 0) sums(i) = allchk
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine synchup
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      include 'mpinpb.h'
-      integer ierr
-      call timer_start(T_synch)
-      call mpi_barrier(MPI_COMM_WORLD, ierr)
-      call timer_stop(T_synch)
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine verify (d1, d2, d3, nt, verified, class)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'global.h'
-      include 'mpinpb.h'
-      integer d1, d2, d3, nt
-      character class
-      logical verified
-      integer ierr, size, i
-      double precision err, epsilon
-
-c---------------------------------------------------------------------
-c   Reference checksums
-c---------------------------------------------------------------------
-      double complex csum_ref(25)
-
-
-      class = 'U'
-
-      if (me .ne. 0) return
-
-      epsilon = 1.0d-12
-      verified = .FALSE.
-
-      if (d1 .eq. 64 .and.
-     >    d2 .eq. 64 .and.
-     >    d3 .eq. 64 .and.
-     >    nt .eq. 6) then
-c---------------------------------------------------------------------
-c   Sample size reference checksums
-c---------------------------------------------------------------------
-         class = 'S'
-         csum_ref(1) = dcmplx(5.546087004964D+02, 4.845363331978D+02)
-         csum_ref(2) = dcmplx(5.546385409189D+02, 4.865304269511D+02)
-         csum_ref(3) = dcmplx(5.546148406171D+02, 4.883910722336D+02)
-         csum_ref(4) = dcmplx(5.545423607415D+02, 4.901273169046D+02)
-         csum_ref(5) = dcmplx(5.544255039624D+02, 4.917475857993D+02)
-         csum_ref(6) = dcmplx(5.542683411902D+02, 4.932597244941D+02)
-
-      else if (d1 .eq. 128 .and.
-     >    d2 .eq. 128 .and.
-     >    d3 .eq. 32 .and.
-     >    nt .eq. 6) then
-c---------------------------------------------------------------------
-c   Class W size reference checksums
-c---------------------------------------------------------------------
-         class = 'W'
-         csum_ref(1) = dcmplx(5.673612178944D+02, 5.293246849175D+02)
-         csum_ref(2) = dcmplx(5.631436885271D+02, 5.282149986629D+02)
-         csum_ref(3) = dcmplx(5.594024089970D+02, 5.270996558037D+02)
-         csum_ref(4) = dcmplx(5.560698047020D+02, 5.260027904925D+02)
-         csum_ref(5) = dcmplx(5.530898991250D+02, 5.249400845633D+02)
-         csum_ref(6) = dcmplx(5.504159734538D+02, 5.239212247086D+02)
-
-      else if (d1 .eq. 256 .and.
-     >    d2 .eq. 256 .and.
-     >    d3 .eq. 128 .and.
-     >    nt .eq. 6) then
-c---------------------------------------------------------------------
-c   Class A size reference checksums
-c---------------------------------------------------------------------
-         class = 'A'
-         csum_ref(1) = dcmplx(5.046735008193D+02, 5.114047905510D+02)
-         csum_ref(2) = dcmplx(5.059412319734D+02, 5.098809666433D+02)
-         csum_ref(3) = dcmplx(5.069376896287D+02, 5.098144042213D+02)
-         csum_ref(4) = dcmplx(5.077892868474D+02, 5.101336130759D+02)
-         csum_ref(5) = dcmplx(5.085233095391D+02, 5.104914655194D+02)
-         csum_ref(6) = dcmplx(5.091487099959D+02, 5.107917842803D+02)
-      
-      else if (d1 .eq. 512 .and.
-     >    d2 .eq. 256 .and.
-     >    d3 .eq. 256 .and.
-     >    nt .eq. 20) then
-c---------------------------------------------------------------------
-c   Class B size reference checksums
-c---------------------------------------------------------------------
-         class = 'B'
-         csum_ref(1)  = dcmplx(5.177643571579D+02, 5.077803458597D+02)
-         csum_ref(2)  = dcmplx(5.154521291263D+02, 5.088249431599D+02)
-         csum_ref(3)  = dcmplx(5.146409228649D+02, 5.096208912659D+02)
-         csum_ref(4)  = dcmplx(5.142378756213D+02, 5.101023387619D+02)
-         csum_ref(5)  = dcmplx(5.139626667737D+02, 5.103976610617D+02)
-         csum_ref(6)  = dcmplx(5.137423460082D+02, 5.105948019802D+02)
-         csum_ref(7)  = dcmplx(5.135547056878D+02, 5.107404165783D+02)
-         csum_ref(8)  = dcmplx(5.133910925466D+02, 5.108576573661D+02)
-         csum_ref(9)  = dcmplx(5.132470705390D+02, 5.109577278523D+02)
-         csum_ref(10) = dcmplx(5.131197729984D+02, 5.110460304483D+02)
-         csum_ref(11) = dcmplx(5.130070319283D+02, 5.111252433800D+02)
-         csum_ref(12) = dcmplx(5.129070537032D+02, 5.111968077718D+02)
-         csum_ref(13) = dcmplx(5.128182883502D+02, 5.112616233064D+02)
-         csum_ref(14) = dcmplx(5.127393733383D+02, 5.113203605551D+02)
-         csum_ref(15) = dcmplx(5.126691062020D+02, 5.113735928093D+02)
-         csum_ref(16) = dcmplx(5.126064276004D+02, 5.114218460548D+02)
-         csum_ref(17) = dcmplx(5.125504076570D+02, 5.114656139760D+02)
-         csum_ref(18) = dcmplx(5.125002331720D+02, 5.115053595966D+02)
-         csum_ref(19) = dcmplx(5.124551951846D+02, 5.115415130407D+02)
-         csum_ref(20) = dcmplx(5.124146770029D+02, 5.115744692211D+02)
-
-      else if (d1 .eq. 512 .and.
-     >    d2 .eq. 512 .and.
-     >    d3 .eq. 512 .and.
-     >    nt .eq. 20) then
-c---------------------------------------------------------------------
-c   Class C size reference checksums
-c---------------------------------------------------------------------
-         class = 'C'
-         csum_ref(1)  = dcmplx(5.195078707457D+02, 5.149019699238D+02)
-         csum_ref(2)  = dcmplx(5.155422171134D+02, 5.127578201997D+02)
-         csum_ref(3)  = dcmplx(5.144678022222D+02, 5.122251847514D+02)
-         csum_ref(4)  = dcmplx(5.140150594328D+02, 5.121090289018D+02)
-         csum_ref(5)  = dcmplx(5.137550426810D+02, 5.121143685824D+02)
-         csum_ref(6)  = dcmplx(5.135811056728D+02, 5.121496764568D+02)
-         csum_ref(7)  = dcmplx(5.134569343165D+02, 5.121870921893D+02)
-         csum_ref(8)  = dcmplx(5.133651975661D+02, 5.122193250322D+02)
-         csum_ref(9)  = dcmplx(5.132955192805D+02, 5.122454735794D+02)
-         csum_ref(10) = dcmplx(5.132410471738D+02, 5.122663649603D+02)
-         csum_ref(11) = dcmplx(5.131971141679D+02, 5.122830879827D+02)
-         csum_ref(12) = dcmplx(5.131605205716D+02, 5.122965869718D+02)
-         csum_ref(13) = dcmplx(5.131290734194D+02, 5.123075927445D+02)
-         csum_ref(14) = dcmplx(5.131012720314D+02, 5.123166486553D+02)
-         csum_ref(15) = dcmplx(5.130760908195D+02, 5.123241541685D+02)
-         csum_ref(16) = dcmplx(5.130528295923D+02, 5.123304037599D+02)
-         csum_ref(17) = dcmplx(5.130310107773D+02, 5.123356167976D+02)
-         csum_ref(18) = dcmplx(5.130103090133D+02, 5.123399592211D+02)
-         csum_ref(19) = dcmplx(5.129905029333D+02, 5.123435588985D+02)
-         csum_ref(20) = dcmplx(5.129714421109D+02, 5.123465164008D+02)
-
-      else if (d1 .eq. 2048 .and.
-     >    d2 .eq. 1024 .and.
-     >    d3 .eq. 1024 .and.
-     >    nt .eq. 25) then
-c---------------------------------------------------------------------
-c   Class D size reference checksums
-c---------------------------------------------------------------------
-         class = 'D'
-         csum_ref(1)  = dcmplx(5.122230065252D+02, 5.118534037109D+02)
-         csum_ref(2)  = dcmplx(5.120463975765D+02, 5.117061181082D+02)
-         csum_ref(3)  = dcmplx(5.119865766760D+02, 5.117096364601D+02)
-         csum_ref(4)  = dcmplx(5.119518799488D+02, 5.117373863950D+02)
-         csum_ref(5)  = dcmplx(5.119269088223D+02, 5.117680347632D+02)
-         csum_ref(6)  = dcmplx(5.119082416858D+02, 5.117967875532D+02)
-         csum_ref(7)  = dcmplx(5.118943814638D+02, 5.118225281841D+02)
-         csum_ref(8)  = dcmplx(5.118842385057D+02, 5.118451629348D+02)
-         csum_ref(9)  = dcmplx(5.118769435632D+02, 5.118649119387D+02)
-         csum_ref(10) = dcmplx(5.118718203448D+02, 5.118820803844D+02)
-         csum_ref(11) = dcmplx(5.118683569061D+02, 5.118969781011D+02)
-         csum_ref(12) = dcmplx(5.118661708593D+02, 5.119098918835D+02)
-         csum_ref(13) = dcmplx(5.118649768950D+02, 5.119210777066D+02)
-         csum_ref(14) = dcmplx(5.118645605626D+02, 5.119307604484D+02)
-         csum_ref(15) = dcmplx(5.118647586618D+02, 5.119391362671D+02)
-         csum_ref(16) = dcmplx(5.118654451572D+02, 5.119463757241D+02)
-         csum_ref(17) = dcmplx(5.118665212451D+02, 5.119526269238D+02)
-         csum_ref(18) = dcmplx(5.118679083821D+02, 5.119580184108D+02)
-         csum_ref(19) = dcmplx(5.118695433664D+02, 5.119626617538D+02)
-         csum_ref(20) = dcmplx(5.118713748264D+02, 5.119666538138D+02)
-         csum_ref(21) = dcmplx(5.118733606701D+02, 5.119700787219D+02)
-         csum_ref(22) = dcmplx(5.118754661974D+02, 5.119730095953D+02)
-         csum_ref(23) = dcmplx(5.118776626738D+02, 5.119755100241D+02)
-         csum_ref(24) = dcmplx(5.118799262314D+02, 5.119776353561D+02)
-         csum_ref(25) = dcmplx(5.118822370068D+02, 5.119794338060D+02)
-
-      else if (d1 .eq. 4096 .and.
-     >    d2 .eq. 2048 .and.
-     >    d3 .eq. 2048 .and.
-     >    nt .eq. 25) then
-c---------------------------------------------------------------------
-c   Class E size reference checksums
-c---------------------------------------------------------------------
-         class = 'E'
-         csum_ref(1)  = dcmplx(5.121601045346D+02, 5.117395998266D+02)
-         csum_ref(2)  = dcmplx(5.120905403678D+02, 5.118614716182D+02)
-         csum_ref(3)  = dcmplx(5.120623229306D+02, 5.119074203747D+02)
-         csum_ref(4)  = dcmplx(5.120438418997D+02, 5.119345900733D+02)
-         csum_ref(5)  = dcmplx(5.120311521872D+02, 5.119551325550D+02)
-         csum_ref(6)  = dcmplx(5.120226088809D+02, 5.119720179919D+02)
-         csum_ref(7)  = dcmplx(5.120169296534D+02, 5.119861371665D+02)
-         csum_ref(8)  = dcmplx(5.120131225172D+02, 5.119979364402D+02)
-         csum_ref(9)  = dcmplx(5.120104767108D+02, 5.120077674092D+02)
-         csum_ref(10) = dcmplx(5.120085127969D+02, 5.120159443121D+02)
-         csum_ref(11) = dcmplx(5.120069224127D+02, 5.120227453670D+02)
-         csum_ref(12) = dcmplx(5.120055158164D+02, 5.120284096041D+02)
-         csum_ref(13) = dcmplx(5.120041820159D+02, 5.120331373793D+02)
-         csum_ref(14) = dcmplx(5.120028605402D+02, 5.120370938679D+02)
-         csum_ref(15) = dcmplx(5.120015223011D+02, 5.120404138831D+02)
-         csum_ref(16) = dcmplx(5.120001570022D+02, 5.120432068837D+02)
-         csum_ref(17) = dcmplx(5.119987650555D+02, 5.120455615860D+02)
-         csum_ref(18) = dcmplx(5.119973525091D+02, 5.120475499442D+02)
-         csum_ref(19) = dcmplx(5.119959279472D+02, 5.120492304629D+02)
-         csum_ref(20) = dcmplx(5.119945006558D+02, 5.120506508902D+02)
-         csum_ref(21) = dcmplx(5.119930795911D+02, 5.120518503782D+02)
-         csum_ref(22) = dcmplx(5.119916728462D+02, 5.120528612016D+02)
-         csum_ref(23) = dcmplx(5.119902874185D+02, 5.120537101195D+02)
-         csum_ref(24) = dcmplx(5.119889291565D+02, 5.120544194514D+02)
-         csum_ref(25) = dcmplx(5.119876028049D+02, 5.120550079284D+02)
-
-      endif
-
-
-      if (class .ne. 'U') then
-
-         do i = 1, nt
-            err = abs( (sums(i) - csum_ref(i)) / csum_ref(i) )
-            if (.not.(err .le. epsilon)) goto 100
-         end do
-         verified = .TRUE.
- 100     continue
-
-      endif
-
-      call MPI_COMM_SIZE(MPI_COMM_WORLD, size, ierr)
-      if (size .ne. np) then
-         write(*, 4010) np
-         write(*, 4011)
-         write(*, 4012)
-c---------------------------------------------------------------------
-c multiple statements because some Fortran compilers have
-c problems with long strings. 
-c---------------------------------------------------------------------
- 4010    format( ' Warning: benchmark was compiled for ', i5, 
-     >           'processors')
- 4011    format( ' Must be run on this many processors for official',
-     >           ' verification')
- 4012    format( ' so memory access is repeatable')
-         verified = .false.
-      endif
-         
-      if (class .ne. 'U') then
-         if (verified) then
-            write(*,2000)
- 2000       format(' Result verification successful')
-         else
-            write(*,2001)
- 2001       format(' Result verification failed')
-         endif
-      endif
-      print *, 'class = ', class
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/FT/global.h b/examples/smpi/NAS/FT/global.h
deleted file mode 100644 (file)
index 3e534bb..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-      include 'npbparams.h'
-
-c 2D processor array -> 2D grid decomposition (by pencils)
-c If processor array is 1xN or -> 1D grid decomposition (by planes)
-c If processor array is 1x1 -> 0D grid decomposition
-c For simplicity, do not treat Nx1 (np2 = 1) specially
-      integer np1, np2, np
-
-c basic decomposition strategy
-      integer layout_type
-      integer layout_0D, layout_1D, layout_2D
-      parameter (layout_0D = 0, layout_1D = 1, layout_2D = 2)
-
-      common /procgrid/ np1, np2, layout_type, np
-
-
-c Cache blocking params. These values are good for most
-c RISC processors.  
-c FFT parameters:
-c  fftblock controls how many ffts are done at a time. 
-c  The default is appropriate for most cache-based machines
-c  On vector machines, the FFT can be vectorized with vector
-c  length equal to the block size, so the block size should
-c  be as large as possible. This is the size of the smallest
-c  dimension of the problem: 128 for class A, 256 for class B and
-c  512 for class C.
-c Transpose parameters:
-c  transblock is the blocking factor for the transposes when there
-c  is a 1-D layout. On vector machines it should probably be
-c  large (largest dimension of the problem).
-
-
-      integer fftblock_default, fftblockpad_default
-      parameter (fftblock_default=16, fftblockpad_default=18)
-      integer transblock, transblockpad
-      parameter(transblock=32, transblockpad=34)
-      
-      integer fftblock, fftblockpad
-      common /blockinfo/ fftblock, fftblockpad
-
-c we need a bunch of logic to keep track of how
-c arrays are laid out. 
-c coords of this processor
-      integer me, me1, me2
-      common /coords/ me, me1, me2
-c need a communicator for row/col in processor grid
-      integer commslice1, commslice2
-      common /comms/ commslice1, commslice2
-
-
-
-c There are basically three stages
-c 1: x-y-z layout
-c 2: after x-transform (before y)
-c 3: after y-transform (before z)
-c The computation proceeds logically as
-
-c set up initial conditions
-c fftx(1)
-c transpose (1->2)
-c ffty(2)
-c transpose (2->3)
-c fftz(3)
-c time evolution
-c fftz(3)
-c transpose (3->2)
-c ffty(2)
-c transpose (2->1)
-c fftx(1)
-c compute residual(1)
-
-c for the 0D, 1D, 2D strategies, the layouts look like xxx
-c        
-c            0D        1D        2D
-c 1:        xyz       xyz       xyz
-c 2:        xyz       xyz       yxz
-c 3:        xyz       zyx       zxy
-
-c the array dimensions are stored in dims(coord, phase)
-      integer dims(3, 3)
-      integer xstart(3), ystart(3), zstart(3)
-      integer xend(3), yend(3), zend(3)
-      common /layout/ dims,
-     >                xstart, ystart, zstart, 
-     >                xend, yend, zend
-
-      integer T_total, T_setup, T_fft, T_evolve, T_checksum, 
-     >        T_fftlow, T_fftcopy, T_transpose, 
-     >        T_transxzloc, T_transxzglo, T_transxzfin, 
-     >        T_transxyloc, T_transxyglo, T_transxyfin, 
-     >        T_synch, T_max
-      parameter (T_total = 1, T_setup = 2, T_fft = 3, 
-     >           T_evolve = 4, T_checksum = 5, 
-     >           T_fftlow = 6, T_fftcopy = 7, T_transpose = 8,
-     >           T_transxzloc = 9, T_transxzglo = 10, T_transxzfin = 11, 
-     >           T_transxyloc = 12, T_transxyglo = 13, 
-     >           T_transxyfin = 14,  T_synch = 15, T_max = 15)
-
-
-
-      logical timers_enabled
-      parameter (timers_enabled = .false.)
-
-
-      external timer_read
-      double precision timer_read
-      external ilog2
-      integer ilog2
-
-      external randlc
-      double precision randlc
-
-
-c other stuff
-      logical debug, debugsynch
-      common /dbg/ debug, debugsynch
-
-      double precision seed, a, pi, alpha
-      parameter (seed = 314159265.d0, a = 1220703125.d0, 
-     >  pi = 3.141592653589793238d0, alpha=1.0d-6)
-
-c roots of unity array
-c relies on x being largest dimension?
-      double complex u(nx)
-      common /ucomm/ u
-
-
-c for checksum data
-      double complex sums(0:niter_default)
-      common /sumcomm/ sums
-
-c number of iterations
-      integer niter
-      common /iter/ niter
diff --git a/examples/smpi/NAS/FT/inputft.data.sample b/examples/smpi/NAS/FT/inputft.data.sample
deleted file mode 100644 (file)
index 448ac42..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-6   ! number of iterations
-2   ! layout type. 0 = 0d, 1 = 1d, 2 = 2d
-2 4 ! processor layout. 0d must be "1 1"; 1d must be "1 N"
diff --git a/examples/smpi/NAS/FT/mpinpb.h b/examples/smpi/NAS/FT/mpinpb.h
deleted file mode 100644 (file)
index e43e552..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-      include 'mpif.h'
-c mpi data types
-      integer dc_type
-      common /mpistuff/ dc_type
diff --git a/examples/smpi/NAS/LU/Makefile b/examples/smpi/NAS/LU/Makefile
deleted file mode 100644 (file)
index a05c94d..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-SHELL=/bin/sh
-BENCHMARK=lu
-BENCHMARKU=LU
-VEC=
-
-include ../config/make.def
-
-OBJS = lu.o init_comm.o read_input.o bcast_inputs.o proc_grid.o neighbors.o \
-       nodedim.o subdomain.o setcoeff.o sethyper.o setbv.o exact.o setiv.o \
-       erhs.o ssor.o exchange_1.o exchange_3.o exchange_4.o exchange_5.o \
-       exchange_6.o rhs.o l2norm.o jacld.o blts$(VEC).o jacu.o buts$(VEC).o \
-       error.o pintgr.o verify.o ${COMMON}/print_results.o ${COMMON}/timers.o
-
-include ../sys/make.common
-
-
-# npbparams.h is included by applu.incl
-# The following rule should do the trick but many make programs (not gmake)
-# will do the wrong thing and rebuild the world every time (because the
-# mod time on header.h is not changed. One solution would be to 
-# touch header.h but this might cause confusion if someone has
-# accidentally deleted it. Instead, make the dependency on npbparams.h
-# explicit in all the lines below (even though dependence is indirect). 
-
-# applu.incl: npbparams.h
-
-${PROGRAM}: config
-       @if [ x$(VERSION) = xvec ] ; then       \
-               ${MAKE} VEC=_vec exec;          \
-       elif [ x$(VERSION) = xVEC ] ; then      \
-               ${MAKE} VEC=_vec exec;          \
-       else                                    \
-               ${MAKE} exec;                   \
-       fi
-
-exec: $(OBJS)
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${FMPI_LIB}
-
-.f.o :
-       ${FCOMPILE} $<
-
-lu.o:          lu.f applu.incl npbparams.h
-bcast_inputs.o:        bcast_inputs.f applu.incl npbparams.h mpinpb.h
-blts$(VEC).o:  blts$(VEC).f
-buts$(VEC).o:  buts$(VEC).f
-erhs.o:                erhs.f applu.incl npbparams.h
-error.o:       error.f applu.incl npbparams.h mpinpb.h
-exact.o:       exact.f applu.incl npbparams.h
-exchange_1.o:  exchange_1.f applu.incl npbparams.h mpinpb.h
-exchange_3.o:  exchange_3.f applu.incl npbparams.h mpinpb.h
-exchange_4.o:  exchange_4.f applu.incl npbparams.h mpinpb.h
-exchange_5.o:  exchange_5.f applu.incl npbparams.h mpinpb.h
-exchange_6.o:  exchange_6.f applu.incl npbparams.h mpinpb.h
-init_comm.o:   init_comm.f applu.incl npbparams.h mpinpb.h 
-jacld.o:       jacld.f applu.incl npbparams.h
-jacu.o:                jacu.f applu.incl npbparams.h
-l2norm.o:      l2norm.f mpinpb.h
-neighbors.o:   neighbors.f applu.incl npbparams.h
-nodedim.o:     nodedim.f
-pintgr.o:      pintgr.f applu.incl npbparams.h mpinpb.h
-proc_grid.o:   proc_grid.f applu.incl npbparams.h
-read_input.o:  read_input.f applu.incl npbparams.h mpinpb.h
-rhs.o:         rhs.f applu.incl npbparams.h
-setbv.o:       setbv.f applu.incl npbparams.h
-setiv.o:       setiv.f applu.incl npbparams.h
-setcoeff.o:    setcoeff.f applu.incl npbparams.h
-sethyper.o:    sethyper.f applu.incl npbparams.h
-ssor.o:                ssor.f applu.incl npbparams.h mpinpb.h
-subdomain.o:   subdomain.f applu.incl npbparams.h mpinpb.h
-verify.o:      verify.f applu.incl npbparams.h
-
-clean:
-       - /bin/rm -f npbparams.h
-       - /bin/rm -f *.o *~
diff --git a/examples/smpi/NAS/LU/applu.incl b/examples/smpi/NAS/LU/applu.incl
deleted file mode 100644 (file)
index 413fc83..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-c---  applu.incl   
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   npbparams.h defines parameters that depend on the class and 
-c   number of nodes
-c---------------------------------------------------------------------
-
-      include 'npbparams.h'
-
-c---------------------------------------------------------------------
-c   parameters which can be overridden in runtime config file
-c   (in addition to size of problem - isiz01,02,03 give the maximum size)
-c   ipr = 1 to print out verbose information
-c   omega = 2.0 is correct for all classes
-c   tolrsd is tolerance levels for steady state residuals
-c---------------------------------------------------------------------
-      integer ipr_default
-      parameter (ipr_default = 1)
-      double precision omega_default
-      parameter (omega_default = 1.2d0)
-      double precision tolrsd1_def, tolrsd2_def, tolrsd3_def, 
-     >                 tolrsd4_def, tolrsd5_def
-      parameter (tolrsd1_def=1.0e-08, 
-     >          tolrsd2_def=1.0e-08, tolrsd3_def=1.0e-08, 
-     >          tolrsd4_def=1.0e-08, tolrsd5_def=1.0e-08)
-
-      double precision c1, c2, c3, c4, c5
-      parameter( c1 = 1.40d+00, c2 = 0.40d+00,
-     >           c3 = 1.00d-01, c4 = 1.00d+00,
-     >           c5 = 1.40d+00 )
-
-c---------------------------------------------------------------------
-c   grid
-c---------------------------------------------------------------------
-      integer nx, ny, nz
-      integer nx0, ny0, nz0
-      integer ipt, ist, iend
-      integer jpt, jst, jend
-      integer ii1, ii2
-      integer ji1, ji2
-      integer ki1, ki2
-      double precision  dxi, deta, dzeta
-      double precision  tx1, tx2, tx3
-      double precision  ty1, ty2, ty3
-      double precision  tz1, tz2, tz3
-
-      common/cgcon/ dxi, deta, dzeta,
-     >              tx1, tx2, tx3,
-     >              ty1, ty2, ty3,
-     >              tz1, tz2, tz3,
-     >              nx, ny, nz, 
-     >              nx0, ny0, nz0,
-     >              ipt, ist, iend,
-     >              jpt, jst, jend,
-     >              ii1, ii2, 
-     >              ji1, ji2, 
-     >              ki1, ki2
-
-c---------------------------------------------------------------------
-c   dissipation
-c---------------------------------------------------------------------
-      double precision dx1, dx2, dx3, dx4, dx5
-      double precision dy1, dy2, dy3, dy4, dy5
-      double precision dz1, dz2, dz3, dz4, dz5
-      double precision dssp
-
-      common/disp/ dx1,dx2,dx3,dx4,dx5,
-     >             dy1,dy2,dy3,dy4,dy5,
-     >             dz1,dz2,dz3,dz4,dz5,
-     >             dssp
-
-c---------------------------------------------------------------------
-c   field variables and residuals
-c---------------------------------------------------------------------
-      double precision u(5,-1:isiz1+2,-1:isiz2+2,isiz3),
-     >       rsd(5,-1:isiz1+2,-1:isiz2+2,isiz3),
-     >       frct(5,-1:isiz1+2,-1:isiz2+2,isiz3),
-     >       flux(5,0:isiz1+1,0:isiz2+1,isiz3)
-
-      common/cvar/ u,
-     >             rsd,
-     >             frct,
-     >             flux
-
-
-c---------------------------------------------------------------------
-c   output control parameters
-c---------------------------------------------------------------------
-      integer ipr, inorm
-
-      common/cprcon/ ipr, inorm
-
-c---------------------------------------------------------------------
-c   newton-raphson iteration control parameters
-c---------------------------------------------------------------------
-      integer itmax, invert
-      double precision  dt, omega, tolrsd(5),
-     >        rsdnm(5), errnm(5), frc, ttotal
-
-      common/ctscon/ dt, omega, tolrsd,
-     >               rsdnm, errnm, frc, ttotal,
-     >               itmax, invert
-
-      double precision a(5,5,isiz1,isiz2),
-     >       b(5,5,isiz1,isiz2),
-     >       c(5,5,isiz1,isiz2),
-     >       d(5,5,isiz1,isiz2)
-
-      common/cjac/ a, b, c, d
-
-c---------------------------------------------------------------------
-c   coefficients of the exact solution
-c---------------------------------------------------------------------
-      double precision ce(5,13)
-
-      common/cexact/ ce
-
-c---------------------------------------------------------------------
-c   multi-processor common blocks
-c---------------------------------------------------------------------
-      integer id, ndim, num, xdim, ydim, row, col
-      common/dim/ id,ndim,num,xdim,ydim,row,col
-
-      integer north,south,east,west
-      common/neigh/ north,south,east, west
-
-      integer from_s,from_n,from_e,from_w
-      parameter (from_s=1,from_n=2,from_e=3,from_w=4)
-
-      integer npmax
-      parameter (npmax=isiz01+isiz02)
-
-      logical icommn(npmax+1),icomms(npmax+1),
-     >        icomme(npmax+1),icommw(npmax+1)
-      double precision  buf(5,2*isiz2*isiz3),
-     >                  buf1(5,2*isiz2*isiz3)
-
-      common/comm/ buf, buf1,
-     >             icommn,icomms,
-     >             icomme,icommw
-
-      double precision maxtime
-      common/timer/maxtime
-
-
-c---------------------------------------------------------------------
-c   end of include file
-c---------------------------------------------------------------------
diff --git a/examples/smpi/NAS/LU/bcast_inputs.f b/examples/smpi/NAS/LU/bcast_inputs.f
deleted file mode 100644 (file)
index c606724..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine bcast_inputs
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer ierr
-
-c---------------------------------------------------------------------
-c   root broadcasts the data
-c   The data isn't contiguous or of the same type, so it's not
-c   clear how to send it in the "MPI" way. 
-c   We could pack the info into a buffer or we could create
-c   an obscene datatype to handle it all at once. Since we only
-c   broadcast the data once, just use a separate broadcast for
-c   each piece. 
-c---------------------------------------------------------------------
-      call MPI_BCAST(ipr, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(inorm, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(itmax, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(dt, 1, dp_type, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(omega, 1, dp_type, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(tolrsd, 5, dp_type, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(nx0, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(ny0, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
-      call MPI_BCAST(nz0, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/blts.f b/examples/smpi/NAS/LU/blts.f
deleted file mode 100644 (file)
index 9861261..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine blts ( ldmx, ldmy, ldmz,
-     >                  nx, ny, nz, k,
-     >                  omega,
-     >                  v,
-     >                  ldz, ldy, ldx, d,
-     >                  ist, iend, jst, jend,
-     >                  nx0, ny0, ipt, jpt)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   compute the regular-sparse, block lower triangular solution:
-c
-c                     v <-- ( L-inv ) * v
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer ldmx, ldmy, ldmz
-      integer nx, ny, nz
-      integer k
-      double precision  omega
-      double precision  v( 5, -1:ldmx+2, -1:ldmy+2, *),
-     >        ldz( 5, 5, ldmx, ldmy),
-     >        ldy( 5, 5, ldmx, ldmy),
-     >        ldx( 5, 5, ldmx, ldmy),
-     >        d( 5, 5, ldmx, ldmy)
-      integer ist, iend
-      integer jst, jend
-      integer nx0, ny0
-      integer ipt, jpt
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, m
-      integer iex
-      double precision  tmp, tmp1
-      double precision  tmat(5,5)
-
-
-c---------------------------------------------------------------------
-c   receive data from north and west
-c---------------------------------------------------------------------
-      iex = 0
-      call exchange_1( v,k,iex )
-
-
-      do j = jst, jend
-         do i = ist, iend
-            do m = 1, 5
-
-                  v( m, i, j, k ) =  v( m, i, j, k )
-     >    - omega * (  ldz( m, 1, i, j ) * v( 1, i, j, k-1 )
-     >               + ldz( m, 2, i, j ) * v( 2, i, j, k-1 )
-     >               + ldz( m, 3, i, j ) * v( 3, i, j, k-1 )
-     >               + ldz( m, 4, i, j ) * v( 4, i, j, k-1 )
-     >               + ldz( m, 5, i, j ) * v( 5, i, j, k-1 )  )
-
-            end do
-         end do
-      end do
-
-
-      do j=jst,jend
-        do i = ist, iend
-
-            do m = 1, 5
-
-                  v( m, i, j, k ) =  v( m, i, j, k )
-     > - omega * ( ldy( m, 1, i, j ) * v( 1, i, j-1, k )
-     >           + ldx( m, 1, i, j ) * v( 1, i-1, j, k )
-     >           + ldy( m, 2, i, j ) * v( 2, i, j-1, k )
-     >           + ldx( m, 2, i, j ) * v( 2, i-1, j, k )
-     >           + ldy( m, 3, i, j ) * v( 3, i, j-1, k )
-     >           + ldx( m, 3, i, j ) * v( 3, i-1, j, k )
-     >           + ldy( m, 4, i, j ) * v( 4, i, j-1, k )
-     >           + ldx( m, 4, i, j ) * v( 4, i-1, j, k )
-     >           + ldy( m, 5, i, j ) * v( 5, i, j-1, k )
-     >           + ldx( m, 5, i, j ) * v( 5, i-1, j, k ) )
-
-            end do
-       
-c---------------------------------------------------------------------
-c   diagonal block inversion
-c
-c   forward elimination
-c---------------------------------------------------------------------
-            do m = 1, 5
-               tmat( m, 1 ) = d( m, 1, i, j )
-               tmat( m, 2 ) = d( m, 2, i, j )
-               tmat( m, 3 ) = d( m, 3, i, j )
-               tmat( m, 4 ) = d( m, 4, i, j )
-               tmat( m, 5 ) = d( m, 5, i, j )
-            end do
-
-            tmp1 = 1.0d+00 / tmat( 1, 1 )
-            tmp = tmp1 * tmat( 2, 1 )
-            tmat( 2, 2 ) =  tmat( 2, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 2, 3 ) =  tmat( 2, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 2, 4 ) =  tmat( 2, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 2, 5 ) =  tmat( 2, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 2, i, j, k ) = v( 2, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 3, 1 )
-            tmat( 3, 2 ) =  tmat( 3, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 4, 1 )
-            tmat( 4, 2 ) =  tmat( 4, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 5, 1 )
-            tmat( 5, 2 ) =  tmat( 5, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 2, 2 )
-            tmp = tmp1 * tmat( 3, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 2, 5 )
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >        - v( 2, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 4, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 2, 5 )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >        - v( 2, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 5, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 2, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 2, i, j, k ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 3, 3 )
-            tmp = tmp1 * tmat( 4, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 3, 5 )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >        - v( 3, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 5, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 3, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 3, i, j, k ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 4, 4 )
-            tmp = tmp1 * tmat( 5, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 4, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 4, i, j, k ) * tmp
-
-c---------------------------------------------------------------------
-c   back substitution
-c---------------------------------------------------------------------
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >                      / tmat( 5, 5 )
-
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >           - tmat( 4, 5 ) * v( 5, i, j, k )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >                      / tmat( 4, 4 )
-
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >           - tmat( 3, 4 ) * v( 4, i, j, k )
-     >           - tmat( 3, 5 ) * v( 5, i, j, k )
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >                      / tmat( 3, 3 )
-
-            v( 2, i, j, k ) = v( 2, i, j, k )
-     >           - tmat( 2, 3 ) * v( 3, i, j, k )
-     >           - tmat( 2, 4 ) * v( 4, i, j, k )
-     >           - tmat( 2, 5 ) * v( 5, i, j, k )
-            v( 2, i, j, k ) = v( 2, i, j, k )
-     >                      / tmat( 2, 2 )
-
-            v( 1, i, j, k ) = v( 1, i, j, k )
-     >           - tmat( 1, 2 ) * v( 2, i, j, k )
-     >           - tmat( 1, 3 ) * v( 3, i, j, k )
-     >           - tmat( 1, 4 ) * v( 4, i, j, k )
-     >           - tmat( 1, 5 ) * v( 5, i, j, k )
-            v( 1, i, j, k ) = v( 1, i, j, k )
-     >                      / tmat( 1, 1 )
-
-
-        enddo
-      enddo
-
-c---------------------------------------------------------------------
-c   send data to east and south
-c---------------------------------------------------------------------
-      iex = 2
-      call exchange_1( v,k,iex )
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/blts_vec.f b/examples/smpi/NAS/LU/blts_vec.f
deleted file mode 100644 (file)
index f90ea84..0000000
+++ /dev/null
@@ -1,334 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine blts ( ldmx, ldmy, ldmz,
-     >                  nx, ny, nz, k,
-     >                  omega,
-     >                  v,
-     >                  ldz, ldy, ldx, d,
-     >                  ist, iend, jst, jend,
-     >                  nx0, ny0, ipt, jpt)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   compute the regular-sparse, block lower triangular solution:
-c
-c                     v <-- ( L-inv ) * v
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer ldmx, ldmy, ldmz
-      integer nx, ny, nz
-      integer k
-      double precision  omega
-      double precision  v( 5, -1:ldmx+2, -1:ldmy+2, *),
-     >        ldz( 5, 5, ldmx, ldmy),
-     >        ldy( 5, 5, ldmx, ldmy),
-     >        ldx( 5, 5, ldmx, ldmy),
-     >        d( 5, 5, ldmx, ldmy)
-      integer ist, iend
-      integer jst, jend
-      integer nx0, ny0
-      integer ipt, jpt
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, m, l, istp, iendp
-      integer iex
-      double precision  tmp, tmp1
-      double precision  tmat(5,5)
-
-
-c---------------------------------------------------------------------
-c   receive data from north and west
-c---------------------------------------------------------------------
-      iex = 0
-      call exchange_1( v,k,iex )
-
-
-      do j = jst, jend
-         do i = ist, iend
-            do m = 1, 5
-
-                  v( m, i, j, k ) =  v( m, i, j, k )
-     >    - omega * (  ldz( m, 1, i, j ) * v( 1, i, j, k-1 )
-     >               + ldz( m, 2, i, j ) * v( 2, i, j, k-1 )
-     >               + ldz( m, 3, i, j ) * v( 3, i, j, k-1 )
-     >               + ldz( m, 4, i, j ) * v( 4, i, j, k-1 )
-     >               + ldz( m, 5, i, j ) * v( 5, i, j, k-1 )  )
-
-            end do
-         end do
-      end do
-
-
-      do l = ist+jst, iend+jend
-         istp  = max(l - jend, ist)
-         iendp = min(l - jst, iend)
-
-!dir$ ivdep
-         do i = istp, iendp
-            j = l - i
-
-!!dir$ unroll 5
-!   manually unroll the loop
-!            do m = 1, 5
-
-                  v( 1, i, j, k ) =  v( 1, i, j, k )
-     > - omega * ( ldy( 1, 1, i, j ) * v( 1, i, j-1, k )
-     >           + ldx( 1, 1, i, j ) * v( 1, i-1, j, k )
-     >           + ldy( 1, 2, i, j ) * v( 2, i, j-1, k )
-     >           + ldx( 1, 2, i, j ) * v( 2, i-1, j, k )
-     >           + ldy( 1, 3, i, j ) * v( 3, i, j-1, k )
-     >           + ldx( 1, 3, i, j ) * v( 3, i-1, j, k )
-     >           + ldy( 1, 4, i, j ) * v( 4, i, j-1, k )
-     >           + ldx( 1, 4, i, j ) * v( 4, i-1, j, k )
-     >           + ldy( 1, 5, i, j ) * v( 5, i, j-1, k )
-     >           + ldx( 1, 5, i, j ) * v( 5, i-1, j, k ) )
-                  v( 2, i, j, k ) =  v( 2, i, j, k )
-     > - omega * ( ldy( 2, 1, i, j ) * v( 1, i, j-1, k )
-     >           + ldx( 2, 1, i, j ) * v( 1, i-1, j, k )
-     >           + ldy( 2, 2, i, j ) * v( 2, i, j-1, k )
-     >           + ldx( 2, 2, i, j ) * v( 2, i-1, j, k )
-     >           + ldy( 2, 3, i, j ) * v( 3, i, j-1, k )
-     >           + ldx( 2, 3, i, j ) * v( 3, i-1, j, k )
-     >           + ldy( 2, 4, i, j ) * v( 4, i, j-1, k )
-     >           + ldx( 2, 4, i, j ) * v( 4, i-1, j, k )
-     >           + ldy( 2, 5, i, j ) * v( 5, i, j-1, k )
-     >           + ldx( 2, 5, i, j ) * v( 5, i-1, j, k ) )
-                  v( 3, i, j, k ) =  v( 3, i, j, k )
-     > - omega * ( ldy( 3, 1, i, j ) * v( 1, i, j-1, k )
-     >           + ldx( 3, 1, i, j ) * v( 1, i-1, j, k )
-     >           + ldy( 3, 2, i, j ) * v( 2, i, j-1, k )
-     >           + ldx( 3, 2, i, j ) * v( 2, i-1, j, k )
-     >           + ldy( 3, 3, i, j ) * v( 3, i, j-1, k )
-     >           + ldx( 3, 3, i, j ) * v( 3, i-1, j, k )
-     >           + ldy( 3, 4, i, j ) * v( 4, i, j-1, k )
-     >           + ldx( 3, 4, i, j ) * v( 4, i-1, j, k )
-     >           + ldy( 3, 5, i, j ) * v( 5, i, j-1, k )
-     >           + ldx( 3, 5, i, j ) * v( 5, i-1, j, k ) )
-                  v( 4, i, j, k ) =  v( 4, i, j, k )
-     > - omega * ( ldy( 4, 1, i, j ) * v( 1, i, j-1, k )
-     >           + ldx( 4, 1, i, j ) * v( 1, i-1, j, k )
-     >           + ldy( 4, 2, i, j ) * v( 2, i, j-1, k )
-     >           + ldx( 4, 2, i, j ) * v( 2, i-1, j, k )
-     >           + ldy( 4, 3, i, j ) * v( 3, i, j-1, k )
-     >           + ldx( 4, 3, i, j ) * v( 3, i-1, j, k )
-     >           + ldy( 4, 4, i, j ) * v( 4, i, j-1, k )
-     >           + ldx( 4, 4, i, j ) * v( 4, i-1, j, k )
-     >           + ldy( 4, 5, i, j ) * v( 5, i, j-1, k )
-     >           + ldx( 4, 5, i, j ) * v( 5, i-1, j, k ) )
-                  v( 5, i, j, k ) =  v( 5, i, j, k )
-     > - omega * ( ldy( 5, 1, i, j ) * v( 1, i, j-1, k )
-     >           + ldx( 5, 1, i, j ) * v( 1, i-1, j, k )
-     >           + ldy( 5, 2, i, j ) * v( 2, i, j-1, k )
-     >           + ldx( 5, 2, i, j ) * v( 2, i-1, j, k )
-     >           + ldy( 5, 3, i, j ) * v( 3, i, j-1, k )
-     >           + ldx( 5, 3, i, j ) * v( 3, i-1, j, k )
-     >           + ldy( 5, 4, i, j ) * v( 4, i, j-1, k )
-     >           + ldx( 5, 4, i, j ) * v( 4, i-1, j, k )
-     >           + ldy( 5, 5, i, j ) * v( 5, i, j-1, k )
-     >           + ldx( 5, 5, i, j ) * v( 5, i-1, j, k ) )
-
-!            end do
-       
-c---------------------------------------------------------------------
-c   diagonal block inversion
-c
-c   forward elimination
-c---------------------------------------------------------------------
-!!dir$ unroll 5
-!   manually unroll the loop
-!            do m = 1, 5
-               tmat( 1, 1 ) = d( 1, 1, i, j )
-               tmat( 1, 2 ) = d( 1, 2, i, j )
-               tmat( 1, 3 ) = d( 1, 3, i, j )
-               tmat( 1, 4 ) = d( 1, 4, i, j )
-               tmat( 1, 5 ) = d( 1, 5, i, j )
-               tmat( 2, 1 ) = d( 2, 1, i, j )
-               tmat( 2, 2 ) = d( 2, 2, i, j )
-               tmat( 2, 3 ) = d( 2, 3, i, j )
-               tmat( 2, 4 ) = d( 2, 4, i, j )
-               tmat( 2, 5 ) = d( 2, 5, i, j )
-               tmat( 3, 1 ) = d( 3, 1, i, j )
-               tmat( 3, 2 ) = d( 3, 2, i, j )
-               tmat( 3, 3 ) = d( 3, 3, i, j )
-               tmat( 3, 4 ) = d( 3, 4, i, j )
-               tmat( 3, 5 ) = d( 3, 5, i, j )
-               tmat( 4, 1 ) = d( 4, 1, i, j )
-               tmat( 4, 2 ) = d( 4, 2, i, j )
-               tmat( 4, 3 ) = d( 4, 3, i, j )
-               tmat( 4, 4 ) = d( 4, 4, i, j )
-               tmat( 4, 5 ) = d( 4, 5, i, j )
-               tmat( 5, 1 ) = d( 5, 1, i, j )
-               tmat( 5, 2 ) = d( 5, 2, i, j )
-               tmat( 5, 3 ) = d( 5, 3, i, j )
-               tmat( 5, 4 ) = d( 5, 4, i, j )
-               tmat( 5, 5 ) = d( 5, 5, i, j )
-!            end do
-
-            tmp1 = 1.0d+00 / tmat( 1, 1 )
-            tmp = tmp1 * tmat( 2, 1 )
-            tmat( 2, 2 ) =  tmat( 2, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 2, 3 ) =  tmat( 2, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 2, 4 ) =  tmat( 2, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 2, 5 ) =  tmat( 2, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 2, i, j, k ) = v( 2, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 3, 1 )
-            tmat( 3, 2 ) =  tmat( 3, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 4, 1 )
-            tmat( 4, 2 ) =  tmat( 4, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 5, 1 )
-            tmat( 5, 2 ) =  tmat( 5, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 1, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 1, i, j, k ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 2, 2 )
-            tmp = tmp1 * tmat( 3, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 2, 5 )
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >        - v( 2, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 4, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 2, 5 )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >        - v( 2, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 5, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 2, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 2, i, j, k ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 3, 3 )
-            tmp = tmp1 * tmat( 4, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 3, 5 )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >        - v( 3, i, j, k ) * tmp
-
-            tmp = tmp1 * tmat( 5, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 3, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 3, i, j, k ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 4, 4 )
-            tmp = tmp1 * tmat( 5, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 4, 5 )
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >        - v( 4, i, j, k ) * tmp
-
-c---------------------------------------------------------------------
-c   back substitution
-c---------------------------------------------------------------------
-            v( 5, i, j, k ) = v( 5, i, j, k )
-     >                      / tmat( 5, 5 )
-
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >           - tmat( 4, 5 ) * v( 5, i, j, k )
-            v( 4, i, j, k ) = v( 4, i, j, k )
-     >                      / tmat( 4, 4 )
-
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >           - tmat( 3, 4 ) * v( 4, i, j, k )
-     >           - tmat( 3, 5 ) * v( 5, i, j, k )
-            v( 3, i, j, k ) = v( 3, i, j, k )
-     >                      / tmat( 3, 3 )
-
-            v( 2, i, j, k ) = v( 2, i, j, k )
-     >           - tmat( 2, 3 ) * v( 3, i, j, k )
-     >           - tmat( 2, 4 ) * v( 4, i, j, k )
-     >           - tmat( 2, 5 ) * v( 5, i, j, k )
-            v( 2, i, j, k ) = v( 2, i, j, k )
-     >                      / tmat( 2, 2 )
-
-            v( 1, i, j, k ) = v( 1, i, j, k )
-     >           - tmat( 1, 2 ) * v( 2, i, j, k )
-     >           - tmat( 1, 3 ) * v( 3, i, j, k )
-     >           - tmat( 1, 4 ) * v( 4, i, j, k )
-     >           - tmat( 1, 5 ) * v( 5, i, j, k )
-            v( 1, i, j, k ) = v( 1, i, j, k )
-     >                      / tmat( 1, 1 )
-
-
-        enddo
-      enddo
-
-c---------------------------------------------------------------------
-c   send data to east and south
-c---------------------------------------------------------------------
-      iex = 2
-      call exchange_1( v,k,iex )
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/buts.f b/examples/smpi/NAS/LU/buts.f
deleted file mode 100644 (file)
index a6fc3d6..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine buts( ldmx, ldmy, ldmz,
-     >                 nx, ny, nz, k,
-     >                 omega,
-     >                 v, tv,
-     >                 d, udx, udy, udz,
-     >                 ist, iend, jst, jend,
-     >                 nx0, ny0, ipt, jpt )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   compute the regular-sparse, block upper triangular solution:
-c
-c                     v <-- ( U-inv ) * v
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer ldmx, ldmy, ldmz
-      integer nx, ny, nz
-      integer k
-      double precision  omega
-      double precision  v( 5, -1:ldmx+2, -1:ldmy+2, *), 
-     >        tv(5, ldmx, ldmy),
-     >        d( 5, 5, ldmx, ldmy),
-     >        udx( 5, 5, ldmx, ldmy),
-     >        udy( 5, 5, ldmx, ldmy),
-     >        udz( 5, 5, ldmx, ldmy )
-      integer ist, iend
-      integer jst, jend
-      integer nx0, ny0
-      integer ipt, jpt
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, m
-      integer iex
-      double precision  tmp, tmp1
-      double precision  tmat(5,5)
-
-
-c---------------------------------------------------------------------
-c   receive data from south and east
-c---------------------------------------------------------------------
-      iex = 1
-      call exchange_1( v,k,iex )
-
-      do j = jend, jst, -1
-         do i = iend, ist, -1
-            do m = 1, 5
-                  tv( m, i, j ) = 
-     >      omega * (  udz( m, 1, i, j ) * v( 1, i, j, k+1 )
-     >               + udz( m, 2, i, j ) * v( 2, i, j, k+1 )
-     >               + udz( m, 3, i, j ) * v( 3, i, j, k+1 )
-     >               + udz( m, 4, i, j ) * v( 4, i, j, k+1 )
-     >               + udz( m, 5, i, j ) * v( 5, i, j, k+1 ) )
-            end do
-         end do
-      end do
-
-
-      do j = jend,jst,-1
-        do i = iend,ist,-1
-
-            do m = 1, 5
-                  tv( m, i, j ) = tv( m, i, j )
-     > + omega * ( udy( m, 1, i, j ) * v( 1, i, j+1, k )
-     >           + udx( m, 1, i, j ) * v( 1, i+1, j, k )
-     >           + udy( m, 2, i, j ) * v( 2, i, j+1, k )
-     >           + udx( m, 2, i, j ) * v( 2, i+1, j, k )
-     >           + udy( m, 3, i, j ) * v( 3, i, j+1, k )
-     >           + udx( m, 3, i, j ) * v( 3, i+1, j, k )
-     >           + udy( m, 4, i, j ) * v( 4, i, j+1, k )
-     >           + udx( m, 4, i, j ) * v( 4, i+1, j, k )
-     >           + udy( m, 5, i, j ) * v( 5, i, j+1, k )
-     >           + udx( m, 5, i, j ) * v( 5, i+1, j, k ) )
-            end do
-
-c---------------------------------------------------------------------
-c   diagonal block inversion
-c---------------------------------------------------------------------
-            do m = 1, 5
-               tmat( m, 1 ) = d( m, 1, i, j )
-               tmat( m, 2 ) = d( m, 2, i, j )
-               tmat( m, 3 ) = d( m, 3, i, j )
-               tmat( m, 4 ) = d( m, 4, i, j )
-               tmat( m, 5 ) = d( m, 5, i, j )
-            end do
-
-            tmp1 = 1.0d+00 / tmat( 1, 1 )
-            tmp = tmp1 * tmat( 2, 1 )
-            tmat( 2, 2 ) =  tmat( 2, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 2, 3 ) =  tmat( 2, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 2, 4 ) =  tmat( 2, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 2, 5 ) =  tmat( 2, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 2, i, j ) = tv( 2, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 3, 1 )
-            tmat( 3, 2 ) =  tmat( 3, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 3, i, j ) = tv( 3, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 4, 1 )
-            tmat( 4, 2 ) =  tmat( 4, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 5, 1 )
-            tmat( 5, 2 ) =  tmat( 5, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 2, 2 )
-            tmp = tmp1 * tmat( 3, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 2, 5 )
-            tv( 3, i, j ) = tv( 3, i, j )
-     >        - tv( 2, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 4, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 2, 5 )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >        - tv( 2, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 5, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 2, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 2, i, j ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 3, 3 )
-            tmp = tmp1 * tmat( 4, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 3, 5 )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >        - tv( 3, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 5, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 3, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 3, i, j ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 4, 4 )
-            tmp = tmp1 * tmat( 5, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 4, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 4, i, j ) * tmp
-
-c---------------------------------------------------------------------
-c   back substitution
-c---------------------------------------------------------------------
-            tv( 5, i, j ) = tv( 5, i, j )
-     >                      / tmat( 5, 5 )
-
-            tv( 4, i, j ) = tv( 4, i, j )
-     >           - tmat( 4, 5 ) * tv( 5, i, j )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >                      / tmat( 4, 4 )
-
-            tv( 3, i, j ) = tv( 3, i, j )
-     >           - tmat( 3, 4 ) * tv( 4, i, j )
-     >           - tmat( 3, 5 ) * tv( 5, i, j )
-            tv( 3, i, j ) = tv( 3, i, j )
-     >                      / tmat( 3, 3 )
-
-            tv( 2, i, j ) = tv( 2, i, j )
-     >           - tmat( 2, 3 ) * tv( 3, i, j )
-     >           - tmat( 2, 4 ) * tv( 4, i, j )
-     >           - tmat( 2, 5 ) * tv( 5, i, j )
-            tv( 2, i, j ) = tv( 2, i, j )
-     >                      / tmat( 2, 2 )
-
-            tv( 1, i, j ) = tv( 1, i, j )
-     >           - tmat( 1, 2 ) * tv( 2, i, j )
-     >           - tmat( 1, 3 ) * tv( 3, i, j )
-     >           - tmat( 1, 4 ) * tv( 4, i, j )
-     >           - tmat( 1, 5 ) * tv( 5, i, j )
-            tv( 1, i, j ) = tv( 1, i, j )
-     >                      / tmat( 1, 1 )
-
-            v( 1, i, j, k ) = v( 1, i, j, k ) - tv( 1, i, j )
-            v( 2, i, j, k ) = v( 2, i, j, k ) - tv( 2, i, j )
-            v( 3, i, j, k ) = v( 3, i, j, k ) - tv( 3, i, j )
-            v( 4, i, j, k ) = v( 4, i, j, k ) - tv( 4, i, j )
-            v( 5, i, j, k ) = v( 5, i, j, k ) - tv( 5, i, j )
-
-
-        enddo
-      end do
-
-c---------------------------------------------------------------------
-c   send data to north and west
-c---------------------------------------------------------------------
-      iex = 3
-      call exchange_1( v,k,iex )
-      return
-      end
diff --git a/examples/smpi/NAS/LU/buts_vec.f b/examples/smpi/NAS/LU/buts_vec.f
deleted file mode 100644 (file)
index 813105d..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine buts( ldmx, ldmy, ldmz,
-     >                 nx, ny, nz, k,
-     >                 omega,
-     >                 v, tv,
-     >                 d, udx, udy, udz,
-     >                 ist, iend, jst, jend,
-     >                 nx0, ny0, ipt, jpt )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   compute the regular-sparse, block upper triangular solution:
-c
-c                     v <-- ( U-inv ) * v
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer ldmx, ldmy, ldmz
-      integer nx, ny, nz
-      integer k
-      double precision  omega
-      double precision  v( 5, -1:ldmx+2, -1:ldmy+2, *), 
-     >        tv(5, ldmx, ldmy),
-     >        d( 5, 5, ldmx, ldmy),
-     >        udx( 5, 5, ldmx, ldmy),
-     >        udy( 5, 5, ldmx, ldmy),
-     >        udz( 5, 5, ldmx, ldmy )
-      integer ist, iend
-      integer jst, jend
-      integer nx0, ny0
-      integer ipt, jpt
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, m, l, istp, iendp
-      integer iex
-      double precision  tmp, tmp1
-      double precision  tmat(5,5)
-
-
-c---------------------------------------------------------------------
-c   receive data from south and east
-c---------------------------------------------------------------------
-      iex = 1
-      call exchange_1( v,k,iex )
-
-      do j = jend, jst, -1
-         do i = iend, ist, -1
-            do m = 1, 5
-                  tv( m, i, j ) = 
-     >      omega * (  udz( m, 1, i, j ) * v( 1, i, j, k+1 )
-     >               + udz( m, 2, i, j ) * v( 2, i, j, k+1 )
-     >               + udz( m, 3, i, j ) * v( 3, i, j, k+1 )
-     >               + udz( m, 4, i, j ) * v( 4, i, j, k+1 )
-     >               + udz( m, 5, i, j ) * v( 5, i, j, k+1 ) )
-            end do
-         end do
-      end do
-
-
-      do l = iend+jend, ist+jst, -1
-         istp  = max(l - jend, ist)
-         iendp = min(l - jst, iend)
-
-!dir$ ivdep
-         do i = istp, iendp
-            j = l - i
-
-!!dir$ unroll 5
-!   manually unroll the loop
-!            do m = 1, 5
-                  tv( 1, i, j ) = tv( 1, i, j )
-     > + omega * ( udy( 1, 1, i, j ) * v( 1, i, j+1, k )
-     >           + udx( 1, 1, i, j ) * v( 1, i+1, j, k )
-     >           + udy( 1, 2, i, j ) * v( 2, i, j+1, k )
-     >           + udx( 1, 2, i, j ) * v( 2, i+1, j, k )
-     >           + udy( 1, 3, i, j ) * v( 3, i, j+1, k )
-     >           + udx( 1, 3, i, j ) * v( 3, i+1, j, k )
-     >           + udy( 1, 4, i, j ) * v( 4, i, j+1, k )
-     >           + udx( 1, 4, i, j ) * v( 4, i+1, j, k )
-     >           + udy( 1, 5, i, j ) * v( 5, i, j+1, k )
-     >           + udx( 1, 5, i, j ) * v( 5, i+1, j, k ) )
-                  tv( 2, i, j ) = tv( 2, i, j )
-     > + omega * ( udy( 2, 1, i, j ) * v( 1, i, j+1, k )
-     >           + udx( 2, 1, i, j ) * v( 1, i+1, j, k )
-     >           + udy( 2, 2, i, j ) * v( 2, i, j+1, k )
-     >           + udx( 2, 2, i, j ) * v( 2, i+1, j, k )
-     >           + udy( 2, 3, i, j ) * v( 3, i, j+1, k )
-     >           + udx( 2, 3, i, j ) * v( 3, i+1, j, k )
-     >           + udy( 2, 4, i, j ) * v( 4, i, j+1, k )
-     >           + udx( 2, 4, i, j ) * v( 4, i+1, j, k )
-     >           + udy( 2, 5, i, j ) * v( 5, i, j+1, k )
-     >           + udx( 2, 5, i, j ) * v( 5, i+1, j, k ) )
-                  tv( 3, i, j ) = tv( 3, i, j )
-     > + omega * ( udy( 3, 1, i, j ) * v( 1, i, j+1, k )
-     >           + udx( 3, 1, i, j ) * v( 1, i+1, j, k )
-     >           + udy( 3, 2, i, j ) * v( 2, i, j+1, k )
-     >           + udx( 3, 2, i, j ) * v( 2, i+1, j, k )
-     >           + udy( 3, 3, i, j ) * v( 3, i, j+1, k )
-     >           + udx( 3, 3, i, j ) * v( 3, i+1, j, k )
-     >           + udy( 3, 4, i, j ) * v( 4, i, j+1, k )
-     >           + udx( 3, 4, i, j ) * v( 4, i+1, j, k )
-     >           + udy( 3, 5, i, j ) * v( 5, i, j+1, k )
-     >           + udx( 3, 5, i, j ) * v( 5, i+1, j, k ) )
-                  tv( 4, i, j ) = tv( 4, i, j )
-     > + omega * ( udy( 4, 1, i, j ) * v( 1, i, j+1, k )
-     >           + udx( 4, 1, i, j ) * v( 1, i+1, j, k )
-     >           + udy( 4, 2, i, j ) * v( 2, i, j+1, k )
-     >           + udx( 4, 2, i, j ) * v( 2, i+1, j, k )
-     >           + udy( 4, 3, i, j ) * v( 3, i, j+1, k )
-     >           + udx( 4, 3, i, j ) * v( 3, i+1, j, k )
-     >           + udy( 4, 4, i, j ) * v( 4, i, j+1, k )
-     >           + udx( 4, 4, i, j ) * v( 4, i+1, j, k )
-     >           + udy( 4, 5, i, j ) * v( 5, i, j+1, k )
-     >           + udx( 4, 5, i, j ) * v( 5, i+1, j, k ) )
-                  tv( 5, i, j ) = tv( 5, i, j )
-     > + omega * ( udy( 5, 1, i, j ) * v( 1, i, j+1, k )
-     >           + udx( 5, 1, i, j ) * v( 1, i+1, j, k )
-     >           + udy( 5, 2, i, j ) * v( 2, i, j+1, k )
-     >           + udx( 5, 2, i, j ) * v( 2, i+1, j, k )
-     >           + udy( 5, 3, i, j ) * v( 3, i, j+1, k )
-     >           + udx( 5, 3, i, j ) * v( 3, i+1, j, k )
-     >           + udy( 5, 4, i, j ) * v( 4, i, j+1, k )
-     >           + udx( 5, 4, i, j ) * v( 4, i+1, j, k )
-     >           + udy( 5, 5, i, j ) * v( 5, i, j+1, k )
-     >           + udx( 5, 5, i, j ) * v( 5, i+1, j, k ) )
-!            end do
-
-c---------------------------------------------------------------------
-c   diagonal block inversion
-c---------------------------------------------------------------------
-!!dir$ unroll 5
-!   manually unroll the loop
-!            do m = 1, 5
-               tmat( 1, 1 ) = d( 1, 1, i, j )
-               tmat( 1, 2 ) = d( 1, 2, i, j )
-               tmat( 1, 3 ) = d( 1, 3, i, j )
-               tmat( 1, 4 ) = d( 1, 4, i, j )
-               tmat( 1, 5 ) = d( 1, 5, i, j )
-               tmat( 2, 1 ) = d( 2, 1, i, j )
-               tmat( 2, 2 ) = d( 2, 2, i, j )
-               tmat( 2, 3 ) = d( 2, 3, i, j )
-               tmat( 2, 4 ) = d( 2, 4, i, j )
-               tmat( 2, 5 ) = d( 2, 5, i, j )
-               tmat( 3, 1 ) = d( 3, 1, i, j )
-               tmat( 3, 2 ) = d( 3, 2, i, j )
-               tmat( 3, 3 ) = d( 3, 3, i, j )
-               tmat( 3, 4 ) = d( 3, 4, i, j )
-               tmat( 3, 5 ) = d( 3, 5, i, j )
-               tmat( 4, 1 ) = d( 4, 1, i, j )
-               tmat( 4, 2 ) = d( 4, 2, i, j )
-               tmat( 4, 3 ) = d( 4, 3, i, j )
-               tmat( 4, 4 ) = d( 4, 4, i, j )
-               tmat( 4, 5 ) = d( 4, 5, i, j )
-               tmat( 5, 1 ) = d( 5, 1, i, j )
-               tmat( 5, 2 ) = d( 5, 2, i, j )
-               tmat( 5, 3 ) = d( 5, 3, i, j )
-               tmat( 5, 4 ) = d( 5, 4, i, j )
-               tmat( 5, 5 ) = d( 5, 5, i, j )
-!            end do
-
-            tmp1 = 1.0d+00 / tmat( 1, 1 )
-            tmp = tmp1 * tmat( 2, 1 )
-            tmat( 2, 2 ) =  tmat( 2, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 2, 3 ) =  tmat( 2, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 2, 4 ) =  tmat( 2, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 2, 5 ) =  tmat( 2, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 2, i, j ) = tv( 2, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 3, 1 )
-            tmat( 3, 2 ) =  tmat( 3, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 3, i, j ) = tv( 3, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 4, 1 )
-            tmat( 4, 2 ) =  tmat( 4, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 5, 1 )
-            tmat( 5, 2 ) =  tmat( 5, 2 )
-     >           - tmp * tmat( 1, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 1, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 1, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 1, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 1, i, j ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 2, 2 )
-            tmp = tmp1 * tmat( 3, 2 )
-            tmat( 3, 3 ) =  tmat( 3, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 3, 4 ) =  tmat( 3, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 3, 5 ) =  tmat( 3, 5 )
-     >           - tmp * tmat( 2, 5 )
-            tv( 3, i, j ) = tv( 3, i, j )
-     >        - tv( 2, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 4, 2 )
-            tmat( 4, 3 ) =  tmat( 4, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 2, 5 )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >        - tv( 2, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 5, 2 )
-            tmat( 5, 3 ) =  tmat( 5, 3 )
-     >           - tmp * tmat( 2, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 2, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 2, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 2, i, j ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 3, 3 )
-            tmp = tmp1 * tmat( 4, 3 )
-            tmat( 4, 4 ) =  tmat( 4, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 4, 5 ) =  tmat( 4, 5 )
-     >           - tmp * tmat( 3, 5 )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >        - tv( 3, i, j ) * tmp
-
-            tmp = tmp1 * tmat( 5, 3 )
-            tmat( 5, 4 ) =  tmat( 5, 4 )
-     >           - tmp * tmat( 3, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 3, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 3, i, j ) * tmp
-
-
-
-            tmp1 = 1.0d+00 / tmat( 4, 4 )
-            tmp = tmp1 * tmat( 5, 4 )
-            tmat( 5, 5 ) =  tmat( 5, 5 )
-     >           - tmp * tmat( 4, 5 )
-            tv( 5, i, j ) = tv( 5, i, j )
-     >        - tv( 4, i, j ) * tmp
-
-c---------------------------------------------------------------------
-c   back substitution
-c---------------------------------------------------------------------
-            tv( 5, i, j ) = tv( 5, i, j )
-     >                      / tmat( 5, 5 )
-
-            tv( 4, i, j ) = tv( 4, i, j )
-     >           - tmat( 4, 5 ) * tv( 5, i, j )
-            tv( 4, i, j ) = tv( 4, i, j )
-     >                      / tmat( 4, 4 )
-
-            tv( 3, i, j ) = tv( 3, i, j )
-     >           - tmat( 3, 4 ) * tv( 4, i, j )
-     >           - tmat( 3, 5 ) * tv( 5, i, j )
-            tv( 3, i, j ) = tv( 3, i, j )
-     >                      / tmat( 3, 3 )
-
-            tv( 2, i, j ) = tv( 2, i, j )
-     >           - tmat( 2, 3 ) * tv( 3, i, j )
-     >           - tmat( 2, 4 ) * tv( 4, i, j )
-     >           - tmat( 2, 5 ) * tv( 5, i, j )
-            tv( 2, i, j ) = tv( 2, i, j )
-     >                      / tmat( 2, 2 )
-
-            tv( 1, i, j ) = tv( 1, i, j )
-     >           - tmat( 1, 2 ) * tv( 2, i, j )
-     >           - tmat( 1, 3 ) * tv( 3, i, j )
-     >           - tmat( 1, 4 ) * tv( 4, i, j )
-     >           - tmat( 1, 5 ) * tv( 5, i, j )
-            tv( 1, i, j ) = tv( 1, i, j )
-     >                      / tmat( 1, 1 )
-
-            v( 1, i, j, k ) = v( 1, i, j, k ) - tv( 1, i, j )
-            v( 2, i, j, k ) = v( 2, i, j, k ) - tv( 2, i, j )
-            v( 3, i, j, k ) = v( 3, i, j, k ) - tv( 3, i, j )
-            v( 4, i, j, k ) = v( 4, i, j, k ) - tv( 4, i, j )
-            v( 5, i, j, k ) = v( 5, i, j, k ) - tv( 5, i, j )
-
-
-        enddo
-      end do
-
-c---------------------------------------------------------------------
-c   send data to north and west
-c---------------------------------------------------------------------
-      iex = 3
-      call exchange_1( v,k,iex )
-      return
-      end
diff --git a/examples/smpi/NAS/LU/erhs.f b/examples/smpi/NAS/LU/erhs.f
deleted file mode 100644 (file)
index 928e2a9..0000000
+++ /dev/null
@@ -1,536 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine erhs
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   compute the right hand side based on exact solution
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k, m
-      integer iglob, jglob
-      integer iex
-      integer L1, L2
-      integer ist1, iend1
-      integer jst1, jend1
-      double precision  dsspm
-      double precision  xi, eta, zeta
-      double precision  q
-      double precision  u21, u31, u41
-      double precision  tmp
-      double precision  u21i, u31i, u41i, u51i
-      double precision  u21j, u31j, u41j, u51j
-      double precision  u21k, u31k, u41k, u51k
-      double precision  u21im1, u31im1, u41im1, u51im1
-      double precision  u21jm1, u31jm1, u41jm1, u51jm1
-      double precision  u21km1, u31km1, u41km1, u51km1
-
-      dsspm = dssp
-
-
-      do k = 1, nz
-         do j = 1, ny
-            do i = 1, nx
-               do m = 1, 5
-                  frct( m, i, j, k ) = 0.0d+00
-               end do
-            end do
-         end do
-      end do
-
-      do k = 1, nz
-         zeta = ( dble(k-1) ) / ( nz - 1 )
-         do j = 1, ny
-            jglob = jpt + j
-            eta = ( dble(jglob-1) ) / ( ny0 - 1 )
-            do i = 1, nx
-               iglob = ipt + i
-               xi = ( dble(iglob-1) ) / ( nx0 - 1 )
-               do m = 1, 5
-                  rsd(m,i,j,k) =  ce(m,1)
-     >                 + ce(m,2) * xi
-     >                 + ce(m,3) * eta
-     >                 + ce(m,4) * zeta
-     >                 + ce(m,5) * xi * xi
-     >                 + ce(m,6) * eta * eta
-     >                 + ce(m,7) * zeta * zeta
-     >                 + ce(m,8) * xi * xi * xi
-     >                 + ce(m,9) * eta * eta * eta
-     >                 + ce(m,10) * zeta * zeta * zeta
-     >                 + ce(m,11) * xi * xi * xi * xi
-     >                 + ce(m,12) * eta * eta * eta * eta
-     >                 + ce(m,13) * zeta * zeta * zeta * zeta
-               end do
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   xi-direction flux differences
-c---------------------------------------------------------------------
-c
-c   iex = flag : iex = 0  north/south communication
-c              : iex = 1  east/west communication
-c
-c---------------------------------------------------------------------
-      iex   = 0
-
-c---------------------------------------------------------------------
-c   communicate and receive/send two rows of data
-c---------------------------------------------------------------------
-      call exchange_3 (rsd,iex)
-
-      L1 = 0
-      if (north.eq.-1) L1 = 1
-      L2 = nx + 1
-      if (south.eq.-1) L2 = nx
-
-      ist1 = 1
-      iend1 = nx
-      if (north.eq.-1) ist1 = 4
-      if (south.eq.-1) iend1 = nx - 3
-
-      do k = 2, nz - 1
-         do j = jst, jend
-            do i = L1, L2
-               flux(1,i,j,k) = rsd(2,i,j,k)
-               u21 = rsd(2,i,j,k) / rsd(1,i,j,k)
-               q = 0.50d+00 * (  rsd(2,i,j,k) * rsd(2,i,j,k)
-     >                         + rsd(3,i,j,k) * rsd(3,i,j,k)
-     >                         + rsd(4,i,j,k) * rsd(4,i,j,k) )
-     >                      / rsd(1,i,j,k)
-               flux(2,i,j,k) = rsd(2,i,j,k) * u21 + c2 * 
-     >                         ( rsd(5,i,j,k) - q )
-               flux(3,i,j,k) = rsd(3,i,j,k) * u21
-               flux(4,i,j,k) = rsd(4,i,j,k) * u21
-               flux(5,i,j,k) = ( c1 * rsd(5,i,j,k) - c2 * q ) * u21
-            end do
-         end do
-      end do 
-
-      do k = 2, nz - 1
-         do j = jst, jend
-            do i = ist, iend
-               do m = 1, 5
-                  frct(m,i,j,k) =  frct(m,i,j,k)
-     >                   - tx2 * ( flux(m,i+1,j,k) - flux(m,i-1,j,k) )
-               end do
-            end do
-            do i = ist, L2
-               tmp = 1.0d+00 / rsd(1,i,j,k)
-
-               u21i = tmp * rsd(2,i,j,k)
-               u31i = tmp * rsd(3,i,j,k)
-               u41i = tmp * rsd(4,i,j,k)
-               u51i = tmp * rsd(5,i,j,k)
-
-               tmp = 1.0d+00 / rsd(1,i-1,j,k)
-
-               u21im1 = tmp * rsd(2,i-1,j,k)
-               u31im1 = tmp * rsd(3,i-1,j,k)
-               u41im1 = tmp * rsd(4,i-1,j,k)
-               u51im1 = tmp * rsd(5,i-1,j,k)
-
-               flux(2,i,j,k) = (4.0d+00/3.0d+00) * tx3 * 
-     >                        ( u21i - u21im1 )
-               flux(3,i,j,k) = tx3 * ( u31i - u31im1 )
-               flux(4,i,j,k) = tx3 * ( u41i - u41im1 )
-               flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 )
-     >              * tx3 * ( ( u21i  **2 + u31i  **2 + u41i  **2 )
-     >                      - ( u21im1**2 + u31im1**2 + u41im1**2 ) )
-     >              + (1.0d+00/6.0d+00)
-     >              * tx3 * ( u21i**2 - u21im1**2 )
-     >              + c1 * c5 * tx3 * ( u51i - u51im1 )
-            end do
-
-            do i = ist, iend
-               frct(1,i,j,k) = frct(1,i,j,k)
-     >              + dx1 * tx1 * (            rsd(1,i-1,j,k)
-     >                             - 2.0d+00 * rsd(1,i,j,k)
-     >                             +           rsd(1,i+1,j,k) )
-               frct(2,i,j,k) = frct(2,i,j,k)
-     >           + tx3 * c3 * c4 * ( flux(2,i+1,j,k) - flux(2,i,j,k) )
-     >              + dx2 * tx1 * (            rsd(2,i-1,j,k)
-     >                             - 2.0d+00 * rsd(2,i,j,k)
-     >                             +           rsd(2,i+1,j,k) )
-               frct(3,i,j,k) = frct(3,i,j,k)
-     >           + tx3 * c3 * c4 * ( flux(3,i+1,j,k) - flux(3,i,j,k) )
-     >              + dx3 * tx1 * (            rsd(3,i-1,j,k)
-     >                             - 2.0d+00 * rsd(3,i,j,k)
-     >                             +           rsd(3,i+1,j,k) )
-               frct(4,i,j,k) = frct(4,i,j,k)
-     >            + tx3 * c3 * c4 * ( flux(4,i+1,j,k) - flux(4,i,j,k) )
-     >              + dx4 * tx1 * (            rsd(4,i-1,j,k)
-     >                             - 2.0d+00 * rsd(4,i,j,k)
-     >                             +           rsd(4,i+1,j,k) )
-               frct(5,i,j,k) = frct(5,i,j,k)
-     >           + tx3 * c3 * c4 * ( flux(5,i+1,j,k) - flux(5,i,j,k) )
-     >              + dx5 * tx1 * (            rsd(5,i-1,j,k)
-     >                             - 2.0d+00 * rsd(5,i,j,k)
-     >                             +           rsd(5,i+1,j,k) )
-            end do
-
-c---------------------------------------------------------------------
-c   Fourth-order dissipation
-c---------------------------------------------------------------------
-            IF (north.eq.-1) then
-             do m = 1, 5
-               frct(m,2,j,k) = frct(m,2,j,k)
-     >           - dsspm * ( + 5.0d+00 * rsd(m,2,j,k)
-     >                       - 4.0d+00 * rsd(m,3,j,k)
-     >                       +           rsd(m,4,j,k) )
-               frct(m,3,j,k) = frct(m,3,j,k)
-     >           - dsspm * ( - 4.0d+00 * rsd(m,2,j,k)
-     >                       + 6.0d+00 * rsd(m,3,j,k)
-     >                       - 4.0d+00 * rsd(m,4,j,k)
-     >                       +           rsd(m,5,j,k) )
-             end do
-            END IF
-
-            do i = ist1,iend1
-               do m = 1, 5
-                  frct(m,i,j,k) = frct(m,i,j,k)
-     >              - dsspm * (            rsd(m,i-2,j,k)
-     >                         - 4.0d+00 * rsd(m,i-1,j,k)
-     >                         + 6.0d+00 * rsd(m,i,j,k)
-     >                         - 4.0d+00 * rsd(m,i+1,j,k)
-     >                         +           rsd(m,i+2,j,k) )
-               end do
-            end do
-
-            IF (south.eq.-1) then
-             do m = 1, 5
-               frct(m,nx-2,j,k) = frct(m,nx-2,j,k)
-     >           - dsspm * (             rsd(m,nx-4,j,k)
-     >                       - 4.0d+00 * rsd(m,nx-3,j,k)
-     >                       + 6.0d+00 * rsd(m,nx-2,j,k)
-     >                       - 4.0d+00 * rsd(m,nx-1,j,k)  )
-               frct(m,nx-1,j,k) = frct(m,nx-1,j,k)
-     >           - dsspm * (             rsd(m,nx-3,j,k)
-     >                       - 4.0d+00 * rsd(m,nx-2,j,k)
-     >                       + 5.0d+00 * rsd(m,nx-1,j,k) )
-             end do
-            END IF
-
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   eta-direction flux differences
-c---------------------------------------------------------------------
-c
-c   iex = flag : iex = 0  north/south communication
-c              : iex = 1  east/west communication
-c
-c---------------------------------------------------------------------
-      iex   = 1
-
-c---------------------------------------------------------------------
-c   communicate and receive/send two rows of data
-c---------------------------------------------------------------------
-      call exchange_3 (rsd,iex)
-
-      L1 = 0
-      if (west.eq.-1) L1 = 1
-      L2 = ny + 1
-      if (east.eq.-1) L2 = ny
-
-      jst1 = 1
-      jend1 = ny
-      if (west.eq.-1) jst1 = 4
-      if (east.eq.-1) jend1 = ny - 3
-
-      do k = 2, nz - 1
-         do j = L1, L2
-            do i = ist, iend
-               flux(1,i,j,k) = rsd(3,i,j,k)
-               u31 = rsd(3,i,j,k) / rsd(1,i,j,k)
-               q = 0.50d+00 * (  rsd(2,i,j,k) * rsd(2,i,j,k)
-     >                         + rsd(3,i,j,k) * rsd(3,i,j,k)
-     >                         + rsd(4,i,j,k) * rsd(4,i,j,k) )
-     >                      / rsd(1,i,j,k)
-               flux(2,i,j,k) = rsd(2,i,j,k) * u31 
-               flux(3,i,j,k) = rsd(3,i,j,k) * u31 + c2 * 
-     >                       ( rsd(5,i,j,k) - q )
-               flux(4,i,j,k) = rsd(4,i,j,k) * u31
-               flux(5,i,j,k) = ( c1 * rsd(5,i,j,k) - c2 * q ) * u31
-            end do
-         end do
-      end do
-
-      do k = 2, nz - 1
-         do i = ist, iend
-            do j = jst, jend
-               do m = 1, 5
-                  frct(m,i,j,k) =  frct(m,i,j,k)
-     >                 - ty2 * ( flux(m,i,j+1,k) - flux(m,i,j-1,k) )
-               end do
-            end do
-         end do
-
-         do j = jst, L2
-            do i = ist, iend
-               tmp = 1.0d+00 / rsd(1,i,j,k)
-
-               u21j = tmp * rsd(2,i,j,k)
-               u31j = tmp * rsd(3,i,j,k)
-               u41j = tmp * rsd(4,i,j,k)
-               u51j = tmp * rsd(5,i,j,k)
-
-               tmp = 1.0d+00 / rsd(1,i,j-1,k)
-
-               u21jm1 = tmp * rsd(2,i,j-1,k)
-               u31jm1 = tmp * rsd(3,i,j-1,k)
-               u41jm1 = tmp * rsd(4,i,j-1,k)
-               u51jm1 = tmp * rsd(5,i,j-1,k)
-
-               flux(2,i,j,k) = ty3 * ( u21j - u21jm1 )
-               flux(3,i,j,k) = (4.0d+00/3.0d+00) * ty3 * 
-     >                       ( u31j - u31jm1 )
-               flux(4,i,j,k) = ty3 * ( u41j - u41jm1 )
-               flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 )
-     >              * ty3 * ( ( u21j  **2 + u31j  **2 + u41j  **2 )
-     >                      - ( u21jm1**2 + u31jm1**2 + u41jm1**2 ) )
-     >              + (1.0d+00/6.0d+00)
-     >              * ty3 * ( u31j**2 - u31jm1**2 )
-     >              + c1 * c5 * ty3 * ( u51j - u51jm1 )
-            end do
-         end do
-
-         do j = jst, jend
-            do i = ist, iend
-               frct(1,i,j,k) = frct(1,i,j,k)
-     >              + dy1 * ty1 * (            rsd(1,i,j-1,k)
-     >                             - 2.0d+00 * rsd(1,i,j,k)
-     >                             +           rsd(1,i,j+1,k) )
-               frct(2,i,j,k) = frct(2,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(2,i,j+1,k) - flux(2,i,j,k) )
-     >              + dy2 * ty1 * (            rsd(2,i,j-1,k)
-     >                             - 2.0d+00 * rsd(2,i,j,k)
-     >                             +           rsd(2,i,j+1,k) )
-               frct(3,i,j,k) = frct(3,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(3,i,j+1,k) - flux(3,i,j,k) )
-     >              + dy3 * ty1 * (            rsd(3,i,j-1,k)
-     >                             - 2.0d+00 * rsd(3,i,j,k)
-     >                             +           rsd(3,i,j+1,k) )
-               frct(4,i,j,k) = frct(4,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(4,i,j+1,k) - flux(4,i,j,k) )
-     >              + dy4 * ty1 * (            rsd(4,i,j-1,k)
-     >                             - 2.0d+00 * rsd(4,i,j,k)
-     >                             +           rsd(4,i,j+1,k) )
-               frct(5,i,j,k) = frct(5,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(5,i,j+1,k) - flux(5,i,j,k) )
-     >              + dy5 * ty1 * (            rsd(5,i,j-1,k)
-     >                             - 2.0d+00 * rsd(5,i,j,k)
-     >                             +           rsd(5,i,j+1,k) )
-            end do
-         end do
-
-c---------------------------------------------------------------------
-c   fourth-order dissipation
-c---------------------------------------------------------------------
-         IF (west.eq.-1) then
-            do i = ist, iend
-             do m = 1, 5
-               frct(m,i,2,k) = frct(m,i,2,k)
-     >           - dsspm * ( + 5.0d+00 * rsd(m,i,2,k)
-     >                       - 4.0d+00 * rsd(m,i,3,k)
-     >                       +           rsd(m,i,4,k) )
-               frct(m,i,3,k) = frct(m,i,3,k)
-     >           - dsspm * ( - 4.0d+00 * rsd(m,i,2,k)
-     >                       + 6.0d+00 * rsd(m,i,3,k)
-     >                       - 4.0d+00 * rsd(m,i,4,k)
-     >                       +           rsd(m,i,5,k) )
-             end do
-            end do
-         END IF
-
-         do j = jst1, jend1
-            do i = ist, iend
-               do m = 1, 5
-                  frct(m,i,j,k) = frct(m,i,j,k)
-     >              - dsspm * (            rsd(m,i,j-2,k)
-     >                        - 4.0d+00 * rsd(m,i,j-1,k)
-     >                        + 6.0d+00 * rsd(m,i,j,k)
-     >                        - 4.0d+00 * rsd(m,i,j+1,k)
-     >                        +           rsd(m,i,j+2,k) )
-               end do
-            end do
-         end do
-
-         IF (east.eq.-1) then
-            do i = ist, iend
-             do m = 1, 5
-               frct(m,i,ny-2,k) = frct(m,i,ny-2,k)
-     >           - dsspm * (             rsd(m,i,ny-4,k)
-     >                       - 4.0d+00 * rsd(m,i,ny-3,k)
-     >                       + 6.0d+00 * rsd(m,i,ny-2,k)
-     >                       - 4.0d+00 * rsd(m,i,ny-1,k)  )
-               frct(m,i,ny-1,k) = frct(m,i,ny-1,k)
-     >           - dsspm * (             rsd(m,i,ny-3,k)
-     >                       - 4.0d+00 * rsd(m,i,ny-2,k)
-     >                       + 5.0d+00 * rsd(m,i,ny-1,k)  )
-             end do
-            end do
-         END IF
-
-      end do
-
-c---------------------------------------------------------------------
-c   zeta-direction flux differences
-c---------------------------------------------------------------------
-      do k = 1, nz
-         do j = jst, jend
-            do i = ist, iend
-               flux(1,i,j,k) = rsd(4,i,j,k)
-               u41 = rsd(4,i,j,k) / rsd(1,i,j,k)
-               q = 0.50d+00 * (  rsd(2,i,j,k) * rsd(2,i,j,k)
-     >                         + rsd(3,i,j,k) * rsd(3,i,j,k)
-     >                         + rsd(4,i,j,k) * rsd(4,i,j,k) )
-     >                      / rsd(1,i,j,k)
-               flux(2,i,j,k) = rsd(2,i,j,k) * u41 
-               flux(3,i,j,k) = rsd(3,i,j,k) * u41 
-               flux(4,i,j,k) = rsd(4,i,j,k) * u41 + c2 * 
-     >                         ( rsd(5,i,j,k) - q )
-               flux(5,i,j,k) = ( c1 * rsd(5,i,j,k) - c2 * q ) * u41
-            end do
-         end do
-      end do
-
-      do k = 2, nz - 1
-         do j = jst, jend
-            do i = ist, iend
-               do m = 1, 5
-                  frct(m,i,j,k) =  frct(m,i,j,k)
-     >                  - tz2 * ( flux(m,i,j,k+1) - flux(m,i,j,k-1) )
-               end do
-            end do
-         end do
-      end do
-
-      do k = 2, nz
-         do j = jst, jend
-            do i = ist, iend
-               tmp = 1.0d+00 / rsd(1,i,j,k)
-
-               u21k = tmp * rsd(2,i,j,k)
-               u31k = tmp * rsd(3,i,j,k)
-               u41k = tmp * rsd(4,i,j,k)
-               u51k = tmp * rsd(5,i,j,k)
-
-               tmp = 1.0d+00 / rsd(1,i,j,k-1)
-
-               u21km1 = tmp * rsd(2,i,j,k-1)
-               u31km1 = tmp * rsd(3,i,j,k-1)
-               u41km1 = tmp * rsd(4,i,j,k-1)
-               u51km1 = tmp * rsd(5,i,j,k-1)
-
-               flux(2,i,j,k) = tz3 * ( u21k - u21km1 )
-               flux(3,i,j,k) = tz3 * ( u31k - u31km1 )
-               flux(4,i,j,k) = (4.0d+00/3.0d+00) * tz3 * ( u41k 
-     >                       - u41km1 )
-               flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 )
-     >              * tz3 * ( ( u21k  **2 + u31k  **2 + u41k  **2 )
-     >                      - ( u21km1**2 + u31km1**2 + u41km1**2 ) )
-     >              + (1.0d+00/6.0d+00)
-     >              * tz3 * ( u41k**2 - u41km1**2 )
-     >              + c1 * c5 * tz3 * ( u51k - u51km1 )
-            end do
-         end do
-      end do
-
-      do k = 2, nz - 1
-         do j = jst, jend
-            do i = ist, iend
-               frct(1,i,j,k) = frct(1,i,j,k)
-     >              + dz1 * tz1 * (            rsd(1,i,j,k+1)
-     >                             - 2.0d+00 * rsd(1,i,j,k)
-     >                             +           rsd(1,i,j,k-1) )
-               frct(2,i,j,k) = frct(2,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(2,i,j,k+1) - flux(2,i,j,k) )
-     >              + dz2 * tz1 * (            rsd(2,i,j,k+1)
-     >                             - 2.0d+00 * rsd(2,i,j,k)
-     >                             +           rsd(2,i,j,k-1) )
-               frct(3,i,j,k) = frct(3,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(3,i,j,k+1) - flux(3,i,j,k) )
-     >              + dz3 * tz1 * (            rsd(3,i,j,k+1)
-     >                             - 2.0d+00 * rsd(3,i,j,k)
-     >                             +           rsd(3,i,j,k-1) )
-               frct(4,i,j,k) = frct(4,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(4,i,j,k+1) - flux(4,i,j,k) )
-     >              + dz4 * tz1 * (            rsd(4,i,j,k+1)
-     >                             - 2.0d+00 * rsd(4,i,j,k)
-     >                             +           rsd(4,i,j,k-1) )
-               frct(5,i,j,k) = frct(5,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(5,i,j,k+1) - flux(5,i,j,k) )
-     >              + dz5 * tz1 * (            rsd(5,i,j,k+1)
-     >                             - 2.0d+00 * rsd(5,i,j,k)
-     >                             +           rsd(5,i,j,k-1) )
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   fourth-order dissipation
-c---------------------------------------------------------------------
-      do j = jst, jend
-         do i = ist, iend
-            do m = 1, 5
-               frct(m,i,j,2) = frct(m,i,j,2)
-     >           - dsspm * ( + 5.0d+00 * rsd(m,i,j,2)
-     >                       - 4.0d+00 * rsd(m,i,j,3)
-     >                       +           rsd(m,i,j,4) )
-               frct(m,i,j,3) = frct(m,i,j,3)
-     >           - dsspm * (- 4.0d+00 * rsd(m,i,j,2)
-     >                      + 6.0d+00 * rsd(m,i,j,3)
-     >                      - 4.0d+00 * rsd(m,i,j,4)
-     >                      +           rsd(m,i,j,5) )
-            end do
-         end do
-      end do
-
-      do k = 4, nz - 3
-         do j = jst, jend
-            do i = ist, iend
-               do m = 1, 5
-                  frct(m,i,j,k) = frct(m,i,j,k)
-     >              - dsspm * (           rsd(m,i,j,k-2)
-     >                        - 4.0d+00 * rsd(m,i,j,k-1)
-     >                        + 6.0d+00 * rsd(m,i,j,k)
-     >                        - 4.0d+00 * rsd(m,i,j,k+1)
-     >                        +           rsd(m,i,j,k+2) )
-               end do
-            end do
-         end do
-      end do
-
-      do j = jst, jend
-         do i = ist, iend
-            do m = 1, 5
-               frct(m,i,j,nz-2) = frct(m,i,j,nz-2)
-     >           - dsspm * (            rsd(m,i,j,nz-4)
-     >                      - 4.0d+00 * rsd(m,i,j,nz-3)
-     >                      + 6.0d+00 * rsd(m,i,j,nz-2)
-     >                      - 4.0d+00 * rsd(m,i,j,nz-1)  )
-               frct(m,i,j,nz-1) = frct(m,i,j,nz-1)
-     >           - dsspm * (             rsd(m,i,j,nz-3)
-     >                       - 4.0d+00 * rsd(m,i,j,nz-2)
-     >                       + 5.0d+00 * rsd(m,i,j,nz-1)  )
-            end do
-         end do
-      end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/error.f b/examples/smpi/NAS/LU/error.f
deleted file mode 100644 (file)
index e83f749..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine error
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   compute the solution error
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k, m
-      integer iglob, jglob
-      double precision  tmp
-      double precision  u000ijk(5), dummy(5)
-
-      integer IERROR
-
-
-      do m = 1, 5
-         errnm(m) = 0.0d+00
-         dummy(m) = 0.0d+00
-      end do
-
-      do k = 2, nz-1
-         do j = jst, jend
-            jglob = jpt + j
-            do i = ist, iend
-               iglob = ipt + i
-               call exact( iglob, jglob, k, u000ijk )
-               do m = 1, 5
-                  tmp = ( u000ijk(m) - u(m,i,j,k) )
-                  dummy(m) = dummy(m) + tmp ** 2
-               end do
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   compute the global sum of individual contributions to dot product.
-c---------------------------------------------------------------------
-      call MPI_ALLREDUCE( dummy,
-     >                    errnm,
-     >                    5,
-     >                    dp_type,
-     >                    MPI_SUM,
-     >                    MPI_COMM_WORLD,
-     >                    IERROR )
-
-      do m = 1, 5
-         errnm(m) = sqrt ( errnm(m) / ( (nx0-2)*(ny0-2)*(nz0-2) ) )
-      end do
-
-c      if (id.eq.0) then
-c        write (*,1002) ( errnm(m), m = 1, 5 )
-c      end if
-
- 1002 format (1x/1x,'RMS-norm of error in soln. to ',
-     > 'first pde  = ',1pe12.5/,
-     > 1x,'RMS-norm of error in soln. to ',
-     > 'second pde = ',1pe12.5/,
-     > 1x,'RMS-norm of error in soln. to ',
-     > 'third pde  = ',1pe12.5/,
-     > 1x,'RMS-norm of error in soln. to ',
-     > 'fourth pde = ',1pe12.5/,
-     > 1x,'RMS-norm of error in soln. to ',
-     > 'fifth pde  = ',1pe12.5)
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/exact.f b/examples/smpi/NAS/LU/exact.f
deleted file mode 100644 (file)
index 19e14c3..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exact( i, j, k, u000ijk )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   compute the exact solution at (i,j,k)
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer i, j, k
-      double precision u000ijk(*)
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer m
-      double precision xi, eta, zeta
-
-      xi  = ( dble ( i - 1 ) ) / ( nx0 - 1 )
-      eta  = ( dble ( j - 1 ) ) / ( ny0 - 1 )
-      zeta = ( dble ( k - 1 ) ) / ( nz - 1 )
-
-
-      do m = 1, 5
-         u000ijk(m) =  ce(m,1)
-     >        + ce(m,2) * xi
-     >        + ce(m,3) * eta
-     >        + ce(m,4) * zeta
-     >        + ce(m,5) * xi * xi
-     >        + ce(m,6) * eta * eta
-     >        + ce(m,7) * zeta * zeta
-     >        + ce(m,8) * xi * xi * xi
-     >        + ce(m,9) * eta * eta * eta
-     >        + ce(m,10) * zeta * zeta * zeta
-     >        + ce(m,11) * xi * xi * xi * xi
-     >        + ce(m,12) * eta * eta * eta * eta
-     >        + ce(m,13) * zeta * zeta * zeta * zeta
-      end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/exchange_1.f b/examples/smpi/NAS/LU/exchange_1.f
deleted file mode 100644 (file)
index 2bf7d28..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exchange_1( g,k,iex )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-      double precision  g(5,-1:isiz1+2,-1:isiz2+2,isiz3)
-      integer k
-      integer iex
-      integer i, j
-      double precision dum(5,isiz1+isiz2), dum1(5,isiz1+isiz2)
-
-      integer STATUS(MPI_STATUS_SIZE)
-      integer IERROR
-
-
-
-      if( iex .eq. 0 ) then
-
-          if( north .ne. -1 ) then
-              call MPI_RECV( dum1(1,jst),
-     >                       5*(jend-jst+1),
-     >                       dp_type,
-     >                       north,
-     >                       from_n,
-     >                       MPI_COMM_WORLD,
-     >                       status,
-     >                       IERROR )
-              do j=jst,jend
-                  g(1,0,j,k) = dum1(1,j)
-                  g(2,0,j,k) = dum1(2,j)
-                  g(3,0,j,k) = dum1(3,j)
-                  g(4,0,j,k) = dum1(4,j)
-                  g(5,0,j,k) = dum1(5,j)
-              enddo
-          endif
-
-          if( west .ne. -1 ) then
-              call MPI_RECV( dum1(1,ist),
-     >                       5*(iend-ist+1),
-     >                       dp_type,
-     >                       west,
-     >                       from_w,
-     >                       MPI_COMM_WORLD,
-     >                       status,
-     >                       IERROR )
-              do i=ist,iend
-                  g(1,i,0,k) = dum1(1,i)
-                  g(2,i,0,k) = dum1(2,i)
-                  g(3,i,0,k) = dum1(3,i)
-                  g(4,i,0,k) = dum1(4,i)
-                  g(5,i,0,k) = dum1(5,i)
-              enddo
-          endif
-
-      else if( iex .eq. 1 ) then
-
-          if( south .ne. -1 ) then
-              call MPI_RECV( dum1(1,jst),
-     >                       5*(jend-jst+1),
-     >                       dp_type,
-     >                       south,
-     >                       from_s,
-     >                       MPI_COMM_WORLD,
-     >                       status,
-     >                       IERROR )
-              do j=jst,jend
-                  g(1,nx+1,j,k) = dum1(1,j)
-                  g(2,nx+1,j,k) = dum1(2,j)
-                  g(3,nx+1,j,k) = dum1(3,j)
-                  g(4,nx+1,j,k) = dum1(4,j)
-                  g(5,nx+1,j,k) = dum1(5,j)
-              enddo
-          endif
-
-          if( east .ne. -1 ) then
-              call MPI_RECV( dum1(1,ist),
-     >                       5*(iend-ist+1),
-     >                       dp_type,
-     >                       east,
-     >                       from_e,
-     >                       MPI_COMM_WORLD,
-     >                       status,
-     >                       IERROR )
-              do i=ist,iend
-                  g(1,i,ny+1,k) = dum1(1,i)
-                  g(2,i,ny+1,k) = dum1(2,i)
-                  g(3,i,ny+1,k) = dum1(3,i)
-                  g(4,i,ny+1,k) = dum1(4,i)
-                  g(5,i,ny+1,k) = dum1(5,i)
-              enddo
-          endif
-
-      else if( iex .eq. 2 ) then
-
-          if( south .ne. -1 ) then
-              do j=jst,jend
-                  dum(1,j) = g(1,nx,j,k) 
-                  dum(2,j) = g(2,nx,j,k) 
-                  dum(3,j) = g(3,nx,j,k) 
-                  dum(4,j) = g(4,nx,j,k) 
-                  dum(5,j) = g(5,nx,j,k) 
-              enddo
-              call MPI_SEND( dum(1,jst), 
-     >                       5*(jend-jst+1), 
-     >                       dp_type, 
-     >                       south, 
-     >                       from_n, 
-     >                       MPI_COMM_WORLD, 
-     >                       IERROR )
-          endif
-
-          if( east .ne. -1 ) then
-              do i=ist,iend
-                  dum(1,i) = g(1,i,ny,k)
-                  dum(2,i) = g(2,i,ny,k)
-                  dum(3,i) = g(3,i,ny,k)
-                  dum(4,i) = g(4,i,ny,k)
-                  dum(5,i) = g(5,i,ny,k)
-              enddo
-              call MPI_SEND( dum(1,ist), 
-     >                       5*(iend-ist+1), 
-     >                       dp_type, 
-     >                       east, 
-     >                       from_w, 
-     >                       MPI_COMM_WORLD, 
-     >                       IERROR )
-          endif
-
-      else
-
-          if( north .ne. -1 ) then
-              do j=jst,jend
-                  dum(1,j) = g(1,1,j,k)
-                  dum(2,j) = g(2,1,j,k)
-                  dum(3,j) = g(3,1,j,k)
-                  dum(4,j) = g(4,1,j,k)
-                  dum(5,j) = g(5,1,j,k)
-              enddo
-              call MPI_SEND( dum(1,jst), 
-     >                       5*(jend-jst+1), 
-     >                       dp_type, 
-     >                       north, 
-     >                       from_s, 
-     >                       MPI_COMM_WORLD, 
-     >                       IERROR )
-          endif
-
-          if( west .ne. -1 ) then
-              do i=ist,iend
-                  dum(1,i) = g(1,i,1,k)
-                  dum(2,i) = g(2,i,1,k)
-                  dum(3,i) = g(3,i,1,k)
-                  dum(4,i) = g(4,i,1,k)
-                  dum(5,i) = g(5,i,1,k)
-              enddo
-              call MPI_SEND( dum(1,ist), 
-     >                       5*(iend-ist+1), 
-     >                       dp_type, 
-     >                       west, 
-     >                       from_e, 
-     >                       MPI_COMM_WORLD, 
-     >                       IERROR )
-          endif
-
-      endif
-
-      end
-
-
-
diff --git a/examples/smpi/NAS/LU/exchange_3.f b/examples/smpi/NAS/LU/exchange_3.f
deleted file mode 100644 (file)
index d52ae7e..0000000
+++ /dev/null
@@ -1,312 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exchange_3(g,iex)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   compute the right hand side based on exact solution
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      double precision  g(5,-1:isiz1+2,-1:isiz2+2,isiz3)
-      integer iex
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k
-      integer ipos1, ipos2
-
-      integer mid
-      integer STATUS(MPI_STATUS_SIZE)
-      integer IERROR
-
-
-
-      if (iex.eq.0) then
-c---------------------------------------------------------------------
-c   communicate in the south and north directions
-c---------------------------------------------------------------------
-      if (north.ne.-1) then
-          call MPI_IRECV( buf1,
-     >                    10*ny*nz,
-     >                    dp_type,
-     >                    MPI_ANY_SOURCE,
-     >                    from_n,
-     >                    MPI_COMM_WORLD,
-     >                    mid,
-     >                    IERROR )
-      end if
-
-c---------------------------------------------------------------------
-c   send south
-c---------------------------------------------------------------------
-      if (south.ne.-1) then
-          do k = 1,nz
-            do j = 1,ny
-              ipos1 = (k-1)*ny + j
-              ipos2 = ipos1 + ny*nz
-              buf(1,ipos1) = g(1,nx-1,j,k) 
-              buf(2,ipos1) = g(2,nx-1,j,k) 
-              buf(3,ipos1) = g(3,nx-1,j,k) 
-              buf(4,ipos1) = g(4,nx-1,j,k) 
-              buf(5,ipos1) = g(5,nx-1,j,k) 
-              buf(1,ipos2) = g(1,nx,j,k)
-              buf(2,ipos2) = g(2,nx,j,k)
-              buf(3,ipos2) = g(3,nx,j,k)
-              buf(4,ipos2) = g(4,nx,j,k)
-              buf(5,ipos2) = g(5,nx,j,k)
-            end do
-          end do
-
-          call MPI_SEND( buf,
-     >                   10*ny*nz,
-     >                   dp_type,
-     >                   south,
-     >                   from_n,
-     >                   MPI_COMM_WORLD,
-     >                   IERROR )
-        end if
-
-c---------------------------------------------------------------------
-c   receive from north
-c---------------------------------------------------------------------
-        if (north.ne.-1) then
-          call MPI_WAIT( mid, STATUS, IERROR )
-
-          do k = 1,nz
-            do j = 1,ny
-              ipos1 = (k-1)*ny + j
-              ipos2 = ipos1 + ny*nz
-              g(1,-1,j,k) = buf1(1,ipos1)
-              g(2,-1,j,k) = buf1(2,ipos1)
-              g(3,-1,j,k) = buf1(3,ipos1)
-              g(4,-1,j,k) = buf1(4,ipos1)
-              g(5,-1,j,k) = buf1(5,ipos1)
-              g(1,0,j,k) = buf1(1,ipos2)
-              g(2,0,j,k) = buf1(2,ipos2)
-              g(3,0,j,k) = buf1(3,ipos2)
-              g(4,0,j,k) = buf1(4,ipos2)
-              g(5,0,j,k) = buf1(5,ipos2)
-            end do
-          end do
-
-        end if
-
-      if (south.ne.-1) then
-          call MPI_IRECV( buf1,
-     >                    10*ny*nz,
-     >                    dp_type,
-     >                    MPI_ANY_SOURCE,
-     >                    from_s,
-     >                    MPI_COMM_WORLD,
-     >                    mid,
-     >                    IERROR )
-      end if
-
-c---------------------------------------------------------------------
-c   send north
-c---------------------------------------------------------------------
-        if (north.ne.-1) then
-          do k = 1,nz
-            do j = 1,ny
-              ipos1 = (k-1)*ny + j
-              ipos2 = ipos1 + ny*nz
-              buf(1,ipos1) = g(1,2,j,k)
-              buf(2,ipos1) = g(2,2,j,k)
-              buf(3,ipos1) = g(3,2,j,k)
-              buf(4,ipos1) = g(4,2,j,k)
-              buf(5,ipos1) = g(5,2,j,k)
-              buf(1,ipos2) = g(1,1,j,k)
-              buf(2,ipos2) = g(2,1,j,k)
-              buf(3,ipos2) = g(3,1,j,k)
-              buf(4,ipos2) = g(4,1,j,k)
-              buf(5,ipos2) = g(5,1,j,k)
-            end do
-          end do
-
-          call MPI_SEND( buf,
-     >                   10*ny*nz,
-     >                   dp_type,
-     >                   north,
-     >                   from_s,
-     >                   MPI_COMM_WORLD,
-     >                   IERROR )
-        end if
-
-c---------------------------------------------------------------------
-c   receive from south
-c---------------------------------------------------------------------
-        if (south.ne.-1) then
-          call MPI_WAIT( mid, STATUS, IERROR )
-
-          do k = 1,nz
-            do j = 1,ny
-              ipos1 = (k-1)*ny + j
-              ipos2 = ipos1 + ny*nz
-              g(1,nx+2,j,k)  = buf1(1,ipos1)
-              g(2,nx+2,j,k)  = buf1(2,ipos1)
-              g(3,nx+2,j,k)  = buf1(3,ipos1)
-              g(4,nx+2,j,k)  = buf1(4,ipos1)
-              g(5,nx+2,j,k)  = buf1(5,ipos1)
-              g(1,nx+1,j,k) = buf1(1,ipos2)
-              g(2,nx+1,j,k) = buf1(2,ipos2)
-              g(3,nx+1,j,k) = buf1(3,ipos2)
-              g(4,nx+1,j,k) = buf1(4,ipos2)
-              g(5,nx+1,j,k) = buf1(5,ipos2)
-            end do
-          end do
-        end if
-
-      else
-
-c---------------------------------------------------------------------
-c   communicate in the east and west directions
-c---------------------------------------------------------------------
-      if (west.ne.-1) then
-          call MPI_IRECV( buf1,
-     >                    10*nx*nz,
-     >                    dp_type,
-     >                    MPI_ANY_SOURCE,
-     >                    from_w,
-     >                    MPI_COMM_WORLD,
-     >                    mid,
-     >                    IERROR )
-      end if
-
-c---------------------------------------------------------------------
-c   send east
-c---------------------------------------------------------------------
-        if (east.ne.-1) then
-          do k = 1,nz
-            do i = 1,nx
-              ipos1 = (k-1)*nx + i
-              ipos2 = ipos1 + nx*nz
-              buf(1,ipos1) = g(1,i,ny-1,k)
-              buf(2,ipos1) = g(2,i,ny-1,k)
-              buf(3,ipos1) = g(3,i,ny-1,k)
-              buf(4,ipos1) = g(4,i,ny-1,k)
-              buf(5,ipos1) = g(5,i,ny-1,k)
-              buf(1,ipos2) = g(1,i,ny,k)
-              buf(2,ipos2) = g(2,i,ny,k)
-              buf(3,ipos2) = g(3,i,ny,k)
-              buf(4,ipos2) = g(4,i,ny,k)
-              buf(5,ipos2) = g(5,i,ny,k)
-            end do
-          end do
-
-          call MPI_SEND( buf,
-     >                   10*nx*nz,
-     >                   dp_type,
-     >                   east,
-     >                   from_w,
-     >                   MPI_COMM_WORLD,
-     >                   IERROR )
-        end if
-
-c---------------------------------------------------------------------
-c   receive from west
-c---------------------------------------------------------------------
-        if (west.ne.-1) then
-          call MPI_WAIT( mid, STATUS, IERROR )
-
-          do k = 1,nz
-            do i = 1,nx
-              ipos1 = (k-1)*nx + i
-              ipos2 = ipos1 + nx*nz
-              g(1,i,-1,k) = buf1(1,ipos1)
-              g(2,i,-1,k) = buf1(2,ipos1)
-              g(3,i,-1,k) = buf1(3,ipos1)
-              g(4,i,-1,k) = buf1(4,ipos1)
-              g(5,i,-1,k) = buf1(5,ipos1)
-              g(1,i,0,k) = buf1(1,ipos2)
-              g(2,i,0,k) = buf1(2,ipos2)
-              g(3,i,0,k) = buf1(3,ipos2)
-              g(4,i,0,k) = buf1(4,ipos2)
-              g(5,i,0,k) = buf1(5,ipos2)
-            end do
-          end do
-
-        end if
-
-      if (east.ne.-1) then
-          call MPI_IRECV( buf1,
-     >                    10*nx*nz,
-     >                    dp_type,
-     >                    MPI_ANY_SOURCE,
-     >                    from_e,
-     >                    MPI_COMM_WORLD,
-     >                    mid,
-     >                    IERROR )
-      end if
-
-c---------------------------------------------------------------------
-c   send west
-c---------------------------------------------------------------------
-      if (west.ne.-1) then
-          do k = 1,nz
-            do i = 1,nx
-              ipos1 = (k-1)*nx + i
-              ipos2 = ipos1 + nx*nz
-              buf(1,ipos1) = g(1,i,2,k)
-              buf(2,ipos1) = g(2,i,2,k)
-              buf(3,ipos1) = g(3,i,2,k)
-              buf(4,ipos1) = g(4,i,2,k)
-              buf(5,ipos1) = g(5,i,2,k)
-              buf(1,ipos2) = g(1,i,1,k)
-              buf(2,ipos2) = g(2,i,1,k)
-              buf(3,ipos2) = g(3,i,1,k)
-              buf(4,ipos2) = g(4,i,1,k)
-              buf(5,ipos2) = g(5,i,1,k)
-            end do
-          end do
-
-          call MPI_SEND( buf,
-     >                   10*nx*nz,
-     >                   dp_type,
-     >                   west,
-     >                   from_e,
-     >                   MPI_COMM_WORLD,
-     >                   IERROR )
-        end if
-
-c---------------------------------------------------------------------
-c   receive from east
-c---------------------------------------------------------------------
-        if (east.ne.-1) then
-          call MPI_WAIT( mid, STATUS, IERROR )
-
-          do k = 1,nz
-            do i = 1,nx
-              ipos1 = (k-1)*nx + i
-              ipos2 = ipos1 + nx*nz
-              g(1,i,ny+2,k)  = buf1(1,ipos1)
-              g(2,i,ny+2,k)  = buf1(2,ipos1)
-              g(3,i,ny+2,k)  = buf1(3,ipos1)
-              g(4,i,ny+2,k)  = buf1(4,ipos1)
-              g(5,i,ny+2,k)  = buf1(5,ipos1)
-              g(1,i,ny+1,k) = buf1(1,ipos2)
-              g(2,i,ny+1,k) = buf1(2,ipos2)
-              g(3,i,ny+1,k) = buf1(3,ipos2)
-              g(4,i,ny+1,k) = buf1(4,ipos2)
-              g(5,i,ny+1,k) = buf1(5,ipos2)
-            end do
-          end do
-
-        end if
-
-      end if
-
-      return
-      end     
diff --git a/examples/smpi/NAS/LU/exchange_4.f b/examples/smpi/NAS/LU/exchange_4.f
deleted file mode 100644 (file)
index 1c4c38e..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exchange_4(g,h,ibeg,ifin1,jbeg,jfin1)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   compute the right hand side based on exact solution
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      double precision  g(0:isiz2+1,0:isiz3+1), 
-     >        h(0:isiz2+1,0:isiz3+1)
-      integer ibeg, ifin1
-      integer jbeg, jfin1
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j
-      integer ny2
-      double precision  dum(1024)
-
-      integer msgid1, msgid3
-      integer STATUS(MPI_STATUS_SIZE)
-      integer IERROR
-
-
-
-      ny2 = ny + 2
-
-c---------------------------------------------------------------------
-c   communicate in the east and west directions
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   receive from east
-c---------------------------------------------------------------------
-      if (jfin1.eq.ny) then
-        call MPI_IRECV( dum,
-     >                  2*nx,
-     >                  dp_type,
-     >                  MPI_ANY_SOURCE,
-     >                  from_e,
-     >                  MPI_COMM_WORLD,
-     >                  msgid3,
-     >                  IERROR )
-
-        call MPI_WAIT( msgid3, STATUS, IERROR )
-
-        do i = 1,nx
-          g(i,ny+1) = dum(i)
-          h(i,ny+1) = dum(i+nx)
-        end do
-
-      end if
-
-c---------------------------------------------------------------------
-c   send west
-c---------------------------------------------------------------------
-      if (jbeg.eq.1) then
-        do i = 1,nx
-          dum(i) = g(i,1)
-          dum(i+nx) = h(i,1)
-        end do
-
-        call MPI_SEND( dum,
-     >                 2*nx,
-     >                 dp_type,
-     >                 west,
-     >                 from_e,
-     >                 MPI_COMM_WORLD,
-     >                 IERROR )
-
-      end if
-
-c---------------------------------------------------------------------
-c   communicate in the south and north directions
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   receive from south
-c---------------------------------------------------------------------
-      if (ifin1.eq.nx) then
-        call MPI_IRECV( dum,
-     >                  2*ny2,
-     >                  dp_type,
-     >                  MPI_ANY_SOURCE,
-     >                  from_s,
-     >                  MPI_COMM_WORLD,
-     >                  msgid1,
-     >                  IERROR )
-
-        call MPI_WAIT( msgid1, STATUS, IERROR )
-
-        do j = 0,ny+1
-          g(nx+1,j) = dum(j+1)
-          h(nx+1,j) = dum(j+ny2+1)
-        end do
-
-      end if
-
-c---------------------------------------------------------------------
-c   send north
-c---------------------------------------------------------------------
-      if (ibeg.eq.1) then
-        do j = 0,ny+1
-          dum(j+1) = g(1,j)
-          dum(j+ny2+1) = h(1,j)
-        end do
-
-        call MPI_SEND( dum,
-     >                 2*ny2,
-     >                 dp_type,
-     >                 north,
-     >                 from_s,
-     >                 MPI_COMM_WORLD,
-     >                 IERROR )
-
-      end if
-
-      return
-      end     
diff --git a/examples/smpi/NAS/LU/exchange_5.f b/examples/smpi/NAS/LU/exchange_5.f
deleted file mode 100644 (file)
index e4cc66f..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exchange_5(g,ibeg,ifin1)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   compute the right hand side based on exact solution
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      double precision  g(0:isiz2+1,0:isiz3+1)
-      integer ibeg, ifin1
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer k
-      double precision  dum(1024)
-
-      integer msgid1
-      integer STATUS(MPI_STATUS_SIZE)
-      integer IERROR
-
-
-
-c---------------------------------------------------------------------
-c   communicate in the south and north directions
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   receive from south
-c---------------------------------------------------------------------
-      if (ifin1.eq.nx) then
-        call MPI_IRECV( dum,
-     >                  nz,
-     >                  dp_type,
-     >                  MPI_ANY_SOURCE,
-     >                  from_s,
-     >                  MPI_COMM_WORLD,
-     >                  msgid1,
-     >                  IERROR )
-
-        call MPI_WAIT( msgid1, STATUS, IERROR )
-
-        do k = 1,nz
-          g(nx+1,k) = dum(k)
-        end do
-
-      end if
-
-c---------------------------------------------------------------------
-c   send north
-c---------------------------------------------------------------------
-      if (ibeg.eq.1) then
-        do k = 1,nz
-          dum(k) = g(1,k)
-        end do
-
-        call MPI_SEND( dum,
-     >                 nz,
-     >                 dp_type,
-     >                 north,
-     >                 from_s,
-     >                 MPI_COMM_WORLD,
-     >                 IERROR )
-
-      end if
-
-      return
-      end     
diff --git a/examples/smpi/NAS/LU/exchange_6.f b/examples/smpi/NAS/LU/exchange_6.f
deleted file mode 100644 (file)
index 0626609..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine exchange_6(g,jbeg,jfin1)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   compute the right hand side based on exact solution
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      double precision  g(0:isiz2+1,0:isiz3+1)
-      integer jbeg, jfin1
-
-c---------------------------------------------------------------------
-c  local parameters
-c---------------------------------------------------------------------
-      integer k
-      double precision  dum(1024)
-
-      integer msgid3
-      integer STATUS(MPI_STATUS_SIZE)
-      integer IERROR
-
-
-
-c---------------------------------------------------------------------
-c   communicate in the east and west directions
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   receive from east
-c---------------------------------------------------------------------
-      if (jfin1.eq.ny) then
-        call MPI_IRECV( dum,
-     >                  nz,
-     >                  dp_type,
-     >                  MPI_ANY_SOURCE,
-     >                  from_e,
-     >                  MPI_COMM_WORLD,
-     >                  msgid3,
-     >                  IERROR )
-
-        call MPI_WAIT( msgid3, STATUS, IERROR )
-
-        do k = 1,nz
-          g(ny+1,k) = dum(k)
-        end do
-
-      end if
-
-c---------------------------------------------------------------------
-c   send west
-c---------------------------------------------------------------------
-      if (jbeg.eq.1) then
-        do k = 1,nz
-          dum(k) = g(1,k)
-        end do
-
-        call MPI_SEND( dum,
-     >                 nz,
-     >                 dp_type,
-     >                 west,
-     >                 from_e,
-     >                 MPI_COMM_WORLD,
-     >                 IERROR )
-
-      end if
-
-      return
-      end     
diff --git a/examples/smpi/NAS/LU/init_comm.f b/examples/smpi/NAS/LU/init_comm.f
deleted file mode 100644 (file)
index 72ece00..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine init_comm 
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   initialize MPI and establish rank and size
-c
-c This is a module in the MPI implementation of LUSSOR
-c pseudo application from the NAS Parallel Benchmarks. 
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-      integer nodedim
-      integer IERROR
-
-
-c---------------------------------------------------------------------
-c    initialize MPI communication
-c---------------------------------------------------------------------
-      call MPI_INIT( IERROR )
-
-c---------------------------------------------------------------------
-c   establish the global rank of this process
-c---------------------------------------------------------------------
-      call MPI_COMM_RANK( MPI_COMM_WORLD,
-     >                     id,
-     >                     IERROR )
-
-c---------------------------------------------------------------------
-c   establish the size of the global group
-c---------------------------------------------------------------------
-      call MPI_COMM_SIZE( MPI_COMM_WORLD,
-     >                     num,
-     >                     IERROR )
-
-      ndim   = nodedim(num)
-
-      if (.not. convertdouble) then
-         dp_type = MPI_DOUBLE_PRECISION
-      else
-         dp_type = MPI_REAL
-      endif
-
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/inputlu.data.sample b/examples/smpi/NAS/LU/inputlu.data.sample
deleted file mode 100644 (file)
index 9ef5a7b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-c
-c***controls printing of the progress of iterations: ipr    inorm
-                                                      1      250
-c
-c***the maximum no. of pseudo-time steps to be performed: nitmax
-                                                             250
-c
-c***magnitude of the time step: dt 
-                               2.0e+00
-c
-c***relaxation factor for SSOR iterations: omega
-                                            1.2
-c
-c***tolerance levels for steady-state residuals: tolnwt(m),m=1,5
-                             1.0e-08   1.0e-08   1.0e-08  1.0e-08  1.0e-08 
-c
-c***number of grid points in xi and eta and zeta directions: nx   ny   nz
-                                                            64  64  64
-c
-
-
-
-
-
diff --git a/examples/smpi/NAS/LU/jacld.f b/examples/smpi/NAS/LU/jacld.f
deleted file mode 100644 (file)
index 9580d08..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine jacld(k)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-
-c---------------------------------------------------------------------
-c   compute the lower triangular part of the jacobian matrix
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer k
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j
-      double precision  r43
-      double precision  c1345
-      double precision  c34
-      double precision  tmp1, tmp2, tmp3
-
-
-
-      r43 = ( 4.0d+00 / 3.0d+00 )
-      c1345 = c1 * c3 * c4 * c5
-      c34 = c3 * c4
-
-         do j = jst, jend
-            do i = ist, iend
-
-c---------------------------------------------------------------------
-c   form the block daigonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i,j,k)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               d(1,1,i,j) =  1.0d+00
-     >                       + dt * 2.0d+00 * (   tx1 * dx1
-     >                                          + ty1 * dy1
-     >                                          + tz1 * dz1 )
-               d(1,2,i,j) =  0.0d+00
-               d(1,3,i,j) =  0.0d+00
-               d(1,4,i,j) =  0.0d+00
-               d(1,5,i,j) =  0.0d+00
-
-               d(2,1,i,j) =  dt * 2.0d+00
-     >          * (  tx1 * ( - r43 * c34 * tmp2 * u(2,i,j,k) )
-     >             + ty1 * ( -       c34 * tmp2 * u(2,i,j,k) )
-     >             + tz1 * ( -       c34 * tmp2 * u(2,i,j,k) ) )
-               d(2,2,i,j) =  1.0d+00
-     >          + dt * 2.0d+00 
-     >          * (  tx1 * r43 * c34 * tmp1
-     >             + ty1 *       c34 * tmp1
-     >             + tz1 *       c34 * tmp1 )
-     >          + dt * 2.0d+00 * (   tx1 * dx2
-     >                             + ty1 * dy2
-     >                             + tz1 * dz2  )
-               d(2,3,i,j) = 0.0d+00
-               d(2,4,i,j) = 0.0d+00
-               d(2,5,i,j) = 0.0d+00
-
-               d(3,1,i,j) = dt * 2.0d+00
-     >      * (  tx1 * ( -       c34 * tmp2 * u(3,i,j,k) )
-     >         + ty1 * ( - r43 * c34 * tmp2 * u(3,i,j,k) )
-     >         + tz1 * ( -       c34 * tmp2 * u(3,i,j,k) ) )
-               d(3,2,i,j) = 0.0d+00
-               d(3,3,i,j) = 1.0d+00
-     >         + dt * 2.0d+00
-     >              * (  tx1 *       c34 * tmp1
-     >                 + ty1 * r43 * c34 * tmp1
-     >                 + tz1 *       c34 * tmp1 )
-     >         + dt * 2.0d+00 * (  tx1 * dx3
-     >                           + ty1 * dy3
-     >                           + tz1 * dz3 )
-               d(3,4,i,j) = 0.0d+00
-               d(3,5,i,j) = 0.0d+00
-
-               d(4,1,i,j) = dt * 2.0d+00
-     >      * (  tx1 * ( -       c34 * tmp2 * u(4,i,j,k) )
-     >         + ty1 * ( -       c34 * tmp2 * u(4,i,j,k) )
-     >         + tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k) ) )
-               d(4,2,i,j) = 0.0d+00
-               d(4,3,i,j) = 0.0d+00
-               d(4,4,i,j) = 1.0d+00
-     >         + dt * 2.0d+00
-     >              * (  tx1 *       c34 * tmp1
-     >                 + ty1 *       c34 * tmp1
-     >                 + tz1 * r43 * c34 * tmp1 )
-     >         + dt * 2.0d+00 * (  tx1 * dx4
-     >                           + ty1 * dy4
-     >                           + tz1 * dz4 )
-               d(4,5,i,j) = 0.0d+00
-
-               d(5,1,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 )
-     >             - ( c1345 ) * tmp2 * u(5,i,j,k) )
-     >   + ty1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 )
-     >             - ( r43*c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 )
-     >             - ( c1345 ) * tmp2 * u(5,i,j,k) )
-     >   + tz1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 )
-     >             - ( r43*c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 )
-     >             - ( c1345 ) * tmp2 * u(5,i,j,k) ) )
-               d(5,2,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( r43*c34 - c1345 ) * tmp2 * u(2,i,j,k)
-     >   + ty1 * (     c34 - c1345 ) * tmp2 * u(2,i,j,k)
-     >   + tz1 * (     c34 - c1345 ) * tmp2 * u(2,i,j,k) )
-               d(5,3,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k)
-     >   + ty1 * ( r43*c34 -c1345 ) * tmp2 * u(3,i,j,k)
-     >   + tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k) )
-               d(5,4,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k)
-     >   + ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k)
-     >   + tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k) )
-               d(5,5,i,j) = 1.0d+00
-     >   + dt * 2.0d+00 * ( tx1 * c1345 * tmp1
-     >                    + ty1 * c1345 * tmp1
-     >                    + tz1 * c1345 * tmp1 )
-     >   + dt * 2.0d+00 * (  tx1 * dx5
-     >                    +  ty1 * dy5
-     >                    +  tz1 * dz5 )
-
-c---------------------------------------------------------------------
-c   form the first block sub-diagonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i,j,k-1)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               a(1,1,i,j) = - dt * tz1 * dz1
-               a(1,2,i,j) =   0.0d+00
-               a(1,3,i,j) =   0.0d+00
-               a(1,4,i,j) = - dt * tz2
-               a(1,5,i,j) =   0.0d+00
-
-               a(2,1,i,j) = - dt * tz2
-     >           * ( - ( u(2,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 )
-     >           - dt * tz1 * ( - c34 * tmp2 * u(2,i,j,k-1) )
-               a(2,2,i,j) = - dt * tz2 * ( u(4,i,j,k-1) * tmp1 )
-     >           - dt * tz1 * c34 * tmp1
-     >           - dt * tz1 * dz2 
-               a(2,3,i,j) = 0.0d+00
-               a(2,4,i,j) = - dt * tz2 * ( u(2,i,j,k-1) * tmp1 )
-               a(2,5,i,j) = 0.0d+00
-
-               a(3,1,i,j) = - dt * tz2
-     >           * ( - ( u(3,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 )
-     >           - dt * tz1 * ( - c34 * tmp2 * u(3,i,j,k-1) )
-               a(3,2,i,j) = 0.0d+00
-               a(3,3,i,j) = - dt * tz2 * ( u(4,i,j,k-1) * tmp1 )
-     >           - dt * tz1 * ( c34 * tmp1 )
-     >           - dt * tz1 * dz3
-               a(3,4,i,j) = - dt * tz2 * ( u(3,i,j,k-1) * tmp1 )
-               a(3,5,i,j) = 0.0d+00
-
-               a(4,1,i,j) = - dt * tz2
-     >        * ( - ( u(4,i,j,k-1) * tmp1 ) ** 2
-     >            + 0.50d+00 * c2
-     >            * ( ( u(2,i,j,k-1) * u(2,i,j,k-1)
-     >                + u(3,i,j,k-1) * u(3,i,j,k-1)
-     >                + u(4,i,j,k-1) * u(4,i,j,k-1) ) * tmp2 ) )
-     >        - dt * tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k-1) )
-               a(4,2,i,j) = - dt * tz2
-     >             * ( - c2 * ( u(2,i,j,k-1) * tmp1 ) )
-               a(4,3,i,j) = - dt * tz2
-     >             * ( - c2 * ( u(3,i,j,k-1) * tmp1 ) )
-               a(4,4,i,j) = - dt * tz2 * ( 2.0d+00 - c2 )
-     >             * ( u(4,i,j,k-1) * tmp1 )
-     >             - dt * tz1 * ( r43 * c34 * tmp1 )
-     >             - dt * tz1 * dz4
-               a(4,5,i,j) = - dt * tz2 * c2
-
-               a(5,1,i,j) = - dt * tz2
-     >     * ( ( c2 * (  u(2,i,j,k-1) * u(2,i,j,k-1)
-     >                 + u(3,i,j,k-1) * u(3,i,j,k-1)
-     >                 + u(4,i,j,k-1) * u(4,i,j,k-1) ) * tmp2
-     >       - c1 * ( u(5,i,j,k-1) * tmp1 ) )
-     >            * ( u(4,i,j,k-1) * tmp1 ) )
-     >       - dt * tz1
-     >       * ( - ( c34 - c1345 ) * tmp3 * (u(2,i,j,k-1)**2)
-     >           - ( c34 - c1345 ) * tmp3 * (u(3,i,j,k-1)**2)
-     >           - ( r43*c34 - c1345 )* tmp3 * (u(4,i,j,k-1)**2)
-     >          - c1345 * tmp2 * u(5,i,j,k-1) )
-               a(5,2,i,j) = - dt * tz2
-     >       * ( - c2 * ( u(2,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 )
-     >       - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k-1)
-               a(5,3,i,j) = - dt * tz2
-     >       * ( - c2 * ( u(3,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 )
-     >       - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k-1)
-               a(5,4,i,j) = - dt * tz2
-     >       * ( c1 * ( u(5,i,j,k-1) * tmp1 )
-     >       - 0.50d+00 * c2
-     >       * ( (  u(2,i,j,k-1)*u(2,i,j,k-1)
-     >            + u(3,i,j,k-1)*u(3,i,j,k-1)
-     >            + 3.0d+00*u(4,i,j,k-1)*u(4,i,j,k-1) ) * tmp2 ) )
-     >       - dt * tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k-1)
-               a(5,5,i,j) = - dt * tz2
-     >       * ( c1 * ( u(4,i,j,k-1) * tmp1 ) )
-     >       - dt * tz1 * c1345 * tmp1
-     >       - dt * tz1 * dz5
-
-c---------------------------------------------------------------------
-c   form the second block sub-diagonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i,j-1,k)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               b(1,1,i,j) = - dt * ty1 * dy1
-               b(1,2,i,j) =   0.0d+00
-               b(1,3,i,j) = - dt * ty2
-               b(1,4,i,j) =   0.0d+00
-               b(1,5,i,j) =   0.0d+00
-
-               b(2,1,i,j) = - dt * ty2
-     >           * ( - ( u(2,i,j-1,k)*u(3,i,j-1,k) ) * tmp2 )
-     >           - dt * ty1 * ( - c34 * tmp2 * u(2,i,j-1,k) )
-               b(2,2,i,j) = - dt * ty2 * ( u(3,i,j-1,k) * tmp1 )
-     >          - dt * ty1 * ( c34 * tmp1 )
-     >          - dt * ty1 * dy2
-               b(2,3,i,j) = - dt * ty2 * ( u(2,i,j-1,k) * tmp1 )
-               b(2,4,i,j) = 0.0d+00
-               b(2,5,i,j) = 0.0d+00
-
-               b(3,1,i,j) = - dt * ty2
-     >           * ( - ( u(3,i,j-1,k) * tmp1 ) ** 2
-     >      + 0.50d+00 * c2 * ( (  u(2,i,j-1,k) * u(2,i,j-1,k)
-     >                           + u(3,i,j-1,k) * u(3,i,j-1,k)
-     >                           + u(4,i,j-1,k) * u(4,i,j-1,k) )
-     >                          * tmp2 ) )
-     >       - dt * ty1 * ( - r43 * c34 * tmp2 * u(3,i,j-1,k) )
-               b(3,2,i,j) = - dt * ty2
-     >                   * ( - c2 * ( u(2,i,j-1,k) * tmp1 ) )
-               b(3,3,i,j) = - dt * ty2 * ( ( 2.0d+00 - c2 )
-     >                   * ( u(3,i,j-1,k) * tmp1 ) )
-     >       - dt * ty1 * ( r43 * c34 * tmp1 )
-     >       - dt * ty1 * dy3
-               b(3,4,i,j) = - dt * ty2
-     >                   * ( - c2 * ( u(4,i,j-1,k) * tmp1 ) )
-               b(3,5,i,j) = - dt * ty2 * c2
-
-               b(4,1,i,j) = - dt * ty2
-     >              * ( - ( u(3,i,j-1,k)*u(4,i,j-1,k) ) * tmp2 )
-     >       - dt * ty1 * ( - c34 * tmp2 * u(4,i,j-1,k) )
-               b(4,2,i,j) = 0.0d+00
-               b(4,3,i,j) = - dt * ty2 * ( u(4,i,j-1,k) * tmp1 )
-               b(4,4,i,j) = - dt * ty2 * ( u(3,i,j-1,k) * tmp1 )
-     >                        - dt * ty1 * ( c34 * tmp1 )
-     >                        - dt * ty1 * dy4
-               b(4,5,i,j) = 0.0d+00
-
-               b(5,1,i,j) = - dt * ty2
-     >          * ( ( c2 * (  u(2,i,j-1,k) * u(2,i,j-1,k)
-     >                      + u(3,i,j-1,k) * u(3,i,j-1,k)
-     >                      + u(4,i,j-1,k) * u(4,i,j-1,k) ) * tmp2
-     >               - c1 * ( u(5,i,j-1,k) * tmp1 ) )
-     >          * ( u(3,i,j-1,k) * tmp1 ) )
-     >          - dt * ty1
-     >          * ( - (     c34 - c1345 )*tmp3*(u(2,i,j-1,k)**2)
-     >              - ( r43*c34 - c1345 )*tmp3*(u(3,i,j-1,k)**2)
-     >              - (     c34 - c1345 )*tmp3*(u(4,i,j-1,k)**2)
-     >              - c1345*tmp2*u(5,i,j-1,k) )
-               b(5,2,i,j) = - dt * ty2
-     >          * ( - c2 * ( u(2,i,j-1,k)*u(3,i,j-1,k) ) * tmp2 )
-     >          - dt * ty1
-     >          * ( c34 - c1345 ) * tmp2 * u(2,i,j-1,k)
-               b(5,3,i,j) = - dt * ty2
-     >          * ( c1 * ( u(5,i,j-1,k) * tmp1 )
-     >          - 0.50d+00 * c2 
-     >          * ( (  u(2,i,j-1,k)*u(2,i,j-1,k)
-     >               + 3.0d+00 * u(3,i,j-1,k)*u(3,i,j-1,k)
-     >               + u(4,i,j-1,k)*u(4,i,j-1,k) ) * tmp2 ) )
-     >          - dt * ty1
-     >          * ( r43*c34 - c1345 ) * tmp2 * u(3,i,j-1,k)
-               b(5,4,i,j) = - dt * ty2
-     >          * ( - c2 * ( u(3,i,j-1,k)*u(4,i,j-1,k) ) * tmp2 )
-     >          - dt * ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j-1,k)
-               b(5,5,i,j) = - dt * ty2
-     >          * ( c1 * ( u(3,i,j-1,k) * tmp1 ) )
-     >          - dt * ty1 * c1345 * tmp1
-     >          - dt * ty1 * dy5
-
-c---------------------------------------------------------------------
-c   form the third block sub-diagonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i-1,j,k)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               c(1,1,i,j) = - dt * tx1 * dx1
-               c(1,2,i,j) = - dt * tx2
-               c(1,3,i,j) =   0.0d+00
-               c(1,4,i,j) =   0.0d+00
-               c(1,5,i,j) =   0.0d+00
-
-               c(2,1,i,j) = - dt * tx2
-     >          * ( - ( u(2,i-1,j,k) * tmp1 ) ** 2
-     >     + c2 * 0.50d+00 * (  u(2,i-1,j,k) * u(2,i-1,j,k)
-     >                        + u(3,i-1,j,k) * u(3,i-1,j,k)
-     >                        + u(4,i-1,j,k) * u(4,i-1,j,k) ) * tmp2 )
-     >          - dt * tx1 * ( - r43 * c34 * tmp2 * u(2,i-1,j,k) )
-               c(2,2,i,j) = - dt * tx2
-     >          * ( ( 2.0d+00 - c2 ) * ( u(2,i-1,j,k) * tmp1 ) )
-     >          - dt * tx1 * ( r43 * c34 * tmp1 )
-     >          - dt * tx1 * dx2
-               c(2,3,i,j) = - dt * tx2
-     >              * ( - c2 * ( u(3,i-1,j,k) * tmp1 ) )
-               c(2,4,i,j) = - dt * tx2
-     >              * ( - c2 * ( u(4,i-1,j,k) * tmp1 ) )
-               c(2,5,i,j) = - dt * tx2 * c2 
-
-               c(3,1,i,j) = - dt * tx2
-     >              * ( - ( u(2,i-1,j,k) * u(3,i-1,j,k) ) * tmp2 )
-     >         - dt * tx1 * ( - c34 * tmp2 * u(3,i-1,j,k) )
-               c(3,2,i,j) = - dt * tx2 * ( u(3,i-1,j,k) * tmp1 )
-               c(3,3,i,j) = - dt * tx2 * ( u(2,i-1,j,k) * tmp1 )
-     >          - dt * tx1 * ( c34 * tmp1 )
-     >          - dt * tx1 * dx3
-               c(3,4,i,j) = 0.0d+00
-               c(3,5,i,j) = 0.0d+00
-
-               c(4,1,i,j) = - dt * tx2
-     >          * ( - ( u(2,i-1,j,k)*u(4,i-1,j,k) ) * tmp2 )
-     >          - dt * tx1 * ( - c34 * tmp2 * u(4,i-1,j,k) )
-               c(4,2,i,j) = - dt * tx2 * ( u(4,i-1,j,k) * tmp1 )
-               c(4,3,i,j) = 0.0d+00
-               c(4,4,i,j) = - dt * tx2 * ( u(2,i-1,j,k) * tmp1 )
-     >          - dt * tx1 * ( c34 * tmp1 )
-     >          - dt * tx1 * dx4
-               c(4,5,i,j) = 0.0d+00
-
-               c(5,1,i,j) = - dt * tx2
-     >          * ( ( c2 * (  u(2,i-1,j,k) * u(2,i-1,j,k)
-     >                      + u(3,i-1,j,k) * u(3,i-1,j,k)
-     >                      + u(4,i-1,j,k) * u(4,i-1,j,k) ) * tmp2
-     >              - c1 * ( u(5,i-1,j,k) * tmp1 ) )
-     >          * ( u(2,i-1,j,k) * tmp1 ) )
-     >          - dt * tx1
-     >          * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i-1,j,k)**2 )
-     >              - (     c34 - c1345 ) * tmp3 * ( u(3,i-1,j,k)**2 )
-     >              - (     c34 - c1345 ) * tmp3 * ( u(4,i-1,j,k)**2 )
-     >              - c1345 * tmp2 * u(5,i-1,j,k) )
-               c(5,2,i,j) = - dt * tx2
-     >          * ( c1 * ( u(5,i-1,j,k) * tmp1 )
-     >             - 0.50d+00 * c2
-     >             * ( (  3.0d+00*u(2,i-1,j,k)*u(2,i-1,j,k)
-     >                  + u(3,i-1,j,k)*u(3,i-1,j,k)
-     >                  + u(4,i-1,j,k)*u(4,i-1,j,k) ) * tmp2 ) )
-     >           - dt * tx1
-     >           * ( r43*c34 - c1345 ) * tmp2 * u(2,i-1,j,k)
-               c(5,3,i,j) = - dt * tx2
-     >           * ( - c2 * ( u(3,i-1,j,k)*u(2,i-1,j,k) ) * tmp2 )
-     >           - dt * tx1
-     >           * (  c34 - c1345 ) * tmp2 * u(3,i-1,j,k)
-               c(5,4,i,j) = - dt * tx2
-     >           * ( - c2 * ( u(4,i-1,j,k)*u(2,i-1,j,k) ) * tmp2 )
-     >           - dt * tx1
-     >           * (  c34 - c1345 ) * tmp2 * u(4,i-1,j,k)
-               c(5,5,i,j) = - dt * tx2
-     >           * ( c1 * ( u(2,i-1,j,k) * tmp1 ) )
-     >           - dt * tx1 * c1345 * tmp1
-     >           - dt * tx1 * dx5
-
-            end do
-         end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/jacu.f b/examples/smpi/NAS/LU/jacu.f
deleted file mode 100644 (file)
index 6a3c5b8..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine jacu(k)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   compute the upper triangular part of the jacobian matrix
-c---------------------------------------------------------------------
-
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer k
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j
-      double precision  r43
-      double precision  c1345
-      double precision  c34
-      double precision  tmp1, tmp2, tmp3
-
-
-
-      r43 = ( 4.0d+00 / 3.0d+00 )
-      c1345 = c1 * c3 * c4 * c5
-      c34 = c3 * c4
-
-         do j = jst, jend
-            do i = ist, iend
-
-c---------------------------------------------------------------------
-c   form the block daigonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i,j,k)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               d(1,1,i,j) =  1.0d+00
-     >                       + dt * 2.0d+00 * (   tx1 * dx1
-     >                                          + ty1 * dy1
-     >                                          + tz1 * dz1 )
-               d(1,2,i,j) =  0.0d+00
-               d(1,3,i,j) =  0.0d+00
-               d(1,4,i,j) =  0.0d+00
-               d(1,5,i,j) =  0.0d+00
-
-               d(2,1,i,j) =  dt * 2.0d+00
-     >          * (  tx1 * ( - r43 * c34 * tmp2 * u(2,i,j,k) )
-     >             + ty1 * ( -       c34 * tmp2 * u(2,i,j,k) )
-     >             + tz1 * ( -       c34 * tmp2 * u(2,i,j,k) ) )
-               d(2,2,i,j) =  1.0d+00
-     >          + dt * 2.0d+00 
-     >          * (  tx1 * r43 * c34 * tmp1
-     >             + ty1 *       c34 * tmp1
-     >             + tz1 *       c34 * tmp1 )
-     >          + dt * 2.0d+00 * (   tx1 * dx2
-     >                             + ty1 * dy2
-     >                             + tz1 * dz2  )
-               d(2,3,i,j) = 0.0d+00
-               d(2,4,i,j) = 0.0d+00
-               d(2,5,i,j) = 0.0d+00
-
-               d(3,1,i,j) = dt * 2.0d+00
-     >      * (  tx1 * ( -       c34 * tmp2 * u(3,i,j,k) )
-     >         + ty1 * ( - r43 * c34 * tmp2 * u(3,i,j,k) )
-     >         + tz1 * ( -       c34 * tmp2 * u(3,i,j,k) ) )
-               d(3,2,i,j) = 0.0d+00
-               d(3,3,i,j) = 1.0d+00
-     >         + dt * 2.0d+00
-     >              * (  tx1 *       c34 * tmp1
-     >                 + ty1 * r43 * c34 * tmp1
-     >                 + tz1 *       c34 * tmp1 )
-     >         + dt * 2.0d+00 * (  tx1 * dx3
-     >                           + ty1 * dy3
-     >                           + tz1 * dz3 )
-               d(3,4,i,j) = 0.0d+00
-               d(3,5,i,j) = 0.0d+00
-
-               d(4,1,i,j) = dt * 2.0d+00
-     >      * (  tx1 * ( -       c34 * tmp2 * u(4,i,j,k) )
-     >         + ty1 * ( -       c34 * tmp2 * u(4,i,j,k) )
-     >         + tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k) ) )
-               d(4,2,i,j) = 0.0d+00
-               d(4,3,i,j) = 0.0d+00
-               d(4,4,i,j) = 1.0d+00
-     >         + dt * 2.0d+00
-     >              * (  tx1 *       c34 * tmp1
-     >                 + ty1 *       c34 * tmp1
-     >                 + tz1 * r43 * c34 * tmp1 )
-     >         + dt * 2.0d+00 * (  tx1 * dx4
-     >                           + ty1 * dy4
-     >                           + tz1 * dz4 )
-               d(4,5,i,j) = 0.0d+00
-
-               d(5,1,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 )
-     >             - ( c1345 ) * tmp2 * u(5,i,j,k) )
-     >   + ty1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 )
-     >             - ( r43*c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 )
-     >             - ( c1345 ) * tmp2 * u(5,i,j,k) )
-     >   + tz1 * ( - ( c34 - c1345 ) * tmp3 * ( u(2,i,j,k) ** 2 )
-     >             - ( c34 - c1345 ) * tmp3 * ( u(3,i,j,k) ** 2 )
-     >             - ( r43*c34 - c1345 ) * tmp3 * ( u(4,i,j,k) ** 2 )
-     >             - ( c1345 ) * tmp2 * u(5,i,j,k) ) )
-               d(5,2,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( r43*c34 - c1345 ) * tmp2 * u(2,i,j,k)
-     >   + ty1 * (     c34 - c1345 ) * tmp2 * u(2,i,j,k)
-     >   + tz1 * (     c34 - c1345 ) * tmp2 * u(2,i,j,k) )
-               d(5,3,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k)
-     >   + ty1 * ( r43*c34 -c1345 ) * tmp2 * u(3,i,j,k)
-     >   + tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k) )
-               d(5,4,i,j) = dt * 2.0d+00
-     > * ( tx1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k)
-     >   + ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j,k)
-     >   + tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k) )
-               d(5,5,i,j) = 1.0d+00
-     >   + dt * 2.0d+00 * ( tx1 * c1345 * tmp1
-     >                    + ty1 * c1345 * tmp1
-     >                    + tz1 * c1345 * tmp1 )
-     >   + dt * 2.0d+00 * (  tx1 * dx5
-     >                    +  ty1 * dy5
-     >                    +  tz1 * dz5 )
-
-c---------------------------------------------------------------------
-c   form the first block sub-diagonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i+1,j,k)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               a(1,1,i,j) = - dt * tx1 * dx1
-               a(1,2,i,j) =   dt * tx2
-               a(1,3,i,j) =   0.0d+00
-               a(1,4,i,j) =   0.0d+00
-               a(1,5,i,j) =   0.0d+00
-
-               a(2,1,i,j) =  dt * tx2
-     >          * ( - ( u(2,i+1,j,k) * tmp1 ) ** 2
-     >     + c2 * 0.50d+00 * (  u(2,i+1,j,k) * u(2,i+1,j,k)
-     >                        + u(3,i+1,j,k) * u(3,i+1,j,k)
-     >                        + u(4,i+1,j,k) * u(4,i+1,j,k) ) * tmp2 )
-     >          - dt * tx1 * ( - r43 * c34 * tmp2 * u(2,i+1,j,k) )
-               a(2,2,i,j) =  dt * tx2
-     >          * ( ( 2.0d+00 - c2 ) * ( u(2,i+1,j,k) * tmp1 ) )
-     >          - dt * tx1 * ( r43 * c34 * tmp1 )
-     >          - dt * tx1 * dx2
-               a(2,3,i,j) =  dt * tx2
-     >              * ( - c2 * ( u(3,i+1,j,k) * tmp1 ) )
-               a(2,4,i,j) =  dt * tx2
-     >              * ( - c2 * ( u(4,i+1,j,k) * tmp1 ) )
-               a(2,5,i,j) =  dt * tx2 * c2 
-
-               a(3,1,i,j) =  dt * tx2
-     >              * ( - ( u(2,i+1,j,k) * u(3,i+1,j,k) ) * tmp2 )
-     >         - dt * tx1 * ( - c34 * tmp2 * u(3,i+1,j,k) )
-               a(3,2,i,j) =  dt * tx2 * ( u(3,i+1,j,k) * tmp1 )
-               a(3,3,i,j) =  dt * tx2 * ( u(2,i+1,j,k) * tmp1 )
-     >          - dt * tx1 * ( c34 * tmp1 )
-     >          - dt * tx1 * dx3
-               a(3,4,i,j) = 0.0d+00
-               a(3,5,i,j) = 0.0d+00
-
-               a(4,1,i,j) = dt * tx2
-     >          * ( - ( u(2,i+1,j,k)*u(4,i+1,j,k) ) * tmp2 )
-     >          - dt * tx1 * ( - c34 * tmp2 * u(4,i+1,j,k) )
-               a(4,2,i,j) = dt * tx2 * ( u(4,i+1,j,k) * tmp1 )
-               a(4,3,i,j) = 0.0d+00
-               a(4,4,i,j) = dt * tx2 * ( u(2,i+1,j,k) * tmp1 )
-     >          - dt * tx1 * ( c34 * tmp1 )
-     >          - dt * tx1 * dx4
-               a(4,5,i,j) = 0.0d+00
-
-               a(5,1,i,j) = dt * tx2
-     >          * ( ( c2 * (  u(2,i+1,j,k) * u(2,i+1,j,k)
-     >                      + u(3,i+1,j,k) * u(3,i+1,j,k)
-     >                      + u(4,i+1,j,k) * u(4,i+1,j,k) ) * tmp2
-     >              - c1 * ( u(5,i+1,j,k) * tmp1 ) )
-     >          * ( u(2,i+1,j,k) * tmp1 ) )
-     >          - dt * tx1
-     >          * ( - ( r43*c34 - c1345 ) * tmp3 * ( u(2,i+1,j,k)**2 )
-     >              - (     c34 - c1345 ) * tmp3 * ( u(3,i+1,j,k)**2 )
-     >              - (     c34 - c1345 ) * tmp3 * ( u(4,i+1,j,k)**2 )
-     >              - c1345 * tmp2 * u(5,i+1,j,k) )
-               a(5,2,i,j) = dt * tx2
-     >          * ( c1 * ( u(5,i+1,j,k) * tmp1 )
-     >             - 0.50d+00 * c2
-     >             * ( (  3.0d+00*u(2,i+1,j,k)*u(2,i+1,j,k)
-     >                  + u(3,i+1,j,k)*u(3,i+1,j,k)
-     >                  + u(4,i+1,j,k)*u(4,i+1,j,k) ) * tmp2 ) )
-     >           - dt * tx1
-     >           * ( r43*c34 - c1345 ) * tmp2 * u(2,i+1,j,k)
-               a(5,3,i,j) = dt * tx2
-     >           * ( - c2 * ( u(3,i+1,j,k)*u(2,i+1,j,k) ) * tmp2 )
-     >           - dt * tx1
-     >           * (  c34 - c1345 ) * tmp2 * u(3,i+1,j,k)
-               a(5,4,i,j) = dt * tx2
-     >           * ( - c2 * ( u(4,i+1,j,k)*u(2,i+1,j,k) ) * tmp2 )
-     >           - dt * tx1
-     >           * (  c34 - c1345 ) * tmp2 * u(4,i+1,j,k)
-               a(5,5,i,j) = dt * tx2
-     >           * ( c1 * ( u(2,i+1,j,k) * tmp1 ) )
-     >           - dt * tx1 * c1345 * tmp1
-     >           - dt * tx1 * dx5
-
-c---------------------------------------------------------------------
-c   form the second block sub-diagonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i,j+1,k)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               b(1,1,i,j) = - dt * ty1 * dy1
-               b(1,2,i,j) =   0.0d+00
-               b(1,3,i,j) =  dt * ty2
-               b(1,4,i,j) =   0.0d+00
-               b(1,5,i,j) =   0.0d+00
-
-               b(2,1,i,j) =  dt * ty2
-     >           * ( - ( u(2,i,j+1,k)*u(3,i,j+1,k) ) * tmp2 )
-     >           - dt * ty1 * ( - c34 * tmp2 * u(2,i,j+1,k) )
-               b(2,2,i,j) =  dt * ty2 * ( u(3,i,j+1,k) * tmp1 )
-     >          - dt * ty1 * ( c34 * tmp1 )
-     >          - dt * ty1 * dy2
-               b(2,3,i,j) =  dt * ty2 * ( u(2,i,j+1,k) * tmp1 )
-               b(2,4,i,j) = 0.0d+00
-               b(2,5,i,j) = 0.0d+00
-
-               b(3,1,i,j) =  dt * ty2
-     >           * ( - ( u(3,i,j+1,k) * tmp1 ) ** 2
-     >      + 0.50d+00 * c2 * ( (  u(2,i,j+1,k) * u(2,i,j+1,k)
-     >                           + u(3,i,j+1,k) * u(3,i,j+1,k)
-     >                           + u(4,i,j+1,k) * u(4,i,j+1,k) )
-     >                          * tmp2 ) )
-     >       - dt * ty1 * ( - r43 * c34 * tmp2 * u(3,i,j+1,k) )
-               b(3,2,i,j) =  dt * ty2
-     >                   * ( - c2 * ( u(2,i,j+1,k) * tmp1 ) )
-               b(3,3,i,j) =  dt * ty2 * ( ( 2.0d+00 - c2 )
-     >                   * ( u(3,i,j+1,k) * tmp1 ) )
-     >       - dt * ty1 * ( r43 * c34 * tmp1 )
-     >       - dt * ty1 * dy3
-               b(3,4,i,j) =  dt * ty2
-     >                   * ( - c2 * ( u(4,i,j+1,k) * tmp1 ) )
-               b(3,5,i,j) =  dt * ty2 * c2
-
-               b(4,1,i,j) =  dt * ty2
-     >              * ( - ( u(3,i,j+1,k)*u(4,i,j+1,k) ) * tmp2 )
-     >       - dt * ty1 * ( - c34 * tmp2 * u(4,i,j+1,k) )
-               b(4,2,i,j) = 0.0d+00
-               b(4,3,i,j) =  dt * ty2 * ( u(4,i,j+1,k) * tmp1 )
-               b(4,4,i,j) =  dt * ty2 * ( u(3,i,j+1,k) * tmp1 )
-     >                        - dt * ty1 * ( c34 * tmp1 )
-     >                        - dt * ty1 * dy4
-               b(4,5,i,j) = 0.0d+00
-
-               b(5,1,i,j) =  dt * ty2
-     >          * ( ( c2 * (  u(2,i,j+1,k) * u(2,i,j+1,k)
-     >                      + u(3,i,j+1,k) * u(3,i,j+1,k)
-     >                      + u(4,i,j+1,k) * u(4,i,j+1,k) ) * tmp2
-     >               - c1 * ( u(5,i,j+1,k) * tmp1 ) )
-     >          * ( u(3,i,j+1,k) * tmp1 ) )
-     >          - dt * ty1
-     >          * ( - (     c34 - c1345 )*tmp3*(u(2,i,j+1,k)**2)
-     >              - ( r43*c34 - c1345 )*tmp3*(u(3,i,j+1,k)**2)
-     >              - (     c34 - c1345 )*tmp3*(u(4,i,j+1,k)**2)
-     >              - c1345*tmp2*u(5,i,j+1,k) )
-               b(5,2,i,j) =  dt * ty2
-     >          * ( - c2 * ( u(2,i,j+1,k)*u(3,i,j+1,k) ) * tmp2 )
-     >          - dt * ty1
-     >          * ( c34 - c1345 ) * tmp2 * u(2,i,j+1,k)
-               b(5,3,i,j) =  dt * ty2
-     >          * ( c1 * ( u(5,i,j+1,k) * tmp1 )
-     >          - 0.50d+00 * c2 
-     >          * ( (  u(2,i,j+1,k)*u(2,i,j+1,k)
-     >               + 3.0d+00 * u(3,i,j+1,k)*u(3,i,j+1,k)
-     >               + u(4,i,j+1,k)*u(4,i,j+1,k) ) * tmp2 ) )
-     >          - dt * ty1
-     >          * ( r43*c34 - c1345 ) * tmp2 * u(3,i,j+1,k)
-               b(5,4,i,j) =  dt * ty2
-     >          * ( - c2 * ( u(3,i,j+1,k)*u(4,i,j+1,k) ) * tmp2 )
-     >          - dt * ty1 * ( c34 - c1345 ) * tmp2 * u(4,i,j+1,k)
-               b(5,5,i,j) =  dt * ty2
-     >          * ( c1 * ( u(3,i,j+1,k) * tmp1 ) )
-     >          - dt * ty1 * c1345 * tmp1
-     >          - dt * ty1 * dy5
-
-c---------------------------------------------------------------------
-c   form the third block sub-diagonal
-c---------------------------------------------------------------------
-               tmp1 = 1.0d+00 / u(1,i,j,k+1)
-               tmp2 = tmp1 * tmp1
-               tmp3 = tmp1 * tmp2
-
-               c(1,1,i,j) = - dt * tz1 * dz1
-               c(1,2,i,j) =   0.0d+00
-               c(1,3,i,j) =   0.0d+00
-               c(1,4,i,j) = dt * tz2
-               c(1,5,i,j) =   0.0d+00
-
-               c(2,1,i,j) = dt * tz2
-     >           * ( - ( u(2,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 )
-     >           - dt * tz1 * ( - c34 * tmp2 * u(2,i,j,k+1) )
-               c(2,2,i,j) = dt * tz2 * ( u(4,i,j,k+1) * tmp1 )
-     >           - dt * tz1 * c34 * tmp1
-     >           - dt * tz1 * dz2 
-               c(2,3,i,j) = 0.0d+00
-               c(2,4,i,j) = dt * tz2 * ( u(2,i,j,k+1) * tmp1 )
-               c(2,5,i,j) = 0.0d+00
-
-               c(3,1,i,j) = dt * tz2
-     >           * ( - ( u(3,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 )
-     >           - dt * tz1 * ( - c34 * tmp2 * u(3,i,j,k+1) )
-               c(3,2,i,j) = 0.0d+00
-               c(3,3,i,j) = dt * tz2 * ( u(4,i,j,k+1) * tmp1 )
-     >           - dt * tz1 * ( c34 * tmp1 )
-     >           - dt * tz1 * dz3
-               c(3,4,i,j) = dt * tz2 * ( u(3,i,j,k+1) * tmp1 )
-               c(3,5,i,j) = 0.0d+00
-
-               c(4,1,i,j) = dt * tz2
-     >        * ( - ( u(4,i,j,k+1) * tmp1 ) ** 2
-     >            + 0.50d+00 * c2
-     >            * ( ( u(2,i,j,k+1) * u(2,i,j,k+1)
-     >                + u(3,i,j,k+1) * u(3,i,j,k+1)
-     >                + u(4,i,j,k+1) * u(4,i,j,k+1) ) * tmp2 ) )
-     >        - dt * tz1 * ( - r43 * c34 * tmp2 * u(4,i,j,k+1) )
-               c(4,2,i,j) = dt * tz2
-     >             * ( - c2 * ( u(2,i,j,k+1) * tmp1 ) )
-               c(4,3,i,j) = dt * tz2
-     >             * ( - c2 * ( u(3,i,j,k+1) * tmp1 ) )
-               c(4,4,i,j) = dt * tz2 * ( 2.0d+00 - c2 )
-     >             * ( u(4,i,j,k+1) * tmp1 )
-     >             - dt * tz1 * ( r43 * c34 * tmp1 )
-     >             - dt * tz1 * dz4
-               c(4,5,i,j) = dt * tz2 * c2
-
-               c(5,1,i,j) = dt * tz2
-     >     * ( ( c2 * (  u(2,i,j,k+1) * u(2,i,j,k+1)
-     >                 + u(3,i,j,k+1) * u(3,i,j,k+1)
-     >                 + u(4,i,j,k+1) * u(4,i,j,k+1) ) * tmp2
-     >       - c1 * ( u(5,i,j,k+1) * tmp1 ) )
-     >            * ( u(4,i,j,k+1) * tmp1 ) )
-     >       - dt * tz1
-     >       * ( - ( c34 - c1345 ) * tmp3 * (u(2,i,j,k+1)**2)
-     >           - ( c34 - c1345 ) * tmp3 * (u(3,i,j,k+1)**2)
-     >           - ( r43*c34 - c1345 )* tmp3 * (u(4,i,j,k+1)**2)
-     >          - c1345 * tmp2 * u(5,i,j,k+1) )
-               c(5,2,i,j) = dt * tz2
-     >       * ( - c2 * ( u(2,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 )
-     >       - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(2,i,j,k+1)
-               c(5,3,i,j) = dt * tz2
-     >       * ( - c2 * ( u(3,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 )
-     >       - dt * tz1 * ( c34 - c1345 ) * tmp2 * u(3,i,j,k+1)
-               c(5,4,i,j) = dt * tz2
-     >       * ( c1 * ( u(5,i,j,k+1) * tmp1 )
-     >       - 0.50d+00 * c2
-     >       * ( (  u(2,i,j,k+1)*u(2,i,j,k+1)
-     >            + u(3,i,j,k+1)*u(3,i,j,k+1)
-     >            + 3.0d+00*u(4,i,j,k+1)*u(4,i,j,k+1) ) * tmp2 ) )
-     >       - dt * tz1 * ( r43*c34 - c1345 ) * tmp2 * u(4,i,j,k+1)
-               c(5,5,i,j) = dt * tz2
-     >       * ( c1 * ( u(4,i,j,k+1) * tmp1 ) )
-     >       - dt * tz1 * c1345 * tmp1
-     >       - dt * tz1 * dz5
-
-            end do
-         end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/l2norm.f b/examples/smpi/NAS/LU/l2norm.f
deleted file mode 100644 (file)
index 147b21d..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine l2norm ( ldx, ldy, ldz, 
-     >                    nx0, ny0, nz0,
-     >                    ist, iend, 
-     >                    jst, jend,
-     >                    v, sum )
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   to compute the l2-norm of vector v.
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer ldx, ldy, ldz
-      integer nx0, ny0, nz0
-      integer ist, iend
-      integer jst, jend
-      double precision  v(5,-1:ldx+2,-1:ldy+2,*), sum(5)
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k, m
-      double precision  dummy(5)
-
-      integer IERROR
-
-
-      do m = 1, 5
-         dummy(m) = 0.0d+00
-      end do
-
-      do k = 2, nz0-1
-         do j = jst, jend
-            do i = ist, iend
-               do m = 1, 5
-                  dummy(m) = dummy(m) + v(m,i,j,k) * v(m,i,j,k)
-               end do
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   compute the global sum of individual contributions to dot product.
-c---------------------------------------------------------------------
-      call MPI_ALLREDUCE( dummy,
-     >                    sum,
-     >                    5,
-     >                    dp_type,
-     >                    MPI_SUM,
-     >                    MPI_COMM_WORLD,
-     >                    IERROR )
-
-      do m = 1, 5
-         sum(m) = sqrt ( sum(m) / ( (nx0-2)*(ny0-2)*(nz0-2) ) )
-      end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/lu.f b/examples/smpi/NAS/LU/lu.f
deleted file mode 100644 (file)
index 543463a..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-!-------------------------------------------------------------------------!
-!                                                                         !
-!        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3         !
-!                                                                         !
-!                                   L U                                   !
-!                                                                         !
-!-------------------------------------------------------------------------!
-!                                                                         !
-!    This benchmark is part of the NAS Parallel Benchmark 3.3 suite.      !
-!    It is described in NAS Technical Reports 95-020 and 02-007           !
-!                                                                         !
-!    Permission to use, copy, distribute and modify this software         !
-!    for any purpose with or without fee is hereby granted.  We           !
-!    request, however, that all derived work reference the NAS            !
-!    Parallel Benchmarks 3.3. This software is provided "as is"           !
-!    without express or implied warranty.                                 !
-!                                                                         !
-!    Information on NPB 3.3, including the technical report, the          !
-!    original specifications, source code, results and information        !
-!    on how to submit new results, is available at:                       !
-!                                                                         !
-!           http://www.nas.nasa.gov/Software/NPB/                         !
-!                                                                         !
-!    Send comments or suggestions to  npb@nas.nasa.gov                    !
-!                                                                         !
-!          NAS Parallel Benchmarks Group                                  !
-!          NASA Ames Research Center                                      !
-!          Mail Stop: T27A-1                                              !
-!          Moffett Field, CA   94035-1000                                 !
-!                                                                         !
-!          E-mail:  npb@nas.nasa.gov                                      !
-!          Fax:     (650) 604-3957                                        !
-!                                                                         !
-!-------------------------------------------------------------------------!
-
-c---------------------------------------------------------------------
-c
-c Authors: S. Weeratunga
-c          V. Venkatakrishnan
-c          E. Barszcz
-c          M. Yarrow
-c
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-      program applu
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   driver for the performance evaluation of the solver for
-c   five coupled parabolic/elliptic partial differential equations.
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-      character class
-      logical verified
-      double precision mflops
-      integer ierr
-
-c---------------------------------------------------------------------
-c   initialize communications
-c---------------------------------------------------------------------
-      call init_comm()
-
-c---------------------------------------------------------------------
-c   read input data
-c---------------------------------------------------------------------
-      call read_input()
-
-c---------------------------------------------------------------------
-c   set up processor grid
-c---------------------------------------------------------------------
-      call proc_grid()
-
-c---------------------------------------------------------------------
-c   determine the neighbors
-c---------------------------------------------------------------------
-      call neighbors()
-
-c---------------------------------------------------------------------
-c   set up sub-domain sizes
-c---------------------------------------------------------------------
-      call subdomain()
-
-c---------------------------------------------------------------------
-c   set up coefficients
-c---------------------------------------------------------------------
-      call setcoeff()
-
-c---------------------------------------------------------------------
-c   set the masks required for comm
-c---------------------------------------------------------------------
-      call sethyper()
-
-c---------------------------------------------------------------------
-c   set the boundary values for dependent variables
-c---------------------------------------------------------------------
-      call setbv()
-
-c---------------------------------------------------------------------
-c   set the initial values for dependent variables
-c---------------------------------------------------------------------
-      call setiv()
-
-c---------------------------------------------------------------------
-c   compute the forcing term based on prescribed exact solution
-c---------------------------------------------------------------------
-      call erhs()
-
-c---------------------------------------------------------------------
-c   perform one SSOR iteration to touch all data and program pages 
-c---------------------------------------------------------------------
-      call ssor(1)
-
-c---------------------------------------------------------------------
-c   reset the boundary and initial values
-c---------------------------------------------------------------------
-      call setbv()
-      call setiv()
-
-c---------------------------------------------------------------------
-c   perform the SSOR iterations
-c---------------------------------------------------------------------
-      call ssor(itmax)
-
-c---------------------------------------------------------------------
-c   compute the solution error
-c---------------------------------------------------------------------
-      call error()
-
-c---------------------------------------------------------------------
-c   compute the surface integral
-c---------------------------------------------------------------------
-      call pintgr()
-
-c---------------------------------------------------------------------
-c   verification test
-c---------------------------------------------------------------------
-      IF (id.eq.0) THEN
-         call verify ( rsdnm, errnm, frc, class, verified )
-         mflops = float(itmax)*(1984.77*float( nx0 )
-     >        *float( ny0 )
-     >        *float( nz0 )
-     >        -10923.3*(float( nx0+ny0+nz0 )/3.)**2 
-     >        +27770.9* float( nx0+ny0+nz0 )/3.
-     >        -144010.)
-     >        / (maxtime*1000000.)
-
-         call print_results('LU', class, nx0,
-     >     ny0, nz0, itmax, nnodes_compiled,
-     >     num, maxtime, mflops, '          floating point', verified, 
-     >     npbversion, compiletime, cs1, cs2, cs3, cs4, cs5, cs6, 
-     >     '(none)')
-
-      END IF
-
-      call mpi_finalize(ierr)
-      end
-
-
diff --git a/examples/smpi/NAS/LU/mpinpb.h b/examples/smpi/NAS/LU/mpinpb.h
deleted file mode 100644 (file)
index ddbf151..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'mpif.h'
-
-      integer           node, no_nodes, root, comm_setup, 
-     >                  comm_solve, comm_rhs, dp_type
-      common /mpistuff/ node, no_nodes, root, comm_setup, 
-     >                  comm_solve, comm_rhs, dp_type
-
diff --git a/examples/smpi/NAS/LU/neighbors.f b/examples/smpi/NAS/LU/neighbors.f
deleted file mode 100644 (file)
index ed8a312..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine neighbors ()
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c     figure out the neighbors and their wrap numbers for each processor
-c---------------------------------------------------------------------
-
-        south = -1
-        east  = -1
-        north = -1
-        west  = -1
-
-      if (row.gt.1) then
-              north = id -1
-      else
-              north = -1
-      end if
-
-      if (row.lt.xdim) then
-              south = id + 1
-      else
-              south = -1
-      end if
-
-      if (col.gt.1) then
-              west = id- xdim
-      else
-              west = -1
-      end if
-
-      if (col.lt.ydim) then
-              east = id + xdim
-      else 
-              east = -1
-      end if
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/nodedim.f b/examples/smpi/NAS/LU/nodedim.f
deleted file mode 100644 (file)
index f4def3a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      integer function nodedim(num)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c  compute the exponent where num = 2**nodedim
-c  NOTE: assumes a power-of-two number of nodes
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-c---------------------------------------------------------------------
-c  input parameters
-c---------------------------------------------------------------------
-      integer num
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      double precision fnum
-
-
-      fnum = dble(num)
-      nodedim = log(fnum)/log(2.0d+0) + 0.00001
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/pintgr.f b/examples/smpi/NAS/LU/pintgr.f
deleted file mode 100644 (file)
index de514cc..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine pintgr
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k
-      integer ibeg, ifin, ifin1
-      integer jbeg, jfin, jfin1
-      integer iglob, iglob1, iglob2
-      integer jglob, jglob1, jglob2
-      integer ind1, ind2
-      double precision  phi1(0:isiz2+1,0:isiz3+1),
-     >                  phi2(0:isiz2+1,0:isiz3+1)
-      double precision  frc1, frc2, frc3
-      double precision  dummy
-
-      integer IERROR
-
-
-c---------------------------------------------------------------------
-c   set up the sub-domains for integeration in each processor
-c---------------------------------------------------------------------
-      ibeg = nx + 1
-      ifin = 0
-      iglob1 = ipt + 1
-      iglob2 = ipt + nx
-      if (iglob1.ge.ii1.and.iglob2.lt.ii2+nx) ibeg = 1
-      if (iglob1.gt.ii1-nx.and.iglob2.le.ii2) ifin = nx
-      if (ii1.ge.iglob1.and.ii1.le.iglob2) ibeg = ii1 - ipt
-      if (ii2.ge.iglob1.and.ii2.le.iglob2) ifin = ii2 - ipt
-      jbeg = ny + 1
-      jfin = 0
-      jglob1 = jpt + 1
-      jglob2 = jpt + ny
-      if (jglob1.ge.ji1.and.jglob2.lt.ji2+ny) jbeg = 1
-      if (jglob1.gt.ji1-ny.and.jglob2.le.ji2) jfin = ny
-      if (ji1.ge.jglob1.and.ji1.le.jglob2) jbeg = ji1 - jpt
-      if (ji2.ge.jglob1.and.ji2.le.jglob2) jfin = ji2 - jpt
-      ifin1 = ifin
-      jfin1 = jfin
-      if (ipt + ifin1.eq.ii2) ifin1 = ifin -1
-      if (jpt + jfin1.eq.ji2) jfin1 = jfin -1
-
-c---------------------------------------------------------------------
-c   initialize
-c---------------------------------------------------------------------
-      do i = 0,isiz2+1
-        do k = 0,isiz3+1
-          phi1(i,k) = 0.
-          phi2(i,k) = 0.
-        end do
-      end do
-
-      do j = jbeg,jfin
-         jglob = jpt + j
-         do i = ibeg,ifin
-            iglob = ipt + i
-
-            k = ki1
-
-            phi1(i,j) = c2*(  u(5,i,j,k)
-     >           - 0.50d+00 * (  u(2,i,j,k) ** 2
-     >                         + u(3,i,j,k) ** 2
-     >                         + u(4,i,j,k) ** 2 )
-     >                        / u(1,i,j,k) )
-
-            k = ki2
-
-            phi2(i,j) = c2*(  u(5,i,j,k)
-     >           - 0.50d+00 * (  u(2,i,j,k) ** 2
-     >                         + u(3,i,j,k) ** 2
-     >                         + u(4,i,j,k) ** 2 )
-     >                        / u(1,i,j,k) )
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c  communicate in i and j directions
-c---------------------------------------------------------------------
-      call exchange_4(phi1,phi2,ibeg,ifin1,jbeg,jfin1)
-
-      frc1 = 0.0d+00
-
-      do j = jbeg,jfin1
-         do i = ibeg, ifin1
-            frc1 = frc1 + (  phi1(i,j)
-     >                     + phi1(i+1,j)
-     >                     + phi1(i,j+1)
-     >                     + phi1(i+1,j+1)
-     >                     + phi2(i,j)
-     >                     + phi2(i+1,j)
-     >                     + phi2(i,j+1)
-     >                     + phi2(i+1,j+1) )
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c  compute the global sum of individual contributions to frc1
-c---------------------------------------------------------------------
-      dummy = frc1
-      call MPI_ALLREDUCE( dummy,
-     >                    frc1,
-     >                    1,
-     >                    dp_type,
-     >                    MPI_SUM,
-     >                    MPI_COMM_WORLD,
-     >                    IERROR )
-
-      frc1 = dxi * deta * frc1
-
-c---------------------------------------------------------------------
-c   initialize
-c---------------------------------------------------------------------
-      do i = 0,isiz2+1
-        do k = 0,isiz3+1
-          phi1(i,k) = 0.
-          phi2(i,k) = 0.
-        end do
-      end do
-      jglob = jpt + jbeg
-      ind1 = 0
-      if (jglob.eq.ji1) then
-        ind1 = 1
-        do k = ki1, ki2
-           do i = ibeg, ifin
-              iglob = ipt + i
-              phi1(i,k) = c2*(  u(5,i,jbeg,k)
-     >             - 0.50d+00 * (  u(2,i,jbeg,k) ** 2
-     >                           + u(3,i,jbeg,k) ** 2
-     >                           + u(4,i,jbeg,k) ** 2 )
-     >                          / u(1,i,jbeg,k) )
-           end do
-        end do
-      end if
-
-      jglob = jpt + jfin
-      ind2 = 0
-      if (jglob.eq.ji2) then
-        ind2 = 1
-        do k = ki1, ki2
-           do i = ibeg, ifin
-              iglob = ipt + i
-              phi2(i,k) = c2*(  u(5,i,jfin,k)
-     >             - 0.50d+00 * (  u(2,i,jfin,k) ** 2
-     >                           + u(3,i,jfin,k) ** 2
-     >                           + u(4,i,jfin,k) ** 2 )
-     >                          / u(1,i,jfin,k) )
-           end do
-        end do
-      end if
-
-c---------------------------------------------------------------------
-c  communicate in i direction
-c---------------------------------------------------------------------
-      if (ind1.eq.1) then
-        call exchange_5(phi1,ibeg,ifin1)
-      end if
-      if (ind2.eq.1) then
-        call exchange_5 (phi2,ibeg,ifin1)
-      end if
-
-      frc2 = 0.0d+00
-      do k = ki1, ki2-1
-         do i = ibeg, ifin1
-            frc2 = frc2 + (  phi1(i,k)
-     >                     + phi1(i+1,k)
-     >                     + phi1(i,k+1)
-     >                     + phi1(i+1,k+1)
-     >                     + phi2(i,k)
-     >                     + phi2(i+1,k)
-     >                     + phi2(i,k+1)
-     >                     + phi2(i+1,k+1) )
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c  compute the global sum of individual contributions to frc2
-c---------------------------------------------------------------------
-      dummy = frc2
-      call MPI_ALLREDUCE( dummy,
-     >                    frc2,
-     >                    1,
-     >                    dp_type,
-     >                    MPI_SUM,
-     >                    MPI_COMM_WORLD,
-     >                    IERROR )
-
-      frc2 = dxi * dzeta * frc2
-
-c---------------------------------------------------------------------
-c   initialize
-c---------------------------------------------------------------------
-      do i = 0,isiz2+1
-        do k = 0,isiz3+1
-          phi1(i,k) = 0.
-          phi2(i,k) = 0.
-        end do
-      end do
-      iglob = ipt + ibeg
-      ind1 = 0
-      if (iglob.eq.ii1) then
-        ind1 = 1
-        do k = ki1, ki2
-           do j = jbeg, jfin
-              jglob = jpt + j
-              phi1(j,k) = c2*(  u(5,ibeg,j,k)
-     >             - 0.50d+00 * (  u(2,ibeg,j,k) ** 2
-     >                           + u(3,ibeg,j,k) ** 2
-     >                           + u(4,ibeg,j,k) ** 2 )
-     >                          / u(1,ibeg,j,k) )
-           end do
-        end do
-      end if
-
-      iglob = ipt + ifin
-      ind2 = 0
-      if (iglob.eq.ii2) then
-        ind2 = 1
-        do k = ki1, ki2
-           do j = jbeg, jfin
-              jglob = jpt + j
-              phi2(j,k) = c2*(  u(5,ifin,j,k)
-     >             - 0.50d+00 * (  u(2,ifin,j,k) ** 2
-     >                           + u(3,ifin,j,k) ** 2
-     >                           + u(4,ifin,j,k) ** 2 )
-     >                          / u(1,ifin,j,k) )
-           end do
-        end do
-      end if
-
-c---------------------------------------------------------------------
-c  communicate in j direction
-c---------------------------------------------------------------------
-      if (ind1.eq.1) then
-        call exchange_6(phi1,jbeg,jfin1)
-      end if
-      if (ind2.eq.1) then
-        call exchange_6(phi2,jbeg,jfin1)
-      end if
-
-      frc3 = 0.0d+00
-
-      do k = ki1, ki2-1
-         do j = jbeg, jfin1
-            frc3 = frc3 + (  phi1(j,k)
-     >                     + phi1(j+1,k)
-     >                     + phi1(j,k+1)
-     >                     + phi1(j+1,k+1)
-     >                     + phi2(j,k)
-     >                     + phi2(j+1,k)
-     >                     + phi2(j,k+1)
-     >                     + phi2(j+1,k+1) )
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c  compute the global sum of individual contributions to frc3
-c---------------------------------------------------------------------
-      dummy = frc3
-      call MPI_ALLREDUCE( dummy,
-     >                    frc3,
-     >                    1,
-     >                    dp_type,
-     >                    MPI_SUM,
-     >                    MPI_COMM_WORLD,
-     >                    IERROR )
-
-      frc3 = deta * dzeta * frc3
-      frc = 0.25d+00 * ( frc1 + frc2 + frc3 )
-c      if (id.eq.0) write (*,1001) frc
-
-      return
-
- 1001 format (//5x,'surface integral = ',1pe12.5//)
-
-      end
diff --git a/examples/smpi/NAS/LU/proc_grid.f b/examples/smpi/NAS/LU/proc_grid.f
deleted file mode 100644 (file)
index 40271c1..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine proc_grid
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   set up a two-d grid for processors: column-major ordering of unknowns
-c   NOTE: assumes a power-of-two number of processors
-c
-c---------------------------------------------------------------------
-
-      xdim   = 2**(ndim/2)
-      if (mod(ndim,2).eq.1) xdim = xdim + xdim
-      ydim   = num/xdim
-
-      row    = mod(id,xdim) + 1
-      col    = id/xdim + 1
-
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/read_input.f b/examples/smpi/NAS/LU/read_input.f
deleted file mode 100644 (file)
index b2e5ff1..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine read_input
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-      integer IERROR, fstatus, nnodes
-
-
-c---------------------------------------------------------------------
-c    only root reads the input file
-c    if input file does not exist, it uses defaults
-c       ipr = 1 for detailed progress output
-c       inorm = how often the norm is printed (once every inorm iterations)
-c       itmax = number of pseudo time steps
-c       dt = time step
-c       omega 1 over-relaxation factor for SSOR
-c       tolrsd = steady state residual tolerance levels
-c       nx, ny, nz = number of grid points in x, y, z directions
-c---------------------------------------------------------------------
-      ROOT = 0
-      if (id .eq. ROOT) then
-
-         write(*, 1000)
-
-         open (unit=3,file='inputlu.data',status='old',
-     >         access='sequential',form='formatted', iostat=fstatus)
-         if (fstatus .eq. 0) then
-
-            write(*, *) 'Reading from input file inputlu.data'
-
-            read (3,*)
-            read (3,*)
-            read (3,*) ipr, inorm
-            read (3,*)
-            read (3,*)
-            read (3,*) itmax
-            read (3,*)
-            read (3,*)
-            read (3,*) dt
-            read (3,*)
-            read (3,*)
-            read (3,*) omega
-            read (3,*)
-            read (3,*)
-            read (3,*) tolrsd(1),tolrsd(2),tolrsd(3),tolrsd(4),tolrsd(5)
-            read (3,*)
-            read (3,*)
-            read (3,*) nx0, ny0, nz0
-            close(3)
-         else
-            ipr = ipr_default
-            inorm = inorm_default
-            itmax = itmax_default
-            dt = dt_default
-            omega = omega_default
-            tolrsd(1) = tolrsd1_def
-            tolrsd(2) = tolrsd2_def
-            tolrsd(3) = tolrsd3_def
-            tolrsd(4) = tolrsd4_def
-            tolrsd(5) = tolrsd5_def
-            nx0 = isiz01
-            ny0 = isiz02
-            nz0 = isiz03
-         endif
-
-c---------------------------------------------------------------------
-c   check problem size
-c---------------------------------------------------------------------
-         call MPI_COMM_SIZE(MPI_COMM_WORLD, nnodes, ierror)
-         if (nnodes .ne. nnodes_compiled) then
-            write (*, 2000) nnodes, nnodes_compiled
- 2000       format (5x,'Warning: program is running on',i3,' processors'
-     >             /5x,'but was compiled for ', i3)
-         endif
-
-         if ( ( nx0 .lt. 4 ) .or.
-     >        ( ny0 .lt. 4 ) .or.
-     >        ( nz0 .lt. 4 ) ) then
-
-            write (*,2001)
- 2001       format (5x,'PROBLEM SIZE IS TOO SMALL - ',
-     >           /5x,'SET EACH OF NX, NY AND NZ AT LEAST EQUAL TO 5')
-            CALL MPI_ABORT( MPI_COMM_WORLD, MPI_ERR_OTHER, IERROR )
-
-         end if
-
-         if ( ( nx0 .gt. isiz01 ) .or.
-     >        ( ny0 .gt. isiz02 ) .or.
-     >        ( nz0 .gt. isiz03 ) ) then
-
-            write (*,2002)
- 2002       format (5x,'PROBLEM SIZE IS TOO LARGE - ',
-     >           /5x,'NX, NY AND NZ SHOULD BE LESS THAN OR EQUAL TO ',
-     >           /5x,'ISIZ01, ISIZ02 AND ISIZ03 RESPECTIVELY')
-            CALL MPI_ABORT( MPI_COMM_WORLD, MPI_ERR_OTHER, IERROR )
-
-         end if
-
-
-         write(*, 1001) nx0, ny0, nz0
-         write(*, 1002) itmax
-         write(*, 1003) nnodes
-
- 1000 format(//, ' NAS Parallel Benchmarks 3.3 -- LU Benchmark',/)
- 1001    format(' Size: ', i4, 'x', i4, 'x', i4)
- 1002    format(' Iterations: ', i4)
- 1003    format(' Number of processes: ', i5, /)
-         
-
-
-      end if
-
-      call bcast_inputs
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/rhs.f b/examples/smpi/NAS/LU/rhs.f
deleted file mode 100644 (file)
index 3da3911..0000000
+++ /dev/null
@@ -1,504 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine rhs
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   compute the right hand sides
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k, m
-      integer iex
-      integer L1, L2
-      integer ist1, iend1
-      integer jst1, jend1
-      double precision  q
-      double precision  u21, u31, u41
-      double precision  tmp
-      double precision  u21i, u31i, u41i, u51i
-      double precision  u21j, u31j, u41j, u51j
-      double precision  u21k, u31k, u41k, u51k
-      double precision  u21im1, u31im1, u41im1, u51im1
-      double precision  u21jm1, u31jm1, u41jm1, u51jm1
-      double precision  u21km1, u31km1, u41km1, u51km1
-
-
-
-      do k = 1, nz
-         do j = 1, ny
-            do i = 1, nx
-               do m = 1, 5
-                  rsd(m,i,j,k) = - frct(m,i,j,k)
-               end do
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   xi-direction flux differences
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   iex = flag : iex = 0  north/south communication
-c              : iex = 1  east/west communication
-c---------------------------------------------------------------------
-      iex   = 0
-
-c---------------------------------------------------------------------
-c   communicate and receive/send two rows of data
-c---------------------------------------------------------------------
-      call exchange_3(u,iex)
-
-      L1 = 0
-      if (north.eq.-1) L1 = 1
-      L2 = nx + 1
-      if (south.eq.-1) L2 = nx
-
-      ist1 = 1
-      iend1 = nx
-      if (north.eq.-1) ist1 = 4
-      if (south.eq.-1) iend1 = nx - 3
-
-      do k = 2, nz - 1
-         do j = jst, jend
-            do i = L1, L2
-               flux(1,i,j,k) = u(2,i,j,k)
-               u21 = u(2,i,j,k) / u(1,i,j,k)
-
-               q = 0.50d+00 * (  u(2,i,j,k) * u(2,i,j,k)
-     >                         + u(3,i,j,k) * u(3,i,j,k)
-     >                         + u(4,i,j,k) * u(4,i,j,k) )
-     >                      / u(1,i,j,k)
-
-               flux(2,i,j,k) = u(2,i,j,k) * u21 + c2 * 
-     >                        ( u(5,i,j,k) - q )
-               flux(3,i,j,k) = u(3,i,j,k) * u21
-               flux(4,i,j,k) = u(4,i,j,k) * u21
-               flux(5,i,j,k) = ( c1 * u(5,i,j,k) - c2 * q ) * u21
-            end do
-
-            do i = ist, iend
-               do m = 1, 5
-                  rsd(m,i,j,k) =  rsd(m,i,j,k)
-     >                 - tx2 * ( flux(m,i+1,j,k) - flux(m,i-1,j,k) )
-               end do
-            end do
-
-            do i = ist, L2
-               tmp = 1.0d+00 / u(1,i,j,k)
-
-               u21i = tmp * u(2,i,j,k)
-               u31i = tmp * u(3,i,j,k)
-               u41i = tmp * u(4,i,j,k)
-               u51i = tmp * u(5,i,j,k)
-
-               tmp = 1.0d+00 / u(1,i-1,j,k)
-
-               u21im1 = tmp * u(2,i-1,j,k)
-               u31im1 = tmp * u(3,i-1,j,k)
-               u41im1 = tmp * u(4,i-1,j,k)
-               u51im1 = tmp * u(5,i-1,j,k)
-
-               flux(2,i,j,k) = (4.0d+00/3.0d+00) * tx3 * (u21i-u21im1)
-               flux(3,i,j,k) = tx3 * ( u31i - u31im1 )
-               flux(4,i,j,k) = tx3 * ( u41i - u41im1 )
-               flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 )
-     >              * tx3 * ( ( u21i  **2 + u31i  **2 + u41i  **2 )
-     >                      - ( u21im1**2 + u31im1**2 + u41im1**2 ) )
-     >              + (1.0d+00/6.0d+00)
-     >              * tx3 * ( u21i**2 - u21im1**2 )
-     >              + c1 * c5 * tx3 * ( u51i - u51im1 )
-            end do
-
-            do i = ist, iend
-               rsd(1,i,j,k) = rsd(1,i,j,k)
-     >              + dx1 * tx1 * (            u(1,i-1,j,k)
-     >                             - 2.0d+00 * u(1,i,j,k)
-     >                             +           u(1,i+1,j,k) )
-               rsd(2,i,j,k) = rsd(2,i,j,k)
-     >          + tx3 * c3 * c4 * ( flux(2,i+1,j,k) - flux(2,i,j,k) )
-     >              + dx2 * tx1 * (            u(2,i-1,j,k)
-     >                             - 2.0d+00 * u(2,i,j,k)
-     >                             +           u(2,i+1,j,k) )
-               rsd(3,i,j,k) = rsd(3,i,j,k)
-     >          + tx3 * c3 * c4 * ( flux(3,i+1,j,k) - flux(3,i,j,k) )
-     >              + dx3 * tx1 * (            u(3,i-1,j,k)
-     >                             - 2.0d+00 * u(3,i,j,k)
-     >                             +           u(3,i+1,j,k) )
-               rsd(4,i,j,k) = rsd(4,i,j,k)
-     >          + tx3 * c3 * c4 * ( flux(4,i+1,j,k) - flux(4,i,j,k) )
-     >              + dx4 * tx1 * (            u(4,i-1,j,k)
-     >                             - 2.0d+00 * u(4,i,j,k)
-     >                             +           u(4,i+1,j,k) )
-               rsd(5,i,j,k) = rsd(5,i,j,k)
-     >          + tx3 * c3 * c4 * ( flux(5,i+1,j,k) - flux(5,i,j,k) )
-     >              + dx5 * tx1 * (            u(5,i-1,j,k)
-     >                             - 2.0d+00 * u(5,i,j,k)
-     >                             +           u(5,i+1,j,k) )
-            end do
-
-c---------------------------------------------------------------------
-c   Fourth-order dissipation
-c---------------------------------------------------------------------
-            IF (north.eq.-1) then
-             do m = 1, 5
-               rsd(m,2,j,k) = rsd(m,2,j,k)
-     >           - dssp * ( + 5.0d+00 * u(m,2,j,k)
-     >                      - 4.0d+00 * u(m,3,j,k)
-     >                      +           u(m,4,j,k) )
-               rsd(m,3,j,k) = rsd(m,3,j,k)
-     >           - dssp * ( - 4.0d+00 * u(m,2,j,k)
-     >                      + 6.0d+00 * u(m,3,j,k)
-     >                      - 4.0d+00 * u(m,4,j,k)
-     >                      +           u(m,5,j,k) )
-             end do
-            END IF
-
-            do i = ist1,iend1
-               do m = 1, 5
-                  rsd(m,i,j,k) = rsd(m,i,j,k)
-     >              - dssp * (            u(m,i-2,j,k)
-     >                        - 4.0d+00 * u(m,i-1,j,k)
-     >                        + 6.0d+00 * u(m,i,j,k)
-     >                        - 4.0d+00 * u(m,i+1,j,k)
-     >                        +           u(m,i+2,j,k) )
-               end do
-            end do
-
-            IF (south.eq.-1) then
-             do m = 1, 5
-               rsd(m,nx-2,j,k) = rsd(m,nx-2,j,k)
-     >           - dssp * (             u(m,nx-4,j,k)
-     >                      - 4.0d+00 * u(m,nx-3,j,k)
-     >                      + 6.0d+00 * u(m,nx-2,j,k)
-     >                      - 4.0d+00 * u(m,nx-1,j,k)  )
-               rsd(m,nx-1,j,k) = rsd(m,nx-1,j,k)
-     >           - dssp * (             u(m,nx-3,j,k)
-     >                      - 4.0d+00 * u(m,nx-2,j,k)
-     >                      + 5.0d+00 * u(m,nx-1,j,k) )
-             end do
-            END IF
-
-         end do
-      end do 
-
-c---------------------------------------------------------------------
-c   eta-direction flux differences
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   iex = flag : iex = 0  north/south communication
-c---------------------------------------------------------------------
-      iex   = 1
-
-c---------------------------------------------------------------------
-c   communicate and receive/send two rows of data
-c---------------------------------------------------------------------
-      call exchange_3(u,iex)
-
-      L1 = 0
-      if (west.eq.-1) L1 = 1
-      L2 = ny + 1
-      if (east.eq.-1) L2 = ny
-
-      jst1 = 1
-      jend1 = ny
-      if (west.eq.-1) jst1 = 4
-      if (east.eq.-1) jend1 = ny - 3
-
-      do k = 2, nz - 1
-         do j = L1, L2
-            do i = ist, iend
-               flux(1,i,j,k) = u(3,i,j,k)
-               u31 = u(3,i,j,k) / u(1,i,j,k)
-
-               q = 0.50d+00 * (  u(2,i,j,k) * u(2,i,j,k)
-     >                         + u(3,i,j,k) * u(3,i,j,k)
-     >                         + u(4,i,j,k) * u(4,i,j,k) )
-     >                      / u(1,i,j,k)
-
-               flux(2,i,j,k) = u(2,i,j,k) * u31 
-               flux(3,i,j,k) = u(3,i,j,k) * u31 + c2 * (u(5,i,j,k)-q)
-               flux(4,i,j,k) = u(4,i,j,k) * u31
-               flux(5,i,j,k) = ( c1 * u(5,i,j,k) - c2 * q ) * u31
-            end do
-         end do
-
-         do j = jst, jend
-            do i = ist, iend
-               do m = 1, 5
-                  rsd(m,i,j,k) =  rsd(m,i,j,k)
-     >                   - ty2 * ( flux(m,i,j+1,k) - flux(m,i,j-1,k) )
-               end do
-            end do
-         end do
-
-         do j = jst, L2
-            do i = ist, iend
-               tmp = 1.0d+00 / u(1,i,j,k)
-
-               u21j = tmp * u(2,i,j,k)
-               u31j = tmp * u(3,i,j,k)
-               u41j = tmp * u(4,i,j,k)
-               u51j = tmp * u(5,i,j,k)
-
-               tmp = 1.0d+00 / u(1,i,j-1,k)
-               u21jm1 = tmp * u(2,i,j-1,k)
-               u31jm1 = tmp * u(3,i,j-1,k)
-               u41jm1 = tmp * u(4,i,j-1,k)
-               u51jm1 = tmp * u(5,i,j-1,k)
-
-               flux(2,i,j,k) = ty3 * ( u21j - u21jm1 )
-               flux(3,i,j,k) = (4.0d+00/3.0d+00) * ty3 * (u31j-u31jm1)
-               flux(4,i,j,k) = ty3 * ( u41j - u41jm1 )
-               flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 )
-     >              * ty3 * ( ( u21j  **2 + u31j  **2 + u41j  **2 )
-     >                      - ( u21jm1**2 + u31jm1**2 + u41jm1**2 ) )
-     >              + (1.0d+00/6.0d+00)
-     >              * ty3 * ( u31j**2 - u31jm1**2 )
-     >              + c1 * c5 * ty3 * ( u51j - u51jm1 )
-            end do
-         end do
-
-         do j = jst, jend
-            do i = ist, iend
-
-               rsd(1,i,j,k) = rsd(1,i,j,k)
-     >              + dy1 * ty1 * (            u(1,i,j-1,k)
-     >                             - 2.0d+00 * u(1,i,j,k)
-     >                             +           u(1,i,j+1,k) )
-
-               rsd(2,i,j,k) = rsd(2,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(2,i,j+1,k) - flux(2,i,j,k) )
-     >              + dy2 * ty1 * (            u(2,i,j-1,k)
-     >                             - 2.0d+00 * u(2,i,j,k)
-     >                             +           u(2,i,j+1,k) )
-
-               rsd(3,i,j,k) = rsd(3,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(3,i,j+1,k) - flux(3,i,j,k) )
-     >              + dy3 * ty1 * (            u(3,i,j-1,k)
-     >                             - 2.0d+00 * u(3,i,j,k)
-     >                             +           u(3,i,j+1,k) )
-
-               rsd(4,i,j,k) = rsd(4,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(4,i,j+1,k) - flux(4,i,j,k) )
-     >              + dy4 * ty1 * (            u(4,i,j-1,k)
-     >                             - 2.0d+00 * u(4,i,j,k)
-     >                             +           u(4,i,j+1,k) )
-
-               rsd(5,i,j,k) = rsd(5,i,j,k)
-     >          + ty3 * c3 * c4 * ( flux(5,i,j+1,k) - flux(5,i,j,k) )
-     >              + dy5 * ty1 * (            u(5,i,j-1,k)
-     >                             - 2.0d+00 * u(5,i,j,k)
-     >                             +           u(5,i,j+1,k) )
-
-            end do
-         end do
-
-c---------------------------------------------------------------------
-c   fourth-order dissipation
-c---------------------------------------------------------------------
-         IF (west.eq.-1) then
-            do i = ist, iend
-             do m = 1, 5
-               rsd(m,i,2,k) = rsd(m,i,2,k)
-     >           - dssp * ( + 5.0d+00 * u(m,i,2,k)
-     >                      - 4.0d+00 * u(m,i,3,k)
-     >                      +           u(m,i,4,k) )
-               rsd(m,i,3,k) = rsd(m,i,3,k)
-     >           - dssp * ( - 4.0d+00 * u(m,i,2,k)
-     >                      + 6.0d+00 * u(m,i,3,k)
-     >                      - 4.0d+00 * u(m,i,4,k)
-     >                      +           u(m,i,5,k) )
-             end do
-            end do
-         END IF
-
-         do j = jst1, jend1
-            do i = ist, iend
-               do m = 1, 5
-                  rsd(m,i,j,k) = rsd(m,i,j,k)
-     >              - dssp * (            u(m,i,j-2,k)
-     >                        - 4.0d+00 * u(m,i,j-1,k)
-     >                        + 6.0d+00 * u(m,i,j,k)
-     >                        - 4.0d+00 * u(m,i,j+1,k)
-     >                        +           u(m,i,j+2,k) )
-               end do
-            end do
-         end do
-
-         IF (east.eq.-1) then
-            do i = ist, iend
-             do m = 1, 5
-               rsd(m,i,ny-2,k) = rsd(m,i,ny-2,k)
-     >           - dssp * (             u(m,i,ny-4,k)
-     >                      - 4.0d+00 * u(m,i,ny-3,k)
-     >                      + 6.0d+00 * u(m,i,ny-2,k)
-     >                      - 4.0d+00 * u(m,i,ny-1,k)  )
-               rsd(m,i,ny-1,k) = rsd(m,i,ny-1,k)
-     >           - dssp * (             u(m,i,ny-3,k)
-     >                      - 4.0d+00 * u(m,i,ny-2,k)
-     >                      + 5.0d+00 * u(m,i,ny-1,k) )
-             end do
-            end do
-         END IF
-
-      end do
-
-c---------------------------------------------------------------------
-c   zeta-direction flux differences
-c---------------------------------------------------------------------
-      do k = 1, nz
-         do j = jst, jend
-            do i = ist, iend
-               flux(1,i,j,k) = u(4,i,j,k)
-               u41 = u(4,i,j,k) / u(1,i,j,k)
-
-               q = 0.50d+00 * (  u(2,i,j,k) * u(2,i,j,k)
-     >                         + u(3,i,j,k) * u(3,i,j,k)
-     >                         + u(4,i,j,k) * u(4,i,j,k) )
-     >                      / u(1,i,j,k)
-
-               flux(2,i,j,k) = u(2,i,j,k) * u41 
-               flux(3,i,j,k) = u(3,i,j,k) * u41 
-               flux(4,i,j,k) = u(4,i,j,k) * u41 + c2 * (u(5,i,j,k)-q)
-               flux(5,i,j,k) = ( c1 * u(5,i,j,k) - c2 * q ) * u41
-            end do
-         end do
-      end do
-
-      do k = 2, nz - 1
-         do j = jst, jend
-            do i = ist, iend
-               do m = 1, 5
-                  rsd(m,i,j,k) =  rsd(m,i,j,k)
-     >                - tz2 * ( flux(m,i,j,k+1) - flux(m,i,j,k-1) )
-               end do
-            end do
-         end do
-      end do
-
-      do k = 2, nz
-         do j = jst, jend
-            do i = ist, iend
-               tmp = 1.0d+00 / u(1,i,j,k)
-
-               u21k = tmp * u(2,i,j,k)
-               u31k = tmp * u(3,i,j,k)
-               u41k = tmp * u(4,i,j,k)
-               u51k = tmp * u(5,i,j,k)
-
-               tmp = 1.0d+00 / u(1,i,j,k-1)
-
-               u21km1 = tmp * u(2,i,j,k-1)
-               u31km1 = tmp * u(3,i,j,k-1)
-               u41km1 = tmp * u(4,i,j,k-1)
-               u51km1 = tmp * u(5,i,j,k-1)
-
-               flux(2,i,j,k) = tz3 * ( u21k - u21km1 )
-               flux(3,i,j,k) = tz3 * ( u31k - u31km1 )
-               flux(4,i,j,k) = (4.0d+00/3.0d+00) * tz3 * (u41k-u41km1)
-               flux(5,i,j,k) = 0.50d+00 * ( 1.0d+00 - c1*c5 )
-     >              * tz3 * ( ( u21k  **2 + u31k  **2 + u41k  **2 )
-     >                      - ( u21km1**2 + u31km1**2 + u41km1**2 ) )
-     >              + (1.0d+00/6.0d+00)
-     >              * tz3 * ( u41k**2 - u41km1**2 )
-     >              + c1 * c5 * tz3 * ( u51k - u51km1 )
-            end do
-         end do
-      end do
-
-      do k = 2, nz - 1
-         do j = jst, jend
-            do i = ist, iend
-               rsd(1,i,j,k) = rsd(1,i,j,k)
-     >              + dz1 * tz1 * (            u(1,i,j,k-1)
-     >                             - 2.0d+00 * u(1,i,j,k)
-     >                             +           u(1,i,j,k+1) )
-               rsd(2,i,j,k) = rsd(2,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(2,i,j,k+1) - flux(2,i,j,k) )
-     >              + dz2 * tz1 * (            u(2,i,j,k-1)
-     >                             - 2.0d+00 * u(2,i,j,k)
-     >                             +           u(2,i,j,k+1) )
-               rsd(3,i,j,k) = rsd(3,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(3,i,j,k+1) - flux(3,i,j,k) )
-     >              + dz3 * tz1 * (            u(3,i,j,k-1)
-     >                             - 2.0d+00 * u(3,i,j,k)
-     >                             +           u(3,i,j,k+1) )
-               rsd(4,i,j,k) = rsd(4,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(4,i,j,k+1) - flux(4,i,j,k) )
-     >              + dz4 * tz1 * (            u(4,i,j,k-1)
-     >                             - 2.0d+00 * u(4,i,j,k)
-     >                             +           u(4,i,j,k+1) )
-               rsd(5,i,j,k) = rsd(5,i,j,k)
-     >          + tz3 * c3 * c4 * ( flux(5,i,j,k+1) - flux(5,i,j,k) )
-     >              + dz5 * tz1 * (            u(5,i,j,k-1)
-     >                             - 2.0d+00 * u(5,i,j,k)
-     >                             +           u(5,i,j,k+1) )
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   fourth-order dissipation
-c---------------------------------------------------------------------
-      do j = jst, jend
-         do i = ist, iend
-            do m = 1, 5
-               rsd(m,i,j,2) = rsd(m,i,j,2)
-     >           - dssp * ( + 5.0d+00 * u(m,i,j,2)
-     >                      - 4.0d+00 * u(m,i,j,3)
-     >                      +           u(m,i,j,4) )
-               rsd(m,i,j,3) = rsd(m,i,j,3)
-     >           - dssp * ( - 4.0d+00 * u(m,i,j,2)
-     >                      + 6.0d+00 * u(m,i,j,3)
-     >                      - 4.0d+00 * u(m,i,j,4)
-     >                      +           u(m,i,j,5) )
-            end do
-         end do
-      end do
-
-      do k = 4, nz - 3
-         do j = jst, jend
-            do i = ist, iend
-               do m = 1, 5
-                  rsd(m,i,j,k) = rsd(m,i,j,k)
-     >              - dssp * (            u(m,i,j,k-2)
-     >                        - 4.0d+00 * u(m,i,j,k-1)
-     >                        + 6.0d+00 * u(m,i,j,k)
-     >                        - 4.0d+00 * u(m,i,j,k+1)
-     >                        +           u(m,i,j,k+2) )
-               end do
-            end do
-         end do
-      end do
-
-      do j = jst, jend
-         do i = ist, iend
-            do m = 1, 5
-               rsd(m,i,j,nz-2) = rsd(m,i,j,nz-2)
-     >           - dssp * (             u(m,i,j,nz-4)
-     >                      - 4.0d+00 * u(m,i,j,nz-3)
-     >                      + 6.0d+00 * u(m,i,j,nz-2)
-     >                      - 4.0d+00 * u(m,i,j,nz-1)  )
-               rsd(m,i,j,nz-1) = rsd(m,i,j,nz-1)
-     >           - dssp * (             u(m,i,j,nz-3)
-     >                      - 4.0d+00 * u(m,i,j,nz-2)
-     >                      + 5.0d+00 * u(m,i,j,nz-1) )
-            end do
-         end do
-      end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/setbv.f b/examples/smpi/NAS/LU/setbv.f
deleted file mode 100644 (file)
index 56b0edf..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setbv
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   set the boundary values of dependent variables
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c   local variables
-c---------------------------------------------------------------------
-      integer i, j, k
-      integer iglob, jglob
-
-c---------------------------------------------------------------------
-c   set the dependent variable values along the top and bottom faces
-c---------------------------------------------------------------------
-      do j = 1, ny
-         jglob = jpt + j
-         do i = 1, nx
-           iglob = ipt + i
-            call exact( iglob, jglob, 1, u( 1, i, j, 1 ) )
-            call exact( iglob, jglob, nz, u( 1, i, j, nz ) )
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c   set the dependent variable values along north and south faces
-c---------------------------------------------------------------------
-      IF (west.eq.-1) then
-         do k = 1, nz
-            do i = 1, nx
-               iglob = ipt + i
-               call exact( iglob, 1, k, u( 1, i, 1, k ) )
-            end do
-         end do
-      END IF
-
-      IF (east.eq.-1) then
-          do k = 1, nz
-             do i = 1, nx
-                iglob = ipt + i
-                call exact( iglob, ny0, k, u( 1, i, ny, k ) )
-             end do
-          end do
-      END IF
-
-c---------------------------------------------------------------------
-c   set the dependent variable values along east and west faces
-c---------------------------------------------------------------------
-      IF (north.eq.-1) then
-         do k = 1, nz
-            do j = 1, ny
-               jglob = jpt + j
-               call exact( 1, jglob, k, u( 1, 1, j, k ) )
-            end do
-         end do
-      END IF
-
-      IF (south.eq.-1) then
-         do k = 1, nz
-            do j = 1, ny
-                  jglob = jpt + j
-            call exact( nx0, jglob, k, u( 1, nx, j, k ) )
-            end do
-         end do
-      END IF
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/setcoeff.f b/examples/smpi/NAS/LU/setcoeff.f
deleted file mode 100644 (file)
index 8fc5c18..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setcoeff
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-
-
-c---------------------------------------------------------------------
-c   set up coefficients
-c---------------------------------------------------------------------
-      dxi = 1.0d+00 / ( nx0 - 1 )
-      deta = 1.0d+00 / ( ny0 - 1 )
-      dzeta = 1.0d+00 / ( nz0 - 1 )
-
-      tx1 = 1.0d+00 / ( dxi * dxi )
-      tx2 = 1.0d+00 / ( 2.0d+00 * dxi )
-      tx3 = 1.0d+00 / dxi
-
-      ty1 = 1.0d+00 / ( deta * deta )
-      ty2 = 1.0d+00 / ( 2.0d+00 * deta )
-      ty3 = 1.0d+00 / deta
-
-      tz1 = 1.0d+00 / ( dzeta * dzeta )
-      tz2 = 1.0d+00 / ( 2.0d+00 * dzeta )
-      tz3 = 1.0d+00 / dzeta
-
-      ii1 = 2
-      ii2 = nx0 - 1
-      ji1 = 2
-      ji2 = ny0 - 2
-      ki1 = 3
-      ki2 = nz0 - 1
-
-c---------------------------------------------------------------------
-c   diffusion coefficients
-c---------------------------------------------------------------------
-      dx1 = 0.75d+00
-      dx2 = dx1
-      dx3 = dx1
-      dx4 = dx1
-      dx5 = dx1
-
-      dy1 = 0.75d+00
-      dy2 = dy1
-      dy3 = dy1
-      dy4 = dy1
-      dy5 = dy1
-
-      dz1 = 1.00d+00
-      dz2 = dz1
-      dz3 = dz1
-      dz4 = dz1
-      dz5 = dz1
-
-c---------------------------------------------------------------------
-c   fourth difference dissipation
-c---------------------------------------------------------------------
-      dssp = ( max (dx1, dy1, dz1 ) ) / 4.0d+00
-
-c---------------------------------------------------------------------
-c   coefficients of the exact solution to the first pde
-c---------------------------------------------------------------------
-      ce(1,1) = 2.0d+00
-      ce(1,2) = 0.0d+00
-      ce(1,3) = 0.0d+00
-      ce(1,4) = 4.0d+00
-      ce(1,5) = 5.0d+00
-      ce(1,6) = 3.0d+00
-      ce(1,7) = 5.0d-01
-      ce(1,8) = 2.0d-02
-      ce(1,9) = 1.0d-02
-      ce(1,10) = 3.0d-02
-      ce(1,11) = 5.0d-01
-      ce(1,12) = 4.0d-01
-      ce(1,13) = 3.0d-01
-
-c---------------------------------------------------------------------
-c   coefficients of the exact solution to the second pde
-c---------------------------------------------------------------------
-      ce(2,1) = 1.0d+00
-      ce(2,2) = 0.0d+00
-      ce(2,3) = 0.0d+00
-      ce(2,4) = 0.0d+00
-      ce(2,5) = 1.0d+00
-      ce(2,6) = 2.0d+00
-      ce(2,7) = 3.0d+00
-      ce(2,8) = 1.0d-02
-      ce(2,9) = 3.0d-02
-      ce(2,10) = 2.0d-02
-      ce(2,11) = 4.0d-01
-      ce(2,12) = 3.0d-01
-      ce(2,13) = 5.0d-01
-
-c---------------------------------------------------------------------
-c   coefficients of the exact solution to the third pde
-c---------------------------------------------------------------------
-      ce(3,1) = 2.0d+00
-      ce(3,2) = 2.0d+00
-      ce(3,3) = 0.0d+00
-      ce(3,4) = 0.0d+00
-      ce(3,5) = 0.0d+00
-      ce(3,6) = 2.0d+00
-      ce(3,7) = 3.0d+00
-      ce(3,8) = 4.0d-02
-      ce(3,9) = 3.0d-02
-      ce(3,10) = 5.0d-02
-      ce(3,11) = 3.0d-01
-      ce(3,12) = 5.0d-01
-      ce(3,13) = 4.0d-01
-
-c---------------------------------------------------------------------
-c   coefficients of the exact solution to the fourth pde
-c---------------------------------------------------------------------
-      ce(4,1) = 2.0d+00
-      ce(4,2) = 2.0d+00
-      ce(4,3) = 0.0d+00
-      ce(4,4) = 0.0d+00
-      ce(4,5) = 0.0d+00
-      ce(4,6) = 2.0d+00
-      ce(4,7) = 3.0d+00
-      ce(4,8) = 3.0d-02
-      ce(4,9) = 5.0d-02
-      ce(4,10) = 4.0d-02
-      ce(4,11) = 2.0d-01
-      ce(4,12) = 1.0d-01
-      ce(4,13) = 3.0d-01
-
-c---------------------------------------------------------------------
-c   coefficients of the exact solution to the fifth pde
-c---------------------------------------------------------------------
-      ce(5,1) = 5.0d+00
-      ce(5,2) = 4.0d+00
-      ce(5,3) = 3.0d+00
-      ce(5,4) = 2.0d+00
-      ce(5,5) = 1.0d-01
-      ce(5,6) = 4.0d-01
-      ce(5,7) = 3.0d-01
-      ce(5,8) = 5.0d-02
-      ce(5,9) = 4.0d-02
-      ce(5,10) = 3.0d-02
-      ce(5,11) = 1.0d-01
-      ce(5,12) = 3.0d-01
-      ce(5,13) = 2.0d-01
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/sethyper.f b/examples/smpi/NAS/LU/sethyper.f
deleted file mode 100644 (file)
index 15245d4..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine sethyper
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c    for each column in a hyperplane, istart = first row,
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j
-      integer iglob, jglob
-      integer kp
-
-c---------------------------------------------------------------------
-c compute the pointers for hyperplanes
-c---------------------------------------------------------------------
-        do kp = 2,nx0+ny0
-          icomms(kp) = .false.
-          icommn(kp) = .false.
-          icomme(kp) = .false.
-          icommw(kp) = .false.
-
-c---------------------------------------------------------------------
-c  check to see if comm. to south is required
-c---------------------------------------------------------------------
-          if (south.ne.-1) then
-            i     = iend
-            iglob = ipt + i
-            jglob = kp - iglob
-            j     = jglob - jpt
-            if (jglob.ge.2.and.jglob.le.ny0-1.and.j.ge.jst.and.
-     >         j.le.jend) icomms(kp) = .true.
-          end if
-
-c---------------------------------------------------------------------
-c  check to see if comm. to north is required
-c---------------------------------------------------------------------
-          if (north.ne.-1) then
-            i     = ist
-            iglob = ipt + i
-            jglob = kp - iglob
-            j     = jglob - jpt
-            if (jglob.ge.2.and.jglob.le.ny0-1.and.j.ge.jst.and.
-     >         j.le.jend) icommn(kp) = .true.
-          end if
-
-c---------------------------------------------------------------------
-c  check to see if comm. to east is required
-c---------------------------------------------------------------------
-          if (east.ne.-1) then
-            j     = jend
-            jglob = jpt + j
-            iglob = kp - jglob
-            i     = iglob - ipt
-            if (iglob.ge.2.and.iglob.le.nx0-1.and.i.ge.ist.and.
-     >         i.le.iend) icomme(kp) = .true.
-          end if
-
-c---------------------------------------------------------------------
-c  check to see if comm. to west is required
-c---------------------------------------------------------------------
-          if (west.ne.-1) then
-            j = jst
-            jglob = jpt + j
-            iglob = kp - jglob
-            i     = iglob - ipt
-            if (iglob.ge.2.and.iglob.le.nx0-1.and.i.ge.ist.and.
-     >         i.le.iend) icommw(kp) = .true.
-          end if
-
-        end do
-
-        icomms(1) = .false.
-        icommn(1) = .false.
-        icomme(1) = .false.
-        icommw(1) = .false.
-        icomms(nx0+ny0+1) = .false.
-        icommn(nx0+ny0+1) = .false.
-        icomme(nx0+ny0+1) = .false.
-        icommw(nx0+ny0+1) = .false.
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/setiv.f b/examples/smpi/NAS/LU/setiv.f
deleted file mode 100644 (file)
index 73725cb..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-      subroutine setiv
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c
-c   set the initial values of independent variables based on tri-linear
-c   interpolation of boundary values in the computational space.
-c
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k, m
-      integer iglob, jglob
-      double precision  xi, eta, zeta
-      double precision  pxi, peta, pzeta
-      double precision  ue_1jk(5),ue_nx0jk(5),ue_i1k(5),
-     >        ue_iny0k(5),ue_ij1(5),ue_ijnz(5)
-
-
-      do k = 2, nz - 1
-         zeta = ( dble (k-1) ) / (nz-1)
-         do j = 1, ny
-          jglob = jpt + j
-          IF (jglob.ne.1.and.jglob.ne.ny0) then
-            eta = ( dble (jglob-1) ) / (ny0-1)
-            do i = 1, nx
-              iglob = ipt + i
-              IF (iglob.ne.1.and.iglob.ne.nx0) then
-               xi = ( dble (iglob-1) ) / (nx0-1)
-               call exact (1,jglob,k,ue_1jk)
-               call exact (nx0,jglob,k,ue_nx0jk)
-               call exact (iglob,1,k,ue_i1k)
-               call exact (iglob,ny0,k,ue_iny0k)
-               call exact (iglob,jglob,1,ue_ij1)
-               call exact (iglob,jglob,nz,ue_ijnz)
-               do m = 1, 5
-                  pxi =   ( 1.0d+00 - xi ) * ue_1jk(m)
-     >                              + xi   * ue_nx0jk(m)
-                  peta =  ( 1.0d+00 - eta ) * ue_i1k(m)
-     >                              + eta   * ue_iny0k(m)
-                  pzeta = ( 1.0d+00 - zeta ) * ue_ij1(m)
-     >                              + zeta   * ue_ijnz(m)
-
-                  u( m, i, j, k ) = pxi + peta + pzeta
-     >                 - pxi * peta - peta * pzeta - pzeta * pxi
-     >                 + pxi * peta * pzeta
-
-               end do
-              END IF
-            end do
-          END IF
-         end do
-      end do
-
-      return
-      end
diff --git a/examples/smpi/NAS/LU/ssor.f b/examples/smpi/NAS/LU/ssor.f
deleted file mode 100644 (file)
index cf4eed0..0000000
+++ /dev/null
@@ -1,241 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine ssor(niter)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   to perform pseudo-time stepping SSOR iterations
-c   for five nonlinear pde's.
-c---------------------------------------------------------------------
-
-      implicit none
-      integer  niter
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer i, j, k, m
-      integer istep
-      double precision  tmp
-      double precision  delunm(5), tv(5,isiz1,isiz2)
-
-      external timer_read
-      double precision wtime, timer_read
-
-      integer IERROR
-
-      ROOT = 0
-c---------------------------------------------------------------------
-c   begin pseudo-time stepping iterations
-c---------------------------------------------------------------------
-      tmp = 1.0d+00 / ( omega * ( 2.0d+00 - omega ) ) 
-
-c---------------------------------------------------------------------
-c   initialize a,b,c,d to zero (guarantees that page tables have been
-c   formed, if applicable on given architecture, before timestepping).
-c---------------------------------------------------------------------
-      do m=1,isiz2
-         do k=1,isiz1
-            do j=1,5
-               do i=1,5
-                  a(i,j,k,m) = 0.d0
-                  b(i,j,k,m) = 0.d0
-                  c(i,j,k,m) = 0.d0
-                  d(i,j,k,m) = 0.d0
-               enddo
-            enddo
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c   compute the steady-state residuals
-c---------------------------------------------------------------------
-      call rhs
-c---------------------------------------------------------------------
-c   compute the L2 norms of newton iteration residuals
-c---------------------------------------------------------------------
-      call l2norm( isiz1, isiz2, isiz3, nx0, ny0, nz0,
-     >             ist, iend, jst, jend,
-     >             rsd, rsdnm )
-  
-      call MPI_BARRIER( MPI_COMM_WORLD, IERROR )
-      call timer_clear(1)
-      call timer_start(1)
-
-c---------------------------------------------------------------------
-c   the timestep loop
-c---------------------------------------------------------------------
-      do istep = 1, niter
-
-         if (id .eq. 0) then
-            if (mod ( istep, 20) .eq. 0 .or.
-     >            istep .eq. itmax .or.
-     >            istep .eq. 1) then
-               if (niter .gt. 1) write( *, 200) istep
- 200           format(' Time step ', i4)
-            endif
-         endif
-c---------------------------------------------------------------------
-c   perform SSOR iteration
-c---------------------------------------------------------------------
-         do k = 2, nz - 1
-            do j = jst, jend
-               do i = ist, iend
-                  do m = 1, 5
-                     rsd(m,i,j,k) = dt * rsd(m,i,j,k)
-                  end do
-               end do
-            end do
-         end do
-         DO k = 2, nz -1 
-c---------------------------------------------------------------------
-c   form the lower triangular part of the jacobian matrix
-c---------------------------------------------------------------------
-            call jacld(k)
-c---------------------------------------------------------------------
-c   perform the lower triangular solution
-c---------------------------------------------------------------------
-            call blts( isiz1, isiz2, isiz3,
-     >                 nx, ny, nz, k,
-     >                 omega,
-     >                 rsd,
-     >                 a, b, c, d,
-     >                 ist, iend, jst, jend, 
-     >                 nx0, ny0, ipt, jpt)
-          END DO
-          DO k = nz - 1, 2, -1
-c---------------------------------------------------------------------
-c   form the strictly upper triangular part of the jacobian matrix
-c---------------------------------------------------------------------
-            call jacu(k)
-
-c---------------------------------------------------------------------
-c   perform the upper triangular solution
-c---------------------------------------------------------------------
-            call buts( isiz1, isiz2, isiz3,
-     >                 nx, ny, nz, k,
-     >                 omega,
-     >                 rsd, tv,
-     >                 d, a, b, c,
-     >                 ist, iend, jst, jend,
-     >                 nx0, ny0, ipt, jpt)
-          END DO
-c---------------------------------------------------------------------
-c   update the variables
-c---------------------------------------------------------------------
-         do k = 2, nz-1
-            do j = jst, jend
-               do i = ist, iend
-                  do m = 1, 5
-                     u( m, i, j, k ) = u( m, i, j, k )
-     >                    + tmp * rsd( m, i, j, k )
-                  end do
-               end do
-            end do
-         end do
-c---------------------------------------------------------------------
-c   compute the max-norms of newton iteration corrections
-c---------------------------------------------------------------------
-         if ( mod ( istep, inorm ) .eq. 0 ) then
-            call l2norm( isiz1, isiz2, isiz3, nx0, ny0, nz0,
-     >                   ist, iend, jst, jend,
-     >                   rsd, delunm )
-c            if ( ipr .eq. 1 .and. id .eq. 0 ) then
-c                write (*,1006) ( delunm(m), m = 1, 5 )
-c            else if ( ipr .eq. 2 .and. id .eq. 0 ) then
-c                write (*,'(i5,f15.6)') istep,delunm(5)
-c            end if
-         end if
-c---------------------------------------------------------------------
-c   compute the steady-state residuals
-c---------------------------------------------------------------------
-         call rhs
-c---------------------------------------------------------------------
-c   compute the max-norms of newton iteration residuals
-c---------------------------------------------------------------------
-         if ( ( mod ( istep, inorm ) .eq. 0 ) .or.
-     >        ( istep .eq. itmax ) ) then
-            call l2norm( isiz1, isiz2, isiz3, nx0, ny0, nz0,
-     >                   ist, iend, jst, jend,
-     >                   rsd, rsdnm )
-c            if ( ipr .eq. 1.and.id.eq.0 ) then
-c                write (*,1007) ( rsdnm(m), m = 1, 5 )
-c            end if
-         end if
-
-c---------------------------------------------------------------------
-c   check the newton-iteration residuals against the tolerance levels
-c---------------------------------------------------------------------
-         if ( ( rsdnm(1) .lt. tolrsd(1) ) .and.
-     >        ( rsdnm(2) .lt. tolrsd(2) ) .and.
-     >        ( rsdnm(3) .lt. tolrsd(3) ) .and.
-     >        ( rsdnm(4) .lt. tolrsd(4) ) .and.
-     >        ( rsdnm(5) .lt. tolrsd(5) ) ) then
-c            if (ipr .eq. 1 .and. id.eq.0) then
-c               write (*,1004) istep
-c            end if
-            return
-         end if
-      end do
-      call timer_stop(1)
-      wtime = timer_read(1)
-
-      call MPI_ALLREDUCE( wtime, 
-     >                    maxtime, 
-     >                    1, 
-     >                    MPI_DOUBLE_PRECISION, 
-     >                    MPI_MAX, 
-     >                    MPI_COMM_WORLD,
-     >                    IERROR )
-
-
-      return
-      
- 1001 format (1x/5x,'pseudo-time SSOR iteration no.=',i4/)
- 1004 format (1x/1x,'convergence was achieved after ',i4,
-     >   ' pseudo-time steps' )
- 1006 format (1x/1x,'RMS-norm of SSOR-iteration correction ',
-     > 'for first pde  = ',1pe12.5/,
-     > 1x,'RMS-norm of SSOR-iteration correction ',
-     > 'for second pde = ',1pe12.5/,
-     > 1x,'RMS-norm of SSOR-iteration correction ',
-     > 'for third pde  = ',1pe12.5/,
-     > 1x,'RMS-norm of SSOR-iteration correction ',
-     > 'for fourth pde = ',1pe12.5/,
-     > 1x,'RMS-norm of SSOR-iteration correction ',
-     > 'for fifth pde  = ',1pe12.5)
- 1007 format (1x/1x,'RMS-norm of steady-state residual for ',
-     > 'first pde  = ',1pe12.5/,
-     > 1x,'RMS-norm of steady-state residual for ',
-     > 'second pde = ',1pe12.5/,
-     > 1x,'RMS-norm of steady-state residual for ',
-     > 'third pde  = ',1pe12.5/,
-     > 1x,'RMS-norm of steady-state residual for ',
-     > 'fourth pde = ',1pe12.5/,
-     > 1x,'RMS-norm of steady-state residual for ',
-     > 'fifth pde  = ',1pe12.5)
-      end
diff --git a/examples/smpi/NAS/LU/subdomain.f b/examples/smpi/NAS/LU/subdomain.f
deleted file mode 100644 (file)
index 388bbf4..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine subdomain
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'applu.incl'
-
-c---------------------------------------------------------------------
-c  local variables
-c---------------------------------------------------------------------
-      integer mm, ierror, errorcode
-
-
-c---------------------------------------------------------------------
-c
-c   set up the sub-domain sizes
-c
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   x dimension
-c---------------------------------------------------------------------
-      mm   = mod(nx0,xdim)
-      if (row.le.mm) then
-        nx = nx0/xdim + 1
-        ipt = (row-1)*nx
-      else
-        nx = nx0/xdim
-        ipt = (row-1)*nx + mm
-      end if
-
-c---------------------------------------------------------------------
-c   y dimension
-c---------------------------------------------------------------------
-      mm   = mod(ny0,ydim)
-      if (col.le.mm) then
-        ny = ny0/ydim + 1
-        jpt = (col-1)*ny
-      else
-        ny = ny0/ydim
-        jpt = (col-1)*ny + mm
-      end if
-
-c---------------------------------------------------------------------
-c   z dimension
-c---------------------------------------------------------------------
-      nz = nz0
-
-c---------------------------------------------------------------------
-c   check the sub-domain size
-c---------------------------------------------------------------------
-      if ( ( nx .lt. 4 ) .or.
-     >     ( ny .lt. 4 ) .or.
-     >     ( nz .lt. 4 ) ) then
-         write (*,2001) nx, ny, nz
- 2001    format (5x,'SUBDOMAIN SIZE IS TOO SMALL - ',
-     >        /5x,'ADJUST PROBLEM SIZE OR NUMBER OF PROCESSORS',
-     >        /5x,'SO THAT NX, NY AND NZ ARE GREATER THAN OR EQUAL',
-     >        /5x,'TO 4 THEY ARE CURRENTLY', 3I3)
-          CALL MPI_ABORT( MPI_COMM_WORLD,
-     >                    ERRORCODE,
-     >                    IERROR )
-      end if
-
-      if ( ( nx .gt. isiz1 ) .or.
-     >     ( ny .gt. isiz2 ) .or.
-     >     ( nz .gt. isiz3 ) ) then
-         write (*,2002) nx, ny, nz
- 2002    format (5x,'SUBDOMAIN SIZE IS TOO LARGE - ',
-     >        /5x,'ADJUST PROBLEM SIZE OR NUMBER OF PROCESSORS',
-     >        /5x,'SO THAT NX, NY AND NZ ARE LESS THAN OR EQUAL TO ',
-     >        /5x,'ISIZ1, ISIZ2 AND ISIZ3 RESPECTIVELY.  THEY ARE',
-     >        /5x,'CURRENTLY', 3I4)
-          CALL MPI_ABORT( MPI_COMM_WORLD,
-     >                    ERRORCODE,
-     >                    IERROR )
-      end if
-
-
-c---------------------------------------------------------------------
-c   set up the start and end in i and j extents for all processors
-c---------------------------------------------------------------------
-      ist = 1
-      iend = nx
-      if (north.eq.-1) ist = 2
-      if (south.eq.-1) iend = nx - 1
-
-      jst = 1
-      jend = ny
-      if (west.eq.-1) jst = 2
-      if (east.eq.-1) jend = ny - 1
-
-      return
-      end
-
-
diff --git a/examples/smpi/NAS/LU/verify.f b/examples/smpi/NAS/LU/verify.f
deleted file mode 100644 (file)
index 2572441..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-        subroutine verify(xcr, xce, xci, class, verified)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c  verification routine                         
-c---------------------------------------------------------------------
-
-        implicit none
-        include 'mpinpb.h'
-        include 'applu.incl'
-
-        double precision xcr(5), xce(5), xci
-        double precision xcrref(5),xceref(5),xciref, 
-     >                   xcrdif(5),xcedif(5),xcidif,
-     >                   epsilon, dtref
-        integer m
-        character class
-        logical verified
-
-c---------------------------------------------------------------------
-c   tolerance level
-c---------------------------------------------------------------------
-        epsilon = 1.0d-08
-
-        class = 'U'
-        verified = .true.
-
-        do m = 1,5
-           xcrref(m) = 1.0
-           xceref(m) = 1.0
-        end do
-        xciref = 1.0
-
-        if ( (nx0  .eq. 12     ) .and. 
-     >       (ny0  .eq. 12     ) .and.
-     >       (nz0  .eq. 12     ) .and.
-     >       (itmax   .eq. 50    ))  then
-
-           class = 'S'
-           dtref = 5.0d-1
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of residual, for the (12X12X12) grid,
-c   after 50 time steps, with  DT = 5.0d-01
-c---------------------------------------------------------------------
-         xcrref(1) = 1.6196343210976702d-02
-         xcrref(2) = 2.1976745164821318d-03
-         xcrref(3) = 1.5179927653399185d-03
-         xcrref(4) = 1.5029584435994323d-03
-         xcrref(5) = 3.4264073155896461d-02
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of solution error, for the (12X12X12) grid,
-c   after 50 time steps, with  DT = 5.0d-01
-c---------------------------------------------------------------------
-         xceref(1) = 6.4223319957960924d-04
-         xceref(2) = 8.4144342047347926d-05
-         xceref(3) = 5.8588269616485186d-05
-         xceref(4) = 5.8474222595157350d-05
-         xceref(5) = 1.3103347914111294d-03
-
-c---------------------------------------------------------------------
-c   Reference value of surface integral, for the (12X12X12) grid,
-c   after 50 time steps, with DT = 5.0d-01
-c---------------------------------------------------------------------
-         xciref = 7.8418928865937083d+00
-
-
-        elseif ( (nx0 .eq. 33) .and. 
-     >           (ny0 .eq. 33) .and.
-     >           (nz0 .eq. 33) .and.
-     >           (itmax . eq. 300) ) then
-
-           class = 'W'   !SPEC95fp size
-           dtref = 1.5d-3
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of residual, for the (33x33x33) grid,
-c   after 300 time steps, with  DT = 1.5d-3
-c---------------------------------------------------------------------
-           xcrref(1) =   0.1236511638192d+02
-           xcrref(2) =   0.1317228477799d+01
-           xcrref(3) =   0.2550120713095d+01
-           xcrref(4) =   0.2326187750252d+01
-           xcrref(5) =   0.2826799444189d+02
-
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of solution error, for the (33X33X33) grid,
-c---------------------------------------------------------------------
-           xceref(1) =   0.4867877144216d+00
-           xceref(2) =   0.5064652880982d-01
-           xceref(3) =   0.9281818101960d-01
-           xceref(4) =   0.8570126542733d-01
-           xceref(5) =   0.1084277417792d+01
-
-
-c---------------------------------------------------------------------
-c   Reference value of surface integral, for the (33X33X33) grid,
-c   after 300 time steps, with  DT = 1.5d-3
-c---------------------------------------------------------------------
-           xciref    =   0.1161399311023d+02
-
-        elseif ( (nx0 .eq. 64) .and. 
-     >           (ny0 .eq. 64) .and.
-     >           (nz0 .eq. 64) .and.
-     >           (itmax . eq. 250) ) then
-
-           class = 'A'
-           dtref = 2.0d+0
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of residual, for the (64X64X64) grid,
-c   after 250 time steps, with  DT = 2.0d+00
-c---------------------------------------------------------------------
-         xcrref(1) = 7.7902107606689367d+02
-         xcrref(2) = 6.3402765259692870d+01
-         xcrref(3) = 1.9499249727292479d+02
-         xcrref(4) = 1.7845301160418537d+02
-         xcrref(5) = 1.8384760349464247d+03
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of solution error, for the (64X64X64) grid,
-c   after 250 time steps, with  DT = 2.0d+00
-c---------------------------------------------------------------------
-         xceref(1) = 2.9964085685471943d+01
-         xceref(2) = 2.8194576365003349d+00
-         xceref(3) = 7.3473412698774742d+00
-         xceref(4) = 6.7139225687777051d+00
-         xceref(5) = 7.0715315688392578d+01
-
-c---------------------------------------------------------------------
-c   Reference value of surface integral, for the (64X64X64) grid,
-c   after 250 time steps, with DT = 2.0d+00
-c---------------------------------------------------------------------
-         xciref = 2.6030925604886277d+01
-
-
-        elseif ( (nx0 .eq. 102) .and. 
-     >           (ny0 .eq. 102) .and.
-     >           (nz0 .eq. 102) .and.
-     >           (itmax . eq. 250) ) then
-
-           class = 'B'
-           dtref = 2.0d+0
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of residual, for the (102X102X102) grid,
-c   after 250 time steps, with  DT = 2.0d+00
-c---------------------------------------------------------------------
-         xcrref(1) = 3.5532672969982736d+03
-         xcrref(2) = 2.6214750795310692d+02
-         xcrref(3) = 8.8333721850952190d+02
-         xcrref(4) = 7.7812774739425265d+02
-         xcrref(5) = 7.3087969592545314d+03
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of solution error, for the (102X102X102) 
-c   grid, after 250 time steps, with  DT = 2.0d+00
-c---------------------------------------------------------------------
-         xceref(1) = 1.1401176380212709d+02
-         xceref(2) = 8.1098963655421574d+00
-         xceref(3) = 2.8480597317698308d+01
-         xceref(4) = 2.5905394567832939d+01
-         xceref(5) = 2.6054907504857413d+02
-
-c---------------------------------------------------------------------
-c   Reference value of surface integral, for the (102X102X102) grid,
-c   after 250 time steps, with DT = 2.0d+00
-c---------------------------------------------------------------------
-         xciref = 4.7887162703308227d+01
-
-        elseif ( (nx0 .eq. 162) .and. 
-     >           (ny0 .eq. 162) .and.
-     >           (nz0 .eq. 162) .and.
-     >           (itmax . eq. 250) ) then
-
-           class = 'C'
-           dtref = 2.0d+0
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of residual, for the (162X162X162) grid,
-c   after 250 time steps, with  DT = 2.0d+00
-c---------------------------------------------------------------------
-         xcrref(1) = 1.03766980323537846d+04
-         xcrref(2) = 8.92212458801008552d+02
-         xcrref(3) = 2.56238814582660871d+03
-         xcrref(4) = 2.19194343857831427d+03
-         xcrref(5) = 1.78078057261061185d+04
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of solution error, for the (162X162X162) 
-c   grid, after 250 time steps, with  DT = 2.0d+00
-c---------------------------------------------------------------------
-         xceref(1) = 2.15986399716949279d+02
-         xceref(2) = 1.55789559239863600d+01
-         xceref(3) = 5.41318863077207766d+01
-         xceref(4) = 4.82262643154045421d+01
-         xceref(5) = 4.55902910043250358d+02
-
-c---------------------------------------------------------------------
-c   Reference value of surface integral, for the (162X162X162) grid,
-c   after 250 time steps, with DT = 2.0d+00
-c---------------------------------------------------------------------
-         xciref = 6.66404553572181300d+01
-
-        elseif ( (nx0 .eq. 408) .and. 
-     >           (ny0 .eq. 408) .and.
-     >           (nz0 .eq. 408) .and.
-     >           (itmax . eq. 300) ) then
-
-           class = 'D'
-           dtref = 1.0d+0
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of residual, for the (408X408X408) grid,
-c   after 300 time steps, with  DT = 1.0d+00
-c---------------------------------------------------------------------
-         xcrref(1) = 0.4868417937025d+05
-         xcrref(2) = 0.4696371050071d+04
-         xcrref(3) = 0.1218114549776d+05 
-         xcrref(4) = 0.1033801493461d+05
-         xcrref(5) = 0.7142398413817d+05
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of solution error, for the (408X408X408) 
-c   grid, after 300 time steps, with  DT = 1.0d+00
-c---------------------------------------------------------------------
-         xceref(1) = 0.3752393004482d+03
-         xceref(2) = 0.3084128893659d+02
-         xceref(3) = 0.9434276905469d+02
-         xceref(4) = 0.8230686681928d+02
-         xceref(5) = 0.7002620636210d+03
-
-c---------------------------------------------------------------------
-c   Reference value of surface integral, for the (408X408X408) grid,
-c   after 300 time steps, with DT = 1.0d+00
-c---------------------------------------------------------------------
-         xciref =    0.8334101392503d+02
-
-        elseif ( (nx0 .eq. 1020) .and. 
-     >           (ny0 .eq. 1020) .and.
-     >           (nz0 .eq. 1020) .and.
-     >           (itmax . eq. 300) ) then
-
-           class = 'E'
-           dtref = 0.5d+0
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of residual, for the (1020X1020X1020) grid,
-c   after 300 time steps, with  DT = 0.5d+00
-c---------------------------------------------------------------------
-         xcrref(1) = 0.2099641687874d+06
-         xcrref(2) = 0.2130403143165d+05
-         xcrref(3) = 0.5319228789371d+05 
-         xcrref(4) = 0.4509761639833d+05
-         xcrref(5) = 0.2932360006590d+06
-
-c---------------------------------------------------------------------
-c   Reference values of RMS-norms of solution error, for the (1020X1020X1020) 
-c   grid, after 300 time steps, with  DT = 0.5d+00
-c---------------------------------------------------------------------
-         xceref(1) = 0.4800572578333d+03
-         xceref(2) = 0.4221993400184d+02
-         xceref(3) = 0.1210851906824d+03
-         xceref(4) = 0.1047888986770d+03
-         xceref(5) = 0.8363028257389d+03
-
-c---------------------------------------------------------------------
-c   Reference value of surface integral, for the (1020X1020X1020) grid,
-c   after 300 time steps, with DT = 0.5d+00
-c---------------------------------------------------------------------
-         xciref =    0.9512163272273d+02
-
-        else
-           verified = .FALSE.
-        endif
-
-c---------------------------------------------------------------------
-c    verification test for residuals if gridsize is one of 
-c    the defined grid sizes above (class .ne. 'U')
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c    Compute the difference of solution values and the known reference values.
-c---------------------------------------------------------------------
-        do m = 1, 5
-           
-           xcrdif(m) = dabs((xcr(m)-xcrref(m))/xcrref(m)) 
-           xcedif(m) = dabs((xce(m)-xceref(m))/xceref(m))
-           
-        enddo
-        xcidif = dabs((xci - xciref)/xciref)
-
-
-c---------------------------------------------------------------------
-c    Output the comparison of computed results to known cases.
-c---------------------------------------------------------------------
-
-        if (class .ne. 'U') then
-           write(*, 1990) class
- 1990      format(/, ' Verification being performed for class ', a)
-           write (*,2000) epsilon
- 2000      format(' Accuracy setting for epsilon = ', E20.13)
-           verified = (dabs(dt-dtref) .le. epsilon)
-           if (.not.verified) then  
-              class = 'U'
-              write (*,1000) dtref
- 1000         format(' DT does not match the reference value of ', 
-     >                 E15.8)
-           endif
-        else 
-           write(*, 1995)
- 1995      format(' Unknown class')
-        endif
-
-
-        if (class .ne. 'U') then
-           write (*,2001) 
-        else
-           write (*, 2005)
-        endif
-
- 2001   format(' Comparison of RMS-norms of residual')
- 2005   format(' RMS-norms of residual')
-        do m = 1, 5
-           if (class .eq. 'U') then
-              write(*, 2015) m, xcr(m)
-           else if (xcrdif(m) .le. epsilon) then
-              write (*,2011) m,xcr(m),xcrref(m),xcrdif(m)
-           else 
-              verified = .false.
-              write (*,2010) m,xcr(m),xcrref(m),xcrdif(m)
-           endif
-        enddo
-
-        if (class .ne. 'U') then
-           write (*,2002)
-        else
-           write (*,2006)
-        endif
- 2002   format(' Comparison of RMS-norms of solution error')
- 2006   format(' RMS-norms of solution error')
-        
-        do m = 1, 5
-           if (class .eq. 'U') then
-              write(*, 2015) m, xce(m)
-           else if (xcedif(m) .le. epsilon) then
-              write (*,2011) m,xce(m),xceref(m),xcedif(m)
-           else
-              verified = .false.
-              write (*,2010) m,xce(m),xceref(m),xcedif(m)
-           endif
-        enddo
-        
- 2010   format(' FAILURE: ', i2, 2x, E20.13, E20.13, E20.13)
- 2011   format('          ', i2, 2x, E20.13, E20.13, E20.13)
- 2015   format('          ', i2, 2x, E20.13)
-        
-        if (class .ne. 'U') then
-           write (*,2025)
-        else
-           write (*,2026)
-        endif
- 2025   format(' Comparison of surface integral')
- 2026   format(' Surface integral')
-
-
-        if (class .eq. 'U') then
-           write(*, 2030) xci
-        else if (xcidif .le. epsilon) then
-           write(*, 2032) xci, xciref, xcidif
-        else
-           verified = .false.
-           write(*, 2031) xci, xciref, xcidif
-        endif
-
- 2030   format('          ', 4x, E20.13)
- 2031   format(' FAILURE: ', 4x, E20.13, E20.13, E20.13)
- 2032   format('          ', 4x, E20.13, E20.13, E20.13)
-
-
-
-        if (class .eq. 'U') then
-           write(*, 2022)
-           write(*, 2023)
- 2022      format(' No reference values provided')
- 2023      format(' No verification performed')
-        else if (verified) then
-           write(*, 2020)
- 2020      format(' Verification Successful')
-        else
-           write(*, 2021)
- 2021      format(' Verification failed')
-        endif
-
-        return
-
-
-        end
diff --git a/examples/smpi/NAS/MG/Makefile b/examples/smpi/NAS/MG/Makefile
deleted file mode 100644 (file)
index 1554bed..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-SHELL=/bin/sh
-BENCHMARK=mg
-BENCHMARKU=MG
-
-include ../config/make.def
-
-OBJS = mg.o ${COMMON}/print_results.o  \
-       ${COMMON}/${RAND}.o ${COMMON}/timers.o
-
-include ../sys/make.common
-
-${PROGRAM}: config ${OBJS}
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${FMPI_LIB}
-
-mg.o:          mg.f  globals.h mpinpb.h npbparams.h
-       ${FCOMPILE} mg.f
-
-clean:
-       - rm -f *.o *~ 
-       - rm -f npbparams.h core
-
-
-
diff --git a/examples/smpi/NAS/MG/README b/examples/smpi/NAS/MG/README
deleted file mode 100644 (file)
index 6c03f78..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-Some info about the MG benchmark
-================================
-    
-'mg_demo' demonstrates the capabilities of a very simple multigrid
-solver in computing a three dimensional potential field.  This is
-a simplified multigrid solver in two important respects:
-
-  (1) it solves only a constant coefficient equation,
-  and that only on a uniform cubical grid,
-    
-  (2) it solves only a single equation, representing
-  a scalar field rather than a vector field.
-
-We chose it for its portability and simplicity, and expect that a
-supercomputer which can run it effectively will also be able to
-run more complex multigrid programs at least as well.
-     
-     Eric Barszcz                         Paul Frederickson
-     RIACS
-     NASA Ames Research Center            NASA Ames Research Center
-
-========================================================================
-Running the program:  (Note: also see parameter lm information in the
-                       two sections immediately below this section)
-
-The program may be run with or without an input deck (called "mg.input"). 
-The following describes a few things about the input deck if you want to 
-use one. 
-
-The four lines below are the "mg.input" file required to run a
-problem of total size 256x256x256, for 4 iterations (Class "A"),
-and presumes the use of 8 processors:
-
-   8 = top level
-   256 256 256 = nx ny nz
-   4 = nit
-   0 0 0 0 0 0 0 0 = debug_vec
-
-The first line of input indicates how many levels of multi-grid
-cycle will be applied to a particular subpartition.  Presuming that
-8 processors are solving this problem (recall that the number of 
-processors is specified to MPI as a run parameter, and MPI subsequently
-determines this for the code via an MPI subroutine call), a 2x2x2 
-processor grid is  formed, and thus each partition on a processor is 
-of size 128x128x128.  Therefore, a maximum of 8 multi-grid levels may 
-be used.  These are of size 128,64,32,16,8,4,2,1, with the coarsest 
-level being a single point on a given processor.
-
-
-Next, consider the same size problem but running on 1 processor.  The
-following "mg.input" file is appropriate:
-
-    9 = top level
-    256 256 256 = nx ny nz
-    4 = nit
-    0 0 0 0 0 0 0 0 = debug_vec
-
-Since this processor must solve the full 256x256x256 problem, this
-permits 9 multi-grid levels (256,128,64,32,16,8,4,2,1), resulting in 
-a coarsest multi-grid level of a single point on the processor
-
-
-Next, consider the same size problem but running on 2 processors.  The
-following "mg.input" file is required:
-
-    8 = top level
-    256 256 256 = nx ny nz
-    4 = nit
-    0 0 0 0 0 0 0 0 = debug_vec
-
-The algorithm for partitioning the full grid onto some power of 2 number 
-of processors is to start by splitting the last dimension of the grid
-(z dimension) in 2: the problem is now partitioned onto 2 processors.
-Next the middle dimension (y dimension) is split in 2: the problem is now
-partitioned onto 4 processors.  Next, first dimension (x dimension) is
-split in 2: the problem is now partitioned onto 8 processors.  Next, the
-last dimension (z dimension) is split again in 2: the problem is now
-partitioned onto 16 processors.  This partitioning is repeated until all 
-of the power of 2 processors have been allocated.
-
-Thus to run the above problem on 2 processors, the grid partitioning 
-algorithm will allocate the two processors across the last dimension, 
-creating two partitions each of size 256x256x128. The coarsest level of 
-multi-grid must be a single point surrounded by a cubic number of grid 
-points.  Therefore, each of the two processor partitions will contain 4 
-coarsest multi-grid level points, each surrounded by a cube of grid points 
-of size 128x128x128, indicated by a top level of 8.
-
-
-Next, consider the same size problem but running on 4 processors.  The
-following "mg.input" file is required:
-
-    8 = top level
-    256 256 256 = nx ny nz
-    4 = nit
-    0 0 0 0 0 0 0 0 = debug_vec
-
-The partitioning algorithm will create 4 partitions, each of size
-256x128x128.  Each partition will contain 2 coarsest multi-grid level
-points each surrounded by a cube of grid points of size 128x128x128, 
-indicated by a top level of 8.
-
-
-Next, consider the same size problem but running on 16 processors.  The
-following "mg.input" file is required:
-
-    7 = top level
-    256 256 256 = nx ny nz
-    4 = nit
-    0 0 0 0 0 0 0 0 = debug_vec
-
-On each node a partition of size 128x128x64 will be created.  A maximum
-of 7 multi-grid levels (64,32,16,8,4,2,1) may be used, resulting in each 
-partions containing 4 coarsest multi-grid level points, each surrounded 
-by a cube of grid points of size 64x64x64, indicated by a top level of 7.
-
-
-
-
-Note that non-cubic problem sizes may also be considered:
-
-The four lines below are the "mg.input" file appropriate for running a
-problem of total size 256x512x512, for 20 iterations and presumes the 
-use of 32 processors (note: this is NOT a class C problem):
-
-    8 = top level
-    256 512 512 = nx ny nz
-    20 = nit
-    0 0 0 0 0 0 0 0 = debug_vec
-
-The first line of input indicates how many levels of multi-grid
-cycle will be applied to a particular subpartition.  Presuming that
-32 processors are solving this problem, a 2x4x4 processor grid is
-formed, and thus each partition on a processor is of size 128x128x128.
-Therefore, a maximum of 8 multi-grid levels may be used.  These are of
-size 128,64,32,16,8,4,2,1, with the coarsest level being a single 
-point on a given processor.
-
diff --git a/examples/smpi/NAS/MG/globals.h b/examples/smpi/NAS/MG/globals.h
deleted file mode 100644 (file)
index 99573e3..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-c---------------------------------------------------------------------
-c  Parameter lm (declared and set in "npbparams.h") is the log-base2 of 
-c  the edge size max for the partition on a given node, so must be changed 
-c  either to save space (if running a small case) or made bigger for larger 
-c  cases, for example, 512^3. Thus lm=7 means that the largest dimension 
-c  of a partition that can be solved on a node is 2^7 = 128. lm is set 
-c  automatically in npbparams.h
-c  Parameters ndim1, ndim2, ndim3 are the local problem dimensions. 
-c---------------------------------------------------------------------
-
-      include 'npbparams.h'
-
-      integer nm      ! actual dimension including ghost cells for communications
-     >      , nv      ! size of rhs array
-     >      , nr      ! size of residual array
-     >      , nm2     ! size of communication buffer
-     >      , maxlevel! maximum number of levels
-
-      parameter( nm=2+2**lm, nv=(2+2**ndim1)*(2+2**ndim2)*(2+2**ndim3) )
-      parameter( nm2=2*nm*nm, maxlevel=(lt_default+1) )
-      parameter( nr = (8*(nv+nm**2+5*nm+14*lt_default-7*lm))/7 )
-      integer maxprocs
-      parameter( maxprocs = 131072 )  ! this is the upper proc limit that 
-                                      ! the current "nr" parameter can handle
-c---------------------------------------------------------------------
-      integer nbr(3,-1:1,maxlevel), msg_type(3,-1:1)
-      integer  msg_id(3,-1:1,2),nx(maxlevel),ny(maxlevel),nz(maxlevel)
-      common /mg3/ nbr,msg_type,msg_id,nx,ny,nz
-
-      character class
-      common /ClassType/class
-
-      integer debug_vec(0:7)
-      common /my_debug/ debug_vec
-
-      integer ir(maxlevel), m1(maxlevel), m2(maxlevel), m3(maxlevel)
-      integer lt, lb
-      common /fap/ ir,m1,m2,m3,lt,lb
-
-      logical dead(maxlevel), give_ex(3,maxlevel), take_ex(3,maxlevel)
-      common /comm_ex/ dead, give_ex, take_ex
-
-c---------------------------------------------------------------------
-c  Set at m=1024, can handle cases up to 1024^3 case
-c---------------------------------------------------------------------
-      integer m
-c      parameter( m=1037 )
-      parameter( m=nm+1 )
-
-      double precision buff(nm2,4)
-      common /buffer/ buff
-
-
-
-
diff --git a/examples/smpi/NAS/MG/mg.f b/examples/smpi/NAS/MG/mg.f
deleted file mode 100644 (file)
index b0352ae..0000000
+++ /dev/null
@@ -1,2479 +0,0 @@
-!-------------------------------------------------------------------------!
-!                                                                         !
-!        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3         !
-!                                                                         !
-!                                   M G                                   !
-!                                                                         !
-!-------------------------------------------------------------------------!
-!                                                                         !
-!    This benchmark is part of the NAS Parallel Benchmark 3.3 suite.      !
-!    It is described in NAS Technical Reports 95-020 and 02-007           !
-!                                                                         !
-!    Permission to use, copy, distribute and modify this software         !
-!    for any purpose with or without fee is hereby granted.  We           !
-!    request, however, that all derived work reference the NAS            !
-!    Parallel Benchmarks 3.3. This software is provided "as is"           !
-!    without express or implied warranty.                                 !
-!                                                                         !
-!    Information on NPB 3.3, including the technical report, the          !
-!    original specifications, source code, results and information        !
-!    on how to submit new results, is available at:                       !
-!                                                                         !
-!           http://www.nas.nasa.gov/Software/NPB/                         !
-!                                                                         !
-!    Send comments or suggestions to  npb@nas.nasa.gov                    !
-!                                                                         !
-!          NAS Parallel Benchmarks Group                                  !
-!          NASA Ames Research Center                                      !
-!          Mail Stop: T27A-1                                              !
-!          Moffett Field, CA   94035-1000                                 !
-!                                                                         !
-!          E-mail:  npb@nas.nasa.gov                                      !
-!          Fax:     (650) 604-3957                                        !
-!                                                                         !
-!-------------------------------------------------------------------------!
-
-
-c---------------------------------------------------------------------
-c
-c Authors: E. Barszcz
-c          P. Frederickson
-c          A. Woo
-c          M. Yarrow
-c          R. F. Van der Wijngaart
-c
-c---------------------------------------------------------------------
-
-
-c---------------------------------------------------------------------
-      program mg_mpi
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-c---------------------------------------------------------------------------c
-c k is the current level. It is passed down through subroutine args
-c and is NOT global. it is the current iteration
-c---------------------------------------------------------------------------c
-
-      integer k, it
-      
-      external timer_read
-      double precision t, t0, tinit, mflops, timer_read
-
-c---------------------------------------------------------------------------c
-c These arrays are in common because they are quite large
-c and probably shouldn't be allocated on the stack. They
-c are always passed as subroutine args. 
-c---------------------------------------------------------------------------c
-
-      double precision u(nr),v(nv),r(nr),a(0:3),c(0:3)
-      common /noautom/ u,v,r   
-
-      double precision rnm2, rnmu, old2, oldu, epsilon
-      integer n1, n2, n3, nit
-      double precision nn, verify_value, err
-      logical verified
-
-      integer ierr,i, fstatus
-      integer T_bench, T_init
-      parameter (T_bench=1, T_init=2)
-
-      call mpi_init(ierr)
-      call mpi_comm_rank(mpi_comm_world, me, ierr)
-      call mpi_comm_size(mpi_comm_world, nprocs, ierr)
-
-      root = 0
-      if (nprocs_compiled .gt. maxprocs) then
-         if (me .eq. root) write(*,20) nprocs_compiled, maxprocs
- 20      format(' ERROR: compiled for ',i8,' processes'//
-     &          ' The maximum size allowed for this benchmark is ',i6)
-         call mpi_abort(MPI_COMM_WORLD, ierr)
-         stop
-      endif
-
-      if (.not. convertdouble) then
-         dp_type = MPI_DOUBLE_PRECISION
-      else
-         dp_type = MPI_REAL
-      endif
-
-
-      call timer_clear(T_bench)
-      call timer_clear(T_init)
-
-      call mpi_barrier(MPI_COMM_WORLD, ierr)
-
-      call timer_start(T_init)
-      
-
-c---------------------------------------------------------------------
-c Read in and broadcast input data
-c---------------------------------------------------------------------
-
-      if( me .eq. root )then
-         write (*, 1000) 
-
-         open(unit=7,file="mg.input", status="old", iostat=fstatus)
-         if (fstatus .eq. 0) then
-            write(*,50) 
- 50         format(' Reading from input file mg.input')
-            read(7,*) lt
-            read(7,*) nx(lt), ny(lt), nz(lt)
-            read(7,*) nit
-            read(7,*) (debug_vec(i),i=0,7)
-         else
-            write(*,51) 
- 51         format(' No input file. Using compiled defaults ')
-            lt = lt_default
-            nit = nit_default
-            nx(lt) = nx_default
-            ny(lt) = ny_default
-            nz(lt) = nz_default
-            do i = 0,7
-               debug_vec(i) = debug_default
-            end do
-         endif
-      endif
-
-      call mpi_bcast(lt, 1, MPI_INTEGER, 0, mpi_comm_world, ierr)
-      call mpi_bcast(nit, 1, MPI_INTEGER, 0, mpi_comm_world, ierr)
-      call mpi_bcast(nx(lt), 1, MPI_INTEGER, 0, mpi_comm_world, ierr)
-      call mpi_bcast(ny(lt), 1, MPI_INTEGER, 0, mpi_comm_world, ierr)
-      call mpi_bcast(nz(lt), 1, MPI_INTEGER, 0, mpi_comm_world, ierr)
-      call mpi_bcast(debug_vec(0), 8, MPI_INTEGER, 0, 
-     >               mpi_comm_world, ierr)
-
-      if ( (nx(lt) .ne. ny(lt)) .or. (nx(lt) .ne. nz(lt)) ) then
-         Class = 'U' 
-      else if( nx(lt) .eq. 32 .and. nit .eq. 4 ) then
-         Class = 'S'
-      else if( nx(lt) .eq. 128 .and. nit .eq. 4 ) then
-         Class = 'W'
-      else if( nx(lt) .eq. 256 .and. nit .eq. 4 ) then  
-         Class = 'A'
-      else if( nx(lt) .eq. 256 .and. nit .eq. 20 ) then
-         Class = 'B'
-      else if( nx(lt) .eq. 512 .and. nit .eq. 20 ) then  
-         Class = 'C'
-      else if( nx(lt) .eq. 1024 .and. nit .eq. 50 ) then  
-         Class = 'D'
-      else if( nx(lt) .eq. 2048 .and. nit .eq. 50 ) then  
-         Class = 'E'
-      else
-         Class = 'U'
-      endif
-
-c---------------------------------------------------------------------
-c  Use these for debug info:
-c---------------------------------------------------------------------
-c     debug_vec(0) = 1 !=> report all norms
-c     debug_vec(1) = 1 !=> some setup information
-c     debug_vec(1) = 2 !=> more setup information
-c     debug_vec(2) = k => at level k or below, show result of resid
-c     debug_vec(3) = k => at level k or below, show result of psinv
-c     debug_vec(4) = k => at level k or below, show result of rprj
-c     debug_vec(5) = k => at level k or below, show result of interp
-c     debug_vec(6) = 1 => (unused)
-c     debug_vec(7) = 1 => (unused)
-c---------------------------------------------------------------------
-      a(0) = -8.0D0/3.0D0 
-      a(1) =  0.0D0 
-      a(2) =  1.0D0/6.0D0 
-      a(3) =  1.0D0/12.0D0
-      
-      if(Class .eq. 'A' .or. Class .eq. 'S'.or. Class .eq.'W') then
-c---------------------------------------------------------------------
-c     Coefficients for the S(a) smoother
-c---------------------------------------------------------------------
-         c(0) =  -3.0D0/8.0D0
-         c(1) =  +1.0D0/32.0D0
-         c(2) =  -1.0D0/64.0D0
-         c(3) =   0.0D0
-      else
-c---------------------------------------------------------------------
-c     Coefficients for the S(b) smoother
-c---------------------------------------------------------------------
-         c(0) =  -3.0D0/17.0D0
-         c(1) =  +1.0D0/33.0D0
-         c(2) =  -1.0D0/61.0D0
-         c(3) =   0.0D0
-      endif
-      lb = 1
-      k  = lt
-
-      call setup(n1,n2,n3,k)
-      call zero3(u,n1,n2,n3)
-      call zran3(v,n1,n2,n3,nx(lt),ny(lt),k)
-
-      call norm2u3(v,n1,n2,n3,rnm2,rnmu,nx(lt),ny(lt),nz(lt))
-
-      if( me .eq. root )then
-         write (*, 1001) nx(lt),ny(lt),nz(lt), Class
-         write (*, 1002) nit
-
- 1000 format(//,' NAS Parallel Benchmarks 3.3 -- MG Benchmark', /)
- 1001    format(' Size: ', i4, 'x', i4, 'x', i4, '  (class ', A, ')' )
- 1002    format(' Iterations: ', i4)
- 1003    format(' Number of processes: ', i6)
-         if (nprocs .ne. nprocs_compiled) then
-           write (*, 1004) nprocs_compiled
-           write (*, 1005) nprocs
- 1004      format(' WARNING: compiled for ', i6, ' processes ')
- 1005      format(' Number of active processes: ', i6, /)
-         else
-           write (*, 1003) nprocs
-         endif
-      endif
-
-      call resid(u,v,r,n1,n2,n3,a,k)
-      call norm2u3(r,n1,n2,n3,rnm2,rnmu,nx(lt),ny(lt),nz(lt))
-      old2 = rnm2
-      oldu = rnmu
-
-c---------------------------------------------------------------------
-c     One iteration for startup
-c---------------------------------------------------------------------
-      call mg3P(u,v,r,a,c,n1,n2,n3,k)
-      call resid(u,v,r,n1,n2,n3,a,k)
-      call setup(n1,n2,n3,k)
-      call zero3(u,n1,n2,n3)
-      call zran3(v,n1,n2,n3,nx(lt),ny(lt),k)
-
-      call timer_stop(T_init)
-      if( me .eq. root )then
-         tinit = timer_read(T_init)
-         write( *,'(/A,F15.3,A/)' ) 
-     >        ' Initialization time: ',tinit, ' seconds'
-      endif
-
-      call mpi_barrier(mpi_comm_world,ierr)
-
-      call timer_start(T_bench)
-
-      call resid(u,v,r,n1,n2,n3,a,k)
-      call norm2u3(r,n1,n2,n3,rnm2,rnmu,nx(lt),ny(lt),nz(lt))
-      old2 = rnm2
-      oldu = rnmu
-
-      do  it=1,nit
-         if (it.eq.1 .or. it.eq.nit .or. mod(it,5).eq.0) then
-            if (me .eq. root) write(*,80) it
-   80       format('  iter ',i4)
-         endif
-         call mg3P(u,v,r,a,c,n1,n2,n3,k)
-         call resid(u,v,r,n1,n2,n3,a,k)
-      enddo
-
-
-      call norm2u3(r,n1,n2,n3,rnm2,rnmu,nx(lt),ny(lt),nz(lt))
-
-      call timer_stop(T_bench)
-
-      t0 = timer_read(T_bench)
-
-      call mpi_reduce(t0,t,1,dp_type,
-     >     mpi_max,root,mpi_comm_world,ierr)
-      verified = .FALSE.
-      verify_value = 0.0
-      if( me .eq. root )then
-         write(*,100)
- 100     format(/' Benchmark completed ')
-
-         epsilon = 1.d-8
-         if (Class .ne. 'U') then
-            if(Class.eq.'S') then
-               verify_value = 0.5307707005734d-04
-            elseif(Class.eq.'W') then
-               verify_value = 0.6467329375339d-05
-            elseif(Class.eq.'A') then
-               verify_value = 0.2433365309069d-05
-            elseif(Class.eq.'B') then
-               verify_value = 0.1800564401355d-05
-            elseif(Class.eq.'C') then
-               verify_value = 0.5706732285740d-06
-            elseif(Class.eq.'D') then
-               verify_value = 0.1583275060440d-09
-            elseif(Class.eq.'E') then
-               verify_value = 0.5630442584711d-10
-            endif
-
-            err = abs( rnm2 - verify_value ) / verify_value
-            if( err .le. epsilon ) then
-               verified = .TRUE.
-               write(*, 200)
-               write(*, 201) rnm2
-               write(*, 202) err
- 200           format(' VERIFICATION SUCCESSFUL ')
- 201           format(' L2 Norm is ', E20.13)
- 202           format(' Error is   ', E20.13)
-            else
-               verified = .FALSE.
-               write(*, 300) 
-               write(*, 301) rnm2
-               write(*, 302) verify_value
- 300           format(' VERIFICATION FAILED')
- 301           format(' L2 Norm is             ', E20.13)
- 302           format(' The correct L2 Norm is ', E20.13)
-            endif
-         else
-            verified = .FALSE.
-            write (*, 400)
-            write (*, 401)
-            write (*, 201) rnm2
- 400        format(' Problem size unknown')
- 401        format(' NO VERIFICATION PERFORMED')
-         endif
-
-         nn = 1.0d0*nx(lt)*ny(lt)*nz(lt)
-
-         if( t .ne. 0. ) then
-            mflops = 58.*1.0D-6*nit*nn / t
-         else
-            mflops = 0.0
-         endif
-
-         call print_results('MG', class, nx(lt), ny(lt), nz(lt), 
-     >                      nit, nprocs_compiled, nprocs, t,
-     >                      mflops, '          floating point', 
-     >                      verified, npbversion, compiletime,
-     >                      cs1, cs2, cs3, cs4, cs5, cs6, cs7)
-
-
-      endif
-
-
-      call mpi_finalize(ierr)
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup(n1,n2,n3,k)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer  is1, is2, is3, ie1, ie2, ie3
-      common /grid/ is1,is2,is3,ie1,ie2,ie3
-
-      integer n1,n2,n3,k
-      integer dx, dy, log_p, d, i, j
-
-      integer ax, next(3),mi(3,maxlevel),mip(3,maxlevel)
-      integer ng(3,maxlevel)
-      integer idi(3), pi(3), idin(3,-1:1)
-      integer s, dir,ierr
-
-      do  j=-1,1,1
-         do  d=1,3
-            msg_type(d,j) = 100*(j+2+10*d)
-         enddo
-      enddo
-
-      ng(1,lt) = nx(lt)
-      ng(2,lt) = ny(lt)
-      ng(3,lt) = nz(lt)
-      do  ax=1,3
-         next(ax) = 1
-         do  k=lt-1,1,-1
-            ng(ax,k) = ng(ax,k+1)/2
-         enddo
-      enddo
- 61   format(10i4)
-      do  k=lt,1,-1
-         nx(k) = ng(1,k)
-         ny(k) = ng(2,k)
-         nz(k) = ng(3,k)
-      enddo
-
-      log_p  = log(float(nprocs)+0.0001)/log(2.0)
-      dx     = log_p/3
-      pi(1)  = 2**dx
-      idi(1) = mod(me,pi(1))
-
-      dy     = (log_p-dx)/2
-      pi(2)  = 2**dy
-      idi(2) = mod((me/pi(1)),pi(2))
-
-      pi(3)  = nprocs/(pi(1)*pi(2))
-      idi(3) = me/(pi(1)*pi(2))
-
-      do  k = lt,1,-1
-         dead(k) = .false.
-         do  ax = 1,3
-            take_ex(ax,k) = .false.
-            give_ex(ax,k) = .false.
-
-            mi(ax,k) = 2 + 
-     >           ((idi(ax)+1)*ng(ax,k))/pi(ax) -
-     >           ((idi(ax)+0)*ng(ax,k))/pi(ax)
-            mip(ax,k) = 2 + 
-     >           ((next(ax)+idi(ax)+1)*ng(ax,k))/pi(ax) -
-     >           ((next(ax)+idi(ax)+0)*ng(ax,k))/pi(ax) 
-
-            if(mip(ax,k).eq.2.or.mi(ax,k).eq.2)then
-               next(ax) = 2*next(ax)
-            endif
-
-            if( k+1 .le. lt )then
-               if((mip(ax,k).eq.2).and.(mi(ax,k).eq.3))then
-                  give_ex(ax,k+1) = .true.
-               endif
-               if((mip(ax,k).eq.3).and.(mi(ax,k).eq.2))then
-                  take_ex(ax,k+1) = .true.
-               endif
-            endif
-         enddo
-
-         if( mi(1,k).eq.2 .or. 
-     >        mi(2,k).eq.2 .or. 
-     >        mi(3,k).eq.2      )then
-            dead(k) = .true.
-         endif
-         m1(k) = mi(1,k)
-         m2(k) = mi(2,k)
-         m3(k) = mi(3,k)
-
-         do  ax=1,3
-            idin(ax,+1) = mod( idi(ax) + next(ax) + pi(ax) , pi(ax) )
-            idin(ax,-1) = mod( idi(ax) - next(ax) + pi(ax) , pi(ax) )
-         enddo
-         do  dir = 1,-1,-2
-            nbr(1,dir,k) = idin(1,dir) + pi(1)
-     >           *(idi(2)      + pi(2)
-     >           * idi(3))
-            nbr(2,dir,k) = idi(1)      + pi(1)
-     >           *(idin(2,dir) + pi(2)
-     >           * idi(3))
-            nbr(3,dir,k) = idi(1)      + pi(1)
-     >           *(idi(2)      + pi(2)
-     >           * idin(3,dir))
-         enddo
-      enddo
-
-      k = lt
-      is1 = 2 + ng(1,k) - ((pi(1)  -idi(1))*ng(1,lt))/pi(1)
-      ie1 = 1 + ng(1,k) - ((pi(1)-1-idi(1))*ng(1,lt))/pi(1)
-      n1 = 3 + ie1 - is1
-      is2 = 2 + ng(2,k) - ((pi(2)  -idi(2))*ng(2,lt))/pi(2)
-      ie2 = 1 + ng(2,k) - ((pi(2)-1-idi(2))*ng(2,lt))/pi(2)
-      n2 = 3 + ie2 - is2
-      is3 = 2 + ng(3,k) - ((pi(3)  -idi(3))*ng(3,lt))/pi(3)
-      ie3 = 1 + ng(3,k) - ((pi(3)-1-idi(3))*ng(3,lt))/pi(3)
-      n3 = 3 + ie3 - is3
-
-
-      ir(lt)=1
-      do  j = lt-1, 1, -1
-         ir(j)=ir(j+1)+m1(j+1)*m2(j+1)*m3(j+1)
-      enddo
-
-
-      if( debug_vec(1) .ge. 1 )then
-         if( me .eq. root )write(*,*)' in setup, '
-         if( me .eq. root )write(*,*)' me   k  lt  nx  ny  nz ',
-     >        ' n1  n2  n3 is1 is2 is3 ie1 ie2 ie3'
-         do  i=0,nprocs-1
-            if( me .eq. i )then
-               write(*,9) me,k,lt,ng(1,k),ng(2,k),ng(3,k),
-     >              n1,n2,n3,is1,is2,is3,ie1,ie2,ie3
- 9             format(15i4)
-            endif
-            call mpi_barrier(mpi_comm_world,ierr)
-         enddo
-      endif
-      if( debug_vec(1) .ge. 2 )then
-         do  i=0,nprocs-1
-            if( me .eq. i )then
-               write(*,*)' '
-               write(*,*)' processor =',me
-               do  k=lt,1,-1
-                  write(*,7)k,idi(1),idi(2),idi(3),
-     >                 ((nbr(d,j,k),j=-1,1,2),d=1,3),
-     >                 (mi(d,k),d=1,3)
-               enddo
- 7             format(i4,'idi=',3i4,'nbr=',3(2i4,'  '),'mi=',3i4,' ')
-               write(*,*)'idi(s) = ',(idi(s),s=1,3)
-               write(*,*)'dead(2), dead(1) = ',dead(2),dead(1)
-               do  ax=1,3
-                  write(*,*)'give_ex(ax,2)= ',give_ex(ax,2)
-                  write(*,*)'take_ex(ax,2)= ',take_ex(ax,2)
-               enddo
-            endif
-            call mpi_barrier(mpi_comm_world,ierr)
-         enddo
-      endif
-
-      k = lt
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine mg3P(u,v,r,a,c,n1,n2,n3,k)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     multigrid V-cycle routine
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer n1, n2, n3, k
-      double precision u(nr),v(nv),r(nr)
-      double precision a(0:3),c(0:3)
-
-      integer j
-
-c---------------------------------------------------------------------
-c     down cycle.
-c     restrict the residual from the find grid to the coarse
-c---------------------------------------------------------------------
-
-      do  k= lt, lb+1 , -1
-         j = k-1
-         call rprj3(r(ir(k)),m1(k),m2(k),m3(k),
-     >        r(ir(j)),m1(j),m2(j),m3(j),k)
-      enddo
-
-      k = lb
-c---------------------------------------------------------------------
-c     compute an approximate solution on the coarsest grid
-c---------------------------------------------------------------------
-      call zero3(u(ir(k)),m1(k),m2(k),m3(k))
-      call psinv(r(ir(k)),u(ir(k)),m1(k),m2(k),m3(k),c,k)
-
-      do  k = lb+1, lt-1     
-          j = k-1
-c---------------------------------------------------------------------
-c        prolongate from level k-1  to k
-c---------------------------------------------------------------------
-         call zero3(u(ir(k)),m1(k),m2(k),m3(k))
-         call interp(u(ir(j)),m1(j),m2(j),m3(j),
-     >               u(ir(k)),m1(k),m2(k),m3(k),k)
-c---------------------------------------------------------------------
-c        compute residual for level k
-c---------------------------------------------------------------------
-         call resid(u(ir(k)),r(ir(k)),r(ir(k)),m1(k),m2(k),m3(k),a,k)
-c---------------------------------------------------------------------
-c        apply smoother
-c---------------------------------------------------------------------
-         call psinv(r(ir(k)),u(ir(k)),m1(k),m2(k),m3(k),c,k)
-      enddo
- 200  continue
-      j = lt - 1
-      k = lt
-      call interp(u(ir(j)),m1(j),m2(j),m3(j),u,n1,n2,n3,k)
-      call resid(u,v,r,n1,n2,n3,a,k)
-      call psinv(r,u,n1,n2,n3,c,k)
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine psinv( r,u,n1,n2,n3,c,k)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     psinv applies an approximate inverse as smoother:  u = u + Cr
-c
-c     This  implementation costs  15A + 4M per result, where
-c     A and M denote the costs of Addition and Multiplication.  
-c     Presuming coefficient c(3) is zero (the NPB assumes this,
-c     but it is thus not a general case), 2A + 1M may be eliminated,
-c     resulting in 13A + 3M.
-c     Note that this vectorizes, and is also fine for cache 
-c     based machines.  
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'globals.h'
-
-      integer n1,n2,n3,k
-      double precision u(n1,n2,n3),r(n1,n2,n3),c(0:3)
-      integer i3, i2, i1
-
-      double precision r1(m), r2(m)
-      
-      do i3=2,n3-1
-         do i2=2,n2-1
-            do i1=1,n1
-               r1(i1) = r(i1,i2-1,i3) + r(i1,i2+1,i3)
-     >                + r(i1,i2,i3-1) + r(i1,i2,i3+1)
-               r2(i1) = r(i1,i2-1,i3-1) + r(i1,i2+1,i3-1)
-     >                + r(i1,i2-1,i3+1) + r(i1,i2+1,i3+1)
-            enddo
-            do i1=2,n1-1
-               u(i1,i2,i3) = u(i1,i2,i3)
-     >                     + c(0) * r(i1,i2,i3)
-     >                     + c(1) * ( r(i1-1,i2,i3) + r(i1+1,i2,i3)
-     >                              + r1(i1) )
-     >                     + c(2) * ( r2(i1) + r1(i1-1) + r1(i1+1) )
-c---------------------------------------------------------------------
-c  Assume c(3) = 0    (Enable line below if c(3) not= 0)
-c---------------------------------------------------------------------
-c    >                     + c(3) * ( r2(i1-1) + r2(i1+1) )
-c---------------------------------------------------------------------
-            enddo
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     exchange boundary points
-c---------------------------------------------------------------------
-      call comm3(u,n1,n2,n3,k)
-
-      if( debug_vec(0) .ge. 1 )then
-         call rep_nrm(u,n1,n2,n3,'   psinv',k)
-      endif
-
-      if( debug_vec(3) .ge. k )then
-         call showall(u,n1,n2,n3)
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine resid( u,v,r,n1,n2,n3,a,k )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     resid computes the residual:  r = v - Au
-c
-c     This  implementation costs  15A + 4M per result, where
-c     A and M denote the costs of Addition (or Subtraction) and 
-c     Multiplication, respectively. 
-c     Presuming coefficient a(1) is zero (the NPB assumes this,
-c     but it is thus not a general case), 3A + 1M may be eliminated,
-c     resulting in 12A + 3M.
-c     Note that this vectorizes, and is also fine for cache 
-c     based machines.  
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'globals.h'
-
-      integer n1,n2,n3,k
-      double precision u(n1,n2,n3),v(n1,n2,n3),r(n1,n2,n3),a(0:3)
-      integer i3, i2, i1
-      double precision u1(m), u2(m)
-
-      do i3=2,n3-1
-         do i2=2,n2-1
-            do i1=1,n1
-               u1(i1) = u(i1,i2-1,i3) + u(i1,i2+1,i3)
-     >                + u(i1,i2,i3-1) + u(i1,i2,i3+1)
-               u2(i1) = u(i1,i2-1,i3-1) + u(i1,i2+1,i3-1)
-     >                + u(i1,i2-1,i3+1) + u(i1,i2+1,i3+1)
-            enddo
-            do i1=2,n1-1
-               r(i1,i2,i3) = v(i1,i2,i3)
-     >                     - a(0) * u(i1,i2,i3)
-c---------------------------------------------------------------------
-c  Assume a(1) = 0      (Enable 2 lines below if a(1) not= 0)
-c---------------------------------------------------------------------
-c    >                     - a(1) * ( u(i1-1,i2,i3) + u(i1+1,i2,i3)
-c    >                              + u1(i1) )
-c---------------------------------------------------------------------
-     >                     - a(2) * ( u2(i1) + u1(i1-1) + u1(i1+1) )
-     >                     - a(3) * ( u2(i1-1) + u2(i1+1) )
-            enddo
-         enddo
-      enddo
-
-c---------------------------------------------------------------------
-c     exchange boundary data
-c---------------------------------------------------------------------
-      call comm3(r,n1,n2,n3,k)
-
-      if( debug_vec(0) .ge. 1 )then
-         call rep_nrm(r,n1,n2,n3,'   resid',k)
-      endif
-
-      if( debug_vec(2) .ge. k )then
-         call showall(r,n1,n2,n3)
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine rprj3( r,m1k,m2k,m3k,s,m1j,m2j,m3j,k )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     rprj3 projects onto the next coarser grid, 
-c     using a trilinear Finite Element projection:  s = r' = P r
-c     
-c     This  implementation costs  20A + 4M per result, where
-c     A and M denote the costs of Addition and Multiplication.  
-c     Note that this vectorizes, and is also fine for cache 
-c     based machines.  
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer m1k, m2k, m3k, m1j, m2j, m3j,k
-      double precision r(m1k,m2k,m3k), s(m1j,m2j,m3j)
-      integer j3, j2, j1, i3, i2, i1, d1, d2, d3, j
-
-      double precision x1(m), y1(m), x2,y2
-
-
-      if(m1k.eq.3)then
-        d1 = 2
-      else
-        d1 = 1
-      endif
-
-      if(m2k.eq.3)then
-        d2 = 2
-      else
-        d2 = 1
-      endif
-
-      if(m3k.eq.3)then
-        d3 = 2
-      else
-        d3 = 1
-      endif
-
-      do  j3=2,m3j-1
-         i3 = 2*j3-d3
-C        i3 = 2*j3-1
-         do  j2=2,m2j-1
-            i2 = 2*j2-d2
-C           i2 = 2*j2-1
-
-            do j1=2,m1j
-              i1 = 2*j1-d1
-C             i1 = 2*j1-1
-              x1(i1-1) = r(i1-1,i2-1,i3  ) + r(i1-1,i2+1,i3  )
-     >                 + r(i1-1,i2,  i3-1) + r(i1-1,i2,  i3+1)
-              y1(i1-1) = r(i1-1,i2-1,i3-1) + r(i1-1,i2-1,i3+1)
-     >                 + r(i1-1,i2+1,i3-1) + r(i1-1,i2+1,i3+1)
-            enddo
-
-            do  j1=2,m1j-1
-              i1 = 2*j1-d1
-C             i1 = 2*j1-1
-              y2 = r(i1,  i2-1,i3-1) + r(i1,  i2-1,i3+1)
-     >           + r(i1,  i2+1,i3-1) + r(i1,  i2+1,i3+1)
-              x2 = r(i1,  i2-1,i3  ) + r(i1,  i2+1,i3  )
-     >           + r(i1,  i2,  i3-1) + r(i1,  i2,  i3+1)
-              s(j1,j2,j3) =
-     >               0.5D0 * r(i1,i2,i3)
-     >             + 0.25D0 * ( r(i1-1,i2,i3) + r(i1+1,i2,i3) + x2)
-     >             + 0.125D0 * ( x1(i1-1) + x1(i1+1) + y2)
-     >             + 0.0625D0 * ( y1(i1-1) + y1(i1+1) )
-            enddo
-
-         enddo
-      enddo
-
-
-      j = k-1
-      call comm3(s,m1j,m2j,m3j,j)
-
-      if( debug_vec(0) .ge. 1 )then
-         call rep_nrm(s,m1j,m2j,m3j,'   rprj3',k-1)
-      endif
-
-      if( debug_vec(4) .ge. k )then
-         call showall(s,m1j,m2j,m3j)
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine interp( z,mm1,mm2,mm3,u,n1,n2,n3,k )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     interp adds the trilinear interpolation of the correction
-c     from the coarser grid to the current approximation:  u = u + Qu'
-c     
-c     Observe that this  implementation costs  16A + 4M, where
-c     A and M denote the costs of Addition and Multiplication.  
-c     Note that this vectorizes, and is also fine for cache 
-c     based machines.  Vector machines may get slightly better 
-c     performance however, with 8 separate "do i1" loops, rather than 4.
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer mm1, mm2, mm3, n1, n2, n3,k
-      double precision z(mm1,mm2,mm3),u(n1,n2,n3)
-      integer i3, i2, i1, d1, d2, d3, t1, t2, t3
-
-c note that m = 1037 in globals.h but for this only need to be
-c 535 to handle up to 1024^3
-c      integer m
-c      parameter( m=535 )
-      double precision z1(m),z2(m),z3(m)
-
-
-      if( n1 .ne. 3 .and. n2 .ne. 3 .and. n3 .ne. 3 ) then
-
-         do  i3=1,mm3-1
-            do  i2=1,mm2-1
-
-               do i1=1,mm1
-                  z1(i1) = z(i1,i2+1,i3) + z(i1,i2,i3)
-                  z2(i1) = z(i1,i2,i3+1) + z(i1,i2,i3)
-                  z3(i1) = z(i1,i2+1,i3+1) + z(i1,i2,i3+1) + z1(i1)
-               enddo
-
-               do  i1=1,mm1-1
-                  u(2*i1-1,2*i2-1,2*i3-1)=u(2*i1-1,2*i2-1,2*i3-1)
-     >                 +z(i1,i2,i3)
-                  u(2*i1,2*i2-1,2*i3-1)=u(2*i1,2*i2-1,2*i3-1)
-     >                 +0.5d0*(z(i1+1,i2,i3)+z(i1,i2,i3))
-               enddo
-               do i1=1,mm1-1
-                  u(2*i1-1,2*i2,2*i3-1)=u(2*i1-1,2*i2,2*i3-1)
-     >                 +0.5d0 * z1(i1)
-                  u(2*i1,2*i2,2*i3-1)=u(2*i1,2*i2,2*i3-1)
-     >                 +0.25d0*( z1(i1) + z1(i1+1) )
-               enddo
-               do i1=1,mm1-1
-                  u(2*i1-1,2*i2-1,2*i3)=u(2*i1-1,2*i2-1,2*i3)
-     >                 +0.5d0 * z2(i1)
-                  u(2*i1,2*i2-1,2*i3)=u(2*i1,2*i2-1,2*i3)
-     >                 +0.25d0*( z2(i1) + z2(i1+1) )
-               enddo
-               do i1=1,mm1-1
-                  u(2*i1-1,2*i2,2*i3)=u(2*i1-1,2*i2,2*i3)
-     >                 +0.25d0* z3(i1)
-                  u(2*i1,2*i2,2*i3)=u(2*i1,2*i2,2*i3)
-     >                 +0.125d0*( z3(i1) + z3(i1+1) )
-               enddo
-            enddo
-         enddo
-
-      else
-
-         if(n1.eq.3)then
-            d1 = 2
-            t1 = 1
-         else
-            d1 = 1
-            t1 = 0
-         endif
-         
-         if(n2.eq.3)then
-            d2 = 2
-            t2 = 1
-         else
-            d2 = 1
-            t2 = 0
-         endif
-         
-         if(n3.eq.3)then
-            d3 = 2
-            t3 = 1
-         else
-            d3 = 1
-            t3 = 0
-         endif
-         
-         do  i3=d3,mm3-1
-            do  i2=d2,mm2-1
-               do  i1=d1,mm1-1
-                  u(2*i1-d1,2*i2-d2,2*i3-d3)=u(2*i1-d1,2*i2-d2,2*i3-d3)
-     >                 +z(i1,i2,i3)
-               enddo
-               do  i1=1,mm1-1
-                  u(2*i1-t1,2*i2-d2,2*i3-d3)=u(2*i1-t1,2*i2-d2,2*i3-d3)
-     >                 +0.5D0*(z(i1+1,i2,i3)+z(i1,i2,i3))
-               enddo
-            enddo
-            do  i2=1,mm2-1
-               do  i1=d1,mm1-1
-                  u(2*i1-d1,2*i2-t2,2*i3-d3)=u(2*i1-d1,2*i2-t2,2*i3-d3)
-     >                 +0.5D0*(z(i1,i2+1,i3)+z(i1,i2,i3))
-               enddo
-               do  i1=1,mm1-1
-                  u(2*i1-t1,2*i2-t2,2*i3-d3)=u(2*i1-t1,2*i2-t2,2*i3-d3)
-     >                 +0.25D0*(z(i1+1,i2+1,i3)+z(i1+1,i2,i3)
-     >                 +z(i1,  i2+1,i3)+z(i1,  i2,i3))
-               enddo
-            enddo
-         enddo
-
-         do  i3=1,mm3-1
-            do  i2=d2,mm2-1
-               do  i1=d1,mm1-1
-                  u(2*i1-d1,2*i2-d2,2*i3-t3)=u(2*i1-d1,2*i2-d2,2*i3-t3)
-     >                 +0.5D0*(z(i1,i2,i3+1)+z(i1,i2,i3))
-               enddo
-               do  i1=1,mm1-1
-                  u(2*i1-t1,2*i2-d2,2*i3-t3)=u(2*i1-t1,2*i2-d2,2*i3-t3)
-     >                 +0.25D0*(z(i1+1,i2,i3+1)+z(i1,i2,i3+1)
-     >                 +z(i1+1,i2,i3  )+z(i1,i2,i3  ))
-               enddo
-            enddo
-            do  i2=1,mm2-1
-               do  i1=d1,mm1-1
-                  u(2*i1-d1,2*i2-t2,2*i3-t3)=u(2*i1-d1,2*i2-t2,2*i3-t3)
-     >                 +0.25D0*(z(i1,i2+1,i3+1)+z(i1,i2,i3+1)
-     >                 +z(i1,i2+1,i3  )+z(i1,i2,i3  ))
-               enddo
-               do  i1=1,mm1-1
-                  u(2*i1-t1,2*i2-t2,2*i3-t3)=u(2*i1-t1,2*i2-t2,2*i3-t3)
-     >                 +0.125D0*(z(i1+1,i2+1,i3+1)+z(i1+1,i2,i3+1)
-     >                 +z(i1  ,i2+1,i3+1)+z(i1  ,i2,i3+1)
-     >                 +z(i1+1,i2+1,i3  )+z(i1+1,i2,i3  )
-     >                 +z(i1  ,i2+1,i3  )+z(i1  ,i2,i3  ))
-               enddo
-            enddo
-         enddo
-
-      endif
-
-      call comm3_ex(u,n1,n2,n3,k)
-
-      if( debug_vec(0) .ge. 1 )then
-         call rep_nrm(z,mm1,mm2,mm3,'z: inter',k-1)
-         call rep_nrm(u,n1,n2,n3,'u: inter',k)
-      endif
-
-      if( debug_vec(5) .ge. k )then
-         call showall(z,mm1,mm2,mm3)
-         call showall(u,n1,n2,n3)
-      endif
-
-      return 
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine norm2u3(r,n1,n2,n3,rnm2,rnmu,nx,ny,nz)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     norm2u3 evaluates approximations to the L2 norm and the
-c     uniform (or L-infinity or Chebyshev) norm, under the
-c     assumption that the boundaries are periodic or zero.  Add the
-c     boundaries in with half weight (quarter weight on the edges
-c     and eighth weight at the corners) for inhomogeneous boundaries.
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer n1, n2, n3, nx, ny, nz
-      double precision rnm2, rnmu, r(n1,n2,n3)
-      double precision s, a, ss
-      integer i3, i2, i1, ierr
-
-      double precision dn
-
-      dn = 1.0d0*nx*ny*nz
-
-      s=0.0D0
-      rnmu = 0.0D0
-      do  i3=2,n3-1
-         do  i2=2,n2-1
-            do  i1=2,n1-1
-               s=s+r(i1,i2,i3)**2
-               a=abs(r(i1,i2,i3))
-               if(a.gt.rnmu)rnmu=a
-            enddo
-         enddo
-      enddo
-
-      call mpi_allreduce(rnmu,ss,1,dp_type,
-     >     mpi_max,mpi_comm_world,ierr)
-      rnmu = ss
-      call mpi_allreduce(s, ss, 1, dp_type,
-     >     mpi_sum,mpi_comm_world,ierr)
-      s = ss
-      rnm2=sqrt( s / dn )
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine rep_nrm(u,n1,n2,n3,title,kk)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     report on norm
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer n1, n2, n3, kk
-      double precision u(n1,n2,n3)
-      character*8 title
-
-      double precision rnm2, rnmu
-
-
-      call norm2u3(u,n1,n2,n3,rnm2,rnmu,nx(kk),ny(kk),nz(kk))
-      if( me .eq. root )then
-         write(*,7)kk,title,rnm2,rnmu
- 7       format(' Level',i2,' in ',a8,': norms =',D21.14,D21.14)
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine comm3(u,n1,n2,n3,kk)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     comm3 organizes the communication on all borders 
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer n1, n2, n3, kk
-      double precision u(n1,n2,n3)
-      integer axis
-
-      if( .not. dead(kk) )then
-         do  axis = 1, 3
-            if( nprocs .ne. 1) then
-   
-               call ready( axis, -1, kk )
-               call ready( axis, +1, kk )
-   
-               call give3( axis, +1, u, n1, n2, n3, kk )
-               call give3( axis, -1, u, n1, n2, n3, kk )
-   
-               call take3( axis, -1, u, n1, n2, n3 )
-               call take3( axis, +1, u, n1, n2, n3 )
-   
-            else
-               call comm1p( axis, u, n1, n2, n3, kk )
-            endif
-         enddo
-      else
-         call zero3(u,n1,n2,n3)
-      endif
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine comm3_ex(u,n1,n2,n3,kk)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     comm3_ex  communicates to expand the number of processors
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer n1, n2, n3, kk
-      double precision u(n1,n2,n3)
-      integer axis
-
-      do  axis = 1, 3
-         if( nprocs .ne. 1 ) then
-            if( take_ex( axis, kk ) )then
-               call ready( axis, -1, kk )
-               call ready( axis, +1, kk )
-               call take3_ex( axis, -1, u, n1, n2, n3 )
-               call take3_ex( axis, +1, u, n1, n2, n3 )
-            endif
-   
-            if( give_ex( axis, kk ) )then
-               call give3_ex( axis, +1, u, n1, n2, n3, kk )
-               call give3_ex( axis, -1, u, n1, n2, n3, kk )
-            endif
-         else
-            call comm1p_ex( axis, u, n1, n2, n3, kk )
-         endif
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine ready( axis, dir, k )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     ready allocates a buffer to take in a message
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer axis, dir, k
-      integer buff_id,buff_len,i,ierr
-
-      buff_id = 3 + dir
-      buff_len = nm2
-
-      do  i=1,nm2
-         buff(i,buff_id) = 0.0D0
-      enddo
-
-
-c---------------------------------------------------------------------
-c     fake message request type
-c---------------------------------------------------------------------
-      msg_id(axis,dir,1) = msg_type(axis,dir) +1000*me
-
-      call mpi_irecv( buff(1,buff_id), buff_len,
-     >     dp_type, nbr(axis,-dir,k), msg_type(axis,dir), 
-     >     mpi_comm_world, msg_id(axis,dir,1), ierr)
-      return
-      end
-
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine give3( axis, dir, u, n1, n2, n3, k )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     give3 sends border data out in the requested direction
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer axis, dir, n1, n2, n3, k, ierr
-      double precision u( n1, n2, n3 )
-
-      integer i3, i2, i1, buff_len,buff_id
-
-      buff_id = 2 + dir 
-      buff_len = 0
-
-      if( axis .eq.  1 )then
-         if( dir .eq. -1 )then
-
-            do  i3=2,n3-1
-               do  i2=2,n2-1
-                  buff_len = buff_len + 1
-                  buff(buff_len,buff_id ) = u( 2,  i2,i3)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=2,n3-1
-               do  i2=2,n2-1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( n1-1, i2,i3)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         endif
-      endif
-
-      if( axis .eq.  2 )then
-         if( dir .eq. -1 )then
-
-            do  i3=2,n3-1
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( i1,  2,i3)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=2,n3-1
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len,  buff_id )= u( i1,n2-1,i3)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         endif
-      endif
-
-      if( axis .eq.  3 )then
-         if( dir .eq. -1 )then
-
-            do  i2=1,n2
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( i1,i2,2)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         else if( dir .eq. +1 ) then
-
-            do  i2=1,n2
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( i1,i2,n3-1)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine take3( axis, dir, u, n1, n2, n3 )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     take3 copies in border data from the requested direction
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer axis, dir, n1, n2, n3
-      double precision u( n1, n2, n3 )
-
-      integer buff_id, indx
-
-      integer status(mpi_status_size), ierr
-
-      integer i3, i2, i1
-
-      call mpi_wait( msg_id( axis, dir, 1 ),status,ierr)
-      buff_id = 3 + dir
-      indx = 0
-
-      if( axis .eq.  1 )then
-         if( dir .eq. -1 )then
-
-            do  i3=2,n3-1
-               do  i2=2,n2-1
-                  indx = indx + 1
-                  u(n1,i2,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=2,n3-1
-               do  i2=2,n2-1
-                  indx = indx + 1
-                  u(1,i2,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         endif
-      endif
-
-      if( axis .eq.  2 )then
-         if( dir .eq. -1 )then
-
-            do  i3=2,n3-1
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,n2,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=2,n3-1
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,1,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         endif
-      endif
-
-      if( axis .eq.  3 )then
-         if( dir .eq. -1 )then
-
-            do  i2=1,n2
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,i2,n3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         else if( dir .eq. +1 ) then
-
-            do  i2=1,n2
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,i2,1) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine give3_ex( axis, dir, u, n1, n2, n3, k )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     give3_ex sends border data out to expand number of processors
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer axis, dir, n1, n2, n3, k, ierr
-      double precision u( n1, n2, n3 )
-
-      integer i3, i2, i1, buff_len, buff_id
-
-      buff_id = 2 + dir 
-      buff_len = 0
-
-      if( axis .eq.  1 )then
-         if( dir .eq. -1 )then
-
-            do  i3=1,n3
-               do  i2=1,n2
-                  buff_len = buff_len + 1
-                  buff(buff_len,buff_id ) = u( 2,  i2,i3)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=1,n3
-               do  i2=1,n2
-                  do  i1=n1-1,n1
-                     buff_len = buff_len + 1
-                     buff(buff_len,buff_id)= u(i1,i2,i3)
-                  enddo
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         endif
-      endif
-
-      if( axis .eq.  2 )then
-         if( dir .eq. -1 )then
-
-            do  i3=1,n3
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( i1,  2,i3)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=1,n3
-               do  i2=n2-1,n2
-                  do  i1=1,n1
-                     buff_len = buff_len + 1
-                     buff(buff_len,buff_id )= u(i1,i2,i3)
-                  enddo
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         endif
-      endif
-
-      if( axis .eq.  3 )then
-         if( dir .eq. -1 )then
-
-            do  i2=1,n2
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( i1,i2,2)
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=n3-1,n3
-               do  i2=1,n2
-                  do  i1=1,n1
-                     buff_len = buff_len + 1
-                     buff(buff_len, buff_id ) = u( i1,i2,i3)
-                  enddo
-               enddo
-            enddo
-
-            call mpi_send( 
-     >           buff(1, buff_id ), buff_len,dp_type,
-     >           nbr( axis, dir, k ), msg_type(axis,dir), 
-     >           mpi_comm_world, ierr)
-
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine take3_ex( axis, dir, u, n1, n2, n3 )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     take3_ex copies in border data to expand number of processors
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer axis, dir, n1, n2, n3
-      double precision u( n1, n2, n3 )
-
-      integer buff_id, indx
-
-      integer status(mpi_status_size) , ierr
-
-      integer i3, i2, i1
-
-      call mpi_wait( msg_id( axis, dir, 1 ),status,ierr)
-      buff_id = 3 + dir
-      indx = 0
-
-      if( axis .eq.  1 )then
-         if( dir .eq. -1 )then
-
-            do  i3=1,n3
-               do  i2=1,n2
-                  indx = indx + 1
-                  u(n1,i2,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=1,n3
-               do  i2=1,n2
-                  do  i1=1,2
-                     indx = indx + 1
-                     u(i1,i2,i3) = buff(indx,buff_id)
-                  enddo
-               enddo
-            enddo
-
-         endif
-      endif
-
-      if( axis .eq.  2 )then
-         if( dir .eq. -1 )then
-
-            do  i3=1,n3
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,n2,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=1,n3
-               do  i2=1,2
-                  do  i1=1,n1
-                     indx = indx + 1
-                     u(i1,i2,i3) = buff(indx,buff_id)
-                  enddo
-               enddo
-            enddo
-
-         endif
-      endif
-
-      if( axis .eq.  3 )then
-         if( dir .eq. -1 )then
-
-            do  i2=1,n2
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,i2,n3) = buff(indx, buff_id )
-               enddo
-            enddo
-
-         else if( dir .eq. +1 ) then
-
-            do  i3=1,2
-               do  i2=1,n2
-                  do  i1=1,n1
-                     indx = indx + 1
-                     u(i1,i2,i3) = buff(indx,buff_id)
-                  enddo
-               enddo
-            enddo
-
-         endif
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine comm1p( axis, u, n1, n2, n3, kk )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer axis, dir, n1, n2, n3
-      double precision u( n1, n2, n3 )
-
-      integer i3, i2, i1, buff_len,buff_id
-      integer i, kk, indx
-
-      dir = -1
-
-      buff_id = 3 + dir
-      buff_len = nm2
-
-      do  i=1,nm2
-         buff(i,buff_id) = 0.0D0
-      enddo
-
-
-      dir = +1
-
-      buff_id = 3 + dir
-      buff_len = nm2
-
-      do  i=1,nm2
-         buff(i,buff_id) = 0.0D0
-      enddo
-
-      dir = +1
-
-      buff_id = 2 + dir 
-      buff_len = 0
-
-      if( axis .eq.  1 )then
-         do  i3=2,n3-1
-            do  i2=2,n2-1
-               buff_len = buff_len + 1
-               buff(buff_len, buff_id ) = u( n1-1, i2,i3)
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  2 )then
-         do  i3=2,n3-1
-            do  i1=1,n1
-               buff_len = buff_len + 1
-               buff(buff_len,  buff_id )= u( i1,n2-1,i3)
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  3 )then
-         do  i2=1,n2
-            do  i1=1,n1
-               buff_len = buff_len + 1
-               buff(buff_len, buff_id ) = u( i1,i2,n3-1)
-            enddo
-         enddo
-      endif
-
-      dir = -1
-
-      buff_id = 2 + dir 
-      buff_len = 0
-
-      if( axis .eq.  1 )then
-         do  i3=2,n3-1
-            do  i2=2,n2-1
-               buff_len = buff_len + 1
-               buff(buff_len,buff_id ) = u( 2,  i2,i3)
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  2 )then
-         do  i3=2,n3-1
-            do  i1=1,n1
-               buff_len = buff_len + 1
-               buff(buff_len, buff_id ) = u( i1,  2,i3)
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  3 )then
-         do  i2=1,n2
-            do  i1=1,n1
-               buff_len = buff_len + 1
-               buff(buff_len, buff_id ) = u( i1,i2,2)
-            enddo
-         enddo
-      endif
-
-      do  i=1,nm2
-         buff(i,4) = buff(i,3)
-         buff(i,2) = buff(i,1)
-      enddo
-
-      dir = -1
-
-      buff_id = 3 + dir
-      indx = 0
-
-      if( axis .eq.  1 )then
-         do  i3=2,n3-1
-            do  i2=2,n2-1
-               indx = indx + 1
-               u(n1,i2,i3) = buff(indx, buff_id )
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  2 )then
-         do  i3=2,n3-1
-            do  i1=1,n1
-               indx = indx + 1
-               u(i1,n2,i3) = buff(indx, buff_id )
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  3 )then
-         do  i2=1,n2
-            do  i1=1,n1
-               indx = indx + 1
-               u(i1,i2,n3) = buff(indx, buff_id )
-            enddo
-         enddo
-      endif
-
-
-      dir = +1
-
-      buff_id = 3 + dir
-      indx = 0
-
-      if( axis .eq.  1 )then
-         do  i3=2,n3-1
-            do  i2=2,n2-1
-               indx = indx + 1
-               u(1,i2,i3) = buff(indx, buff_id )
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  2 )then
-         do  i3=2,n3-1
-            do  i1=1,n1
-               indx = indx + 1
-               u(i1,1,i3) = buff(indx, buff_id )
-            enddo
-         enddo
-      endif
-
-      if( axis .eq.  3 )then
-         do  i2=1,n2
-            do  i1=1,n1
-               indx = indx + 1
-               u(i1,i2,1) = buff(indx, buff_id )
-            enddo
-         enddo
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine comm1p_ex( axis, u, n1, n2, n3, kk )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      include 'globals.h'
-
-      integer axis, dir, n1, n2, n3
-      double precision u( n1, n2, n3 )
-
-      integer i3, i2, i1, buff_len,buff_id
-      integer i, kk, indx
-
-      if( take_ex( axis, kk ) ) then
-
-         dir = -1
-
-         buff_id = 3 + dir
-         buff_len = nm2
-
-         do  i=1,nm2
-            buff(i,buff_id) = 0.0D0
-         enddo
-
-
-         dir = +1
-
-         buff_id = 3 + dir
-         buff_len = nm2
-
-         do  i=1,nm2
-            buff(i,buff_id) = 0.0D0
-         enddo
-
-
-         dir = -1
-
-         buff_id = 3 + dir
-         indx = 0
-
-         if( axis .eq.  1 )then
-            do  i3=1,n3
-               do  i2=1,n2
-                  indx = indx + 1
-                  u(n1,i2,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  2 )then
-            do  i3=1,n3
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,n2,i3) = buff(indx, buff_id )
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  3 )then
-            do  i2=1,n2
-               do  i1=1,n1
-                  indx = indx + 1
-                  u(i1,i2,n3) = buff(indx, buff_id )
-               enddo
-            enddo
-         endif
-
-         dir = +1
-
-         buff_id = 3 + dir
-         indx = 0
-
-         if( axis .eq.  1 )then
-            do  i3=1,n3
-               do  i2=1,n2
-                  do  i1=1,2
-                     indx = indx + 1
-                     u(i1,i2,i3) = buff(indx,buff_id)
-                  enddo
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  2 )then
-            do  i3=1,n3
-               do  i2=1,2
-                  do  i1=1,n1
-                     indx = indx + 1
-                     u(i1,i2,i3) = buff(indx,buff_id)
-                  enddo
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  3 )then
-            do  i3=1,2
-               do  i2=1,n2
-                  do  i1=1,n1
-                     indx = indx + 1
-                     u(i1,i2,i3) = buff(indx,buff_id)
-                  enddo
-               enddo
-            enddo
-         endif
-
-      endif
-
-      if( give_ex( axis, kk ) )then
-
-         dir = +1
-
-         buff_id = 2 + dir 
-         buff_len = 0
-
-         if( axis .eq.  1 )then
-            do  i3=1,n3
-               do  i2=1,n2
-                  do  i1=n1-1,n1
-                     buff_len = buff_len + 1
-                     buff(buff_len,buff_id)= u(i1,i2,i3)
-                  enddo
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  2 )then
-            do  i3=1,n3
-               do  i2=n2-1,n2
-                  do  i1=1,n1
-                     buff_len = buff_len + 1
-                     buff(buff_len,buff_id )= u(i1,i2,i3)
-                  enddo
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  3 )then
-            do  i3=n3-1,n3
-               do  i2=1,n2
-                  do  i1=1,n1
-                     buff_len = buff_len + 1
-                     buff(buff_len, buff_id ) = u( i1,i2,i3)
-                  enddo
-               enddo
-            enddo
-         endif
-
-         dir = -1
-
-         buff_id = 2 + dir 
-         buff_len = 0
-
-         if( axis .eq.  1 )then
-            do  i3=1,n3
-               do  i2=1,n2
-                  buff_len = buff_len + 1
-                  buff(buff_len,buff_id ) = u( 2,  i2,i3)
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  2 )then
-            do  i3=1,n3
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( i1,  2,i3)
-               enddo
-            enddo
-         endif
-
-         if( axis .eq.  3 )then
-            do  i2=1,n2
-               do  i1=1,n1
-                  buff_len = buff_len + 1
-                  buff(buff_len, buff_id ) = u( i1,i2,2)
-               enddo
-            enddo
-         endif
-
-      endif
-
-      do  i=1,nm2
-         buff(i,4) = buff(i,3)
-         buff(i,2) = buff(i,1)
-      enddo
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine zran3(z,n1,n2,n3,nx,ny,k)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     zran3  loads +1 at ten randomly chosen points,
-c     loads -1 at a different ten random points,
-c     and zero elsewhere.
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer  is1, is2, is3, ie1, ie2, ie3
-      common /grid/ is1,is2,is3,ie1,ie2,ie3
-
-      integer n1, n2, n3, k, nx, ny, ierr, i0, m0, m1
-      double precision z(n1,n2,n3)
-
-      integer mm, i1, i2, i3, d1, e1, e2, e3
-      double precision x, a
-      double precision xx, x0, x1, a1, a2, ai, power
-      parameter( mm = 10,  a = 5.D0 ** 13, x = 314159265.D0)
-      double precision ten( mm, 0:1 ), temp, best
-      integer i, j1( mm, 0:1 ), j2( mm, 0:1 ), j3( mm, 0:1 )
-      integer jg( 0:3, mm, 0:1 ), jg_temp(4)
-
-      external randlc
-      double precision randlc, rdummy
-
-      a1 = power( a, nx, 1, 0 )
-      a2 = power( a, nx, ny, 0 )
-
-      call zero3(z,n1,n2,n3)
-
-c      i = is1-2+nx*(is2-2+ny*(is3-2))
-
-      ai = power( a, nx, is2-2+ny*(is3-2), is1-2 )
-      d1 = ie1 - is1 + 1
-      e1 = ie1 - is1 + 2
-      e2 = ie2 - is2 + 2
-      e3 = ie3 - is3 + 2
-      x0 = x
-      rdummy = randlc( x0, ai )
-      do  i3 = 2, e3
-         x1 = x0
-         do  i2 = 2, e2
-            xx = x1
-            call vranlc( d1, xx, a, z( 2, i2, i3 ))
-            rdummy = randlc( x1, a1 )
-         enddo
-         rdummy = randlc( x0, a2 )
-      enddo
-
-c---------------------------------------------------------------------
-c       call comm3(z,n1,n2,n3)
-c       call showall(z,n1,n2,n3)
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     each processor looks for twenty candidates
-c---------------------------------------------------------------------
-      do  i=1,mm
-         ten( i, 1 ) = 0.0D0
-         j1( i, 1 ) = 0
-         j2( i, 1 ) = 0
-         j3( i, 1 ) = 0
-         ten( i, 0 ) = 1.0D0
-         j1( i, 0 ) = 0
-         j2( i, 0 ) = 0
-         j3( i, 0 ) = 0
-      enddo
-
-      do  i3=2,n3-1
-         do  i2=2,n2-1
-            do  i1=2,n1-1
-               if( z(i1,i2,i3) .gt. ten( 1, 1 ) )then
-                  ten(1,1) = z(i1,i2,i3) 
-                  j1(1,1) = i1
-                  j2(1,1) = i2
-                  j3(1,1) = i3
-                  call bubble( ten, j1, j2, j3, mm, 1 )
-               endif
-               if( z(i1,i2,i3) .lt. ten( 1, 0 ) )then
-                  ten(1,0) = z(i1,i2,i3) 
-                  j1(1,0) = i1
-                  j2(1,0) = i2
-                  j3(1,0) = i3
-                  call bubble( ten, j1, j2, j3, mm, 0 )
-               endif
-            enddo
-         enddo
-      enddo
-
-      call mpi_barrier(mpi_comm_world,ierr)
-
-c---------------------------------------------------------------------
-c     Now which of these are globally best?
-c---------------------------------------------------------------------
-      i1 = mm
-      i0 = mm
-      do  i=mm,1,-1
-
-         best = z( j1(i1,1), j2(i1,1), j3(i1,1) )
-         call mpi_allreduce(best,temp,1,dp_type,
-     >        mpi_max,mpi_comm_world,ierr)
-         best = temp
-         if(best.eq.z(j1(i1,1),j2(i1,1),j3(i1,1)))then
-            jg( 0, i, 1) = me
-            jg( 1, i, 1) = is1 - 2 + j1( i1, 1 ) 
-            jg( 2, i, 1) = is2 - 2 + j2( i1, 1 ) 
-            jg( 3, i, 1) = is3 - 2 + j3( i1, 1 ) 
-            i1 = i1-1
-         else
-            jg( 0, i, 1) = 0
-            jg( 1, i, 1) = 0
-            jg( 2, i, 1) = 0
-            jg( 3, i, 1) = 0
-         endif
-         ten( i, 1 ) = best
-         call mpi_allreduce(jg(0,i,1), jg_temp,4,MPI_INTEGER,
-     >        mpi_max,mpi_comm_world,ierr)
-         jg( 0, i, 1) =  jg_temp(1)
-         jg( 1, i, 1) =  jg_temp(2)
-         jg( 2, i, 1) =  jg_temp(3)
-         jg( 3, i, 1) =  jg_temp(4)
-
-         best = z( j1(i0,0), j2(i0,0), j3(i0,0) )
-         call mpi_allreduce(best,temp,1,dp_type,
-     >        mpi_min,mpi_comm_world,ierr)
-         best = temp
-         if(best.eq.z(j1(i0,0),j2(i0,0),j3(i0,0)))then
-            jg( 0, i, 0) = me
-            jg( 1, i, 0) = is1 - 2 + j1( i0, 0 ) 
-            jg( 2, i, 0) = is2 - 2 + j2( i0, 0 ) 
-            jg( 3, i, 0) = is3 - 2 + j3( i0, 0 ) 
-            i0 = i0-1
-         else
-            jg( 0, i, 0) = 0
-            jg( 1, i, 0) = 0
-            jg( 2, i, 0) = 0
-            jg( 3, i, 0) = 0
-         endif
-         ten( i, 0 ) = best
-         call mpi_allreduce(jg(0,i,0), jg_temp,4,MPI_INTEGER,
-     >        mpi_max,mpi_comm_world,ierr)
-         jg( 0, i, 0) =  jg_temp(1)
-         jg( 1, i, 0) =  jg_temp(2)
-         jg( 2, i, 0) =  jg_temp(3)
-         jg( 3, i, 0) =  jg_temp(4)
-
-      enddo
-      m1 = i1+1
-      m0 = i0+1
-
-c      if( me .eq. root) then
-c         write(*,*)' '
-c         write(*,*)' negative charges at'
-c         write(*,9)(jg(1,i,0),jg(2,i,0),jg(3,i,0),i=1,mm)
-c         write(*,*)' positive charges at'
-c         write(*,9)(jg(1,i,1),jg(2,i,1),jg(3,i,1),i=1,mm)
-c         write(*,*)' small random numbers were'
-c         write(*,8)(ten( i,0),i=mm,1,-1)
-c         write(*,*)' and they were found on processor number'
-c         write(*,7)(jg(0,i,0),i=mm,1,-1)
-c         write(*,*)' large random numbers were'
-c         write(*,8)(ten( i,1),i=mm,1,-1)
-c         write(*,*)' and they were found on processor number'
-c         write(*,7)(jg(0,i,1),i=mm,1,-1)
-c      endif
-c 9    format(5(' (',i3,2(',',i3),')'))
-c 8    format(5D15.8)
-c 7    format(10i4)
-      call mpi_barrier(mpi_comm_world,ierr)
-      do  i3=1,n3
-         do  i2=1,n2
-            do  i1=1,n1
-               z(i1,i2,i3) = 0.0D0
-            enddo
-         enddo
-      enddo
-      do  i=mm,m0,-1
-         z( j1(i,0), j2(i,0), j3(i,0) ) = -1.0D0
-      enddo
-      do  i=mm,m1,-1
-         z( j1(i,1), j2(i,1), j3(i,1) ) = +1.0D0
-      enddo
-      call comm3(z,n1,n2,n3,k)
-
-c---------------------------------------------------------------------
-c          call showall(z,n1,n2,n3)
-c---------------------------------------------------------------------
-
-      return 
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine show_l(z,n1,n2,n3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer n1,n2,n3,i1,i2,i3,ierr
-      double precision z(n1,n2,n3)
-      integer m1, m2, m3,i
-
-      m1 = min(n1,18)
-      m2 = min(n2,14)
-      m3 = min(n3,18)
-
-      write(*,*)'  '
-      do  i=0,nprocs-1
-         if( me .eq. i )then
-            write(*,*)' id = ', me
-            do  i3=1,m3
-               do  i1=1,m1
-                  write(*,6)(z(i1,i2,i3),i2=1,m2)
-               enddo
-               write(*,*)' - - - - - - - '
-            enddo
-            write(*,*)'  '
- 6          format(6f15.11)
-         endif
-         call mpi_barrier(mpi_comm_world,ierr)
-      enddo
-
-      return 
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine showall(z,n1,n2,n3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer n1,n2,n3,i1,i2,i3,i,ierr
-      double precision z(n1,n2,n3)
-      integer m1, m2, m3
-
-      m1 = min(n1,18)
-      m2 = min(n2,14)
-      m3 = min(n3,18)
-
-      write(*,*)'  '
-      do  i=0,nprocs-1
-         if( me .eq. i )then
-            write(*,*)' id = ', me
-            do  i3=1,m3
-               do  i1=1,m1
-                  write(*,6)(z(i1,i2,i3),i2=1,m2)
-               enddo
-               write(*,*)' - - - - - - - '
-            enddo
-            write(*,*)'  '
- 6          format(15f6.3)
-         endif
-         call mpi_barrier(mpi_comm_world,ierr)
-      enddo
-
-      return 
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine show(z,n1,n2,n3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-      integer n1,n2,n3,i1,i2,i3,ierr,i
-      double precision z(n1,n2,n3)
-
-      write(*,*)'  '
-      do  i=0,nprocs-1
-         if( me .eq. i )then
-            write(*,*)' id = ', me
-            do  i3=2,n3-1
-               do  i1=2,n1-1
-                  write(*,6)(z(i1,i2,i3),i2=2,n1-1)
-               enddo
-               write(*,*)' - - - - - - - '
-            enddo
-            write(*,*)'  '
- 6          format(8D10.3)
-         endif
-         call mpi_barrier(mpi_comm_world,ierr)
-      enddo
-
-c     call comm3(z,n1,n2,n3)
-
-      return 
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      double precision function power( a, n1, n2, n3 )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     power  raises an integer, disguised as a double
-c     precision real, to an integer power.
-c     This version tries to avoid integer overflow by treating
-c     it as expressed in a form of "n1*n2+n3".
-c---------------------------------------------------------------------
-      implicit none
-
-      double precision a, aj
-      integer n1, n2, n3
-
-      integer n1j, n2j, nj
-      external randlc
-      double precision randlc, rdummy
-
-      power = 1.0d0
-      aj = a
-      nj = n3
-      n1j = n1
-      n2j = n2
- 100  continue
-
-      if( n2j .gt. 0 ) then
-         if( mod(n2j,2) .eq. 1 ) nj = nj + n1j
-         n2j = n2j/2
-      else if( nj .eq. 0 ) then
-         go to 200
-      endif
-      if( mod(nj,2) .eq. 1 ) rdummy =  randlc( power, aj )
-      rdummy = randlc( aj, aj )
-      nj = nj/2
-      go to 100
-
- 200  continue
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine bubble( ten, j1, j2, j3, m, ind )
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c     bubble        does a bubble sort in direction dir
-c---------------------------------------------------------------------
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer m, ind, j1( m, 0:1 ), j2( m, 0:1 ), j3( m, 0:1 )
-      double precision ten( m, 0:1 )
-      double precision temp
-      integer i, j_temp
-
-      if( ind .eq. 1 )then
-
-         do  i=1,m-1
-            if( ten(i,ind) .gt. ten(i+1,ind) )then
-
-               temp = ten( i+1, ind )
-               ten( i+1, ind ) = ten( i, ind )
-               ten( i, ind ) = temp
-
-               j_temp           = j1( i+1, ind )
-               j1( i+1, ind ) = j1( i,   ind )
-               j1( i,   ind ) = j_temp
-
-               j_temp           = j2( i+1, ind )
-               j2( i+1, ind ) = j2( i,   ind )
-               j2( i,   ind ) = j_temp
-
-               j_temp           = j3( i+1, ind )
-               j3( i+1, ind ) = j3( i,   ind )
-               j3( i,   ind ) = j_temp
-
-            else 
-               return
-            endif
-         enddo
-
-      else
-
-         do  i=1,m-1
-            if( ten(i,ind) .lt. ten(i+1,ind) )then
-
-               temp = ten( i+1, ind )
-               ten( i+1, ind ) = ten( i, ind )
-               ten( i, ind ) = temp
-
-               j_temp           = j1( i+1, ind )
-               j1( i+1, ind ) = j1( i,   ind )
-               j1( i,   ind ) = j_temp
-
-               j_temp           = j2( i+1, ind )
-               j2( i+1, ind ) = j2( i,   ind )
-               j2( i,   ind ) = j_temp
-
-               j_temp           = j3( i+1, ind )
-               j3( i+1, ind ) = j3( i,   ind )
-               j3( i,   ind ) = j_temp
-
-            else 
-               return
-            endif
-         enddo
-
-      endif
-
-      return
-      end
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine zero3(z,n1,n2,n3)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-      include 'mpinpb.h'
-
-      integer n1, n2, n3
-      double precision z(n1,n2,n3)
-      integer i1, i2, i3
-
-      do  i3=1,n3
-         do  i2=1,n2
-            do  i1=1,n1
-               z(i1,i2,i3)=0.0D0
-            enddo
-         enddo
-      enddo
-
-      return
-      end
-
-
-c----- end of program ------------------------------------------------
diff --git a/examples/smpi/NAS/MG/mg.input.sample b/examples/smpi/NAS/MG/mg.input.sample
deleted file mode 100644 (file)
index a4dcf81..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
- 8 = top level
- 256 256 256 = nx ny nz
- 20 = nit
- 0 0 0 0 0 0 0 0 = debug_vec
diff --git a/examples/smpi/NAS/MG/mpinpb.h b/examples/smpi/NAS/MG/mpinpb.h
deleted file mode 100644 (file)
index 1f0368c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include           'mpif.h'
-
-      integer           me, nprocs, root, dp_type
-      common /mpistuff/ me, nprocs, root, dp_type
-
index f40f6b1..7f1bee8 100644 (file)
@@ -8,26 +8,6 @@ SFILE=config/suite.def
 default: header
        @ sys/print_instructions
 
-BT: bt
-bt: header
-       cd BT; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) SUBTYPE=$(SUBTYPE) VERSION=$(VERSION)
-
-SP: sp
-sp: header
-       cd SP; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS)
-
-LU: lu
-lu: header
-       cd LU; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS) VERSION=$(VERSION)
-
-MG: mg
-mg: header
-       cd MG; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS)
-
-FT: ft
-ft: header
-       cd FT; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS)
-
 IS: is
 is: header
        cd IS; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS)
@@ -36,10 +16,6 @@ IS-trace: is-trace
 is-trace: header
        cd IS-trace; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS)
 
-CG: cg
-cg: header
-       cd CG; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS)
-
 EP: ep
 ep: header
        cd EP; $(MAKE) NPROCS=$(NPROCS) CLASS=$(CLASS)
diff --git a/examples/smpi/NAS/SP/Makefile b/examples/smpi/NAS/SP/Makefile
deleted file mode 100644 (file)
index 01508aa..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-SHELL=/bin/sh
-BENCHMARK=sp
-BENCHMARKU=SP
-
-include ../config/make.def
-
-
-OBJS = sp.o make_set.o initialize.o exact_solution.o exact_rhs.o \
-       set_constants.o adi.o define.o copy_faces.o rhs.o      \
-       lhsx.o lhsy.o lhsz.o x_solve.o ninvr.o y_solve.o pinvr.o    \
-       z_solve.o tzetar.o add.o txinvr.o error.o verify.o setup_mpi.o \
-       ${COMMON}/print_results.o ${COMMON}/timers.o
-
-include ../sys/make.common
-
-# npbparams.h is included by header.h
-# The following rule should do the trick but many make programs (not gmake)
-# will do the wrong thing and rebuild the world every time (because the
-# mod time on header.h is not changed. One solution would be to 
-# touch header.h but this might cause confusion if someone has
-# accidentally deleted it. Instead, make the dependency on npbparams.h
-# explicit in all the lines below (even though dependence is indirect). 
-
-# header.h: npbparams.h
-
-${PROGRAM}: config ${OBJS}
-       ${FLINK} ${FLINKFLAGS} -o ${PROGRAM} ${OBJS} ${FMPI_LIB}
-
-.f.o:
-       ${FCOMPILE} $<
-
-sp.o:             sp.f  header.h npbparams.h  mpinpb.h
-make_set.o:       make_set.f  header.h npbparams.h  mpinpb.h
-initialize.o:     initialize.f  header.h npbparams.h
-exact_solution.o: exact_solution.f  header.h npbparams.h
-exact_rhs.o:      exact_rhs.f  header.h npbparams.h
-set_constants.o:  set_constants.f  header.h npbparams.h
-adi.o:            adi.f  header.h npbparams.h
-define.o:         define.f  header.h npbparams.h
-copy_faces.o:     copy_faces.f  header.h npbparams.h  mpinpb.h
-rhs.o:            rhs.f  header.h npbparams.h
-lhsx.o:           lhsx.f  header.h npbparams.h
-lhsy.o:           lhsy.f  header.h npbparams.h
-lhsz.o:           lhsz.f  header.h npbparams.h
-x_solve.o:        x_solve.f  header.h npbparams.h  mpinpb.h
-ninvr.o:          ninvr.f  header.h npbparams.h
-y_solve.o:        y_solve.f  header.h npbparams.h  mpinpb.h
-pinvr.o:          pinvr.f  header.h npbparams.h
-z_solve.o:        z_solve.f  header.h npbparams.h  mpinpb.h
-tzetar.o:         tzetar.f  header.h npbparams.h
-add.o:            add.f  header.h npbparams.h
-txinvr.o:         txinvr.f  header.h npbparams.h
-error.o:          error.f  header.h npbparams.h  mpinpb.h
-verify.o:         verify.f  header.h npbparams.h  mpinpb.h
-setup_mpi.o:      setup_mpi.f mpinpb.h npbparams.h 
-
-
-clean:
-       - rm -f *.o *~ mputil*
-       - rm -f npbparams.h core
diff --git a/examples/smpi/NAS/SP/README b/examples/smpi/NAS/SP/README
deleted file mode 100644 (file)
index fe423db..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-This code implements a 3D Multi-partition algorithm for the solution 
-of the uncoupled systems of linear equations resulting from 
-Beam-Warming approximate factorization.  Consequently, the program 
-must be run on a square number of processors.  The included file 
-"npbparams.h" contains a parameter statement which sets "maxcells" 
-and "problem_size".  The parameter maxcells must be set to the 
-square root of the number of processors.  For example, if running 
-on 25 processors, then set max_cells=5.  The standard problem sizes 
-are problem_size=64 for class A, 102 for class B, and 162 for class C.
-
-The number of time steps and the time step size dt are set in the 
-npbparams.h but may be overridden in the input deck "inputsp.data".  
-The number of time steps is 400 for all three 
-standard problems, and the appropriate time step sizes "dt" are 
-0.0015d0 for class A, 0.001d0 for class B, and 0.00067 for class C.  
-
diff --git a/examples/smpi/NAS/SP/add.f b/examples/smpi/NAS/SP/add.f
deleted file mode 100644 (file)
index cdc4765..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine  add
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c addition of update to the vector u
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       integer  c, i, j, k, m
-
-       do  c = 1, ncells
-          do m = 1, 5
-             do  k = start(3,c), cell_size(3,c)-end(3,c)-1
-                do  j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do  i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      u(i,j,k,m,c) = u(i,j,k,m,c) + rhs(i,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-       end do
-
-       return
-       end
diff --git a/examples/smpi/NAS/SP/adi.f b/examples/smpi/NAS/SP/adi.f
deleted file mode 100644 (file)
index e55cfd6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine  adi
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       call copy_faces
-
-       call txinvr
-
-       call x_solve
-
-       call y_solve
-
-       call z_solve
-
-       call add
-
-       return
-       end
-
diff --git a/examples/smpi/NAS/SP/copy_faces.f b/examples/smpi/NAS/SP/copy_faces.f
deleted file mode 100644 (file)
index 41824d2..0000000
+++ /dev/null
@@ -1,306 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine copy_faces
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c this function copies the face values of a variable defined on a set 
-c of cells to the overlap locations of the adjacent sets of cells. 
-c Because a set of cells interfaces in each direction with exactly one 
-c other set, we only need to fill six different buffers. We could try to 
-c overlap communication with computation, by computing
-c some internal values while communicating boundary values, but this
-c adds so much overhead that it's not clearly useful. 
-c---------------------------------------------------------------------
-
-       include 'header.h'
-       include 'mpinpb.h'
-
-       integer i, j, k, c, m, requests(0:11), p0, p1, 
-     >         p2, p3, p4, p5, b_size(0:5), ss(0:5), 
-     >         sr(0:5), error, statuses(MPI_STATUS_SIZE, 0:11)
-
-c---------------------------------------------------------------------
-c      exit immediately if there are no faces to be copied           
-c---------------------------------------------------------------------
-       if (no_nodes .eq. 1) then
-          call compute_rhs
-          return
-       endif
-
-
-       ss(0) = start_send_east
-       ss(1) = start_send_west
-       ss(2) = start_send_north
-       ss(3) = start_send_south
-       ss(4) = start_send_top
-       ss(5) = start_send_bottom
-
-       sr(0) = start_recv_east
-       sr(1) = start_recv_west
-       sr(2) = start_recv_north
-       sr(3) = start_recv_south
-       sr(4) = start_recv_top
-       sr(5) = start_recv_bottom
-
-       b_size(0) = east_size   
-       b_size(1) = west_size   
-       b_size(2) = north_size  
-       b_size(3) = south_size  
-       b_size(4) = top_size    
-       b_size(5) = bottom_size 
-
-c---------------------------------------------------------------------
-c because the difference stencil for the diagonalized scheme is 
-c orthogonal, we do not have to perform the staged copying of faces, 
-c but can send all face information simultaneously to the neighboring 
-c cells in all directions          
-c---------------------------------------------------------------------
-       p0 = 0
-       p1 = 0
-       p2 = 0
-       p3 = 0
-       p4 = 0
-       p5 = 0
-
-       do  c = 1, ncells
-          do   m = 1, 5
-
-c---------------------------------------------------------------------
-c            fill the buffer to be sent to eastern neighbors (i-dir)
-c---------------------------------------------------------------------
-             if (cell_coord(1,c) .ne. ncells) then
-                do   k = 0, cell_size(3,c)-1
-                   do   j = 0, cell_size(2,c)-1
-                      do   i = cell_size(1,c)-2, cell_size(1,c)-1
-                         out_buffer(ss(0)+p0) = u(i,j,k,m,c)
-                         p0 = p0 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-c---------------------------------------------------------------------
-c            fill the buffer to be sent to western neighbors 
-c---------------------------------------------------------------------
-             if (cell_coord(1,c) .ne. 1) then
-                do   k = 0, cell_size(3,c)-1
-                   do   j = 0, cell_size(2,c)-1
-                      do   i = 0, 1
-                         out_buffer(ss(1)+p1) = u(i,j,k,m,c)
-                         p1 = p1 + 1
-                      end do
-                   end do
-                end do
-
-
-             endif
-
-c---------------------------------------------------------------------
-c            fill the buffer to be sent to northern neighbors (j_dir)
-c---------------------------------------------------------------------
-             if (cell_coord(2,c) .ne. ncells) then
-                do   k = 0, cell_size(3,c)-1
-                   do   j = cell_size(2,c)-2, cell_size(2,c)-1
-                      do   i = 0, cell_size(1,c)-1
-                         out_buffer(ss(2)+p2) = u(i,j,k,m,c)
-                         p2 = p2 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-c---------------------------------------------------------------------
-c            fill the buffer to be sent to southern neighbors 
-c---------------------------------------------------------------------
-             if (cell_coord(2,c).ne. 1) then
-                do   k = 0, cell_size(3,c)-1
-                   do   j = 0, 1
-                      do   i = 0, cell_size(1,c)-1   
-                         out_buffer(ss(3)+p3) = u(i,j,k,m,c)
-                         p3 = p3 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-c---------------------------------------------------------------------
-c            fill the buffer to be sent to top neighbors (k-dir)
-c---------------------------------------------------------------------
-             if (cell_coord(3,c) .ne. ncells) then
-                do   k = cell_size(3,c)-2, cell_size(3,c)-1
-                   do   j = 0, cell_size(2,c)-1
-                      do   i = 0, cell_size(1,c)-1
-                         out_buffer(ss(4)+p4) = u(i,j,k,m,c)
-                         p4 = p4 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-c---------------------------------------------------------------------
-c            fill the buffer to be sent to bottom neighbors
-c---------------------------------------------------------------------
-             if (cell_coord(3,c).ne. 1) then
-                 do    k=0, 1
-                    do   j = 0, cell_size(2,c)-1
-                       do   i = 0, cell_size(1,c)-1
-                          out_buffer(ss(5)+p5) = u(i,j,k,m,c)
-                          p5 = p5 + 1
-                       end do
-                    end do
-                 end do
-              endif
-
-c---------------------------------------------------------------------
-c          m loop
-c---------------------------------------------------------------------
-           end do
-
-c---------------------------------------------------------------------
-c       cell loop
-c---------------------------------------------------------------------
-        end do
-
-       call mpi_irecv(in_buffer(sr(0)), b_size(0), 
-     >                dp_type, successor(1), WEST,  
-     >                comm_rhs, requests(0), error)
-       call mpi_irecv(in_buffer(sr(1)), b_size(1), 
-     >                dp_type, predecessor(1), EAST,  
-     >                comm_rhs, requests(1), error)
-       call mpi_irecv(in_buffer(sr(2)), b_size(2), 
-     >                dp_type, successor(2), SOUTH, 
-     >                comm_rhs, requests(2), error)
-       call mpi_irecv(in_buffer(sr(3)), b_size(3), 
-     >                dp_type, predecessor(2), NORTH, 
-     >                comm_rhs, requests(3), error)
-       call mpi_irecv(in_buffer(sr(4)), b_size(4), 
-     >                dp_type, successor(3), BOTTOM,
-     >                comm_rhs, requests(4), error)
-       call mpi_irecv(in_buffer(sr(5)), b_size(5), 
-     >                dp_type, predecessor(3), TOP,   
-     >                comm_rhs, requests(5), error)
-
-       call mpi_isend(out_buffer(ss(0)), b_size(0), 
-     >                dp_type, successor(1),   EAST, 
-     >                comm_rhs, requests(6), error)
-       call mpi_isend(out_buffer(ss(1)), b_size(1), 
-     >                dp_type, predecessor(1), WEST, 
-     >                comm_rhs, requests(7), error)
-       call mpi_isend(out_buffer(ss(2)), b_size(2), 
-     >                dp_type,successor(2),   NORTH, 
-     >                comm_rhs, requests(8), error)
-       call mpi_isend(out_buffer(ss(3)), b_size(3), 
-     >                dp_type,predecessor(2), SOUTH, 
-     >                comm_rhs, requests(9), error)
-       call mpi_isend(out_buffer(ss(4)), b_size(4), 
-     >                dp_type,successor(3),   TOP, 
-     >                comm_rhs,   requests(10), error)
-       call mpi_isend(out_buffer(ss(5)), b_size(5), 
-     >                dp_type,predecessor(3), BOTTOM, 
-     >                comm_rhs,requests(11), error)
-
-
-       call mpi_waitall(12, requests, statuses, error)
-
-c---------------------------------------------------------------------
-c unpack the data that has just been received;             
-c---------------------------------------------------------------------
-       p0 = 0
-       p1 = 0
-       p2 = 0
-       p3 = 0
-       p4 = 0
-       p5 = 0
-
-       do   c = 1, ncells
-          do    m = 1, 5
-
-             if (cell_coord(1,c) .ne. 1) then
-                do   k = 0, cell_size(3,c)-1
-                   do   j = 0, cell_size(2,c)-1
-                      do   i = -2, -1
-                         u(i,j,k,m,c) = in_buffer(sr(1)+p0)
-                         p0 = p0 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-             if (cell_coord(1,c) .ne. ncells) then
-                do  k = 0, cell_size(3,c)-1
-                   do  j = 0, cell_size(2,c)-1
-                      do  i = cell_size(1,c), cell_size(1,c)+1
-                         u(i,j,k,m,c) = in_buffer(sr(0)+p1)
-                         p1 = p1 + 1
-                      end do
-                   end do
-                end do
-             end if
-             if (cell_coord(2,c) .ne. 1) then
-                do  k = 0, cell_size(3,c)-1
-                   do   j = -2, -1
-                      do  i = 0, cell_size(1,c)-1
-                         u(i,j,k,m,c) = in_buffer(sr(3)+p2)
-                         p2 = p2 + 1
-                      end do
-                   end do
-                end do
-
-             endif
-             if (cell_coord(2,c) .ne. ncells) then
-                do  k = 0, cell_size(3,c)-1
-                   do   j = cell_size(2,c), cell_size(2,c)+1
-                      do  i = 0, cell_size(1,c)-1
-                         u(i,j,k,m,c) = in_buffer(sr(2)+p3)
-                         p3 = p3 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-             if (cell_coord(3,c) .ne. 1) then
-                do  k = -2, -1
-                   do  j = 0, cell_size(2,c)-1
-                      do  i = 0, cell_size(1,c)-1
-                         u(i,j,k,m,c) = in_buffer(sr(5)+p4)
-                         p4 = p4 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-             if (cell_coord(3,c) .ne. ncells) then
-                do  k = cell_size(3,c), cell_size(3,c)+1
-                   do  j = 0, cell_size(2,c)-1
-                      do  i = 0, cell_size(1,c)-1
-                         u(i,j,k,m,c) = in_buffer(sr(4)+p5)
-                         p5 = p5 + 1
-                      end do
-                   end do
-                end do
-             endif
-
-c---------------------------------------------------------------------
-c         m loop            
-c---------------------------------------------------------------------
-          end do
-
-c---------------------------------------------------------------------
-c      cells loop
-c---------------------------------------------------------------------
-       end do
-
-c---------------------------------------------------------------------
-c now that we have all the data, compute the rhs
-c---------------------------------------------------------------------
-       call compute_rhs
-
-       return
-       end
diff --git a/examples/smpi/NAS/SP/define.f b/examples/smpi/NAS/SP/define.f
deleted file mode 100644 (file)
index c465533..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine compute_buffer_size(dim)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       integer  c, dim, face_size
-
-       if (ncells .eq. 1) return
-
-c---------------------------------------------------------------------
-c      compute the actual sizes of the buffers; note that there is 
-c      always one cell face that doesn't need buffer space, because it 
-c      is at the boundary of the grid
-c---------------------------------------------------------------------
-
-       west_size = 0
-       east_size = 0
-
-       do   c = 1, ncells
-          face_size = cell_size(2,c) * cell_size(3,c) * dim * 2
-          if (cell_coord(1,c).ne.1) west_size = west_size + face_size
-          if (cell_coord(1,c).ne.ncells) east_size = east_size + 
-     >                                                 face_size 
-       end do
-
-       north_size = 0
-       south_size = 0
-       do   c = 1, ncells
-          face_size = cell_size(1,c)*cell_size(3,c) * dim * 2
-          if (cell_coord(2,c).ne.1) south_size = south_size + face_size
-          if (cell_coord(2,c).ne.ncells) north_size = north_size + 
-     >                                                  face_size 
-       end do
-
-       top_size = 0
-       bottom_size = 0
-       do   c = 1, ncells
-          face_size = cell_size(1,c) * cell_size(2,c) * dim * 2
-          if (cell_coord(3,c).ne.1) bottom_size = bottom_size + 
-     >                                            face_size
-          if (cell_coord(3,c).ne.ncells) top_size = top_size +
-     >                                                face_size     
-       end do
-
-       start_send_west   = 1
-       start_send_east   = start_send_west   + west_size
-       start_send_south  = start_send_east   + east_size
-       start_send_north  = start_send_south  + south_size
-       start_send_bottom = start_send_north  + north_size
-       start_send_top    = start_send_bottom + bottom_size
-       start_recv_west   = 1
-       start_recv_east   = start_recv_west   + west_size
-       start_recv_south  = start_recv_east   + east_size
-       start_recv_north  = start_recv_south  + south_size
-       start_recv_bottom = start_recv_north  + north_size
-       start_recv_top    = start_recv_bottom + bottom_size
-
-       return
-       end
-
diff --git a/examples/smpi/NAS/SP/error.f b/examples/smpi/NAS/SP/error.f
deleted file mode 100644 (file)
index fd9aab3..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine error_norm(rms)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c this function computes the norm of the difference between the
-c computed solution and the exact solution
-c---------------------------------------------------------------------
-
-       include 'header.h'
-       include 'mpinpb.h'
-
-       integer c, i, j, k, m, ii, jj, kk, d, error
-       double precision xi, eta, zeta, u_exact(5), rms(5), rms_work(5),
-     >                  add
-
-       do   m = 1, 5 
-          rms_work(m) = 0.0d0
-       end do
-
-       do   c = 1, ncells
-          kk = 0
-          do   k = cell_low(3,c), cell_high(3,c)
-             zeta = dble(k) * dnzm1
-             jj = 0
-             do   j = cell_low(2,c), cell_high(2,c)
-                eta = dble(j) * dnym1
-                ii = 0
-                do   i = cell_low(1,c), cell_high(1,c)
-                   xi = dble(i) * dnxm1
-                   call exact_solution(xi, eta, zeta, u_exact)
-
-                   do   m = 1, 5
-                      add = u(ii,jj,kk,m,c)-u_exact(m)
-                      rms_work(m) = rms_work(m) + add*add
-                   end do
-                   ii = ii + 1
-                end do
-                jj = jj + 1
-             end do
-             kk = kk + 1
-          end do
-       end do
-
-       call mpi_allreduce(rms_work, rms, 5, dp_type, 
-     >                 MPI_SUM, comm_setup, error)
-
-       do    m = 1, 5
-          do    d = 1, 3
-             rms(m) = rms(m) / dble(grid_points(d)-2)
-          end do
-          rms(m) = dsqrt(rms(m))
-       end do
-
-       return
-       end
-
-
-
-       subroutine rhs_norm(rms)
-
-       include 'header.h'
-       include 'mpinpb.h'
-
-       integer c, i, j, k, d, m, error
-       double precision rms(5), rms_work(5), add
-
-       do    m = 1, 5
-          rms_work(m) = 0.0d0
-       end do
-
-       do   c = 1, ncells
-          do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-                do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-                   do   m = 1, 5
-                      add = rhs(i,j,k,m,c)
-                      rms_work(m) = rms_work(m) + add*add
-                   end do
-                end do
-             end do
-          end do
-       end do
-
-
-
-       call mpi_allreduce(rms_work, rms, 5, dp_type, 
-     >                 MPI_SUM, comm_setup, error)
-
-       do   m = 1, 5
-          do   d = 1, 3
-             rms(m) = rms(m) / dble(grid_points(d)-2)
-          end do
-          rms(m) = dsqrt(rms(m))
-       end do
-
-       return
-       end
-
-
diff --git a/examples/smpi/NAS/SP/exact_rhs.f b/examples/smpi/NAS/SP/exact_rhs.f
deleted file mode 100644 (file)
index b589668..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine exact_rhs
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c compute the right hand side based on exact solution
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       double precision dtemp(5), xi, eta, zeta, dtpp
-       integer          c, m, i, j, k, ip1, im1, jp1, 
-     >                  jm1, km1, kp1
-
-c---------------------------------------------------------------------
-c loop over all cells owned by this node                   
-c---------------------------------------------------------------------
-       do   c = 1, ncells
-
-c---------------------------------------------------------------------
-c         initialize                                  
-c---------------------------------------------------------------------
-          do   m = 1, 5
-             do   k= 0, cell_size(3,c)-1
-                do   j = 0, cell_size(2,c)-1
-                   do   i = 0, cell_size(1,c)-1
-                      forcing(i,j,k,m,c) = 0.0d0
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c xi-direction flux differences                      
-c---------------------------------------------------------------------
-          do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-             zeta = dble(k+cell_low(3,c)) * dnzm1
-             do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-                eta = dble(j+cell_low(2,c)) * dnym1
-
-                do  i=-2*(1-start(1,c)), cell_size(1,c)+1-2*end(1,c)
-                   xi = dble(i+cell_low(1,c)) * dnxm1
-
-                   call exact_solution(xi, eta, zeta, dtemp)
-                   do  m = 1, 5
-                      ue(i,m) = dtemp(m)
-                   end do
-
-                   dtpp = 1.0d0 / dtemp(1)
-
-                   do  m = 2, 5
-                      buf(i,m) = dtpp * dtemp(m)
-                   end do
-
-                   cuf(i)   = buf(i,2) * buf(i,2)
-                   buf(i,1) = cuf(i) + buf(i,3) * buf(i,3) + 
-     >                        buf(i,4) * buf(i,4) 
-                   q(i) = 0.5d0*(buf(i,2)*ue(i,2) + buf(i,3)*ue(i,3) +
-     >                           buf(i,4)*ue(i,4))
-
-                end do
-                do  i = start(1,c), cell_size(1,c)-end(1,c)-1
-                   im1 = i-1
-                   ip1 = i+1
-
-                   forcing(i,j,k,1,c) = forcing(i,j,k,1,c) -
-     >                 tx2*( ue(ip1,2)-ue(im1,2) )+
-     >                 dx1tx1*(ue(ip1,1)-2.0d0*ue(i,1)+ue(im1,1))
-
-                   forcing(i,j,k,2,c) = forcing(i,j,k,2,c) - tx2 * (
-     >                (ue(ip1,2)*buf(ip1,2)+c2*(ue(ip1,5)-q(ip1)))-
-     >                (ue(im1,2)*buf(im1,2)+c2*(ue(im1,5)-q(im1))))+
-     >                 xxcon1*(buf(ip1,2)-2.0d0*buf(i,2)+buf(im1,2))+
-     >                 dx2tx1*( ue(ip1,2)-2.0d0* ue(i,2)+ue(im1,2))
-
-                   forcing(i,j,k,3,c) = forcing(i,j,k,3,c) - tx2 * (
-     >                 ue(ip1,3)*buf(ip1,2)-ue(im1,3)*buf(im1,2))+
-     >                 xxcon2*(buf(ip1,3)-2.0d0*buf(i,3)+buf(im1,3))+
-     >                 dx3tx1*( ue(ip1,3)-2.0d0*ue(i,3) +ue(im1,3))
-                  
-                   forcing(i,j,k,4,c) = forcing(i,j,k,4,c) - tx2*(
-     >                 ue(ip1,4)*buf(ip1,2)-ue(im1,4)*buf(im1,2))+
-     >                 xxcon2*(buf(ip1,4)-2.0d0*buf(i,4)+buf(im1,4))+
-     >                 dx4tx1*( ue(ip1,4)-2.0d0* ue(i,4)+ ue(im1,4))
-
-                   forcing(i,j,k,5,c) = forcing(i,j,k,5,c) - tx2*(
-     >                 buf(ip1,2)*(c1*ue(ip1,5)-c2*q(ip1))-
-     >                 buf(im1,2)*(c1*ue(im1,5)-c2*q(im1)))+
-     >                 0.5d0*xxcon3*(buf(ip1,1)-2.0d0*buf(i,1)+
-     >                               buf(im1,1))+
-     >                 xxcon4*(cuf(ip1)-2.0d0*cuf(i)+cuf(im1))+
-     >                 xxcon5*(buf(ip1,5)-2.0d0*buf(i,5)+buf(im1,5))+
-     >                 dx5tx1*( ue(ip1,5)-2.0d0* ue(i,5)+ ue(im1,5))
-                end do
-
-c---------------------------------------------------------------------
-c Fourth-order dissipation                         
-c---------------------------------------------------------------------
-                if (start(1,c) .gt. 0) then
-                   do   m = 1, 5
-                      i = 1
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                    (5.0d0*ue(i,m) - 4.0d0*ue(i+1,m) +ue(i+2,m))
-                      i = 2
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (-4.0d0*ue(i-1,m) + 6.0d0*ue(i,m) -
-     >                     4.0d0*ue(i+1,m) +       ue(i+2,m))
-                   end do
-                endif
-
-                do   m = 1, 5
-                   do  i = start(1,c)*3, cell_size(1,c)-3*end(1,c)-1
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp*
-     >                   (ue(i-2,m) - 4.0d0*ue(i-1,m) +
-     >                    6.0d0*ue(i,m) - 4.0d0*ue(i+1,m) + ue(i+2,m))
-                   end do
-                end do
-
-                if (end(1,c) .gt. 0) then
-                   do   m = 1, 5
-                      i = cell_size(1,c)-3
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (ue(i-2,m) - 4.0d0*ue(i-1,m) +
-     >                    6.0d0*ue(i,m) - 4.0d0*ue(i+1,m))
-                      i = cell_size(1,c)-2
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (ue(i-2,m) - 4.0d0*ue(i-1,m) + 5.0d0*ue(i,m))
-                   end do
-                endif
-
-             end do
-          end do
-c---------------------------------------------------------------------
-c  eta-direction flux differences             
-c---------------------------------------------------------------------
-          do   k = start(3,c), cell_size(3,c)-end(3,c)-1          
-             zeta = dble(k+cell_low(3,c)) * dnzm1
-             do   i=start(1,c), cell_size(1,c)-end(1,c)-1
-                xi = dble(i+cell_low(1,c)) * dnxm1
-
-                do  j=-2*(1-start(2,c)), cell_size(2,c)+1-2*end(2,c)
-                   eta = dble(j+cell_low(2,c)) * dnym1
-
-                   call exact_solution(xi, eta, zeta, dtemp)
-                   do   m = 1, 5 
-                      ue(j,m) = dtemp(m)
-                   end do
-                   dtpp = 1.0d0/dtemp(1)
-
-                   do  m = 2, 5
-                      buf(j,m) = dtpp * dtemp(m)
-                   end do
-
-                   cuf(j)   = buf(j,3) * buf(j,3)
-                   buf(j,1) = cuf(j) + buf(j,2) * buf(j,2) + 
-     >                        buf(j,4) * buf(j,4)
-                   q(j) = 0.5d0*(buf(j,2)*ue(j,2) + buf(j,3)*ue(j,3) +
-     >                           buf(j,4)*ue(j,4))
-                end do
-
-                do  j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   jm1 = j-1
-                   jp1 = j+1
-                  
-                   forcing(i,j,k,1,c) = forcing(i,j,k,1,c) -
-     >                ty2*( ue(jp1,3)-ue(jm1,3) )+
-     >                dy1ty1*(ue(jp1,1)-2.0d0*ue(j,1)+ue(jm1,1))
-
-                   forcing(i,j,k,2,c) = forcing(i,j,k,2,c) - ty2*(
-     >                ue(jp1,2)*buf(jp1,3)-ue(jm1,2)*buf(jm1,3))+
-     >                yycon2*(buf(jp1,2)-2.0d0*buf(j,2)+buf(jm1,2))+
-     >                dy2ty1*( ue(jp1,2)-2.0* ue(j,2)+ ue(jm1,2))
-
-                   forcing(i,j,k,3,c) = forcing(i,j,k,3,c) - ty2*(
-     >                (ue(jp1,3)*buf(jp1,3)+c2*(ue(jp1,5)-q(jp1)))-
-     >                (ue(jm1,3)*buf(jm1,3)+c2*(ue(jm1,5)-q(jm1))))+
-     >                yycon1*(buf(jp1,3)-2.0d0*buf(j,3)+buf(jm1,3))+
-     >                dy3ty1*( ue(jp1,3)-2.0d0*ue(j,3) +ue(jm1,3))
-
-                   forcing(i,j,k,4,c) = forcing(i,j,k,4,c) - ty2*(
-     >                ue(jp1,4)*buf(jp1,3)-ue(jm1,4)*buf(jm1,3))+
-     >                yycon2*(buf(jp1,4)-2.0d0*buf(j,4)+buf(jm1,4))+
-     >                dy4ty1*( ue(jp1,4)-2.0d0*ue(j,4)+ ue(jm1,4))
-
-                   forcing(i,j,k,5,c) = forcing(i,j,k,5,c) - ty2*(
-     >                buf(jp1,3)*(c1*ue(jp1,5)-c2*q(jp1))-
-     >                buf(jm1,3)*(c1*ue(jm1,5)-c2*q(jm1)))+
-     >                0.5d0*yycon3*(buf(jp1,1)-2.0d0*buf(j,1)+
-     >                              buf(jm1,1))+
-     >                yycon4*(cuf(jp1)-2.0d0*cuf(j)+cuf(jm1))+
-     >                yycon5*(buf(jp1,5)-2.0d0*buf(j,5)+buf(jm1,5))+
-     >                dy5ty1*(ue(jp1,5)-2.0d0*ue(j,5)+ue(jm1,5))
-                end do
-
-c---------------------------------------------------------------------
-c Fourth-order dissipation                      
-c---------------------------------------------------------------------
-                if (start(2,c) .gt. 0) then
-                   do   m = 1, 5
-                      j = 1
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                    (5.0d0*ue(j,m) - 4.0d0*ue(j+1,m) +ue(j+2,m))
-                      j = 2
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (-4.0d0*ue(j-1,m) + 6.0d0*ue(j,m) -
-     >                     4.0d0*ue(j+1,m) +       ue(j+2,m))
-                   end do
-                endif
-
-                do   m = 1, 5
-                   do  j = start(2,c)*3, cell_size(2,c)-3*end(2,c)-1
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp*
-     >                   (ue(j-2,m) - 4.0d0*ue(j-1,m) +
-     >                    6.0d0*ue(j,m) - 4.0d0*ue(j+1,m) + ue(j+2,m))
-                   end do
-                end do
-                if (end(2,c) .gt. 0) then
-                   do   m = 1, 5
-                      j = cell_size(2,c)-3
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (ue(j-2,m) - 4.0d0*ue(j-1,m) +
-     >                    6.0d0*ue(j,m) - 4.0d0*ue(j+1,m))
-                      j = cell_size(2,c)-2
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (ue(j-2,m) - 4.0d0*ue(j-1,m) + 5.0d0*ue(j,m))
-
-                   end do
-                endif
-
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c zeta-direction flux differences                      
-c---------------------------------------------------------------------
-          do  j=start(2,c), cell_size(2,c)-end(2,c)-1
-             eta = dble(j+cell_low(2,c)) * dnym1
-             do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-                xi = dble(i+cell_low(1,c)) * dnxm1
-
-                do k=-2*(1-start(3,c)), cell_size(3,c)+1-2*end(3,c)
-                   zeta = dble(k+cell_low(3,c)) * dnzm1
-
-                   call exact_solution(xi, eta, zeta, dtemp)
-                   do   m = 1, 5
-                      ue(k,m) = dtemp(m)
-                   end do
-
-                   dtpp = 1.0d0/dtemp(1)
-
-                   do   m = 2, 5
-                      buf(k,m) = dtpp * dtemp(m)
-                   end do
-
-                   cuf(k)   = buf(k,4) * buf(k,4)
-                   buf(k,1) = cuf(k) + buf(k,2) * buf(k,2) + 
-     >                        buf(k,3) * buf(k,3)
-                   q(k) = 0.5d0*(buf(k,2)*ue(k,2) + buf(k,3)*ue(k,3) +
-     >                           buf(k,4)*ue(k,4))
-                end do
-
-                do    k=start(3,c), cell_size(3,c)-end(3,c)-1
-                   km1 = k-1
-                   kp1 = k+1
-                  
-                   forcing(i,j,k,1,c) = forcing(i,j,k,1,c) -
-     >                 tz2*( ue(kp1,4)-ue(km1,4) )+
-     >                 dz1tz1*(ue(kp1,1)-2.0d0*ue(k,1)+ue(km1,1))
-
-                   forcing(i,j,k,2,c) = forcing(i,j,k,2,c) - tz2 * (
-     >                 ue(kp1,2)*buf(kp1,4)-ue(km1,2)*buf(km1,4))+
-     >                 zzcon2*(buf(kp1,2)-2.0d0*buf(k,2)+buf(km1,2))+
-     >                 dz2tz1*( ue(kp1,2)-2.0d0* ue(k,2)+ ue(km1,2))
-
-                   forcing(i,j,k,3,c) = forcing(i,j,k,3,c) - tz2 * (
-     >                 ue(kp1,3)*buf(kp1,4)-ue(km1,3)*buf(km1,4))+
-     >                 zzcon2*(buf(kp1,3)-2.0d0*buf(k,3)+buf(km1,3))+
-     >                 dz3tz1*(ue(kp1,3)-2.0d0*ue(k,3)+ue(km1,3))
-
-                   forcing(i,j,k,4,c) = forcing(i,j,k,4,c) - tz2 * (
-     >                (ue(kp1,4)*buf(kp1,4)+c2*(ue(kp1,5)-q(kp1)))-
-     >                (ue(km1,4)*buf(km1,4)+c2*(ue(km1,5)-q(km1))))+
-     >                zzcon1*(buf(kp1,4)-2.0d0*buf(k,4)+buf(km1,4))+
-     >                dz4tz1*( ue(kp1,4)-2.0d0*ue(k,4) +ue(km1,4))
-
-                   forcing(i,j,k,5,c) = forcing(i,j,k,5,c) - tz2 * (
-     >                 buf(kp1,4)*(c1*ue(kp1,5)-c2*q(kp1))-
-     >                 buf(km1,4)*(c1*ue(km1,5)-c2*q(km1)))+
-     >                 0.5d0*zzcon3*(buf(kp1,1)-2.0d0*buf(k,1)
-     >                              +buf(km1,1))+
-     >                 zzcon4*(cuf(kp1)-2.0d0*cuf(k)+cuf(km1))+
-     >                 zzcon5*(buf(kp1,5)-2.0d0*buf(k,5)+buf(km1,5))+
-     >                 dz5tz1*( ue(kp1,5)-2.0d0*ue(k,5)+ ue(km1,5))
-                end do
-
-c---------------------------------------------------------------------
-c Fourth-order dissipation                        
-c---------------------------------------------------------------------
-                if (start(3,c) .gt. 0) then
-                   do   m = 1, 5
-                      k = 1
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                    (5.0d0*ue(k,m) - 4.0d0*ue(k+1,m) +ue(k+2,m))
-                      k = 2
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (-4.0d0*ue(k-1,m) + 6.0d0*ue(k,m) -
-     >                     4.0d0*ue(k+1,m) +       ue(k+2,m))
-                   end do
-                endif
-
-                do   m = 1, 5
-                   do  k = start(3,c)*3, cell_size(3,c)-3*end(3,c)-1
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp*
-     >                   (ue(k-2,m) - 4.0d0*ue(k-1,m) +
-     >                    6.0d0*ue(k,m) - 4.0d0*ue(k+1,m) + ue(k+2,m))
-                   end do
-                end do
-
-                if (end(3,c) .gt. 0) then
-                   do    m = 1, 5
-                      k = cell_size(3,c)-3
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (ue(k-2,m) - 4.0d0*ue(k-1,m) +
-     >                    6.0d0*ue(k,m) - 4.0d0*ue(k+1,m))
-                      k = cell_size(3,c)-2
-                      forcing(i,j,k,m,c) = forcing(i,j,k,m,c) - dssp *
-     >                   (ue(k-2,m) - 4.0d0*ue(k-1,m) + 5.0d0*ue(k,m))
-                   end do
-                endif
-
-             end do
-          end do
-c---------------------------------------------------------------------
-c now change the sign of the forcing function, 
-c---------------------------------------------------------------------
-          do   m = 1, 5
-             do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-                do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      forcing(i,j,k,m,c) = -1.d0 * forcing(i,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c      cell loop
-c---------------------------------------------------------------------
-       end do
-
-       return
-       end
-
-
-
-
-
diff --git a/examples/smpi/NAS/SP/exact_solution.f b/examples/smpi/NAS/SP/exact_solution.f
deleted file mode 100644 (file)
index 2644f0b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine exact_solution(xi,eta,zeta,dtemp)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c this function returns the exact solution at point xi, eta, zeta  
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       double precision  xi, eta, zeta, dtemp(5)
-       integer m
-
-       do  m = 1, 5
-          dtemp(m) =  ce(m,1) +
-     >    xi*(ce(m,2) + xi*(ce(m,5) + xi*(ce(m,8) + xi*ce(m,11)))) +
-     >    eta*(ce(m,3) + eta*(ce(m,6) + eta*(ce(m,9) + eta*ce(m,12))))+
-     >    zeta*(ce(m,4) + zeta*(ce(m,7) + zeta*(ce(m,10) + 
-     >    zeta*ce(m,13))))
-       end do
-
-       return
-       end
-
-
diff --git a/examples/smpi/NAS/SP/header.h b/examples/smpi/NAS/SP/header.h
deleted file mode 100644 (file)
index 663515a..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      implicit none
-
-c---------------------------------------------------------------------
-c The following include file is generated automatically by the
-c "setparams" utility. It defines 
-c      maxcells:      the square root of the maximum number of processors
-c      problem_size:  12, 64, 102, 162 (for class T, A, B, C)
-c      dt_default:    default time step for this problem size if no
-c                     config file
-c      niter_default: default number of iterations for this problem size
-c---------------------------------------------------------------------
-
-      include 'npbparams.h'
-
-      integer           ncells, grid_points(3)
-      common /global/   ncells, grid_points
-
-      double precision  tx1, tx2, tx3, ty1, ty2, ty3, tz1, tz2, tz3, 
-     >                  dx1, dx2, dx3, dx4, dx5, dy1, dy2, dy3, dy4, 
-     >                  dy5, dz1, dz2, dz3, dz4, dz5, dssp, dt, 
-     >                  ce(5,13), dxmax, dymax, dzmax, xxcon1, xxcon2, 
-     >                  xxcon3, xxcon4, xxcon5, dx1tx1, dx2tx1, dx3tx1,
-     >                  dx4tx1, dx5tx1, yycon1, yycon2, yycon3, yycon4,
-     >                  yycon5, dy1ty1, dy2ty1, dy3ty1, dy4ty1, dy5ty1,
-     >                  zzcon1, zzcon2, zzcon3, zzcon4, zzcon5, dz1tz1, 
-     >                  dz2tz1, dz3tz1, dz4tz1, dz5tz1, dnxm1, dnym1, 
-     >                  dnzm1, c1c2, c1c5, c3c4, c1345, conz1, c1, c2, 
-     >                  c3, c4, c5, c4dssp, c5dssp, dtdssp, dttx1, bt,
-     >                  dttx2, dtty1, dtty2, dttz1, dttz2, c2dttx1, 
-     >                  c2dtty1, c2dttz1, comz1, comz4, comz5, comz6, 
-     >                  c3c4tx3, c3c4ty3, c3c4tz3, c2iv, con43, con16
-
-      common /constants/ tx1, tx2, tx3, ty1, ty2, ty3, tz1, tz2, tz3,
-     >                  dx1, dx2, dx3, dx4, dx5, dy1, dy2, dy3, dy4, 
-     >                  dy5, dz1, dz2, dz3, dz4, dz5, dssp, dt, 
-     >                  ce, dxmax, dymax, dzmax, xxcon1, xxcon2, 
-     >                  xxcon3, xxcon4, xxcon5, dx1tx1, dx2tx1, dx3tx1,
-     >                  dx4tx1, dx5tx1, yycon1, yycon2, yycon3, yycon4,
-     >                  yycon5, dy1ty1, dy2ty1, dy3ty1, dy4ty1, dy5ty1,
-     >                  zzcon1, zzcon2, zzcon3, zzcon4, zzcon5, dz1tz1, 
-     >                  dz2tz1, dz3tz1, dz4tz1, dz5tz1, dnxm1, dnym1, 
-     >                  dnzm1, c1c2, c1c5, c3c4, c1345, conz1, c1, c2, 
-     >                  c3, c4, c5, c4dssp, c5dssp, dtdssp, dttx1, bt,
-     >                  dttx2, dtty1, dtty2, dttz1, dttz2, c2dttx1, 
-     >                  c2dtty1, c2dttz1, comz1, comz4, comz5, comz6, 
-     >                  c3c4tx3, c3c4ty3, c3c4tz3, c2iv, con43, con16
-
-      integer           EAST, WEST, NORTH, SOUTH, 
-     >                  BOTTOM, TOP
-
-      parameter (EAST=2000, WEST=3000,      NORTH=4000, SOUTH=5000,
-     >           BOTTOM=6000, TOP=7000)
-
-      integer cell_coord (3,maxcells), cell_low (3,maxcells), 
-     >        cell_high  (3,maxcells), cell_size(3,maxcells),
-     >        predecessor(3),          slice    (3,maxcells),
-     >        grid_size  (3),          successor(3),
-     >        start      (3,maxcells), end      (3,maxcells)
-      common /partition/ cell_coord, cell_low, cell_high, cell_size,
-     >                   grid_size, successor, predecessor, slice,
-     >                   start, end
-
-      integer IMAX, JMAX, KMAX, MAX_CELL_DIM, BUF_SIZE, IMAXP, JMAXP
-
-      parameter (MAX_CELL_DIM = (problem_size/maxcells)+1)
-
-      parameter (IMAX=MAX_CELL_DIM,JMAX=MAX_CELL_DIM,KMAX=MAX_CELL_DIM)
-      parameter (IMAXP=IMAX/2*2+1,JMAXP=JMAX/2*2+1)
-
-c---------------------------------------------------------------------
-c +1 at end to avoid zero length arrays for 1 node
-c---------------------------------------------------------------------
-      parameter (BUF_SIZE=MAX_CELL_DIM*MAX_CELL_DIM*(maxcells-1)*60*2+1)
-
-      double precision 
-     >   u       (-2:IMAXP+1,-2:JMAXP+1,-2:KMAX+1, 5,maxcells),
-     >   us      (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   vs      (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   ws      (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   qs      (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   ainv    (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   rho_i   (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   speed   (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   square  (-1:IMAX,   -1:JMAX,   -1:KMAX,     maxcells),
-     >   rhs     ( 0:IMAXP-1, 0:JMAXP-1, 0:KMAX-1, 5,maxcells),
-     >   forcing ( 0:IMAXP-1, 0:JMAXP-1, 0:KMAX-1, 5,maxcells),
-     >   lhs     ( 0:IMAXP-1, 0:JMAXP-1, 0:KMAX-1,15,maxcells),
-     >   in_buffer(BUF_SIZE), out_buffer(BUF_SIZE)
-      common /fields/  u, us, vs, ws, qs, ainv, rho_i, speed, square, 
-     >                 rhs, forcing, lhs, in_buffer, out_buffer
-
-      double precision cv(-2:MAX_CELL_DIM+1),   rhon(-2:MAX_CELL_DIM+1),
-     >                 rhos(-2:MAX_CELL_DIM+1), rhoq(-2:MAX_CELL_DIM+1),
-     >                 cuf(-2:MAX_CELL_DIM+1),  q(-2:MAX_CELL_DIM+1),
-     >                 ue(-2:MAX_CELL_DIM+1,5), buf(-2:MAX_CELL_DIM+1,5)
-      common /work_1d/ cv, rhon, rhos, rhoq, cuf, q, ue, buf
-
-      integer  west_size, east_size, bottom_size, top_size,
-     >         north_size, south_size, start_send_west, 
-     >         start_send_east, start_send_south, start_send_north,
-     >         start_send_bottom, start_send_top, start_recv_west,
-     >         start_recv_east, start_recv_south, start_recv_north,
-     >         start_recv_bottom, start_recv_top
-      common /box/ west_size, east_size, bottom_size,
-     >             top_size, north_size, south_size, 
-     >             start_send_west, start_send_east, start_send_south,
-     >             start_send_north, start_send_bottom, start_send_top,
-     >             start_recv_west, start_recv_east, start_recv_south,
-     >             start_recv_north, start_recv_bottom, start_recv_top
diff --git a/examples/smpi/NAS/SP/initialize.f b/examples/smpi/NAS/SP/initialize.f
deleted file mode 100644 (file)
index 655c8d9..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine  initialize
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c This subroutine initializes the field variable u using 
-c tri-linear transfinite interpolation of the boundary values     
-c---------------------------------------------------------------------
-
-       include 'header.h'
-  
-       integer c, i, j, k, m, ii, jj, kk, ix, iy, iz
-       double precision  xi, eta, zeta, Pface(5,3,2), Pxi, Peta, 
-     >                   Pzeta, temp(5)
-
-
-c---------------------------------------------------------------------
-c  Later (in compute_rhs) we compute 1/u for every element. A few of 
-c  the corner elements are not used, but it convenient (and faster) 
-c  to compute the whole thing with a simple loop. Make sure those 
-c  values are nonzero by initializing the whole thing here. 
-c---------------------------------------------------------------------
-      do c = 1, ncells
-         do kk = -1, IMAX
-            do jj = -1, IMAX
-               do ii = -1, IMAX
-                  u(ii, jj, kk, 1, c) = 1.0
-                  u(ii, jj, kk, 2, c) = 0.0
-                  u(ii, jj, kk, 3, c) = 0.0
-                  u(ii, jj, kk, 4, c) = 0.0
-                  u(ii, jj, kk, 5, c) = 1.0
-               end do
-            end do
-         end do
-      end do
-
-c---------------------------------------------------------------------
-c first store the "interpolated" values everywhere on the grid    
-c---------------------------------------------------------------------
-       do  c=1, ncells
-          kk = 0
-          do  k = cell_low(3,c), cell_high(3,c)
-             zeta = dble(k) * dnzm1
-             jj = 0
-             do  j = cell_low(2,c), cell_high(2,c)
-                eta = dble(j) * dnym1
-                ii = 0
-                do   i = cell_low(1,c), cell_high(1,c)
-                   xi = dble(i) * dnxm1
-                  
-                   do ix = 1, 2
-                      call exact_solution(dble(ix-1), eta, zeta, 
-     >                                    Pface(1,1,ix))
-                   end do
-
-                   do    iy = 1, 2
-                      call exact_solution(xi, dble(iy-1) , zeta, 
-     >                                    Pface(1,2,iy))
-                   end do
-
-                   do    iz = 1, 2
-                      call exact_solution(xi, eta, dble(iz-1),   
-     >                                    Pface(1,3,iz))
-                   end do
-
-                   do   m = 1, 5
-                      Pxi   = xi   * Pface(m,1,2) + 
-     >                        (1.0d0-xi)   * Pface(m,1,1)
-                      Peta  = eta  * Pface(m,2,2) + 
-     >                        (1.0d0-eta)  * Pface(m,2,1)
-                      Pzeta = zeta * Pface(m,3,2) + 
-     >                        (1.0d0-zeta) * Pface(m,3,1)
-                      u(ii,jj,kk,m,c) = Pxi + Peta + Pzeta - 
-     >                          Pxi*Peta - Pxi*Pzeta - Peta*Pzeta + 
-     >                          Pxi*Peta*Pzeta
-
-                   end do
-                   ii = ii + 1
-                end do
-                jj = jj + 1
-             end do
-             kk = kk+1
-          end do
-       end do
-
-c---------------------------------------------------------------------
-c now store the exact values on the boundaries        
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c west face                                                  
-c---------------------------------------------------------------------
-       c = slice(1,1)
-       ii = 0
-       xi = 0.0d0
-       kk = 0
-       do  k = cell_low(3,c), cell_high(3,c)
-          zeta = dble(k) * dnzm1
-          jj = 0
-          do   j = cell_low(2,c), cell_high(2,c)
-             eta = dble(j) * dnym1
-             call exact_solution(xi, eta, zeta, temp)
-             do   m = 1, 5
-                u(ii,jj,kk,m,c) = temp(m)
-             end do
-             jj = jj + 1
-          end do
-          kk = kk + 1
-       end do
-
-c---------------------------------------------------------------------
-c east face                                                      
-c---------------------------------------------------------------------
-       c  = slice(1,ncells)
-       ii = cell_size(1,c)-1
-       xi = 1.0d0
-       kk = 0
-       do   k = cell_low(3,c), cell_high(3,c)
-          zeta = dble(k) * dnzm1
-          jj = 0
-          do   j = cell_low(2,c), cell_high(2,c)
-             eta = dble(j) * dnym1
-             call exact_solution(xi, eta, zeta, temp)
-             do   m = 1, 5
-                u(ii,jj,kk,m,c) = temp(m)
-             end do
-             jj = jj + 1
-          end do
-          kk = kk + 1
-       end do
-
-c---------------------------------------------------------------------
-c south face                                                 
-c---------------------------------------------------------------------
-       c = slice(2,1)
-       jj = 0
-       eta = 0.0d0
-       kk = 0
-       do  k = cell_low(3,c), cell_high(3,c)
-          zeta = dble(k) * dnzm1
-          ii = 0
-          do   i = cell_low(1,c), cell_high(1,c)
-             xi = dble(i) * dnxm1
-             call exact_solution(xi, eta, zeta, temp)
-             do   m = 1, 5
-                u(ii,jj,kk,m,c) = temp(m)
-             end do
-             ii = ii + 1
-          end do
-          kk = kk + 1
-       end do
-
-
-c---------------------------------------------------------------------
-c north face                                    
-c---------------------------------------------------------------------
-       c = slice(2,ncells)
-       jj = cell_size(2,c)-1
-       eta = 1.0d0
-       kk = 0
-       do   k = cell_low(3,c), cell_high(3,c)
-          zeta = dble(k) * dnzm1
-          ii = 0
-          do   i = cell_low(1,c), cell_high(1,c)
-             xi = dble(i) * dnxm1
-             call exact_solution(xi, eta, zeta, temp)
-             do   m = 1, 5
-                u(ii,jj,kk,m,c) = temp(m)
-             end do
-             ii = ii + 1
-          end do
-          kk = kk + 1
-       end do
-
-c---------------------------------------------------------------------
-c bottom face                                       
-c---------------------------------------------------------------------
-       c = slice(3,1)
-       kk = 0
-       zeta = 0.0d0
-       jj = 0
-       do   j = cell_low(2,c), cell_high(2,c)
-          eta = dble(j) * dnym1
-          ii = 0
-          do   i =cell_low(1,c), cell_high(1,c)
-             xi = dble(i) *dnxm1
-             call exact_solution(xi, eta, zeta, temp)
-             do   m = 1, 5
-                u(ii,jj,kk,m,c) = temp(m)
-             end do
-             ii = ii + 1
-          end do
-          jj = jj + 1
-       end do
-
-c---------------------------------------------------------------------
-c top face     
-c---------------------------------------------------------------------
-       c = slice(3,ncells)
-       kk = cell_size(3,c)-1
-       zeta = 1.0d0
-       jj = 0
-       do   j = cell_low(2,c), cell_high(2,c)
-          eta = dble(j) * dnym1
-          ii = 0
-          do   i =cell_low(1,c), cell_high(1,c)
-             xi = dble(i) * dnxm1
-             call exact_solution(xi, eta, zeta, temp)
-             do   m = 1, 5
-                u(ii,jj,kk,m,c) = temp(m)
-             end do
-             ii = ii + 1
-          end do
-          jj = jj + 1
-       end do
-
-       return
-       end
-
-
-       subroutine lhsinit
-
-       include 'header.h'
-       
-       integer i, j, k, d, c, n
-
-c---------------------------------------------------------------------
-c loop over all cells                                       
-c---------------------------------------------------------------------
-       do  c = 1, ncells
-
-c---------------------------------------------------------------------
-c         first, initialize the start and end arrays
-c---------------------------------------------------------------------
-          do  d = 1, 3
-             if (cell_coord(d,c) .eq. 1) then
-                start(d,c) = 1
-             else 
-                start(d,c) = 0
-             endif
-             if (cell_coord(d,c) .eq. ncells) then
-                end(d,c) = 1
-             else
-                end(d,c) = 0
-             endif
-          end do
-
-c---------------------------------------------------------------------
-c     zap the whole left hand side for starters
-c---------------------------------------------------------------------
-          do  n = 1, 15
-             do  k = 0, cell_size(3,c)-1
-                do  j = 0, cell_size(2,c)-1
-                   do  i = 0, cell_size(1,c)-1
-                      lhs(i,j,k,n,c) = 0.0d0
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c next, set all diagonal values to 1. This is overkill, but convenient
-c---------------------------------------------------------------------
-          do   n = 1, 3
-             do   k = 0, cell_size(3,c)-1
-                do   j = 0, cell_size(2,c)-1
-                   do   i = 0, cell_size(1,c)-1
-                      lhs(i,j,k,5*n-2,c) = 1.0d0
-                   end do
-                end do
-             end do
-          end do
-
-       end do
-
-      return
-      end
-
-
-
diff --git a/examples/smpi/NAS/SP/inputsp.data.sample b/examples/smpi/NAS/SP/inputsp.data.sample
deleted file mode 100644 (file)
index ae3801f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-400       number of time steps
-0.0015d0  dt for class A = 0.0015d0. class B = 0.001d0  class C = 0.00067d0
-64 64 64
diff --git a/examples/smpi/NAS/SP/lhsx.f b/examples/smpi/NAS/SP/lhsx.f
deleted file mode 100644 (file)
index cae7779..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine lhsx(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c This function computes the left hand side for the three x-factors  
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       double precision ru1
-       integer          i, j, k, c
-
-
-c---------------------------------------------------------------------
-c      treat only cell c             
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c      first fill the lhs for the u-eigenvalue                   
-c---------------------------------------------------------------------
-       do  k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do  j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do  i = start(1,c)-1, cell_size(1,c)-end(1,c)
-                ru1 = c3c4*rho_i(i,j,k,c)
-                cv(i) = us(i,j,k,c)
-                rhon(i) = dmax1(dx2+con43*ru1, 
-     >                          dx5+c1c5*ru1,
-     >                          dxmax+ru1,
-     >                          dx1)
-             end do
-
-             do  i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,1,c) =   0.0d0
-                lhs(i,j,k,2,c) = - dttx2 * cv(i-1) - dttx1 * rhon(i-1)
-                lhs(i,j,k,3,c) =   1.0d0 + c2dttx1 * rhon(i)
-                lhs(i,j,k,4,c) =   dttx2 * cv(i+1) - dttx1 * rhon(i+1)
-                lhs(i,j,k,5,c) =   0.0d0
-             end do
-          end do
-       end do
-
-c---------------------------------------------------------------------
-c      add fourth order dissipation                             
-c---------------------------------------------------------------------
-       if (start(1,c) .gt. 0) then
-          i = 1
-          do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz5
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-                lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1
-  
-                lhs(i+1,j,k,2,c) = lhs(i+1,j,k,2,c) - comz4
-                lhs(i+1,j,k,3,c) = lhs(i+1,j,k,3,c) + comz6
-                lhs(i+1,j,k,4,c) = lhs(i+1,j,k,4,c) - comz4
-                lhs(i+1,j,k,5,c) = lhs(i+1,j,k,5,c) + comz1
-             end do
-          end do
-       endif
-
-       do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do   i=3*start(1,c), cell_size(1,c)-3*end(1,c)-1
-                lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1
-                lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-                lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1
-             end do
-          end do
-       end do
-
-       if (end(1,c) .gt. 0) then
-          i = cell_size(1,c)-3
-          do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-                lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1
-                lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-
-                lhs(i+1,j,k,1,c) = lhs(i+1,j,k,1,c) + comz1
-                lhs(i+1,j,k,2,c) = lhs(i+1,j,k,2,c) - comz4
-                lhs(i+1,j,k,3,c) = lhs(i+1,j,k,3,c) + comz5
-             end do
-          end do
-       endif
-
-c---------------------------------------------------------------------
-c      subsequently, fill the other factors (u+c), (u-c) by a4ing to 
-c      the first  
-c---------------------------------------------------------------------
-       do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,1+5,c)  = lhs(i,j,k,1,c)
-                lhs(i,j,k,2+5,c)  = lhs(i,j,k,2,c) - 
-     >                            dttx2 * speed(i-1,j,k,c)
-                lhs(i,j,k,3+5,c)  = lhs(i,j,k,3,c)
-                lhs(i,j,k,4+5,c)  = lhs(i,j,k,4,c) + 
-     >                            dttx2 * speed(i+1,j,k,c)
-                lhs(i,j,k,5+5,c) = lhs(i,j,k,5,c)
-                lhs(i,j,k,1+10,c) = lhs(i,j,k,1,c)
-                lhs(i,j,k,2+10,c) = lhs(i,j,k,2,c) + 
-     >                            dttx2 * speed(i-1,j,k,c)
-                lhs(i,j,k,3+10,c) = lhs(i,j,k,3,c)
-                lhs(i,j,k,4+10,c) = lhs(i,j,k,4,c) - 
-     >                            dttx2 * speed(i+1,j,k,c)
-                lhs(i,j,k,5+10,c) = lhs(i,j,k,5,c)
-             end do
-          end do
-       end do
-
-       return
-       end
-
-
-
diff --git a/examples/smpi/NAS/SP/lhsy.f b/examples/smpi/NAS/SP/lhsy.f
deleted file mode 100644 (file)
index 9c07a35..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine lhsy(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c This function computes the left hand side for the three y-factors   
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       double precision ru1
-       integer          i, j, k, c
-
-c---------------------------------------------------------------------
-c      treat only cell c
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c      first fill the lhs for the u-eigenvalue         
-c---------------------------------------------------------------------
-       do  k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do  i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-             do  j = start(2,c)-1, cell_size(2,c)-end(2,c)
-                ru1 = c3c4*rho_i(i,j,k,c)
-                cv(j) = vs(i,j,k,c)
-                rhoq(j) = dmax1( dy3 + con43 * ru1,
-     >                           dy5 + c1c5*ru1,
-     >                           dymax + ru1,
-     >                           dy1)
-             end do
-            
-             do  j = start(2,c), cell_size(2,c)-end(2,c)-1
-                lhs(i,j,k,1,c) =  0.0d0
-                lhs(i,j,k,2,c) = -dtty2 * cv(j-1) - dtty1 * rhoq(j-1)
-                lhs(i,j,k,3,c) =  1.0 + c2dtty1 * rhoq(j)
-                lhs(i,j,k,4,c) =  dtty2 * cv(j+1) - dtty1 * rhoq(j+1)
-                lhs(i,j,k,5,c) =  0.0d0
-             end do
-          end do
-       end do
-
-c---------------------------------------------------------------------
-c      add fourth order dissipation                             
-c---------------------------------------------------------------------
-       if (start(2,c) .gt. 0) then
-          j = 1
-          do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz5
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-                lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1
-       
-                lhs(i,j+1,k,2,c) = lhs(i,j+1,k,2,c) - comz4
-                lhs(i,j+1,k,3,c) = lhs(i,j+1,k,3,c) + comz6
-                lhs(i,j+1,k,4,c) = lhs(i,j+1,k,4,c) - comz4
-                lhs(i,j+1,k,5,c) = lhs(i,j+1,k,5,c) + comz1
-             end do
-          end do
-       endif
-
-       do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do   j=3*start(2,c), cell_size(2,c)-3*end(2,c)-1
-             do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-                lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1
-                lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-                lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1
-             end do
-          end do
-       end do
-
-       if (end(2,c) .gt. 0) then
-          j = cell_size(2,c)-3
-          do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1
-                lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-
-                lhs(i,j+1,k,1,c) = lhs(i,j+1,k,1,c) + comz1
-                lhs(i,j+1,k,2,c) = lhs(i,j+1,k,2,c) - comz4
-                lhs(i,j+1,k,3,c) = lhs(i,j+1,k,3,c) + comz5
-             end do
-          end do
-       endif
-
-c---------------------------------------------------------------------
-c      subsequently, do the other two factors                    
-c---------------------------------------------------------------------
-       do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,1+5,c)  = lhs(i,j,k,1,c)
-                lhs(i,j,k,2+5,c)  = lhs(i,j,k,2,c) - 
-     >                            dtty2 * speed(i,j-1,k,c)
-                lhs(i,j,k,3+5,c)  = lhs(i,j,k,3,c)
-                lhs(i,j,k,4+5,c)  = lhs(i,j,k,4,c) + 
-     >                            dtty2 * speed(i,j+1,k,c)
-                lhs(i,j,k,5+5,c) = lhs(i,j,k,5,c)
-                lhs(i,j,k,1+10,c) = lhs(i,j,k,1,c)
-                lhs(i,j,k,2+10,c) = lhs(i,j,k,2,c) + 
-     >                            dtty2 * speed(i,j-1,k,c)
-                lhs(i,j,k,3+10,c) = lhs(i,j,k,3,c)
-                lhs(i,j,k,4+10,c) = lhs(i,j,k,4,c) - 
-     >                            dtty2 * speed(i,j+1,k,c)
-                lhs(i,j,k,5+10,c) = lhs(i,j,k,5,c)
-             end do
-          end do
-       end do
-
-       return
-       end
-
-
-
diff --git a/examples/smpi/NAS/SP/lhsz.f b/examples/smpi/NAS/SP/lhsz.f
deleted file mode 100644 (file)
index 08ea0bc..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine lhsz(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c This function computes the left hand side for the three z-factors   
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       double precision ru1
-       integer i, j, k, c
-
-c---------------------------------------------------------------------
-c      treat only cell c                                         
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c first fill the lhs for the u-eigenvalue                          
-c---------------------------------------------------------------------
-       do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-          do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-             do   k = start(3,c)-1, cell_size(3,c)-end(3,c)
-                ru1 = c3c4*rho_i(i,j,k,c)
-                cv(k) = ws(i,j,k,c)
-                rhos(k) = dmax1(dz4 + con43 * ru1,
-     >                          dz5 + c1c5 * ru1,
-     >                          dzmax + ru1,
-     >                          dz1)
-             end do
-
-             do   k =  start(3,c), cell_size(3,c)-end(3,c)-1
-                lhs(i,j,k,1,c) =  0.0d0
-                lhs(i,j,k,2,c) = -dttz2 * cv(k-1) - dttz1 * rhos(k-1)
-                lhs(i,j,k,3,c) =  1.0 + c2dttz1 * rhos(k)
-                lhs(i,j,k,4,c) =  dttz2 * cv(k+1) - dttz1 * rhos(k+1)
-                lhs(i,j,k,5,c) =  0.0d0
-             end do
-          end do
-       end do
-
-c---------------------------------------------------------------------
-c      add fourth order dissipation                                  
-c---------------------------------------------------------------------
-       if (start(3,c) .gt. 0) then
-          k = 1
-          do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz5
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-                lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1
-
-                lhs(i,j,k+1,2,c) = lhs(i,j,k+1,2,c) - comz4
-                lhs(i,j,k+1,3,c) = lhs(i,j,k+1,3,c) + comz6
-                lhs(i,j,k+1,4,c) = lhs(i,j,k+1,4,c) - comz4
-                lhs(i,j,k+1,5,c) = lhs(i,j,k+1,5,c) + comz1
-             end do
-          end do
-       endif
-
-       do    k = 3*start(3,c), cell_size(3,c)-3*end(3,c)-1
-          do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1
-                lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-                lhs(i,j,k,5,c) = lhs(i,j,k,5,c) + comz1
-             end do
-          end do
-       end do
-
-       if (end(3,c) .gt. 0) then
-          k = cell_size(3,c)-3 
-          do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,1,c) = lhs(i,j,k,1,c) + comz1
-                lhs(i,j,k,2,c) = lhs(i,j,k,2,c) - comz4
-                lhs(i,j,k,3,c) = lhs(i,j,k,3,c) + comz6
-                lhs(i,j,k,4,c) = lhs(i,j,k,4,c) - comz4
-
-                lhs(i,j,k+1,1,c) = lhs(i,j,k+1,1,c) + comz1
-                lhs(i,j,k+1,2,c) = lhs(i,j,k+1,2,c) - comz4
-                lhs(i,j,k+1,3,c) = lhs(i,j,k+1,3,c) + comz5
-             end do
-          end do
-       endif
-
-
-c---------------------------------------------------------------------
-c      subsequently, fill the other factors (u+c), (u-c) 
-c---------------------------------------------------------------------
-       do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-                lhs(i,j,k,1+5,c)  = lhs(i,j,k,1,c)
-                lhs(i,j,k,2+5,c)  = lhs(i,j,k,2,c) - 
-     >                            dttz2 * speed(i,j,k-1,c)
-                lhs(i,j,k,3+5,c)  = lhs(i,j,k,3,c)
-                lhs(i,j,k,4+5,c)  = lhs(i,j,k,4,c) + 
-     >                            dttz2 * speed(i,j,k+1,c)
-                lhs(i,j,k,5+5,c) = lhs(i,j,k,5,c)
-                lhs(i,j,k,1+10,c) = lhs(i,j,k,1,c)
-                lhs(i,j,k,2+10,c) = lhs(i,j,k,2,c) + 
-     >                            dttz2 * speed(i,j,k-1,c)
-                lhs(i,j,k,3+10,c) = lhs(i,j,k,3,c)
-                lhs(i,j,k,4+10,c) = lhs(i,j,k,4,c) - 
-     >                            dttz2 * speed(i,j,k+1,c)
-                lhs(i,j,k,5+10,c) = lhs(i,j,k,5,c)
-             end do
-          end do
-       end do
-
-       return
-       end
-
-
diff --git a/examples/smpi/NAS/SP/make_set.f b/examples/smpi/NAS/SP/make_set.f
deleted file mode 100644 (file)
index 7a84e93..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine make_set
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c This function allocates space for a set of cells and fills the set     
-c such that communication between cells on different nodes is only
-c nearest neighbor                                                   
-c---------------------------------------------------------------------
-
-       include 'header.h'
-       include 'mpinpb.h'
-
-       integer p, i, j, c, dir, size, excess, ierr,ierrcode
-
-c---------------------------------------------------------------------
-c     compute square root; add small number to allow for roundoff
-c     (note: this is computed in setup_mpi.f also, but prefer to do
-c     it twice because of some include file problems).
-c---------------------------------------------------------------------
-      ncells = dint(dsqrt(dble(no_nodes) + 0.00001d0))
-
-c---------------------------------------------------------------------
-c      this makes coding easier
-c---------------------------------------------------------------------
-       p = ncells
-   
-c---------------------------------------------------------------------
-c      determine the location of the cell at the bottom of the 3D 
-c      array of cells
-c---------------------------------------------------------------------
-       cell_coord(1,1) = mod(node,p) 
-       cell_coord(2,1) = node/p 
-       cell_coord(3,1) = 0
-
-c---------------------------------------------------------------------
-c      set the cell_coords for cells in the rest of the z-layers; 
-c      this comes down to a simple linear numbering in the z-direct-
-c      ion, and to the doubly-cyclic numbering in the other dirs     
-c---------------------------------------------------------------------
-       do    c=2, p
-          cell_coord(1,c) = mod(cell_coord(1,c-1)+1,p) 
-          cell_coord(2,c) = mod(cell_coord(2,c-1)-1+p,p) 
-          cell_coord(3,c) = c-1
-       end do
-
-c---------------------------------------------------------------------
-c      offset all the coordinates by 1 to adjust for Fortran arrays
-c---------------------------------------------------------------------
-       do    dir = 1, 3
-          do    c = 1, p
-             cell_coord(dir,c) = cell_coord(dir,c) + 1
-          end do
-       end do
-   
-c---------------------------------------------------------------------
-c      slice(dir,n) contains the sequence number of the cell that is in
-c      coordinate plane n in the dir direction
-c---------------------------------------------------------------------
-       do   dir = 1, 3
-          do   c = 1, p
-             slice(dir,cell_coord(dir,c)) = c
-          end do
-       end do
-
-
-c---------------------------------------------------------------------
-c      fill the predecessor and successor entries, using the indices 
-c      of the bottom cells (they are the same at each level of k 
-c      anyway) acting as if full periodicity pertains; note that p is
-c      added to those arguments to the mod functions that might
-c      otherwise return wrong values when using the modulo function
-c---------------------------------------------------------------------
-       i = cell_coord(1,1)-1
-       j = cell_coord(2,1)-1
-
-       predecessor(1) = mod(i-1+p,p) + p*j
-       predecessor(2) = i + p*mod(j-1+p,p)
-       predecessor(3) = mod(i+1,p) + p*mod(j-1+p,p)
-       successor(1)   = mod(i+1,p) + p*j
-       successor(2)   = i + p*mod(j+1,p)
-       successor(3)   = mod(i-1+p,p) + p*mod(j+1,p)
-
-c---------------------------------------------------------------------
-c now compute the sizes of the cells                                    
-c---------------------------------------------------------------------
-       do    dir= 1, 3
-c---------------------------------------------------------------------
-c         set cell_coord range for each direction                            
-c---------------------------------------------------------------------
-          size   = grid_points(dir)/p
-          excess = mod(grid_points(dir),p)
-          do    c=1, ncells
-             if (cell_coord(dir,c) .le. excess) then
-                cell_size(dir,c) = size+1
-                cell_low(dir,c) = (cell_coord(dir,c)-1)*(size+1)
-                cell_high(dir,c) = cell_low(dir,c)+size
-             else 
-                cell_size(dir,c) = size
-                cell_low(dir,c)  = excess*(size+1)+
-     >                   (cell_coord(dir,c)-excess-1)*size
-                cell_high(dir,c) = cell_low(dir,c)+size-1
-             endif
-             if (cell_size(dir, c) .le. 2) then
-                write(*,50)
- 50             format(' Error: Cell size too small. Min size is 3')
-                call MPI_Abort(mpi_comm_world,ierrcode,ierr)
-                stop
-             endif
-          end do
-       end do
-
-       return
-       end
-
diff --git a/examples/smpi/NAS/SP/mpinpb.h b/examples/smpi/NAS/SP/mpinpb.h
deleted file mode 100644 (file)
index 439db34..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      include 'mpif.h'
-
-      integer           node, no_nodes, total_nodes, root, comm_setup, 
-     >                  comm_solve, comm_rhs, dp_type
-      logical           active
-      common /mpistuff/ node, no_nodes, total_nodes, root, comm_setup, 
-     >                  comm_solve, comm_rhs, dp_type, active
-      integer           DEFAULT_TAG
-      parameter         (DEFAULT_TAG = 0)
diff --git a/examples/smpi/NAS/SP/ninvr.f b/examples/smpi/NAS/SP/ninvr.f
deleted file mode 100644 (file)
index 146d046..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine  ninvr(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   block-diagonal matrix-vector multiplication              
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       integer  c,  i, j, k
-       double precision r1, r2, r3, r4, r5, t1, t2
-
-c---------------------------------------------------------------------
-c      treat only one cell                           
-c---------------------------------------------------------------------
-       do k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-                r1 = rhs(i,j,k,1,c)
-                r2 = rhs(i,j,k,2,c)
-                r3 = rhs(i,j,k,3,c)
-                r4 = rhs(i,j,k,4,c)
-                r5 = rhs(i,j,k,5,c)
-               
-                t1 = bt * r3
-                t2 = 0.5d0 * ( r4 + r5 )
-
-                rhs(i,j,k,1,c) = -r2
-                rhs(i,j,k,2,c) =  r1
-                rhs(i,j,k,3,c) = bt * ( r4 - r5 )
-                rhs(i,j,k,4,c) = -t1 + t2
-                rhs(i,j,k,5,c) =  t1 + t2
-             enddo    
-          enddo
-       enddo
-
-       return
-       end
diff --git a/examples/smpi/NAS/SP/pinvr.f b/examples/smpi/NAS/SP/pinvr.f
deleted file mode 100644 (file)
index 060f0a5..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine pinvr(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   block-diagonal matrix-vector multiplication                       
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       integer i, j, k, c
-       double precision r1, r2, r3, r4, r5, t1, t2
-
-c---------------------------------------------------------------------
-c      treat only one cell                                   
-c---------------------------------------------------------------------
-       do   k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do   j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do   i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-                r1 = rhs(i,j,k,1,c)
-                r2 = rhs(i,j,k,2,c)
-                r3 = rhs(i,j,k,3,c)
-                r4 = rhs(i,j,k,4,c)
-                r5 = rhs(i,j,k,5,c)
-
-                t1 = bt * r1
-                t2 = 0.5d0 * ( r4 + r5 )
-
-                rhs(i,j,k,1,c) =  bt * ( r4 - r5 )
-                rhs(i,j,k,2,c) = -r3
-                rhs(i,j,k,3,c) =  r2
-                rhs(i,j,k,4,c) = -t1 + t2
-                rhs(i,j,k,5,c) =  t1 + t2
-             end do
-          end do
-       end do
-
-       return
-       end
-
-
-
diff --git a/examples/smpi/NAS/SP/rhs.f b/examples/smpi/NAS/SP/rhs.f
deleted file mode 100644 (file)
index 34e562a..0000000
+++ /dev/null
@@ -1,446 +0,0 @@
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine compute_rhs
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       integer c, i, j, k, m
-       double precision aux, rho_inv, uijk, up1, um1, vijk, vp1, vm1,
-     >                  wijk, wp1, wm1
-
-
-c---------------------------------------------------------------------
-c loop over all cells owned by this node                           
-c---------------------------------------------------------------------
-       do    c = 1, ncells
-
-c---------------------------------------------------------------------
-c         compute the reciprocal of density, and the kinetic energy, 
-c         and the speed of sound. 
-c---------------------------------------------------------------------
-
-          do    k = -1, cell_size(3,c)
-             do    j = -1, cell_size(2,c)
-                do    i = -1, cell_size(1,c)
-                   rho_inv = 1.0d0/u(i,j,k,1,c)
-                   rho_i(i,j,k,c) = rho_inv
-                   us(i,j,k,c) = u(i,j,k,2,c) * rho_inv
-                   vs(i,j,k,c) = u(i,j,k,3,c) * rho_inv
-                   ws(i,j,k,c) = u(i,j,k,4,c) * rho_inv
-                   square(i,j,k,c)     = 0.5d0* (
-     >                        u(i,j,k,2,c)*u(i,j,k,2,c) + 
-     >                        u(i,j,k,3,c)*u(i,j,k,3,c) +
-     >                        u(i,j,k,4,c)*u(i,j,k,4,c) ) * rho_inv
-                   qs(i,j,k,c) = square(i,j,k,c) * rho_inv
-c---------------------------------------------------------------------
-c                  (don't need speed and ainx until the lhs computation)
-c---------------------------------------------------------------------
-                   aux = c1c2*rho_inv* (u(i,j,k,5,c) - square(i,j,k,c))
-                   aux = dsqrt(aux)
-                   speed(i,j,k,c) = aux
-                   ainv(i,j,k,c)  = 1.0d0/aux
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c copy the exact forcing term to the right hand side;  because 
-c this forcing term is known, we can store it on the whole of every 
-c cell,  including the boundary                   
-c---------------------------------------------------------------------
-
-          do   m = 1, 5
-             do   k = 0, cell_size(3,c)-1
-                do   j = 0, cell_size(2,c)-1
-                   do   i = 0, cell_size(1,c)-1
-                      rhs(i,j,k,m,c) = forcing(i,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-
-c---------------------------------------------------------------------
-c         compute xi-direction fluxes 
-c---------------------------------------------------------------------
-          do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-                do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-                   uijk = us(i,j,k,c)
-                   up1  = us(i+1,j,k,c)
-                   um1  = us(i-1,j,k,c)
-
-                   rhs(i,j,k,1,c) = rhs(i,j,k,1,c) + dx1tx1 * 
-     >                    (u(i+1,j,k,1,c) - 2.0d0*u(i,j,k,1,c) + 
-     >                     u(i-1,j,k,1,c)) -
-     >                    tx2 * (u(i+1,j,k,2,c) - u(i-1,j,k,2,c))
-
-                   rhs(i,j,k,2,c) = rhs(i,j,k,2,c) + dx2tx1 * 
-     >                    (u(i+1,j,k,2,c) - 2.0d0*u(i,j,k,2,c) + 
-     >                     u(i-1,j,k,2,c)) +
-     >                    xxcon2*con43 * (up1 - 2.0d0*uijk + um1) -
-     >                    tx2 * (u(i+1,j,k,2,c)*up1 - 
-     >                           u(i-1,j,k,2,c)*um1 +
-     >                           (u(i+1,j,k,5,c)- square(i+1,j,k,c)-
-     >                            u(i-1,j,k,5,c)+ square(i-1,j,k,c))*
-     >                            c2)
-
-                   rhs(i,j,k,3,c) = rhs(i,j,k,3,c) + dx3tx1 * 
-     >                    (u(i+1,j,k,3,c) - 2.0d0*u(i,j,k,3,c) +
-     >                     u(i-1,j,k,3,c)) +
-     >                    xxcon2 * (vs(i+1,j,k,c) - 2.0d0*vs(i,j,k,c) +
-     >                              vs(i-1,j,k,c)) -
-     >                    tx2 * (u(i+1,j,k,3,c)*up1 - 
-     >                           u(i-1,j,k,3,c)*um1)
-
-                   rhs(i,j,k,4,c) = rhs(i,j,k,4,c) + dx4tx1 * 
-     >                    (u(i+1,j,k,4,c) - 2.0d0*u(i,j,k,4,c) +
-     >                     u(i-1,j,k,4,c)) +
-     >                    xxcon2 * (ws(i+1,j,k,c) - 2.0d0*ws(i,j,k,c) +
-     >                              ws(i-1,j,k,c)) -
-     >                    tx2 * (u(i+1,j,k,4,c)*up1 - 
-     >                           u(i-1,j,k,4,c)*um1)
-
-                   rhs(i,j,k,5,c) = rhs(i,j,k,5,c) + dx5tx1 * 
-     >                    (u(i+1,j,k,5,c) - 2.0d0*u(i,j,k,5,c) +
-     >                     u(i-1,j,k,5,c)) +
-     >                    xxcon3 * (qs(i+1,j,k,c) - 2.0d0*qs(i,j,k,c) +
-     >                              qs(i-1,j,k,c)) +
-     >                    xxcon4 * (up1*up1 -       2.0d0*uijk*uijk + 
-     >                              um1*um1) +
-     >                    xxcon5 * (u(i+1,j,k,5,c)*rho_i(i+1,j,k,c) - 
-     >                              2.0d0*u(i,j,k,5,c)*rho_i(i,j,k,c) +
-     >                              u(i-1,j,k,5,c)*rho_i(i-1,j,k,c)) -
-     >                    tx2 * ( (c1*u(i+1,j,k,5,c) - 
-     >                             c2*square(i+1,j,k,c))*up1 -
-     >                            (c1*u(i-1,j,k,5,c) - 
-     >                             c2*square(i-1,j,k,c))*um1 )
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         add fourth order xi-direction dissipation               
-c---------------------------------------------------------------------
-          if (start(1,c) .gt. 0) then
-             i = 1
-             do    m = 1, 5
-                do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c)- dssp * 
-     >                    ( 5.0d0*u(i,j,k,m,c) - 4.0d0*u(i+1,j,k,m,c) +
-     >                            u(i+2,j,k,m,c))
-                   end do
-                end do
-             end do
-
-             i = 2
-             do    m = 1, 5
-                do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * 
-     >                    (-4.0d0*u(i-1,j,k,m,c) + 6.0d0*u(i,j,k,m,c) -
-     >                      4.0d0*u(i+1,j,k,m,c) + u(i+2,j,k,m,c))
-                   end do
-                end do
-             end do
-          endif
-
-          do     m = 1, 5
-             do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do  i = 3*start(1,c),cell_size(1,c)-3*end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * 
-     >                    (  u(i-2,j,k,m,c) - 4.0d0*u(i-1,j,k,m,c) + 
-     >                     6.0*u(i,j,k,m,c) - 4.0d0*u(i+1,j,k,m,c) + 
-     >                         u(i+2,j,k,m,c) )
-                   end do
-                end do
-             end do
-          end do
-
-          if (end(1,c) .gt. 0) then
-             i = cell_size(1,c)-3
-             do     m = 1, 5
-                do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp *
-     >                    ( u(i-2,j,k,m,c) - 4.0d0*u(i-1,j,k,m,c) + 
-     >                      6.0d0*u(i,j,k,m,c) - 4.0d0*u(i+1,j,k,m,c) )
-                   end do
-                end do
-             end do
-
-             i = cell_size(1,c)-2
-             do     m = 1, 5
-                do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp *
-     >                    ( u(i-2,j,k,m,c) - 4.d0*u(i-1,j,k,m,c) +
-     >                      5.d0*u(i,j,k,m,c) )
-                   end do
-                end do
-             end do
-          endif
-
-c---------------------------------------------------------------------
-c         compute eta-direction fluxes 
-c---------------------------------------------------------------------
-          do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                   vijk = vs(i,j,k,c)
-                   vp1  = vs(i,j+1,k,c)
-                   vm1  = vs(i,j-1,k,c)
-                   rhs(i,j,k,1,c) = rhs(i,j,k,1,c) + dy1ty1 * 
-     >                   (u(i,j+1,k,1,c) - 2.0d0*u(i,j,k,1,c) + 
-     >                    u(i,j-1,k,1,c)) -
-     >                   ty2 * (u(i,j+1,k,3,c) - u(i,j-1,k,3,c))
-                   rhs(i,j,k,2,c) = rhs(i,j,k,2,c) + dy2ty1 * 
-     >                   (u(i,j+1,k,2,c) - 2.0d0*u(i,j,k,2,c) + 
-     >                    u(i,j-1,k,2,c)) +
-     >                   yycon2 * (us(i,j+1,k,c) - 2.0d0*us(i,j,k,c) + 
-     >                             us(i,j-1,k,c)) -
-     >                   ty2 * (u(i,j+1,k,2,c)*vp1 - 
-     >                          u(i,j-1,k,2,c)*vm1)
-                   rhs(i,j,k,3,c) = rhs(i,j,k,3,c) + dy3ty1 * 
-     >                   (u(i,j+1,k,3,c) - 2.0d0*u(i,j,k,3,c) + 
-     >                    u(i,j-1,k,3,c)) +
-     >                   yycon2*con43 * (vp1 - 2.0d0*vijk + vm1) -
-     >                   ty2 * (u(i,j+1,k,3,c)*vp1 - 
-     >                          u(i,j-1,k,3,c)*vm1 +
-     >                          (u(i,j+1,k,5,c) - square(i,j+1,k,c) - 
-     >                           u(i,j-1,k,5,c) + square(i,j-1,k,c))
-     >                          *c2)
-                   rhs(i,j,k,4,c) = rhs(i,j,k,4,c) + dy4ty1 * 
-     >                   (u(i,j+1,k,4,c) - 2.0d0*u(i,j,k,4,c) + 
-     >                    u(i,j-1,k,4,c)) +
-     >                   yycon2 * (ws(i,j+1,k,c) - 2.0d0*ws(i,j,k,c) + 
-     >                             ws(i,j-1,k,c)) -
-     >                   ty2 * (u(i,j+1,k,4,c)*vp1 - 
-     >                          u(i,j-1,k,4,c)*vm1)
-                   rhs(i,j,k,5,c) = rhs(i,j,k,5,c) + dy5ty1 * 
-     >                   (u(i,j+1,k,5,c) - 2.0d0*u(i,j,k,5,c) + 
-     >                    u(i,j-1,k,5,c)) +
-     >                   yycon3 * (qs(i,j+1,k,c) - 2.0d0*qs(i,j,k,c) + 
-     >                             qs(i,j-1,k,c)) +
-     >                   yycon4 * (vp1*vp1       - 2.0d0*vijk*vijk + 
-     >                             vm1*vm1) +
-     >                   yycon5 * (u(i,j+1,k,5,c)*rho_i(i,j+1,k,c) - 
-     >                             2.0d0*u(i,j,k,5,c)*rho_i(i,j,k,c) +
-     >                             u(i,j-1,k,5,c)*rho_i(i,j-1,k,c)) -
-     >                   ty2 * ((c1*u(i,j+1,k,5,c) - 
-     >                           c2*square(i,j+1,k,c)) * vp1 -
-     >                          (c1*u(i,j-1,k,5,c) - 
-     >                           c2*square(i,j-1,k,c)) * vm1)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         add fourth order eta-direction dissipation         
-c---------------------------------------------------------------------
-          if (start(2,c) .gt. 0) then
-             j = 1
-             do     m = 1, 5
-                do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c)- dssp * 
-     >                    ( 5.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j+1,k,m,c) +
-     >                            u(i,j+2,k,m,c))
-                   end do
-                end do
-             end do
-
-             j = 2
-             do     m = 1, 5
-                do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * 
-     >                    (-4.0d0*u(i,j-1,k,m,c) + 6.0d0*u(i,j,k,m,c) -
-     >                      4.0d0*u(i,j+1,k,m,c) + u(i,j+2,k,m,c))
-                   end do
-                end do
-             end do
-          endif
-
-          do     m = 1, 5
-             do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                do    j = 3*start(2,c), cell_size(2,c)-3*end(2,c)-1
-                   do  i = start(1,c),cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * 
-     >                    (  u(i,j-2,k,m,c) - 4.0d0*u(i,j-1,k,m,c) + 
-     >                     6.0*u(i,j,k,m,c) - 4.0d0*u(i,j+1,k,m,c) + 
-     >                         u(i,j+2,k,m,c) )
-                   end do
-                end do
-             end do
-          end do
-          if (end(2,c) .gt. 0) then
-             j = cell_size(2,c)-3
-             do     m = 1, 5
-                do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp *
-     >                    ( u(i,j-2,k,m,c) - 4.0d0*u(i,j-1,k,m,c) + 
-     >                      6.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j+1,k,m,c) )
-                   end do
-                end do
-             end do
-
-             j = cell_size(2,c)-2
-             do     m = 1, 5
-                do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp *
-     >                    ( u(i,j-2,k,m,c) - 4.d0*u(i,j-1,k,m,c) +
-     >                      5.d0*u(i,j,k,m,c) )
-                   end do
-                end do
-             end do
-          endif
-
-
-c---------------------------------------------------------------------
-c         compute zeta-direction fluxes 
-c---------------------------------------------------------------------
-          do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                   wijk = ws(i,j,k,c)
-                   wp1  = ws(i,j,k+1,c)
-                   wm1  = ws(i,j,k-1,c)
-
-                   rhs(i,j,k,1,c) = rhs(i,j,k,1,c) + dz1tz1 * 
-     >                   (u(i,j,k+1,1,c) - 2.0d0*u(i,j,k,1,c) + 
-     >                    u(i,j,k-1,1,c)) -
-     >                   tz2 * (u(i,j,k+1,4,c) - u(i,j,k-1,4,c))
-                   rhs(i,j,k,2,c) = rhs(i,j,k,2,c) + dz2tz1 * 
-     >                   (u(i,j,k+1,2,c) - 2.0d0*u(i,j,k,2,c) + 
-     >                    u(i,j,k-1,2,c)) +
-     >                   zzcon2 * (us(i,j,k+1,c) - 2.0d0*us(i,j,k,c) + 
-     >                             us(i,j,k-1,c)) -
-     >                   tz2 * (u(i,j,k+1,2,c)*wp1 - 
-     >                          u(i,j,k-1,2,c)*wm1)
-                   rhs(i,j,k,3,c) = rhs(i,j,k,3,c) + dz3tz1 * 
-     >                   (u(i,j,k+1,3,c) - 2.0d0*u(i,j,k,3,c) + 
-     >                    u(i,j,k-1,3,c)) +
-     >                   zzcon2 * (vs(i,j,k+1,c) - 2.0d0*vs(i,j,k,c) + 
-     >                             vs(i,j,k-1,c)) -
-     >                   tz2 * (u(i,j,k+1,3,c)*wp1 - 
-     >                          u(i,j,k-1,3,c)*wm1)
-                   rhs(i,j,k,4,c) = rhs(i,j,k,4,c) + dz4tz1 * 
-     >                   (u(i,j,k+1,4,c) - 2.0d0*u(i,j,k,4,c) + 
-     >                    u(i,j,k-1,4,c)) +
-     >                   zzcon2*con43 * (wp1 - 2.0d0*wijk + wm1) -
-     >                   tz2 * (u(i,j,k+1,4,c)*wp1 - 
-     >                          u(i,j,k-1,4,c)*wm1 +
-     >                          (u(i,j,k+1,5,c) - square(i,j,k+1,c) - 
-     >                           u(i,j,k-1,5,c) + square(i,j,k-1,c))
-     >                          *c2)
-                   rhs(i,j,k,5,c) = rhs(i,j,k,5,c) + dz5tz1 * 
-     >                   (u(i,j,k+1,5,c) - 2.0d0*u(i,j,k,5,c) + 
-     >                    u(i,j,k-1,5,c)) +
-     >                   zzcon3 * (qs(i,j,k+1,c) - 2.0d0*qs(i,j,k,c) + 
-     >                             qs(i,j,k-1,c)) +
-     >                   zzcon4 * (wp1*wp1 - 2.0d0*wijk*wijk + 
-     >                             wm1*wm1) +
-     >                   zzcon5 * (u(i,j,k+1,5,c)*rho_i(i,j,k+1,c) - 
-     >                             2.0d0*u(i,j,k,5,c)*rho_i(i,j,k,c) +
-     >                             u(i,j,k-1,5,c)*rho_i(i,j,k-1,c)) -
-     >                   tz2 * ( (c1*u(i,j,k+1,5,c) - 
-     >                            c2*square(i,j,k+1,c))*wp1 -
-     >                           (c1*u(i,j,k-1,5,c) - 
-     >                            c2*square(i,j,k-1,c))*wm1)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         add fourth order zeta-direction dissipation                
-c---------------------------------------------------------------------
-          if (start(3,c) .gt. 0) then
-             k = 1
-             do     m = 1, 5
-                do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c)- dssp * 
-     >                    ( 5.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j,k+1,m,c) +
-     >                            u(i,j,k+2,m,c))
-                   end do
-                end do
-             end do
-
-             k = 2
-             do     m = 1, 5
-                do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * 
-     >                    (-4.0d0*u(i,j,k-1,m,c) + 6.0d0*u(i,j,k,m,c) -
-     >                      4.0d0*u(i,j,k+1,m,c) + u(i,j,k+2,m,c))
-                   end do
-                end do
-             end do
-          endif
-
-          do     m = 1, 5
-             do     k = 3*start(3,c), cell_size(3,c)-3*end(3,c)-1
-                do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do     i = start(1,c),cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp * 
-     >                    (  u(i,j,k-2,m,c) - 4.0d0*u(i,j,k-1,m,c) + 
-     >                     6.0*u(i,j,k,m,c) - 4.0d0*u(i,j,k+1,m,c) + 
-     >                         u(i,j,k+2,m,c) )
-                   end do
-                end do
-             end do
-          end do
-          if (end(3,c) .gt. 0) then
-             k = cell_size(3,c)-3
-             do     m = 1, 5
-                do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp *
-     >                    ( u(i,j,k-2,m,c) - 4.0d0*u(i,j,k-1,m,c) + 
-     >                      6.0d0*u(i,j,k,m,c) - 4.0d0*u(i,j,k+1,m,c) )
-                   end do
-                end do
-             end do
-
-             k = cell_size(3,c)-2
-             do     m = 1, 5
-                do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do     i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - dssp *
-     >                    ( u(i,j,k-2,m,c) - 4.d0*u(i,j,k-1,m,c) +
-     >                      5.d0*u(i,j,k,m,c) )
-                   end do
-                end do
-             end do
-          endif
-
-          do     m = 1, 5
-             do     k = start(3,c), cell_size(3,c)-end(3,c)-1
-                do     j = start(2,c), cell_size(2,c)-end(2,c)-1
-                   do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) * dt
-                   end do
-                end do
-             end do
-          end do
-
-       end do
-    
-       return
-       end
-
-
-
-
diff --git a/examples/smpi/NAS/SP/set_constants.f b/examples/smpi/NAS/SP/set_constants.f
deleted file mode 100644 (file)
index 63ce72b..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine  set_constants
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       include 'header.h'
-  
-       ce(1,1)  = 2.0d0
-       ce(1,2)  = 0.0d0
-       ce(1,3)  = 0.0d0
-       ce(1,4)  = 4.0d0
-       ce(1,5)  = 5.0d0
-       ce(1,6)  = 3.0d0
-       ce(1,7)  = 0.5d0
-       ce(1,8)  = 0.02d0
-       ce(1,9)  = 0.01d0
-       ce(1,10) = 0.03d0
-       ce(1,11) = 0.5d0
-       ce(1,12) = 0.4d0
-       ce(1,13) = 0.3d0
-       ce(2,1)  = 1.0d0
-       ce(2,2)  = 0.0d0
-       ce(2,3)  = 0.0d0
-       ce(2,4)  = 0.0d0
-       ce(2,5)  = 1.0d0
-       ce(2,6)  = 2.0d0
-       ce(2,7)  = 3.0d0
-       ce(2,8)  = 0.01d0
-       ce(2,9)  = 0.03d0
-       ce(2,10) = 0.02d0
-       ce(2,11) = 0.4d0
-       ce(2,12) = 0.3d0
-       ce(2,13) = 0.5d0
-
-       ce(3,1)  = 2.0d0
-       ce(3,2)  = 2.0d0
-       ce(3,3)  = 0.0d0
-       ce(3,4)  = 0.0d0
-       ce(3,5)  = 0.0d0
-       ce(3,6)  = 2.0d0
-       ce(3,7)  = 3.0d0
-       ce(3,8)  = 0.04d0
-       ce(3,9)  = 0.03d0
-       ce(3,10) = 0.05d0
-       ce(3,11) = 0.3d0
-       ce(3,12) = 0.5d0
-       ce(3,13) = 0.4d0
-
-       ce(4,1)  = 2.0d0
-       ce(4,2)  = 2.0d0
-       ce(4,3)  = 0.0d0
-       ce(4,4)  = 0.0d0
-       ce(4,5)  = 0.0d0
-       ce(4,6)  = 2.0d0
-       ce(4,7)  = 3.0d0
-       ce(4,8)  = 0.03d0
-       ce(4,9)  = 0.05d0
-       ce(4,10) = 0.04d0
-       ce(4,11) = 0.2d0
-       ce(4,12) = 0.1d0
-       ce(4,13) = 0.3d0
-
-       ce(5,1)  = 5.0d0
-       ce(5,2)  = 4.0d0
-       ce(5,3)  = 3.0d0
-       ce(5,4)  = 2.0d0
-       ce(5,5)  = 0.1d0
-       ce(5,6)  = 0.4d0
-       ce(5,7)  = 0.3d0
-       ce(5,8)  = 0.05d0
-       ce(5,9)  = 0.04d0
-       ce(5,10) = 0.03d0
-       ce(5,11) = 0.1d0
-       ce(5,12) = 0.3d0
-       ce(5,13) = 0.2d0
-
-       c1 = 1.4d0
-       c2 = 0.4d0
-       c3 = 0.1d0
-       c4 = 1.0d0
-       c5 = 1.4d0
-
-       bt = dsqrt(0.5d0)
-
-       dnxm1 = 1.0d0 / dble(grid_points(1)-1)
-       dnym1 = 1.0d0 / dble(grid_points(2)-1)
-       dnzm1 = 1.0d0 / dble(grid_points(3)-1)
-
-       c1c2 = c1 * c2
-       c1c5 = c1 * c5
-       c3c4 = c3 * c4
-       c1345 = c1c5 * c3c4
-
-       conz1 = (1.0d0-c1c5)
-
-       tx1 = 1.0d0 / (dnxm1 * dnxm1)
-       tx2 = 1.0d0 / (2.0d0 * dnxm1)
-       tx3 = 1.0d0 / dnxm1
-
-       ty1 = 1.0d0 / (dnym1 * dnym1)
-       ty2 = 1.0d0 / (2.0d0 * dnym1)
-       ty3 = 1.0d0 / dnym1
-       tz1 = 1.0d0 / (dnzm1 * dnzm1)
-       tz2 = 1.0d0 / (2.0d0 * dnzm1)
-       tz3 = 1.0d0 / dnzm1
-
-       dx1 = 0.75d0
-       dx2 = 0.75d0
-       dx3 = 0.75d0
-       dx4 = 0.75d0
-       dx5 = 0.75d0
-
-       dy1 = 0.75d0
-       dy2 = 0.75d0
-       dy3 = 0.75d0
-       dy4 = 0.75d0
-       dy5 = 0.75d0
-
-       dz1 = 1.0d0
-       dz2 = 1.0d0
-       dz3 = 1.0d0
-       dz4 = 1.0d0
-       dz5 = 1.0d0
-
-       dxmax = dmax1(dx3, dx4)
-       dymax = dmax1(dy2, dy4)
-       dzmax = dmax1(dz2, dz3)
-
-       dssp = 0.25d0 * dmax1(dx1, dmax1(dy1, dz1) )
-
-       c4dssp = 4.0d0 * dssp
-       c5dssp = 5.0d0 * dssp
-
-       dttx1 = dt*tx1
-       dttx2 = dt*tx2
-       dtty1 = dt*ty1
-       dtty2 = dt*ty2
-       dttz1 = dt*tz1
-       dttz2 = dt*tz2
-
-       c2dttx1 = 2.0d0*dttx1
-       c2dtty1 = 2.0d0*dtty1
-       c2dttz1 = 2.0d0*dttz1
-
-       dtdssp = dt*dssp
-
-       comz1  = dtdssp
-       comz4  = 4.0d0*dtdssp
-       comz5  = 5.0d0*dtdssp
-       comz6  = 6.0d0*dtdssp
-
-       c3c4tx3 = c3c4*tx3
-       c3c4ty3 = c3c4*ty3
-       c3c4tz3 = c3c4*tz3
-
-       dx1tx1 = dx1*tx1
-       dx2tx1 = dx2*tx1
-       dx3tx1 = dx3*tx1
-       dx4tx1 = dx4*tx1
-       dx5tx1 = dx5*tx1
-        
-       dy1ty1 = dy1*ty1
-       dy2ty1 = dy2*ty1
-       dy3ty1 = dy3*ty1
-       dy4ty1 = dy4*ty1
-       dy5ty1 = dy5*ty1
-        
-       dz1tz1 = dz1*tz1
-       dz2tz1 = dz2*tz1
-       dz3tz1 = dz3*tz1
-       dz4tz1 = dz4*tz1
-       dz5tz1 = dz5*tz1
-
-       c2iv  = 2.5d0
-       con43 = 4.0d0/3.0d0
-       con16 = 1.0d0/6.0d0
-        
-       xxcon1 = c3c4tx3*con43*tx3
-       xxcon2 = c3c4tx3*tx3
-       xxcon3 = c3c4tx3*conz1*tx3
-       xxcon4 = c3c4tx3*con16*tx3
-       xxcon5 = c3c4tx3*c1c5*tx3
-
-       yycon1 = c3c4ty3*con43*ty3
-       yycon2 = c3c4ty3*ty3
-       yycon3 = c3c4ty3*conz1*ty3
-       yycon4 = c3c4ty3*con16*ty3
-       yycon5 = c3c4ty3*c1c5*ty3
-
-       zzcon1 = c3c4tz3*con43*tz3
-       zzcon2 = c3c4tz3*tz3
-       zzcon3 = c3c4tz3*conz1*tz3
-       zzcon4 = c3c4tz3*con16*tz3
-       zzcon5 = c3c4tz3*c1c5*tz3
-
-       return
-       end
diff --git a/examples/smpi/NAS/SP/setup_mpi.f b/examples/smpi/NAS/SP/setup_mpi.f
deleted file mode 100644 (file)
index 2d98f7d..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-      subroutine setup_mpi
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c set up MPI stuff
-c---------------------------------------------------------------------
-
-      implicit none
-      include 'mpinpb.h'
-      include 'npbparams.h'
-      integer error, nc, color
-
-      call mpi_init(error)
-      
-      call mpi_comm_size(MPI_COMM_WORLD, total_nodes, error)
-      call mpi_comm_rank(MPI_COMM_WORLD, node, error)
-
-      if (.not. convertdouble) then
-         dp_type = MPI_DOUBLE_PRECISION
-      else
-         dp_type = MPI_REAL
-      endif
-
-c---------------------------------------------------------------------
-c     compute square root; add small number to allow for roundoff
-c---------------------------------------------------------------------
-      nc = dint(dsqrt(dble(total_nodes) + 0.00001d0))
-
-c---------------------------------------------------------------------
-c We handle a non-square number of nodes by making the excess nodes
-c inactive. However, we can never handle more cells than were compiled
-c in. 
-c---------------------------------------------------------------------
-
-      if (nc .gt. maxcells) nc = maxcells
-
-      if (node .ge. nc*nc) then
-         active = .false.
-         color = 1
-      else
-         active = .true.
-         color = 0
-      end if
-      
-      call mpi_comm_split(MPI_COMM_WORLD,color,node,comm_setup,error)
-      if (.not. active) return
-
-      call mpi_comm_size(comm_setup, no_nodes, error)
-      call mpi_comm_dup(comm_setup, comm_solve, error)
-      call mpi_comm_dup(comm_setup, comm_rhs, error)
-      
-c---------------------------------------------------------------------
-c     let node 0 be the root for the group (there is only one)
-c---------------------------------------------------------------------
-      root = 0
-
-      return
-      end
-
diff --git a/examples/smpi/NAS/SP/sp.f b/examples/smpi/NAS/SP/sp.f
deleted file mode 100644 (file)
index 740cade..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-!-------------------------------------------------------------------------!
-!                                                                         !
-!        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3         !
-!                                                                         !
-!                                   S P                                   !
-!                                                                         !
-!-------------------------------------------------------------------------!
-!                                                                         !
-!    This benchmark is part of the NAS Parallel Benchmark 3.3 suite.      !
-!    It is described in NAS Technical Reports 95-020 and 02-007           !
-!                                                                         !
-!    Permission to use, copy, distribute and modify this software         !
-!    for any purpose with or without fee is hereby granted.  We           !
-!    request, however, that all derived work reference the NAS            !
-!    Parallel Benchmarks 3.3. This software is provided "as is"           !
-!    without express or implied warranty.                                 !
-!                                                                         !
-!    Information on NPB 3.3, including the technical report, the          !
-!    original specifications, source code, results and information        !
-!    on how to submit new results, is available at:                       !
-!                                                                         !
-!           http://www.nas.nasa.gov/Software/NPB/                         !
-!                                                                         !
-!    Send comments or suggestions to  npb@nas.nasa.gov                    !
-!                                                                         !
-!          NAS Parallel Benchmarks Group                                  !
-!          NASA Ames Research Center                                      !
-!          Mail Stop: T27A-1                                              !
-!          Moffett Field, CA   94035-1000                                 !
-!                                                                         !
-!          E-mail:  npb@nas.nasa.gov                                      !
-!          Fax:     (650) 604-3957                                        !
-!                                                                         !
-!-------------------------------------------------------------------------!
-
-
-c---------------------------------------------------------------------
-c
-c Authors: R. F. Van der Wijngaart
-c          W. Saphir
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-       program MPSP
-c---------------------------------------------------------------------
-
-       include  'header.h'
-       include  'mpinpb.h'
-      
-       integer          i, niter, step, c, error, fstatus
-       external timer_read
-       double precision mflops, t, tmax, timer_read
-       logical          verified
-       character        class
-
-       call setup_mpi
-       if (.not. active) goto 999
-
-c---------------------------------------------------------------------
-c      Root node reads input file (if it exists) else takes
-c      defaults from parameters
-c---------------------------------------------------------------------
-       if (node .eq. root) then
-          
-          write(*, 1000)
-          open (unit=2,file='inputsp.data',status='old', iostat=fstatus)
-c
-          if (fstatus .eq. 0) then
-            write(*,233) 
- 233        format(' Reading from input file inputsp.data')
-            read (2,*) niter
-            read (2,*) dt
-            read (2,*) grid_points(1), grid_points(2), grid_points(3)
-            close(2)
-          else
-            write(*,234) 
-            niter = niter_default
-            dt    = dt_default
-            grid_points(1) = problem_size
-            grid_points(2) = problem_size
-            grid_points(3) = problem_size
-          endif
- 234      format(' No input file inputsp.data. Using compiled defaults')
-
-          write(*, 1001) grid_points(1), grid_points(2), grid_points(3)
-          write(*, 1002) niter, dt
-          if (no_nodes .ne. total_nodes) write(*, 1004) total_nodes
-          if (no_nodes .ne. maxcells*maxcells) 
-     >        write(*, 1005) maxcells*maxcells
-          write(*, 1003) no_nodes
-
- 1000 format(//,' NAS Parallel Benchmarks 3.3 -- SP Benchmark',/)
- 1001     format(' Size: ', i4, 'x', i4, 'x', i4)
- 1002     format(' Iterations: ', i4, '    dt: ', F11.7)
- 1004     format(' Total number of processes: ', i5)
- 1005     format(' WARNING: compiled for ', i5, ' processes ')
- 1003     format(' Number of active processes: ', i5, /)
-
-       endif
-
-       call mpi_bcast(niter, 1, MPI_INTEGER, 
-     >                root, comm_setup, error)
-
-       call mpi_bcast(dt, 1, dp_type, 
-     >                root, comm_setup, error)
-
-       call mpi_bcast(grid_points(1), 3, MPI_INTEGER, 
-     >                root, comm_setup, error)
-
-
-       call make_set
-
-       do  c = 1, ncells
-          if ( (cell_size(1,c) .gt. IMAX) .or.
-     >         (cell_size(2,c) .gt. JMAX) .or.
-     >         (cell_size(3,c) .gt. KMAX) ) then
-             print *,node, c, (cell_size(i,c),i=1,3)
-             print *,' Problem size too big for compiled array sizes'
-             goto 999
-          endif
-       end do
-
-       call set_constants
-
-       call initialize
-
-c       call mpi_finalize(error)
-c       stop
-
-       call lhsinit
-
-       call exact_rhs
-
-       call compute_buffer_size(5)
-
-c---------------------------------------------------------------------
-c      do one time step to touch all code, and reinitialize
-c---------------------------------------------------------------------
-       call adi
-       call initialize
-
-c---------------------------------------------------------------------
-c      Synchronize before placing time stamp
-c---------------------------------------------------------------------
-       call mpi_barrier(comm_setup, error)
-
-       call timer_clear(1)
-       call timer_start(1)
-
-       do  step = 1, niter
-
-          if (node .eq. root) then
-             if (mod(step, 20) .eq. 0 .or. 
-     >           step .eq. 1) then
-                write(*, 200) step
- 200            format(' Time step ', i4)
-              endif
-          endif
-
-          call adi
-
-       end do
-
-       call timer_stop(1)
-       t = timer_read(1)
-       
-       call verify(niter, class, verified)
-
-       call mpi_reduce(t, tmax, 1, 
-     >                 dp_type, MPI_MAX, 
-     >                 root, comm_setup, error)
-
-       if( node .eq. root ) then
-          if( tmax .ne. 0. ) then
-             mflops = (881.174*float( problem_size )**3
-     >                -4683.91*float( problem_size )**2
-     >                +11484.5*float( problem_size )
-     >                -19272.4) * float( niter ) / (tmax*1000000.0d0)
-          else
-             mflops = 0.0
-          endif
-
-         call print_results('SP', class, grid_points(1), 
-     >     grid_points(2), grid_points(3), niter, maxcells*maxcells, 
-     >     total_nodes, tmax, mflops, '          floating point', 
-     >     verified, npbversion,compiletime, cs1, cs2, cs3, cs4, cs5, 
-     >     cs6, '(none)')
-       endif
-
- 999   continue
-       call mpi_barrier(MPI_COMM_WORLD, error)
-       call mpi_finalize(error)
-
-       end
diff --git a/examples/smpi/NAS/SP/txinvr.f b/examples/smpi/NAS/SP/txinvr.f
deleted file mode 100644 (file)
index b5ca461..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine  txinvr
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c block-diagonal matrix-vector multiplication                  
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       integer c, i, j, k
-       double precision t1, t2, t3, ac, ru1, uu, vv, ww, r1, r2, r3, 
-     >                  r4, r5, ac2inv
-
-c---------------------------------------------------------------------
-c      loop over all cells owned by this node          
-c---------------------------------------------------------------------
-       do   c = 1, ncells
-          do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-             do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-                do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-                   ru1 = rho_i(i,j,k,c)
-                   uu = us(i,j,k,c)
-                   vv = vs(i,j,k,c)
-                   ww = ws(i,j,k,c)
-                   ac = speed(i,j,k,c)
-                   ac2inv = ainv(i,j,k,c)*ainv(i,j,k,c)
-
-                   r1 = rhs(i,j,k,1,c)
-                   r2 = rhs(i,j,k,2,c)
-                   r3 = rhs(i,j,k,3,c)
-                   r4 = rhs(i,j,k,4,c)
-                   r5 = rhs(i,j,k,5,c)
-
-                   t1 = c2 * ac2inv * ( qs(i,j,k,c)*r1 - uu*r2  - 
-     >                  vv*r3 - ww*r4 + r5 )
-                   t2 = bt * ru1 * ( uu * r1 - r2 )
-                   t3 = ( bt * ru1 * ac ) * t1
-
-                   rhs(i,j,k,1,c) = r1 - t1
-                   rhs(i,j,k,2,c) = - ru1 * ( ww*r1 - r4 )
-                   rhs(i,j,k,3,c) =   ru1 * ( vv*r1 - r3 )
-                   rhs(i,j,k,4,c) = - t2 + t3
-                   rhs(i,j,k,5,c) =   t2 + t3
-                end do
-             end do
-          end do
-       end do
-
-       return
-       end
-
-
diff --git a/examples/smpi/NAS/SP/tzetar.f b/examples/smpi/NAS/SP/tzetar.f
deleted file mode 100644 (file)
index 554066d..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine  tzetar(c)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c   block-diagonal matrix-vector multiplication                       
-c---------------------------------------------------------------------
-
-       include 'header.h'
-
-       integer i, j, k, c
-       double precision  t1, t2, t3, ac, xvel, yvel, zvel, r1, r2, r3, 
-     >                   r4, r5, btuz, acinv, ac2u, uzik1
-
-c---------------------------------------------------------------------
-c      treat only one cell                                             
-c---------------------------------------------------------------------
-       do    k = start(3,c), cell_size(3,c)-end(3,c)-1
-          do    j = start(2,c), cell_size(2,c)-end(2,c)-1
-             do    i = start(1,c), cell_size(1,c)-end(1,c)-1
-
-                xvel = us(i,j,k,c)
-                yvel = vs(i,j,k,c)
-                zvel = ws(i,j,k,c)
-                ac   = speed(i,j,k,c)
-                acinv = ainv(i,j,k,c)
-
-                ac2u = ac*ac
-
-                r1 = rhs(i,j,k,1,c)
-                r2 = rhs(i,j,k,2,c)
-                r3 = rhs(i,j,k,3,c)
-                r4 = rhs(i,j,k,4,c)
-                r5 = rhs(i,j,k,5,c)      
-
-                uzik1 = u(i,j,k,1,c)
-                btuz  = bt * uzik1
-
-                t1 = btuz*acinv * (r4 + r5)
-                t2 = r3 + t1
-                t3 = btuz * (r4 - r5)
-
-                rhs(i,j,k,1,c) = t2
-                rhs(i,j,k,2,c) = -uzik1*r2 + xvel*t2
-                rhs(i,j,k,3,c) =  uzik1*r1 + yvel*t2
-                rhs(i,j,k,4,c) =  zvel*t2  + t3
-                rhs(i,j,k,5,c) =  uzik1*(-xvel*r2 + yvel*r1) + 
-     >                    qs(i,j,k,c)*t2 + c2iv*ac2u*t1 + zvel*t3
-
-             end do
-          end do
-       end do
-
-       return
-       end
diff --git a/examples/smpi/NAS/SP/verify.f b/examples/smpi/NAS/SP/verify.f
deleted file mode 100644 (file)
index 08be79c..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-        subroutine verify(no_time_steps, class, verified)
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c  verification routine                         
-c---------------------------------------------------------------------
-
-        include 'header.h'
-        include 'mpinpb.h'
-
-        double precision xcrref(5),xceref(5),xcrdif(5),xcedif(5), 
-     >                   epsilon, xce(5), xcr(5), dtref
-        integer m, no_time_steps
-        character class
-        logical verified
-
-c---------------------------------------------------------------------
-c   tolerance level
-c---------------------------------------------------------------------
-        epsilon = 1.0d-08
-
-
-c---------------------------------------------------------------------
-c   compute the error norm and the residual norm, and exit if not printing
-c---------------------------------------------------------------------
-        call error_norm(xce)
-        call copy_faces
-
-        call rhs_norm(xcr)
-
-        do m = 1, 5
-           xcr(m) = xcr(m) / dt
-        enddo
-
-        if (node .ne. 0) return
-
-        class = 'U'
-        verified = .true.
-
-        do m = 1,5
-           xcrref(m) = 1.0
-           xceref(m) = 1.0
-        end do
-
-c---------------------------------------------------------------------
-c    reference data for 12X12X12 grids after 100 time steps, with DT = 1.50d-02
-c---------------------------------------------------------------------
-        if ( (grid_points(1)  .eq. 12     ) .and. 
-     >       (grid_points(2)  .eq. 12     ) .and.
-     >       (grid_points(3)  .eq. 12     ) .and.
-     >       (no_time_steps   .eq. 100    ))  then
-
-           class = 'S'
-           dtref = 1.5d-2
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 2.7470315451339479d-02
-           xcrref(2) = 1.0360746705285417d-02
-           xcrref(3) = 1.6235745065095532d-02
-           xcrref(4) = 1.5840557224455615d-02
-           xcrref(5) = 3.4849040609362460d-02
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-           xceref(1) = 2.7289258557377227d-05
-           xceref(2) = 1.0364446640837285d-05
-           xceref(3) = 1.6154798287166471d-05
-           xceref(4) = 1.5750704994480102d-05
-           xceref(5) = 3.4177666183390531d-05
-
-
-c---------------------------------------------------------------------
-c    reference data for 36X36X36 grids after 400 time steps, with DT = 1.5d-03
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 36) .and. 
-     >           (grid_points(2) .eq. 36) .and.
-     >           (grid_points(3) .eq. 36) .and.
-     >           (no_time_steps . eq. 400) ) then
-
-           class = 'W'
-           dtref = 1.5d-3
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 0.1893253733584d-02
-           xcrref(2) = 0.1717075447775d-03
-           xcrref(3) = 0.2778153350936d-03
-           xcrref(4) = 0.2887475409984d-03
-           xcrref(5) = 0.3143611161242d-02
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-           xceref(1) = 0.7542088599534d-04
-           xceref(2) = 0.6512852253086d-05
-           xceref(3) = 0.1049092285688d-04
-           xceref(4) = 0.1128838671535d-04
-           xceref(5) = 0.1212845639773d-03
-
-c---------------------------------------------------------------------
-c    reference data for 64X64X64 grids after 400 time steps, with DT = 1.5d-03
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 64) .and. 
-     >           (grid_points(2) .eq. 64) .and.
-     >           (grid_points(3) .eq. 64) .and.
-     >           (no_time_steps . eq. 400) ) then
-
-           class = 'A'
-           dtref = 1.5d-3
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 2.4799822399300195d0
-           xcrref(2) = 1.1276337964368832d0
-           xcrref(3) = 1.5028977888770491d0
-           xcrref(4) = 1.4217816211695179d0
-           xcrref(5) = 2.1292113035138280d0
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-           xceref(1) = 1.0900140297820550d-04
-           xceref(2) = 3.7343951769282091d-05
-           xceref(3) = 5.0092785406541633d-05
-           xceref(4) = 4.7671093939528255d-05
-           xceref(5) = 1.3621613399213001d-04
-
-c---------------------------------------------------------------------
-c    reference data for 102X102X102 grids after 400 time steps,
-c    with DT = 1.0d-03
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 102) .and. 
-     >           (grid_points(2) .eq. 102) .and.
-     >           (grid_points(3) .eq. 102) .and.
-     >           (no_time_steps . eq. 400) ) then
-
-           class = 'B'
-           dtref = 1.0d-3
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 0.6903293579998d+02
-           xcrref(2) = 0.3095134488084d+02
-           xcrref(3) = 0.4103336647017d+02
-           xcrref(4) = 0.3864769009604d+02
-           xcrref(5) = 0.5643482272596d+02
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-           xceref(1) = 0.9810006190188d-02
-           xceref(2) = 0.1022827905670d-02
-           xceref(3) = 0.1720597911692d-02
-           xceref(4) = 0.1694479428231d-02
-           xceref(5) = 0.1847456263981d-01
-
-c---------------------------------------------------------------------
-c    reference data for 162X162X162 grids after 400 time steps,
-c    with DT = 0.67d-03
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 162) .and. 
-     >           (grid_points(2) .eq. 162) .and.
-     >           (grid_points(3) .eq. 162) .and.
-     >           (no_time_steps . eq. 400) ) then
-
-           class = 'C'
-           dtref = 0.67d-3
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 0.5881691581829d+03
-           xcrref(2) = 0.2454417603569d+03
-           xcrref(3) = 0.3293829191851d+03
-           xcrref(4) = 0.3081924971891d+03
-           xcrref(5) = 0.4597223799176d+03
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-           xceref(1) = 0.2598120500183d+00
-           xceref(2) = 0.2590888922315d-01
-           xceref(3) = 0.5132886416320d-01
-           xceref(4) = 0.4806073419454d-01
-           xceref(5) = 0.5483377491301d+00
-
-c---------------------------------------------------------------------
-c    reference data for 408X408X408 grids after 500 time steps,
-c    with DT = 0.3d-03
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 408) .and. 
-     >           (grid_points(2) .eq. 408) .and.
-     >           (grid_points(3) .eq. 408) .and.
-     >           (no_time_steps . eq. 500) ) then
-
-           class = 'D'
-           dtref = 0.30d-3
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 0.1044696216887d+05
-           xcrref(2) = 0.3204427762578d+04
-           xcrref(3) = 0.4648680733032d+04
-           xcrref(4) = 0.4238923283697d+04
-           xcrref(5) = 0.7588412036136d+04
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-           xceref(1) = 0.5089471423669d+01
-           xceref(2) = 0.5323514855894d+00
-           xceref(3) = 0.1187051008971d+01
-           xceref(4) = 0.1083734951938d+01
-           xceref(5) = 0.1164108338568d+02
-
-c---------------------------------------------------------------------
-c    reference data for 1020X1020X1020 grids after 500 time steps,
-c    with DT = 0.1d-03
-c---------------------------------------------------------------------
-        elseif ( (grid_points(1) .eq. 1020) .and. 
-     >           (grid_points(2) .eq. 1020) .and.
-     >           (grid_points(3) .eq. 1020) .and.
-     >           (no_time_steps . eq. 500) ) then
-
-           class = 'E'
-           dtref = 0.10d-3
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of residual.
-c---------------------------------------------------------------------
-           xcrref(1) = 0.6255387422609d+05
-           xcrref(2) = 0.1495317020012d+05
-           xcrref(3) = 0.2347595750586d+05
-           xcrref(4) = 0.2091099783534d+05
-           xcrref(5) = 0.4770412841218d+05
-
-c---------------------------------------------------------------------
-c    Reference values of RMS-norms of solution error.
-c---------------------------------------------------------------------
-           xceref(1) = 0.6742735164909d+02
-           xceref(2) = 0.5390656036938d+01
-           xceref(3) = 0.1680647196477d+02
-           xceref(4) = 0.1536963126457d+02
-           xceref(5) = 0.1575330146156d+03
-
-        else
-           verified = .false.
-        endif
-
-c---------------------------------------------------------------------
-c    verification test for residuals if gridsize is one of 
-c    the defined grid sizes above (class .ne. 'U')
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c    Compute the difference of solution values and the known reference values.
-c---------------------------------------------------------------------
-        do m = 1, 5
-           
-           xcrdif(m) = dabs((xcr(m)-xcrref(m))/xcrref(m)) 
-           xcedif(m) = dabs((xce(m)-xceref(m))/xceref(m))
-           
-        enddo
-
-c---------------------------------------------------------------------
-c    Output the comparison of computed results to known cases.
-c---------------------------------------------------------------------
-
-        if (class .ne. 'U') then
-           write(*, 1990) class
- 1990      format(' Verification being performed for class ', a)
-           write (*,2000) epsilon
- 2000      format(' accuracy setting for epsilon = ', E20.13)
-           verified = (dabs(dt-dtref) .le. epsilon)
-           if (.not.verified) then  
-              class = 'U'
-              write (*,1000) dtref
- 1000         format(' DT does not match the reference value of ', 
-     >                 E15.8)
-           endif
-        else 
-           write(*, 1995)
- 1995      format(' Unknown class')
-        endif
-
-
-        if (class .ne. 'U') then
-           write (*,2001) 
-        else
-           write (*, 2005)
-        endif
-
- 2001   format(' Comparison of RMS-norms of residual')
- 2005   format(' RMS-norms of residual')
-        do m = 1, 5
-           if (class .eq. 'U') then
-              write(*, 2015) m, xcr(m)
-           else if (xcrdif(m) .le. epsilon) then
-              write (*,2011) m,xcr(m),xcrref(m),xcrdif(m)
-           else 
-              verified = .false.
-              write (*,2010) m,xcr(m),xcrref(m),xcrdif(m)
-           endif
-        enddo
-
-        if (class .ne. 'U') then
-           write (*,2002)
-        else
-           write (*,2006)
-        endif
- 2002   format(' Comparison of RMS-norms of solution error')
- 2006   format(' RMS-norms of solution error')
-        
-        do m = 1, 5
-           if (class .eq. 'U') then
-              write(*, 2015) m, xce(m)
-           else if (xcedif(m) .le. epsilon) then
-              write (*,2011) m,xce(m),xceref(m),xcedif(m)
-           else
-              verified = .false.
-              write (*,2010) m,xce(m),xceref(m),xcedif(m)
-           endif
-        enddo
-        
- 2010   format(' FAILURE: ', i2, E20.13, E20.13, E20.13)
- 2011   format('          ', i2, E20.13, E20.13, E20.13)
- 2015   format('          ', i2, E20.13)
-        
-        if (class .eq. 'U') then
-           write(*, 2022)
-           write(*, 2023)
- 2022      format(' No reference values provided')
- 2023      format(' No verification performed')
-        else if (verified) then
-           write(*, 2020)
- 2020      format(' Verification Successful')
-        else
-           write(*, 2021)
- 2021      format(' Verification failed')
-        endif
-
-        return
-
-
-        end
diff --git a/examples/smpi/NAS/SP/x_solve.f b/examples/smpi/NAS/SP/x_solve.f
deleted file mode 100644 (file)
index cd40756..0000000
+++ /dev/null
@@ -1,545 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine x_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c this function performs the solution of the approximate factorization
-c step in the x-direction for all five matrix components
-c simultaneously. The Thomas algorithm is employed to solve the
-c systems for the x-lines. Boundary conditions are non-periodic
-c---------------------------------------------------------------------
-
-       include 'header.h'
-       include 'mpinpb.h'
-
-
-       integer i, j, k, jp, kp, n, iend, jsize, ksize, i1, i2,
-     >         buffer_size, c, m, p, istart, stage, error,
-     >         requests(2), statuses(MPI_STATUS_SIZE, 2)
-       double precision  r1, r2, d, e, s(5), sm1, sm2,
-     >                   fac1, fac2
-
-
-
-c---------------------------------------------------------------------
-c      OK, now we know that there are multiple processors
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c now do a sweep on a layer-by-layer basis, i.e. sweeping through cells
-c on this node in the direction of increasing i for the forward sweep,
-c and after that reversing the direction for the backsubstitution.
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c                          FORWARD ELIMINATION  
-c---------------------------------------------------------------------
-       do    stage = 1, ncells
-          c         = slice(1,stage)
-
-          istart = 0
-          iend   = cell_size(1,c)-1
-
-          jsize     = cell_size(2,c)
-          ksize     = cell_size(3,c)
-          jp        = cell_coord(2,c)-1
-          kp        = cell_coord(3,c)-1
-
-          buffer_size = (jsize-start(2,c)-end(2,c)) * 
-     >                  (ksize-start(3,c)-end(3,c))
-
-          if ( stage .ne. 1) then
-
-c---------------------------------------------------------------------
-c            if this is not the first processor in this row of cells, 
-c            receive data from predecessor containing the right hand
-c            sides and the upper diagonal elements of the previous two rows
-c---------------------------------------------------------------------
-             call mpi_irecv(in_buffer, 22*buffer_size, 
-     >                      dp_type, predecessor(1), 
-     >                      DEFAULT_TAG,  comm_solve, 
-     >                      requests(1), error)
-
-
-c---------------------------------------------------------------------
-c            communication has already been started. 
-c            compute the left hand side while waiting for the msg
-c---------------------------------------------------------------------
-             call lhsx(c)
-
-c---------------------------------------------------------------------
-c            wait for pending communication to complete
-c            This waits on the current receive and on the send
-c            from the previous stage. They always come in pairs. 
-c---------------------------------------------------------------------
-
-             call mpi_waitall(2, requests, statuses, error)
-
-c---------------------------------------------------------------------
-c            unpack the buffer                                 
-c---------------------------------------------------------------------
-             i  = istart
-             i1 = istart + 1
-             n = 0
-
-c---------------------------------------------------------------------
-c            create a running pointer
-c---------------------------------------------------------------------
-             p = 0
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    j = start(2,c), jsize-end(2,c)-1
-                   lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) -
-     >                       in_buffer(p+1) * lhs(i,j,k,n+1,c)
-                   lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) -
-     >                       in_buffer(p+2) * lhs(i,j,k,n+1,c)
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                       in_buffer(p+2+m) * lhs(i,j,k,n+1,c)
-                   end do
-                   d            = in_buffer(p+6)
-                   e            = in_buffer(p+7)
-                   do    m = 1, 3
-                      s(m) = in_buffer(p+7+m)
-                   end do
-                   r1 = lhs(i,j,k,n+2,c)
-                   lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1
-                   lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1
-                   end do
-                   r2 = lhs(i1,j,k,n+1,c)
-                   lhs(i1,j,k,n+2,c) = lhs(i1,j,k,n+2,c) - d * r2
-                   lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - e * r2
-                   do    m = 1, 3
-                      rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) - s(m) * r2
-                   end do
-                   p = p + 10
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do    k = start(3,c), ksize-end(3,c)-1
-                   do    j = start(2,c), jsize-end(2,c)-1
-                      lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) -
-     >                          in_buffer(p+1) * lhs(i,j,k,n+1,c)
-                      lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) -
-     >                          in_buffer(p+2) * lhs(i,j,k,n+1,c)
-                      rhs(i,j,k,m,c)   = rhs(i,j,k,m,c) -
-     >                          in_buffer(p+3) * lhs(i,j,k,n+1,c)
-                      d                = in_buffer(p+4)
-                      e                = in_buffer(p+5)
-                      s(m)             = in_buffer(p+6)
-                      r1 = lhs(i,j,k,n+2,c)
-                      lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1
-                      lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1
-                      rhs(i,j,k,m,c)   = rhs(i,j,k,m,c) - s(m) * r1
-                      r2 = lhs(i1,j,k,n+1,c)
-                      lhs(i1,j,k,n+2,c) = lhs(i1,j,k,n+2,c) - d * r2
-                      lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) - e * r2
-                      rhs(i1,j,k,m,c)   = rhs(i1,j,k,m,c) - s(m) * r2
-                      p = p + 6
-                   end do
-                end do
-             end do
-
-          else            
-
-c---------------------------------------------------------------------
-c            if this IS the first cell, we still compute the lhs
-c---------------------------------------------------------------------
-             call lhsx(c)
-          endif
-
-c---------------------------------------------------------------------
-c         perform the Thomas algorithm; first, FORWARD ELIMINATION     
-c---------------------------------------------------------------------
-          n = 0
-
-          do    k = start(3,c), ksize-end(3,c)-1
-             do    j = start(2,c), jsize-end(2,c)-1
-                do    i = istart, iend-2
-                   i1 = i  + 1
-                   i2 = i  + 2
-                   fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                   lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                   end do
-                   lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) -
-     >                         lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c)
-                   lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) -
-     >                         lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) -
-     >                         lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c)
-                   end do
-                   lhs(i2,j,k,n+2,c) = lhs(i2,j,k,n+2,c) -
-     >                         lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+4,c)
-                   lhs(i2,j,k,n+3,c) = lhs(i2,j,k,n+3,c) -
-     >                         lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i2,j,k,m,c) = rhs(i2,j,k,m,c) -
-     >                         lhs(i2,j,k,n+1,c)*rhs(i,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         The last two rows in this grid block are a bit different, 
-c         since they do not have two more rows available for the
-c         elimination of off-diagonal entries
-c---------------------------------------------------------------------
-
-          i  = iend - 1
-          i1 = iend
-          do    k = start(3,c), ksize-end(3,c)-1
-             do    j = start(2,c), jsize-end(2,c)-1
-                fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                do    m = 1, 3
-                   rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                end do
-                lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) -
-     >                      lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c)
-                lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) -
-     >                      lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c)
-                do    m = 1, 3
-                   rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) -
-     >                      lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c)
-                end do
-c---------------------------------------------------------------------
-c               scale the last row immediately (some of this is
-c               overkill in case this is the last cell)
-c---------------------------------------------------------------------
-                fac2               = 1.d0/lhs(i1,j,k,n+3,c)
-                lhs(i1,j,k,n+4,c) = fac2*lhs(i1,j,k,n+4,c)
-                lhs(i1,j,k,n+5,c) = fac2*lhs(i1,j,k,n+5,c)  
-                do    m = 1, 3
-                   rhs(i1,j,k,m,c) = fac2*rhs(i1,j,k,m,c)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         do the u+c and the u-c factors                 
-c---------------------------------------------------------------------
-
-          do    m = 4, 5
-             n = (m-3)*5
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    j = start(2,c), jsize-end(2,c)-1
-                   do    i = istart, iend-2
-                   i1 = i  + 1
-                   i2 = i  + 2
-                   fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                   lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                   rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                   lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) -
-     >                         lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c)
-                   lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) -
-     >                         lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c)
-                   rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) -
-     >                         lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c)
-                   lhs(i2,j,k,n+2,c) = lhs(i2,j,k,n+2,c) -
-     >                         lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+4,c)
-                   lhs(i2,j,k,n+3,c) = lhs(i2,j,k,n+3,c) -
-     >                         lhs(i2,j,k,n+1,c)*lhs(i,j,k,n+5,c)
-                   rhs(i2,j,k,m,c) = rhs(i2,j,k,m,c) -
-     >                         lhs(i2,j,k,n+1,c)*rhs(i,j,k,m,c)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c            And again the last two rows separately
-c---------------------------------------------------------------------
-             i  = iend - 1
-             i1 = iend
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    j = start(2,c), jsize-end(2,c)-1
-                fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                rhs(i,j,k,m,c)     = fac1*rhs(i,j,k,m,c)
-                lhs(i1,j,k,n+3,c) = lhs(i1,j,k,n+3,c) -
-     >                      lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+4,c)
-                lhs(i1,j,k,n+4,c) = lhs(i1,j,k,n+4,c) -
-     >                      lhs(i1,j,k,n+2,c)*lhs(i,j,k,n+5,c)
-                rhs(i1,j,k,m,c)   = rhs(i1,j,k,m,c) -
-     >                      lhs(i1,j,k,n+2,c)*rhs(i,j,k,m,c)
-c---------------------------------------------------------------------
-c               Scale the last row immediately (some of this is overkill
-c               if this is the last cell)
-c---------------------------------------------------------------------
-                fac2               = 1.d0/lhs(i1,j,k,n+3,c)
-                lhs(i1,j,k,n+4,c) = fac2*lhs(i1,j,k,n+4,c)
-                lhs(i1,j,k,n+5,c) = fac2*lhs(i1,j,k,n+5,c)
-                rhs(i1,j,k,m,c)   = fac2*rhs(i1,j,k,m,c)
-
-             end do
-          end do
-       end do
-
-c---------------------------------------------------------------------
-c         send information to the next processor, except when this
-c         is the last grid block
-c---------------------------------------------------------------------
-          if (stage .ne. ncells) then
-
-c---------------------------------------------------------------------
-c            create a running pointer for the send buffer  
-c---------------------------------------------------------------------
-             p = 0
-             n = 0
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    j = start(2,c), jsize-end(2,c)-1
-                   do    i = iend-1, iend
-                      out_buffer(p+1) = lhs(i,j,k,n+4,c)
-                      out_buffer(p+2) = lhs(i,j,k,n+5,c)
-                      do    m = 1, 3
-                         out_buffer(p+2+m) = rhs(i,j,k,m,c)
-                      end do
-                      p = p+5
-                   end do
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do    k = start(3,c), ksize-end(3,c)-1
-                   do    j = start(2,c), jsize-end(2,c)-1
-                      do    i = iend-1, iend
-                         out_buffer(p+1) = lhs(i,j,k,n+4,c)
-                         out_buffer(p+2) = lhs(i,j,k,n+5,c)
-                         out_buffer(p+3) = rhs(i,j,k,m,c)
-                         p = p + 3
-                      end do
-                   end do
-                end do
-             end do
-
-c---------------------------------------------------------------------
-c send data to next phase
-c can't receive data yet because buffer size will be wrong 
-c---------------------------------------------------------------------
-             call mpi_isend(out_buffer, 22*buffer_size, 
-     >                     dp_type, successor(1), 
-     >                     DEFAULT_TAG, comm_solve, 
-     >                     requests(2), error)
-
-          endif
-       end do
-
-c---------------------------------------------------------------------
-c      now go in the reverse direction                      
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c                         BACKSUBSTITUTION 
-c---------------------------------------------------------------------
-       do    stage = ncells, 1, -1
-          c = slice(1,stage)
-
-          istart = 0
-          iend   = cell_size(1,c)-1
-
-          jsize = cell_size(2,c)
-          ksize = cell_size(3,c)
-          jp    = cell_coord(2,c)-1
-          kp    = cell_coord(3,c)-1
-
-          buffer_size = (jsize-start(2,c)-end(2,c)) * 
-     >                  (ksize-start(3,c)-end(3,c))
-
-          if (stage .ne. ncells) then
-
-c---------------------------------------------------------------------
-c            if this is not the starting cell in this row of cells, 
-c            wait for a message to be received, containing the 
-c            solution of the previous two stations     
-c---------------------------------------------------------------------
-             call mpi_irecv(in_buffer, 10*buffer_size, 
-     >                      dp_type, successor(1), 
-     >                      DEFAULT_TAG, comm_solve, 
-     >                      requests(1), error)
-
-
-c---------------------------------------------------------------------
-c            communication has already been started
-c            while waiting, do the block-diagonal inversion for the 
-c            cell that was just finished                
-c---------------------------------------------------------------------
-
-             call ninvr(slice(1,stage+1))
-
-c---------------------------------------------------------------------
-c            wait for pending communication to complete
-c---------------------------------------------------------------------
-             call mpi_waitall(2, requests, statuses, error)
-
-c---------------------------------------------------------------------
-c            unpack the buffer for the first three factors         
-c---------------------------------------------------------------------
-             n = 0
-             p = 0
-             i  = iend
-             i1 = i - 1
-             do    m = 1, 3
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   j = start(2,c), jsize-end(2,c)-1
-                      sm1 = in_buffer(p+1)
-                      sm2 = in_buffer(p+2)
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k,n+4,c)*sm1 -
-     >                        lhs(i,j,k,n+5,c)*sm2
-                      rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) -
-     >                        lhs(i1,j,k,n+4,c) * rhs(i,j,k,m,c) - 
-     >                        lhs(i1,j,k,n+5,c) * sm1
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-c---------------------------------------------------------------------
-c            now unpack the buffer for the remaining two factors
-c---------------------------------------------------------------------
-             do    m = 4, 5
-                n = (m-3)*5
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   j = start(2,c), jsize-end(2,c)-1
-                      sm1 = in_buffer(p+1)
-                      sm2 = in_buffer(p+2)
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k,n+4,c)*sm1 -
-     >                        lhs(i,j,k,n+5,c)*sm2
-                      rhs(i1,j,k,m,c) = rhs(i1,j,k,m,c) -
-     >                        lhs(i1,j,k,n+4,c) * rhs(i,j,k,m,c) - 
-     >                        lhs(i1,j,k,n+5,c) * sm1
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-          else
-
-c---------------------------------------------------------------------
-c            now we know this is the first grid block on the back sweep,
-c            so we don't need a message to start the substitution. 
-c---------------------------------------------------------------------
-             i  = iend-1
-             i1 = iend
-             n = 0
-             do   m = 1, 3
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   j = start(2,c), jsize-end(2,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                             lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c)
-                   end do
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   j = start(2,c), jsize-end(2,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                             lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c)
-                   end do
-                end do
-             end do
-          endif
-
-c---------------------------------------------------------------------
-c         Whether or not this is the last processor, we always have
-c         to complete the back-substitution 
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c         The first three factors
-c---------------------------------------------------------------------
-          n = 0
-          do   m = 1, 3
-             do   k = start(3,c), ksize-end(3,c)-1
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do    i = iend-2, istart, -1
-                      i1 = i  + 1
-                      i2 = i  + 2
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                          lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c) -
-     >                          lhs(i,j,k,n+5,c)*rhs(i2,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         And the remaining two
-c---------------------------------------------------------------------
-          do    m = 4, 5
-             n = (m-3)*5
-             do   k = start(3,c), ksize-end(3,c)-1
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do    i = iend-2, istart, -1
-                      i1 = i  + 1
-                      i2 = i  + 2
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                          lhs(i,j,k,n+4,c)*rhs(i1,j,k,m,c) -
-     >                          lhs(i,j,k,n+5,c)*rhs(i2,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         send on information to the previous processor, if needed
-c---------------------------------------------------------------------
-          if (stage .ne.  1) then
-             i  = istart
-             i1 = istart+1
-             p = 0
-             do    m = 1, 5
-                do    k = start(3,c), ksize-end(3,c)-1
-                   do    j = start(2,c), jsize-end(2,c)-1
-                      out_buffer(p+1) = rhs(i,j,k,m,c)
-                       out_buffer(p+2) = rhs(i1,j,k,m,c)
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-c---------------------------------------------------------------------
-c            pack and send the buffer
-c---------------------------------------------------------------------
-             call mpi_isend(out_buffer, 10*buffer_size, 
-     >                     dp_type, predecessor(1), 
-     >                     DEFAULT_TAG, comm_solve, 
-     >                     requests(2), error)
-
-          endif
-
-c---------------------------------------------------------------------
-c         If this was the last stage, do the block-diagonal inversion          
-c---------------------------------------------------------------------
-          if (stage .eq. 1) call ninvr(c)
-
-       end do
-
-       return
-       end
-    
-
-
-
-
-
-
diff --git a/examples/smpi/NAS/SP/y_solve.f b/examples/smpi/NAS/SP/y_solve.f
deleted file mode 100644 (file)
index fdcbb4d..0000000
+++ /dev/null
@@ -1,538 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine y_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c this function performs the solution of the approximate factorization
-c step in the y-direction for all five matrix components
-c simultaneously. The Thomas algorithm is employed to solve the
-c systems for the y-lines. Boundary conditions are non-periodic
-c---------------------------------------------------------------------
-
-       include 'header.h'
-       include 'mpinpb.h'
-
-       integer i, j, k, stage, ip, kp, n, isize, jend, ksize, j1, j2,
-     >         buffer_size, c, m, p, jstart, error,
-     >         requests(2), statuses(MPI_STATUS_SIZE, 2)
-       double precision  r1, r2, d, e, s(5), sm1, sm2,
-     >                   fac1, fac2
-
-
-c---------------------------------------------------------------------
-c now do a sweep on a layer-by-layer basis, i.e. sweeping through cells
-c on this node in the direction of increasing i for the forward sweep,
-c and after that reversing the direction for the backsubstitution  
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c                          FORWARD ELIMINATION  
-c---------------------------------------------------------------------
-       do    stage = 1, ncells
-          c      = slice(2,stage)
-
-          jstart = 0
-          jend   = cell_size(2,c)-1
-
-          isize     = cell_size(1,c)
-          ksize     = cell_size(3,c)
-          ip        = cell_coord(1,c)-1
-          kp        = cell_coord(3,c)-1
-
-          buffer_size = (isize-start(1,c)-end(1,c)) * 
-     >                  (ksize-start(3,c)-end(3,c))
-
-          if ( stage .ne. 1) then
-
-c---------------------------------------------------------------------
-c            if this is not the first processor in this row of cells, 
-c            receive data from predecessor containing the right hand
-c            sides and the upper diagonal elements of the previous two rows
-c---------------------------------------------------------------------
-
-             call mpi_irecv(in_buffer, 22*buffer_size, 
-     >                      dp_type, predecessor(2), 
-     >                      DEFAULT_TAG, comm_solve, 
-     >                      requests(1), error)
-
-c---------------------------------------------------------------------
-c            communication has already been started. 
-c            compute the left hand side while waiting for the msg
-c---------------------------------------------------------------------
-             call lhsy(c)
-
-c---------------------------------------------------------------------
-c            wait for pending communication to complete
-c            This waits on the current receive and on the send
-c            from the previous stage. They always come in pairs. 
-c---------------------------------------------------------------------
-             call mpi_waitall(2, requests, statuses, error)
-
-c---------------------------------------------------------------------
-c            unpack the buffer                                 
-c---------------------------------------------------------------------
-             j  = jstart
-             j1 = jstart + 1
-             n = 0
-c---------------------------------------------------------------------
-c            create a running pointer
-c---------------------------------------------------------------------
-             p = 0
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    i = start(1,c), isize-end(1,c)-1
-                   lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) -
-     >                       in_buffer(p+1) * lhs(i,j,k,n+1,c)
-                   lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) -
-     >                       in_buffer(p+2) * lhs(i,j,k,n+1,c)
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                       in_buffer(p+2+m) * lhs(i,j,k,n+1,c)
-                   end do
-                   d            = in_buffer(p+6)
-                   e            = in_buffer(p+7)
-                   do    m = 1, 3
-                      s(m) = in_buffer(p+7+m)
-                   end do
-                   r1 = lhs(i,j,k,n+2,c)
-                   lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1
-                   lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1
-                   end do
-                   r2 = lhs(i,j1,k,n+1,c)
-                   lhs(i,j1,k,n+2,c) = lhs(i,j1,k,n+2,c) - d * r2
-                   lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - e * r2
-                   do    m = 1, 3
-                      rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) - s(m) * r2
-                   end do
-                   p = p + 10
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do    k = start(3,c), ksize-end(3,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) -
-     >                          in_buffer(p+1) * lhs(i,j,k,n+1,c)
-                      lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) -
-     >                          in_buffer(p+2) * lhs(i,j,k,n+1,c)
-                      rhs(i,j,k,m,c)   = rhs(i,j,k,m,c) -
-     >                          in_buffer(p+3) * lhs(i,j,k,n+1,c)
-                      d                = in_buffer(p+4)
-                      e                = in_buffer(p+5)
-                      s(m)             = in_buffer(p+6)
-                      r1 = lhs(i,j,k,n+2,c)
-                      lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1
-                      lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1
-                      rhs(i,j,k,m,c)   = rhs(i,j,k,m,c) - s(m) * r1
-                      r2 = lhs(i,j1,k,n+1,c)
-                      lhs(i,j1,k,n+2,c) = lhs(i,j1,k,n+2,c) - d * r2
-                      lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) - e * r2
-                      rhs(i,j1,k,m,c)   = rhs(i,j1,k,m,c) - s(m) * r2
-                      p = p + 6
-                   end do
-                end do
-             end do
-
-          else            
-
-c---------------------------------------------------------------------
-c            if this IS the first cell, we still compute the lhs
-c---------------------------------------------------------------------
-             call lhsy(c)
-          endif
-
-c---------------------------------------------------------------------
-c         perform the Thomas algorithm; first, FORWARD ELIMINATION     
-c---------------------------------------------------------------------
-          n = 0
-
-          do    k = start(3,c), ksize-end(3,c)-1
-             do    j = jstart, jend-2
-                do    i = start(1,c), isize-end(1,c)-1
-                   j1 = j  + 1
-                   j2 = j  + 2
-                   fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                   lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                   end do
-                   lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) -
-     >                         lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) -
-     >                         lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) -
-     >                         lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c)
-                   end do
-                   lhs(i,j2,k,n+2,c) = lhs(i,j2,k,n+2,c) -
-     >                         lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j2,k,n+3,c) = lhs(i,j2,k,n+3,c) -
-     >                         lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i,j2,k,m,c) = rhs(i,j2,k,m,c) -
-     >                         lhs(i,j2,k,n+1,c)*rhs(i,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         The last two rows in this grid block are a bit different, 
-c         since they do not have two more rows available for the
-c         elimination of off-diagonal entries
-c---------------------------------------------------------------------
-
-          j  = jend - 1
-          j1 = jend
-          do    k = start(3,c), ksize-end(3,c)-1
-             do    i = start(1,c), isize-end(1,c)-1
-                fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                do    m = 1, 3
-                   rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                end do
-                lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) -
-     >                      lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c)
-                lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) -
-     >                      lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c)
-                do    m = 1, 3
-                   rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) -
-     >                      lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c)
-                end do
-c---------------------------------------------------------------------
-c               scale the last row immediately (some of this is
-c               overkill in case this is the last cell)
-c---------------------------------------------------------------------
-                fac2               = 1.d0/lhs(i,j1,k,n+3,c)
-                lhs(i,j1,k,n+4,c) = fac2*lhs(i,j1,k,n+4,c)
-                lhs(i,j1,k,n+5,c) = fac2*lhs(i,j1,k,n+5,c)  
-                do    m = 1, 3
-                   rhs(i,j1,k,m,c) = fac2*rhs(i,j1,k,m,c)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         do the u+c and the u-c factors                 
-c---------------------------------------------------------------------
-          do    m = 4, 5
-             n = (m-3)*5
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    j = jstart, jend-2
-                   do    i = start(1,c), isize-end(1,c)-1
-                   j1 = j  + 1
-                   j2 = j  + 2
-                   fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                   lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                   rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                   lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) -
-     >                         lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) -
-     >                         lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c)
-                   rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) -
-     >                         lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c)
-                   lhs(i,j2,k,n+2,c) = lhs(i,j2,k,n+2,c) -
-     >                         lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j2,k,n+3,c) = lhs(i,j2,k,n+3,c) -
-     >                         lhs(i,j2,k,n+1,c)*lhs(i,j,k,n+5,c)
-                   rhs(i,j2,k,m,c) = rhs(i,j2,k,m,c) -
-     >                         lhs(i,j2,k,n+1,c)*rhs(i,j,k,m,c)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c            And again the last two rows separately
-c---------------------------------------------------------------------
-             j  = jend - 1
-             j1 = jend
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    i = start(1,c), isize-end(1,c)-1
-                fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                rhs(i,j,k,m,c)     = fac1*rhs(i,j,k,m,c)
-                lhs(i,j1,k,n+3,c) = lhs(i,j1,k,n+3,c) -
-     >                      lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+4,c)
-                lhs(i,j1,k,n+4,c) = lhs(i,j1,k,n+4,c) -
-     >                      lhs(i,j1,k,n+2,c)*lhs(i,j,k,n+5,c)
-                rhs(i,j1,k,m,c)   = rhs(i,j1,k,m,c) -
-     >                      lhs(i,j1,k,n+2,c)*rhs(i,j,k,m,c)
-c---------------------------------------------------------------------
-c               Scale the last row immediately (some of this is overkill
-c               if this is the last cell)
-c---------------------------------------------------------------------
-                fac2               = 1.d0/lhs(i,j1,k,n+3,c)
-                lhs(i,j1,k,n+4,c) = fac2*lhs(i,j1,k,n+4,c)
-                lhs(i,j1,k,n+5,c) = fac2*lhs(i,j1,k,n+5,c)
-                rhs(i,j1,k,m,c)   = fac2*rhs(i,j1,k,m,c)
-
-             end do
-          end do
-       end do
-
-c---------------------------------------------------------------------
-c         send information to the next processor, except when this
-c         is the last grid block;
-c---------------------------------------------------------------------
-
-          if (stage .ne. ncells) then
-
-c---------------------------------------------------------------------
-c            create a running pointer for the send buffer  
-c---------------------------------------------------------------------
-             p = 0
-             n = 0
-             do    k = start(3,c), ksize-end(3,c)-1
-                do    i = start(1,c), isize-end(1,c)-1
-                   do    j = jend-1, jend
-                      out_buffer(p+1) = lhs(i,j,k,n+4,c)
-                      out_buffer(p+2) = lhs(i,j,k,n+5,c)
-                      do    m = 1, 3
-                         out_buffer(p+2+m) = rhs(i,j,k,m,c)
-                      end do
-                      p = p+5
-                   end do
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do    k = start(3,c), ksize-end(3,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      do    j = jend-1, jend
-                         out_buffer(p+1) = lhs(i,j,k,n+4,c)
-                         out_buffer(p+2) = lhs(i,j,k,n+5,c)
-                         out_buffer(p+3) = rhs(i,j,k,m,c)
-                         p = p + 3
-                      end do
-                   end do
-                end do
-             end do
-
-c---------------------------------------------------------------------
-c            pack and send the buffer
-c---------------------------------------------------------------------
-             call mpi_isend(out_buffer, 22*buffer_size, 
-     >                     dp_type, successor(2), 
-     >                     DEFAULT_TAG, comm_solve, 
-     >                     requests(2), error)
-
-          endif
-       end do
-
-c---------------------------------------------------------------------
-c      now go in the reverse direction                      
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c                         BACKSUBSTITUTION 
-c---------------------------------------------------------------------
-       do    stage = ncells, 1, -1
-          c = slice(2,stage)
-
-          jstart = 0
-          jend   = cell_size(2,c)-1
-
-          isize = cell_size(1,c)
-          ksize = cell_size(3,c)
-          ip    = cell_coord(1,c)-1
-          kp    = cell_coord(3,c)-1
-
-          buffer_size = (isize-start(1,c)-end(1,c)) * 
-     >                  (ksize-start(3,c)-end(3,c))
-
-          if (stage .ne. ncells) then
-
-c---------------------------------------------------------------------
-c            if this is not the starting cell in this row of cells, 
-c            wait for a message to be received, containing the 
-c            solution of the previous two stations     
-c---------------------------------------------------------------------
-
-             call mpi_irecv(in_buffer, 10*buffer_size, 
-     >                      dp_type, successor(2), 
-     >                      DEFAULT_TAG, comm_solve, 
-     >                      requests(1), error)
-
-
-c---------------------------------------------------------------------
-c            communication has already been started
-c            while waiting, do the block-diagonal inversion for the 
-c            cell that was just finished                
-c---------------------------------------------------------------------
-
-             call pinvr(slice(2,stage+1))
-
-c---------------------------------------------------------------------
-c            wait for pending communication to complete
-c---------------------------------------------------------------------
-             call mpi_waitall(2, requests, statuses, error)
-
-c---------------------------------------------------------------------
-c            unpack the buffer for the first three factors         
-c---------------------------------------------------------------------
-             n = 0
-             p = 0
-             j  = jend
-             j1 = j - 1
-             do    m = 1, 3
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      sm1 = in_buffer(p+1)
-                      sm2 = in_buffer(p+2)
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k,n+4,c)*sm1 -
-     >                        lhs(i,j,k,n+5,c)*sm2
-                      rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) -
-     >                        lhs(i,j1,k,n+4,c) * rhs(i,j,k,m,c) - 
-     >                        lhs(i,j1,k,n+5,c) * sm1
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-c---------------------------------------------------------------------
-c            now unpack the buffer for the remaining two factors
-c---------------------------------------------------------------------
-             do    m = 4, 5
-                n = (m-3)*5
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      sm1 = in_buffer(p+1)
-                      sm2 = in_buffer(p+2)
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k,n+4,c)*sm1 -
-     >                        lhs(i,j,k,n+5,c)*sm2
-                      rhs(i,j1,k,m,c) = rhs(i,j1,k,m,c) -
-     >                        lhs(i,j1,k,n+4,c) * rhs(i,j,k,m,c) - 
-     >                        lhs(i,j1,k,n+5,c) * sm1
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-          else
-c---------------------------------------------------------------------
-c            now we know this is the first grid block on the back sweep,
-c            so we don't need a message to start the substitution. 
-c---------------------------------------------------------------------
-
-             j  = jend - 1
-             j1 = jend
-             n = 0
-             do   m = 1, 3
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                             lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c)
-                   end do
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do   k = start(3,c), ksize-end(3,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                             lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c)
-                   end do
-                end do
-             end do
-          endif
-
-c---------------------------------------------------------------------
-c         Whether or not this is the last processor, we always have
-c         to complete the back-substitution 
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c         The first three factors
-c---------------------------------------------------------------------
-          n = 0
-          do   m = 1, 3
-             do   k = start(3,c), ksize-end(3,c)-1
-                do   j = jend-2, jstart, -1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      j1 = j  + 1
-                      j2 = j  + 2
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                          lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c) -
-     >                          lhs(i,j,k,n+5,c)*rhs(i,j2,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         And the remaining two
-c---------------------------------------------------------------------
-          do    m = 4, 5
-             n = (m-3)*5
-             do   k = start(3,c), ksize-end(3,c)-1
-                do   j = jend-2, jstart, -1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      j1 = j  + 1
-                      j2 = j1 + 1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                          lhs(i,j,k,n+4,c)*rhs(i,j1,k,m,c) -
-     >                          lhs(i,j,k,n+5,c)*rhs(i,j2,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         send on information to the previous processor, if needed
-c---------------------------------------------------------------------
-          if (stage .ne.  1) then
-             j  = jstart
-             j1 = jstart + 1
-             p = 0
-             do    m = 1, 5
-                do    k = start(3,c), ksize-end(3,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      out_buffer(p+1) = rhs(i,j,k,m,c)
-                      out_buffer(p+2) = rhs(i,j1,k,m,c)
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-c---------------------------------------------------------------------
-c            pack and send the buffer
-c---------------------------------------------------------------------
-
-             call mpi_isend(out_buffer, 10*buffer_size, 
-     >                     dp_type, predecessor(2), 
-     >                     DEFAULT_TAG, comm_solve, 
-     >                     requests(2), error)
-
-          endif
-
-c---------------------------------------------------------------------
-c         If this was the last stage, do the block-diagonal inversion          
-c---------------------------------------------------------------------
-          if (stage .eq. 1) call pinvr(c)
-
-       end do
-
-       return
-       end
-    
-
-
-
-
-
-
diff --git a/examples/smpi/NAS/SP/z_solve.f b/examples/smpi/NAS/SP/z_solve.f
deleted file mode 100644 (file)
index ad0dc7e..0000000
+++ /dev/null
@@ -1,532 +0,0 @@
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-       subroutine z_solve
-
-c---------------------------------------------------------------------
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c this function performs the solution of the approximate factorization
-c step in the z-direction for all five matrix components
-c simultaneously. The Thomas algorithm is employed to solve the
-c systems for the z-lines. Boundary conditions are non-periodic
-c---------------------------------------------------------------------
-
-       include 'header.h'
-       include 'mpinpb.h'
-
-       integer i, j, k, stage, ip, jp, n, isize, jsize, kend, k1, k2,
-     >         buffer_size, c, m, p, kstart, error,
-     >         requests(2), statuses(MPI_STATUS_SIZE, 2)
-       double precision  r1, r2, d, e, s(5), sm1, sm2,
-     >                   fac1, fac2
-
-c---------------------------------------------------------------------
-c now do a sweep on a layer-by-layer basis, i.e. sweeping through cells
-c on this node in the direction of increasing i for the forward sweep,
-c and after that reversing the direction for the backsubstitution  
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c                          FORWARD ELIMINATION  
-c---------------------------------------------------------------------
-       do    stage = 1, ncells
-          c         = slice(3,stage)
-
-          kstart = 0
-          kend   = cell_size(3,c)-1
-
-          isize     = cell_size(1,c)
-          jsize     = cell_size(2,c)
-          ip        = cell_coord(1,c)-1
-          jp        = cell_coord(2,c)-1
-
-          buffer_size = (isize-start(1,c)-end(1,c)) * 
-     >                  (jsize-start(2,c)-end(2,c))
-
-          if (stage .ne. 1) then
-
-
-c---------------------------------------------------------------------
-c            if this is not the first processor in this row of cells, 
-c            receive data from predecessor containing the right hand
-c            sides and the upper diagonal elements of the previous two rows
-c---------------------------------------------------------------------
-
-             call mpi_irecv(in_buffer, 22*buffer_size, 
-     >                      dp_type, predecessor(3), 
-     >                      DEFAULT_TAG, comm_solve, 
-     >                      requests(1), error)
-
-
-c---------------------------------------------------------------------
-c            communication has already been started. 
-c            compute the left hand side while waiting for the msg
-c---------------------------------------------------------------------
-             call lhsz(c)
-
-c---------------------------------------------------------------------
-c            wait for pending communication to complete
-c---------------------------------------------------------------------
-             call mpi_waitall(2, requests, statuses, error)
-             
-c---------------------------------------------------------------------
-c            unpack the buffer                                 
-c---------------------------------------------------------------------
-             k  = kstart
-             k1 = kstart + 1
-             n = 0
-
-c---------------------------------------------------------------------
-c            create a running pointer
-c---------------------------------------------------------------------
-             p = 0
-             do    j = start(2,c), jsize-end(2,c)-1
-                do    i = start(1,c), isize-end(1,c)-1
-                   lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) -
-     >                       in_buffer(p+1) * lhs(i,j,k,n+1,c)
-                   lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) -
-     >                       in_buffer(p+2) * lhs(i,j,k,n+1,c)
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                       in_buffer(p+2+m) * lhs(i,j,k,n+1,c)
-                   end do
-                   d            = in_buffer(p+6)
-                   e            = in_buffer(p+7)
-                   do    m = 1, 3
-                      s(m) = in_buffer(p+7+m)
-                   end do
-                   r1 = lhs(i,j,k,n+2,c)
-                   lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1
-                   lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - s(m) * r1
-                   end do
-                   r2 = lhs(i,j,k1,n+1,c)
-                   lhs(i,j,k1,n+2,c) = lhs(i,j,k1,n+2,c) - d * r2
-                   lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - e * r2
-                   do    m = 1, 3
-                      rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) - s(m) * r2
-                   end do
-                   p = p + 10
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do    j = start(2,c), jsize-end(2,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      lhs(i,j,k,n+2,c) = lhs(i,j,k,n+2,c) -
-     >                          in_buffer(p+1) * lhs(i,j,k,n+1,c)
-                      lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) -
-     >                          in_buffer(p+2) * lhs(i,j,k,n+1,c)
-                      rhs(i,j,k,m,c)   = rhs(i,j,k,m,c) -
-     >                          in_buffer(p+3) * lhs(i,j,k,n+1,c)
-                      d                = in_buffer(p+4)
-                      e                = in_buffer(p+5)
-                      s(m)             = in_buffer(p+6)
-                      r1 = lhs(i,j,k,n+2,c)
-                      lhs(i,j,k,n+3,c) = lhs(i,j,k,n+3,c) - d * r1
-                      lhs(i,j,k,n+4,c) = lhs(i,j,k,n+4,c) - e * r1
-                      rhs(i,j,k,m,c)   = rhs(i,j,k,m,c) - s(m) * r1
-                      r2 = lhs(i,j,k1,n+1,c)
-                      lhs(i,j,k1,n+2,c) = lhs(i,j,k1,n+2,c) - d * r2
-                      lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) - e * r2
-                      rhs(i,j,k1,m,c)   = rhs(i,j,k1,m,c) - s(m) * r2
-                      p = p + 6
-                   end do
-                end do
-             end do
-
-          else            
-
-c---------------------------------------------------------------------
-c            if this IS the first cell, we still compute the lhs
-c---------------------------------------------------------------------
-             call lhsz(c)
-          endif
-
-c---------------------------------------------------------------------
-c         perform the Thomas algorithm; first, FORWARD ELIMINATION     
-c---------------------------------------------------------------------
-          n = 0
-
-          do    k = kstart, kend-2
-             do    j = start(2,c), jsize-end(2,c)-1
-                do    i = start(1,c), isize-end(1,c)-1
-                   k1 = k  + 1
-                   k2 = k  + 2
-                   fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                   lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                   end do
-                   lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) -
-     >                         lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) -
-     >                         lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) -
-     >                         lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c)
-                   end do
-                   lhs(i,j,k2,n+2,c) = lhs(i,j,k2,n+2,c) -
-     >                         lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k2,n+3,c) = lhs(i,j,k2,n+3,c) -
-     >                         lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+5,c)
-                   do    m = 1, 3
-                      rhs(i,j,k2,m,c) = rhs(i,j,k2,m,c) -
-     >                         lhs(i,j,k2,n+1,c)*rhs(i,j,k,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         The last two rows in this grid block are a bit different, 
-c         since they do not have two more rows available for the
-c         elimination of off-diagonal entries
-c---------------------------------------------------------------------
-          k  = kend - 1
-          k1 = kend
-          do    j = start(2,c), jsize-end(2,c)-1
-             do    i = start(1,c), isize-end(1,c)-1
-                fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                do    m = 1, 3
-                   rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                end do
-                lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) -
-     >                      lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c)
-                lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) -
-     >                      lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c)
-                do    m = 1, 3
-                   rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) -
-     >                      lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c)
-                end do
-c---------------------------------------------------------------------
-c               scale the last row immediately (some of this is
-c               overkill in case this is the last cell)
-c---------------------------------------------------------------------
-                fac2               = 1.d0/lhs(i,j,k1,n+3,c)
-                lhs(i,j,k1,n+4,c) = fac2*lhs(i,j,k1,n+4,c)
-                lhs(i,j,k1,n+5,c) = fac2*lhs(i,j,k1,n+5,c)  
-                do    m = 1, 3
-                   rhs(i,j,k1,m,c) = fac2*rhs(i,j,k1,m,c)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         do the u+c and the u-c factors               
-c---------------------------------------------------------------------
-          do   m = 4, 5
-             n = (m-3)*5
-             do    k = kstart, kend-2
-                do    j = start(2,c), jsize-end(2,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                   k1 = k  + 1
-                   k2 = k  + 2
-                   fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                   lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                   rhs(i,j,k,m,c) = fac1*rhs(i,j,k,m,c)
-                   lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) -
-     >                         lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) -
-     >                         lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c)
-                   rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) -
-     >                         lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c)
-                   lhs(i,j,k2,n+2,c) = lhs(i,j,k2,n+2,c) -
-     >                         lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+4,c)
-                   lhs(i,j,k2,n+3,c) = lhs(i,j,k2,n+3,c) -
-     >                         lhs(i,j,k2,n+1,c)*lhs(i,j,k,n+5,c)
-                   rhs(i,j,k2,m,c) = rhs(i,j,k2,m,c) -
-     >                         lhs(i,j,k2,n+1,c)*rhs(i,j,k,m,c)
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c            And again the last two rows separately
-c---------------------------------------------------------------------
-             k  = kend - 1
-             k1 = kend
-             do    j = start(2,c), jsize-end(2,c)-1
-                do    i = start(1,c), isize-end(1,c)-1
-                fac1               = 1.d0/lhs(i,j,k,n+3,c)
-                lhs(i,j,k,n+4,c)   = fac1*lhs(i,j,k,n+4,c)
-                lhs(i,j,k,n+5,c)   = fac1*lhs(i,j,k,n+5,c)
-                rhs(i,j,k,m,c)     = fac1*rhs(i,j,k,m,c)
-                lhs(i,j,k1,n+3,c) = lhs(i,j,k1,n+3,c) -
-     >                      lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+4,c)
-                lhs(i,j,k1,n+4,c) = lhs(i,j,k1,n+4,c) -
-     >                      lhs(i,j,k1,n+2,c)*lhs(i,j,k,n+5,c)
-                rhs(i,j,k1,m,c)   = rhs(i,j,k1,m,c) -
-     >                      lhs(i,j,k1,n+2,c)*rhs(i,j,k,m,c)
-c---------------------------------------------------------------------
-c               Scale the last row immediately (some of this is overkill
-c               if this is the last cell)
-c---------------------------------------------------------------------
-                fac2               = 1.d0/lhs(i,j,k1,n+3,c)
-                lhs(i,j,k1,n+4,c) = fac2*lhs(i,j,k1,n+4,c)
-                lhs(i,j,k1,n+5,c) = fac2*lhs(i,j,k1,n+5,c)
-                rhs(i,j,k1,m,c)   = fac2*rhs(i,j,k1,m,c)
-
-             end do
-          end do
-       end do
-
-c---------------------------------------------------------------------
-c         send information to the next processor, except when this
-c         is the last grid block,
-c---------------------------------------------------------------------
-
-          if (stage .ne. ncells) then
-
-c---------------------------------------------------------------------
-c            create a running pointer for the send buffer  
-c---------------------------------------------------------------------
-             p = 0
-             n = 0
-             do    j = start(2,c), jsize-end(2,c)-1
-                do    i = start(1,c), isize-end(1,c)-1
-                   do    k = kend-1, kend
-                      out_buffer(p+1) = lhs(i,j,k,n+4,c)
-                      out_buffer(p+2) = lhs(i,j,k,n+5,c)
-                      do    m = 1, 3
-                         out_buffer(p+2+m) = rhs(i,j,k,m,c)
-                      end do
-                      p = p+5
-                   end do
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do    j = start(2,c), jsize-end(2,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      do    k = kend-1, kend
-                         out_buffer(p+1) = lhs(i,j,k,n+4,c)
-                         out_buffer(p+2) = lhs(i,j,k,n+5,c)
-                         out_buffer(p+3) = rhs(i,j,k,m,c)
-                         p = p + 3
-                      end do
-                   end do
-                end do
-             end do
-
-
-             call mpi_isend(out_buffer, 22*buffer_size, 
-     >                     dp_type, successor(3), 
-     >                     DEFAULT_TAG, comm_solve, 
-     >                     requests(2), error)
-
-          endif
-       end do
-
-c---------------------------------------------------------------------
-c      now go in the reverse direction                      
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c                         BACKSUBSTITUTION 
-c---------------------------------------------------------------------
-       do    stage = ncells, 1, -1
-          c = slice(3,stage)
-
-          kstart = 0
-          kend   = cell_size(3,c)-1
-
-          isize     = cell_size(1,c)
-          jsize     = cell_size(2,c)
-          ip        = cell_coord(1,c)-1
-          jp        = cell_coord(2,c)-1
-
-          buffer_size = (isize-start(1,c)-end(1,c)) * 
-     >                  (jsize-start(2,c)-end(2,c))
-
-          if (stage .ne. ncells) then
-
-c---------------------------------------------------------------------
-c            if this is not the starting cell in this row of cells, 
-c            wait for a message to be received, containing the 
-c            solution of the previous two stations     
-c---------------------------------------------------------------------
-
-             call mpi_irecv(in_buffer, 10*buffer_size, 
-     >                      dp_type, successor(3), 
-     >                      DEFAULT_TAG, comm_solve, 
-     >                      requests(1), error)
-
-
-c---------------------------------------------------------------------
-c            communication has already been started
-c            while waiting, do the  block-diagonal inversion for the 
-c            cell that was just finished                
-c---------------------------------------------------------------------
-
-             call tzetar(slice(3,stage+1))
-
-c---------------------------------------------------------------------
-c            wait for pending communication to complete
-c---------------------------------------------------------------------
-             call mpi_waitall(2, requests, statuses, error)
-
-c---------------------------------------------------------------------
-c            unpack the buffer for the first three factors         
-c---------------------------------------------------------------------
-             n = 0
-             p = 0
-             k  = kend
-             k1 = k - 1
-             do    m = 1, 3
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      sm1 = in_buffer(p+1)
-                      sm2 = in_buffer(p+2)
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k,n+4,c)*sm1 -
-     >                        lhs(i,j,k,n+5,c)*sm2
-                      rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) -
-     >                        lhs(i,j,k1,n+4,c) * rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k1,n+5,c) * sm1
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-c---------------------------------------------------------------------
-c            now unpack the buffer for the remaining two factors
-c---------------------------------------------------------------------
-             do    m = 4, 5
-                n = (m-3)*5
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      sm1 = in_buffer(p+1)
-                      sm2 = in_buffer(p+2)
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k,n+4,c)*sm1 -
-     >                        lhs(i,j,k,n+5,c)*sm2
-                      rhs(i,j,k1,m,c) = rhs(i,j,k1,m,c) -
-     >                        lhs(i,j,k1,n+4,c) * rhs(i,j,k,m,c) - 
-     >                        lhs(i,j,k1,n+5,c) * sm1
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-          else
-
-c---------------------------------------------------------------------
-c            now we know this is the first grid block on the back sweep,
-c            so we don't need a message to start the substitution. 
-c---------------------------------------------------------------------
-
-             k  = kend - 1
-             k1 = kend
-             n = 0
-             do   m = 1, 3
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                             lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c)
-                   end do
-                end do
-             end do
-
-             do    m = 4, 5
-                n = (m-3)*5
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do   i = start(1,c), isize-end(1,c)-1
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) -
-     >                             lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c)
-                   end do
-                end do
-             end do
-          endif
-
-c---------------------------------------------------------------------
-c         Whether or not this is the last processor, we always have
-c         to complete the back-substitution 
-c---------------------------------------------------------------------
-
-c---------------------------------------------------------------------
-c         The first three factors
-c---------------------------------------------------------------------
-          n = 0
-          do   m = 1, 3
-             do   k = kend-2, kstart, -1
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      k1 = k  + 1
-                      k2 = k  + 2
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                          lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c) -
-     >                          lhs(i,j,k,n+5,c)*rhs(i,j,k2,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         And the remaining two
-c---------------------------------------------------------------------
-          do    m = 4, 5
-             n = (m-3)*5
-             do   k = kend-2, kstart, -1
-                do   j = start(2,c), jsize-end(2,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      k1 = k  + 1
-                      k2 = k  + 2
-                      rhs(i,j,k,m,c) = rhs(i,j,k,m,c) - 
-     >                          lhs(i,j,k,n+4,c)*rhs(i,j,k1,m,c) -
-     >                          lhs(i,j,k,n+5,c)*rhs(i,j,k2,m,c)
-                   end do
-                end do
-             end do
-          end do
-
-c---------------------------------------------------------------------
-c         send on information to the previous processor, if needed
-c---------------------------------------------------------------------
-          if (stage .ne.  1) then
-             k  = kstart
-             k1 = kstart + 1
-             p = 0
-             do    m = 1, 5
-                do    j = start(2,c), jsize-end(2,c)-1
-                   do    i = start(1,c), isize-end(1,c)-1
-                      out_buffer(p+1) = rhs(i,j,k,m,c)
-                      out_buffer(p+2) = rhs(i,j,k1,m,c)
-                      p = p + 2
-                   end do
-                end do
-             end do
-
-             call mpi_isend(out_buffer, 10*buffer_size, 
-     >                     dp_type, predecessor(3), 
-     >                     DEFAULT_TAG, comm_solve, 
-     >                     requests(2), error)
-
-          endif
-
-c---------------------------------------------------------------------
-c         If this was the last stage, do the block-diagonal inversion
-c---------------------------------------------------------------------
-          if (stage .eq. 1) call tzetar(c)
-
-       end do
-
-       return
-       end
-    
-
-
-
-
-
-
index 1f5bc80..bb086c0 100644 (file)
@@ -209,17 +209,18 @@ $ tail -n +3 ./simgrid.trace
 > 12 13.138198 2 3 7
 > 5 8 2 smpi_replay_finalize "0 1 0"
 > 13 14.286929 2 2
+> 12 14.286929 2 2 8
 > 13 18.250974 2 1
+> 12 18.250974 2 1 8
 > 13 19.691622 2 3
-> 12 19.695603 2 1 8
-> 12 19.698548 2 2 8
-> 12 19.699584 2 3 8
-> 13 19.699584 2 3
-> 7 19.699584 1 3
-> 13 19.699584 2 1
-> 7 19.699584 1 1
-> 13 19.699584 2 2
-> 7 19.699584 1 2
+> 12 19.691622 2 3 8
+> 13 19.691622 2 3
+> 7 19.691622 1 3
+> 13 19.691622 2 2
+> 7 19.691622 1 2
+> 13 19.691622 2 1
+> 7 19.691622 1 1
+
 
 
 
index 0d68e08..0b1a1df 100644 (file)
@@ -1,13 +1,13 @@
 p Test the replay with multiple instances 
 
 p first generate the deployment file
-$ ./generate_multiple_deployment.sh -platform ${srcdir:=.}/../../platforms/small_platform_with_routers.xml -hostfile ${srcdir:=.}/../hostfile  ${srcdir:=.}/description_file deployment.xml
+$ ${srcdir:=.}/generate_multiple_deployment.sh -platform ${srcdir:=.}/../../platforms/small_platform_with_routers.xml -hostfile ${srcdir:=.}/../hostfile  ${srcdir:=.}/description_file deployment.xml
 
 $ ./replay_multiple description_file ${srcdir:=.}/../../platforms/small_platform_with_routers.xml deployment.xml --log=smpi.:info
 > [0.000000] [msg_test/INFO] Initializing instance 1 of size 32
 > [0.000000] [msg_test/INFO] Initializing instance 2 of size 32
 > [0.000000] [smpi_kernel/INFO] You did not set the power of the host running the simulation.  The timings will certainly not be accurate.  Use the option "--cfg=smpi/running_power:<flops>" to set its value.Check http://simgrid.org/simgrid/latest/doc/options.html#options_smpi_bench for more information.
-> [Fafard:2:(53) 1140967.830052] [smpi_replay/INFO] Simulation time 1123895.291050
-> [1140967.964219] [msg_test/INFO] Simulation time 1.14097e+06
+> [Fafard:2:(53) 1140967.830052] [smpi_replay/INFO] Simulation time 1123895.291051
+> [1140967.830052] [msg_test/INFO] Simulation time 1.14097e+06
 
 $ rm -f deployment.xml
index 5fceca3..43d94c5 100644 (file)
@@ -297,7 +297,7 @@ XBT_PUBLIC(msg_comm_t) MSG_task_isend(msg_task_t task, const char *alias);
 XBT_PUBLIC(msg_comm_t) MSG_task_isend_bounded(msg_task_t task, const char *alias, double maxrate);
 XBT_PUBLIC(msg_comm_t) MSG_task_isend_with_matching(msg_task_t task,
                                                     const char *alias,
-                                                    int (*match_fun)(void*,void*, smx_action_t),
+                                                    int (*match_fun)(void*,void*, smx_synchro_t),
                                                     void *match_data);
 
 XBT_PUBLIC(void) MSG_task_dsend(msg_task_t task, const char *alias, void_f_pvoid_t cleanup);
@@ -509,11 +509,5 @@ xbt_dynar_t<msg_vm_t> MSG_vm_get_list_from_hosts(msg_dynar_t<msg_host_t>)
 /* Used only by the bindings -- unclean pimple, please ignore if you're not writing a binding */
 XBT_PUBLIC(smx_context_t) MSG_process_get_smx_ctx(msg_process_t process);
 
-/* ****************************************************************************************** */
-/* TUTORIAL: New API                                                                        */
-/* Declare all functions for the API                                                          */
-/* ****************************************************************************************** */
-XBT_PUBLIC(int) MSG_new_API_fct(const char* param1, double param2);
-
 SG_END_DECL()
 #endif
index 006da0a..e46e72b 100644 (file)
@@ -22,9 +22,6 @@ typedef struct ws_params {
   double dp_rate;
   double dp_cap; /* bytes per 1 flop execution */
 
-  double xfer_cpu_overhead;
-  double dpt_cpu_overhead;
-
   /* set migration speed */
   double mig_speed;
 } s_ws_params_t, *ws_params_t;
index 42b50d4..0fac060 100644 (file)
@@ -75,8 +75,8 @@ typedef struct s_smx_file *smx_file_t;
 typedef xbt_dictelm_t smx_storage_t;
 typedef struct s_smx_storage_priv *smx_storage_priv_t;
 
-/********************************** Action *************************************/
-typedef struct s_smx_action *smx_action_t; /* FIXME: replace by specialized action handlers */
+/********************************** Synchro *************************************/
+typedef struct s_smx_synchro *smx_synchro_t; /* FIXME: replace by specialized synchro handlers */
 
 /* ****************************** Process *********************************** */
 /** @brief Process datatype
@@ -124,8 +124,8 @@ typedef void (*smx_creation_func_t) ( /* process */ smx_process_t*,
  */
 typedef struct s_smx_rvpoint *smx_rdv_t;
 
-XBT_PUBLIC(void*) SIMIX_comm_get_src_data(smx_action_t action);
-XBT_PUBLIC(void*) SIMIX_comm_get_dst_data(smx_action_t action);
+XBT_PUBLIC(void*) SIMIX_comm_get_src_data(smx_synchro_t synchro);
+XBT_PUBLIC(void*) SIMIX_comm_get_dst_data(smx_synchro_t synchro);
 
 /******************************** Context *************************************/
 typedef struct s_smx_context *smx_context_t;
@@ -281,14 +281,14 @@ XBT_PUBLIC(void) SIMIX_process_on_exit_runall(smx_process_t process);
 XBT_PUBLIC(void) SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void *data);
 
 /****************************** Communication *********************************/
-XBT_PUBLIC(void) SIMIX_comm_set_copy_data_callback(void (*callback) (smx_action_t, void*, size_t));
-XBT_PUBLIC(void) SIMIX_comm_copy_pointer_callback(smx_action_t comm, void* buff, size_t buff_size);
-XBT_PUBLIC(void) SIMIX_comm_copy_buffer_callback(smx_action_t comm, void* buff, size_t buff_size);
+XBT_PUBLIC(void) SIMIX_comm_set_copy_data_callback(void (*callback) (smx_synchro_t, void*, size_t));
+XBT_PUBLIC(void) SIMIX_comm_copy_pointer_callback(smx_synchro_t comm, void* buff, size_t buff_size);
+XBT_PUBLIC(void) SIMIX_comm_copy_buffer_callback(smx_synchro_t comm, void* buff, size_t buff_size);
 
-XBT_PUBLIC(smx_action_t) SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
+XBT_PUBLIC(smx_synchro_t) SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
 XBT_PUBLIC(int) SIMIX_comm_has_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
 XBT_PUBLIC(int) SIMIX_comm_has_recv_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data);
-XBT_PUBLIC(void) SIMIX_comm_finish(smx_action_t action);
+XBT_PUBLIC(void) SIMIX_comm_finish(smx_synchro_t synchro);
 
 /******************************************************************************/
 /*                            SIMIX simcalls                                  */
@@ -320,24 +320,24 @@ XBT_PUBLIC(int) simcall_host_get_nb_pstates(smx_host_t host);
 XBT_PUBLIC(void) simcall_host_set_power_peak_at(smx_host_t host, int pstate_index);
 XBT_PUBLIC(double) simcall_host_get_consumed_energy(smx_host_t host);
 
-XBT_PUBLIC(smx_action_t) simcall_host_execute(const char *name, smx_host_t host,
+XBT_PUBLIC(smx_synchro_t) simcall_host_execute(const char *name, smx_host_t host,
                                                 double computation_amount,
                                                 double priority, double bound, unsigned long affinity_mask);
-XBT_PUBLIC(smx_action_t) simcall_host_parallel_execute(const char *name,
+XBT_PUBLIC(smx_synchro_t) simcall_host_parallel_execute(const char *name,
                                                      int host_nb,
                                                      smx_host_t *host_list,
                                                      double *computation_amount,
                                                      double *communication_amount,
                                                      double amount,
                                                      double rate);
-XBT_PUBLIC(void) simcall_host_execution_destroy(smx_action_t execution);
-XBT_PUBLIC(void) simcall_host_execution_cancel(smx_action_t execution);
-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(void) simcall_host_execution_set_bound(smx_action_t execution, double bound);
-XBT_PUBLIC(void) simcall_host_execution_set_affinity(smx_action_t execution, smx_host_t host, unsigned long mask);
-XBT_PUBLIC(e_smx_state_t) simcall_host_execution_wait(smx_action_t execution);
+XBT_PUBLIC(void) simcall_host_execution_destroy(smx_synchro_t execution);
+XBT_PUBLIC(void) simcall_host_execution_cancel(smx_synchro_t execution);
+XBT_PUBLIC(double) simcall_host_execution_get_remains(smx_synchro_t execution);
+XBT_PUBLIC(e_smx_state_t) simcall_host_execution_get_state(smx_synchro_t execution);
+XBT_PUBLIC(void) simcall_host_execution_set_priority(smx_synchro_t execution, double priority);
+XBT_PUBLIC(void) simcall_host_execution_set_bound(smx_synchro_t execution, double bound);
+XBT_PUBLIC(void) simcall_host_execution_set_affinity(smx_synchro_t execution, smx_host_t host, unsigned long mask);
+XBT_PUBLIC(e_smx_state_t) simcall_host_execution_wait(smx_synchro_t execution);
 XBT_PUBLIC(xbt_dict_t) simcall_host_get_mounted_storage_list(smx_host_t host);
 XBT_PUBLIC(xbt_dynar_t) simcall_host_get_attached_storage_list(smx_host_t host);
 XBT_PUBLIC(void) simcall_host_get_params(smx_host_t vm, ws_params_t param);
@@ -408,7 +408,7 @@ XBT_PUBLIC(smx_rdv_t) simcall_rdv_create(const char *name);
 XBT_PUBLIC(void) simcall_rdv_destroy(smx_rdv_t rvp);
 XBT_PUBLIC(smx_rdv_t) simcall_rdv_get_by_name(const char *name);
 XBT_PUBLIC(int) simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host);
-XBT_PUBLIC(smx_action_t) simcall_rdv_get_head(smx_rdv_t rdv);
+XBT_PUBLIC(smx_synchro_t) simcall_rdv_get_head(smx_rdv_t rdv);
 XBT_PUBLIC(smx_process_t) simcall_rdv_get_receiver(smx_rdv_t rdv);
 XBT_PUBLIC(void) simcall_rdv_set_receiver(smx_rdv_t rdv , smx_process_t process);
 
@@ -419,56 +419,56 @@ XBT_PUBLIC(xbt_dict_t) SIMIX_get_rdv_points(void);
 XBT_PUBLIC(void) simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size,
                                      double rate, void *src_buff,
                                      size_t src_buff_size,
-                                     int (*match_fun)(void *, void *, smx_action_t),
-                                     void (*copy_data_fun)(smx_action_t, void*, size_t),
+                                     int (*match_fun)(void *, void *, smx_synchro_t),
+                                     void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                      void *data, double timeout);
 
-XBT_PUBLIC(smx_action_t) simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, 
+XBT_PUBLIC(smx_synchro_t) simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, 
                                               double task_size,
                                               double rate, void *src_buff,
                                               size_t src_buff_size,
-                                              int (*match_fun)(void *, void *, smx_action_t),
+                                              int (*match_fun)(void *, void *, smx_synchro_t),
                                               void (*clean_fun)(void *),
-                                              void (*copy_data_fun)(smx_action_t, void*, size_t),
+                                              void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                               void *data, int detached);
 
 XBT_PUBLIC(void) simcall_comm_recv(smx_rdv_t rdv, void *dst_buff,
                                    size_t * dst_buff_size,
-                                   int (*match_fun)(void *, void *, smx_action_t),
-                                   void (*copy_data_fun)(smx_action_t, void*, size_t),
+                                   int (*match_fun)(void *, void *, smx_synchro_t),
+                                   void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                    void *data, double timeout, double rate);
 
-XBT_PUBLIC(smx_action_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff,
+XBT_PUBLIC(smx_synchro_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff,
                                             size_t * dst_buff_size,
-                                            int (*match_fun)(void *, void *, smx_action_t),
-                                            void (*copy_data_fun)(smx_action_t, void*, size_t),
+                                            int (*match_fun)(void *, void *, smx_synchro_t),
+                                            void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                             void *data, double rate);
 
-XBT_PUBLIC(smx_action_t) simcall_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag,
-                                int (*match_fun)(void *, void *, smx_action_t), void *data);
-XBT_PUBLIC(void) simcall_comm_cancel(smx_action_t comm);
+XBT_PUBLIC(smx_synchro_t) simcall_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag,
+                                int (*match_fun)(void *, void *, smx_synchro_t), void *data);
+XBT_PUBLIC(void) simcall_comm_cancel(smx_synchro_t comm);
 
 /* FIXME: waitany is going to be a vararg function, and should take a timeout */
 XBT_PUBLIC(unsigned int) simcall_comm_waitany(xbt_dynar_t comms);
-XBT_PUBLIC(void) simcall_comm_wait(smx_action_t comm, double timeout);
-XBT_PUBLIC(int) simcall_comm_test(smx_action_t comm);
+XBT_PUBLIC(void) simcall_comm_wait(smx_synchro_t comm, double timeout);
+XBT_PUBLIC(int) simcall_comm_test(smx_synchro_t comm);
 XBT_PUBLIC(int) simcall_comm_testany(xbt_dynar_t comms);
 
 /* Getters and setters */
-XBT_PUBLIC(double) simcall_comm_get_remains(smx_action_t comm);
-XBT_PUBLIC(e_smx_state_t) simcall_comm_get_state(smx_action_t comm);
-XBT_PUBLIC(void *) simcall_comm_get_src_data(smx_action_t comm);
-XBT_PUBLIC(void *) simcall_comm_get_dst_data(smx_action_t comm);
-XBT_PUBLIC(smx_process_t) simcall_comm_get_src_proc(smx_action_t comm);
-XBT_PUBLIC(smx_process_t) simcall_comm_get_dst_proc(smx_action_t comm);
+XBT_PUBLIC(double) simcall_comm_get_remains(smx_synchro_t comm);
+XBT_PUBLIC(e_smx_state_t) simcall_comm_get_state(smx_synchro_t comm);
+XBT_PUBLIC(void *) simcall_comm_get_src_data(smx_synchro_t comm);
+XBT_PUBLIC(void *) simcall_comm_get_dst_data(smx_synchro_t comm);
+XBT_PUBLIC(smx_process_t) simcall_comm_get_src_proc(smx_synchro_t comm);
+XBT_PUBLIC(smx_process_t) simcall_comm_get_dst_proc(smx_synchro_t comm);
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_PUBLIC(int) simcall_comm_is_latency_bounded(smx_action_t comm);
+XBT_PUBLIC(int) simcall_comm_is_latency_bounded(smx_synchro_t comm);
 #endif
 
 #ifdef HAVE_TRACING
 /************************** Tracing handling **********************************/
-XBT_PUBLIC(void) simcall_set_category(smx_action_t action, const char *category);
+XBT_PUBLIC(void) simcall_set_category(smx_synchro_t synchro, const char *category);
 #endif
 
 /************************** Synchro simcalls **********************************/
@@ -531,10 +531,5 @@ XBT_PUBLIC(void *) simcall_mc_snapshot(void);
 XBT_PUBLIC(int) simcall_mc_compare_snapshots(void *s1, void *s2);
 XBT_PUBLIC(int) simcall_mc_random(int min, int max);
 
-/************************** New API simcalls **********************************/
-/* TUTORIAL: New API                                                          */
-/******************************************************************************/
-XBT_PUBLIC(int) simcall_new_api_fct(const char* param1, double param2);
-
 SG_END_DECL()
 #endif                          /* _SIMIX_SIMIX_H */
index 5732217..0c07bbb 100644 (file)
@@ -91,7 +91,7 @@
       parameter(MPI_IO=0)
       integer MPI_ROOT, MPI_INFO_NULL,MPI_COMM_TYPE_SHARED
       parameter(MPI_ROOT=0)
-      parameter(MPI_INFO_NULL=-1)
+      parameter(MPI_INFO_NULL=0)
       parameter(MPI_COMM_TYPE_SHARED=1)
 
 ! These should be ordered as in smpi_f77.c
       integer MPI_LOGICAL8, MPI_2REAL, MPI_2DOUBLE_PRECISION
       integer MPI_AINT, MPI_OFFSET, MPI_COUNT
       integer MPI_REAL16, MPI_COMPLEX8,MPI_COMPLEX16,MPI_COMPLEX32
+      integer MPI_PACKED
       parameter(MPI_DATATYPE_NULL=-1)
       parameter(MPI_BYTE=0)
       parameter(MPI_CHARACTER=1)
       parameter(MPI_COMPLEX8=24)
       parameter(MPI_COMPLEX16=25)
       parameter(MPI_COMPLEX32=26)
+      parameter(MPI_PACKED=27)
 
 
 
index 4b96b52..0b8a267 100644 (file)
@@ -69,6 +69,9 @@ SG_BEGIN_DECL()
 #define MPI_ERR_TOPOLOGY  18
 #define MPI_ERR_NO_MEM    19
 #define MPI_ERR_WIN       20
+#define MPI_ERR_INFO_VALUE 21
+#define MPI_ERR_INFO_KEY   22
+#define MPI_ERR_INFO_NOKEY 23
 #define MPI_ERRCODES_IGNORE (int *)0
 #define MPI_IDENT     0
 #define MPI_SIMILAR   1
@@ -111,7 +114,7 @@ SG_BEGIN_DECL()
 #define MPI_TYPECLASS_INTEGER 1
 #define MPI_TYPECLASS_COMPLEX 2
 #define MPI_ROOT 0
-#define MPI_INFO_NULL -1
+#define MPI_INFO_NULL NULL
 #define MPI_COMM_TYPE_SHARED    1
 #define MPI_WIN_NULL NULL
 
@@ -170,7 +173,8 @@ typedef struct {
 
 struct s_smpi_mpi_win;
 typedef struct s_smpi_mpi_win* MPI_Win;
-typedef int MPI_Info;
+struct s_smpi_mpi_info;
+typedef struct s_smpi_mpi_info *MPI_Info;
 
 #define MPI_STATUS_IGNORE ((MPI_Status*)NULL)
 #define MPI_STATUSES_IGNORE ((MPI_Status*)NULL)
@@ -221,6 +225,7 @@ XBT_PUBLIC_DATA(MPI_Datatype) MPI_2FLOAT;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_2DOUBLE;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_2LONG;//only for compatibility with Fortran
 
+XBT_PUBLIC_DATA(MPI_Datatype) MPI_REAL;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_REAL4;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_REAL8;
 XBT_PUBLIC_DATA(MPI_Datatype) MPI_REAL16;
index b5b18e4..b99eacc 100644 (file)
@@ -108,598 +108,598 @@ XBT_PUBLIC(void) STag_surfxml_model___prop(void);
 XBT_PUBLIC(void) ETag_surfxml_model___prop(void);
 
 /* XML application data. */
-typedef int AT_surfxml_storage_id;
-#define AU_surfxml_storage_id NULL
-typedef enum { AU_surfxml_link_sharing___policy, A_surfxml_link_sharing___policy_SHARED,A_surfxml_link_sharing___policy_FATPIPE,A_surfxml_link_sharing___policy_FULLDUPLEX } AT_surfxml_link_sharing___policy;
-typedef int AT_surfxml_trace___connect_element;
-#define AU_surfxml_trace___connect_element NULL
-typedef int AT_surfxml_ASroute_dst;
-#define AU_surfxml_ASroute_dst NULL
-typedef int AT_surfxml_cluster_lat;
-#define AU_surfxml_cluster_lat NULL
+typedef int AT_surfxml_bypassASroute_dst;
+#define AU_surfxml_bypassASroute_dst NULL
+typedef int AT_surfxml_link_latency___file;
+#define AU_surfxml_link_latency___file NULL
+typedef int AT_surfxml_prop_value;
+#define AU_surfxml_prop_value NULL
+typedef int AT_surfxml_cluster_power;
+#define AU_surfxml_cluster_power NULL
 typedef int AT_surfxml_random_min;
 #define AU_surfxml_random_min NULL
-typedef int AT_surfxml_storage___type_id;
-#define AU_surfxml_storage___type_id NULL
-typedef int AT_surfxml_host___link_up;
-#define AU_surfxml_host___link_up NULL
-typedef int AT_surfxml_random_seed;
-#define AU_surfxml_random_seed NULL
-typedef int AT_surfxml_cluster_suffix;
-#define AU_surfxml_cluster_suffix NULL
-typedef enum { AU_surfxml_link___ctn_direction, A_surfxml_link___ctn_direction_UP,A_surfxml_link___ctn_direction_DOWN,A_surfxml_link___ctn_direction_NONE } AT_surfxml_link___ctn_direction;
-typedef int AT_surfxml_storage___type_content;
-#define AU_surfxml_storage___type_content NULL
+typedef int AT_surfxml_host_availability___file;
+#define AU_surfxml_host_availability___file NULL
+typedef enum { AU_surfxml_link_sharing___policy, A_surfxml_link_sharing___policy_SHARED,A_surfxml_link_sharing___policy_FATPIPE,A_surfxml_link_sharing___policy_FULLDUPLEX } AT_surfxml_link_sharing___policy;
+typedef int AT_surfxml_storage___type_model;
+#define AU_surfxml_storage___type_model NULL
+typedef int AT_surfxml_argument_value;
+#define AU_surfxml_argument_value NULL
+typedef int AT_surfxml_AS_id;
+#define AU_surfxml_AS_id NULL
+typedef int AT_surfxml_cluster_loopback___bw;
+#define AU_surfxml_cluster_loopback___bw NULL
+typedef int AT_surfxml_mount_name;
+#define AU_surfxml_mount_name NULL
+typedef int AT_surfxml_cluster_router___id;
+#define AU_surfxml_cluster_router___id NULL
+typedef int AT_surfxml_cluster_id;
+#define AU_surfxml_cluster_id NULL
+typedef enum { AU_surfxml_cluster_bb___sharing___policy, A_surfxml_cluster_bb___sharing___policy_SHARED,A_surfxml_cluster_bb___sharing___policy_FATPIPE } AT_surfxml_cluster_bb___sharing___policy;
 typedef int AT_surfxml_peer_bw___out;
 #define AU_surfxml_peer_bw___out NULL
-typedef int AT_surfxml_ASroute_gw___src;
-#define AU_surfxml_ASroute_gw___src NULL
-typedef int AT_surfxml_bypassASroute_gw___dst;
-#define AU_surfxml_bypassASroute_gw___dst NULL
+typedef int AT_surfxml_cluster_core;
+#define AU_surfxml_cluster_core NULL
+typedef int AT_surfxml_random_std___deviation;
+#define AU_surfxml_random_std___deviation NULL
+typedef int AT_surfxml_bypassRoute_src;
+#define AU_surfxml_bypassRoute_src NULL
+typedef int AT_surfxml_backbone_bandwidth;
+#define AU_surfxml_backbone_bandwidth NULL
+typedef int AT_surfxml_cabinet_radical;
+#define AU_surfxml_cabinet_radical NULL
+typedef int AT_surfxml_storage_content;
+#define AU_surfxml_storage_content NULL
+typedef int AT_surfxml_link_id;
+#define AU_surfxml_link_id NULL
+typedef int AT_surfxml_host___link_id;
+#define AU_surfxml_host___link_id NULL
+typedef int AT_surfxml_include_file;
+#define AU_surfxml_include_file NULL
+typedef int AT_surfxml_storage_content___type;
+#define AU_surfxml_storage_content___type NULL
 typedef int AT_surfxml_process_kill___time;
 #define AU_surfxml_process_kill___time NULL
+typedef int AT_surfxml_peer_state___file;
+#define AU_surfxml_peer_state___file NULL
+typedef enum { AU_surfxml_link___ctn_direction, A_surfxml_link___ctn_direction_UP,A_surfxml_link___ctn_direction_DOWN,A_surfxml_link___ctn_direction_NONE } AT_surfxml_link___ctn_direction;
+typedef int AT_surfxml_host___link_up;
+#define AU_surfxml_host___link_up NULL
+typedef int AT_surfxml_bypassASroute_gw___dst;
+#define AU_surfxml_bypassASroute_gw___dst NULL
+typedef enum { AU_surfxml_AS_routing, A_surfxml_AS_routing_Full,A_surfxml_AS_routing_Floyd,A_surfxml_AS_routing_Dijkstra,A_surfxml_AS_routing_DijkstraCache,A_surfxml_AS_routing_None,A_surfxml_AS_routing_Vivaldi,A_surfxml_AS_routing_Cluster,A_surfxml_AS_routing_Cluster___torus,A_surfxml_AS_routing_Cluster___fat___tree } AT_surfxml_AS_routing;
+typedef int AT_surfxml_bypassRoute_dst;
+#define AU_surfxml_bypassRoute_dst NULL
+typedef enum { AU_surfxml_cluster_topology, A_surfxml_cluster_topology_FLAT,A_surfxml_cluster_topology_TORUS,A_surfxml_cluster_topology_FAT___TREE } AT_surfxml_cluster_topology;
+typedef int AT_surfxml_link_latency;
+#define AU_surfxml_link_latency NULL
 typedef int AT_surfxml_route_src;
 #define AU_surfxml_route_src NULL
-typedef int AT_surfxml_argument_value;
-#define AU_surfxml_argument_value NULL
-typedef int AT_surfxml_peer_availability___file;
-#define AU_surfxml_peer_availability___file NULL
-typedef int AT_surfxml_cabinet_radical;
-#define AU_surfxml_cabinet_radical NULL
-typedef int AT_surfxml_trace___connect_trace;
-#define AU_surfxml_trace___connect_trace NULL
-typedef int AT_surfxml_mount_name;
-#define AU_surfxml_mount_name NULL
-typedef int AT_surfxml_host_core;
-#define AU_surfxml_host_core NULL
+typedef int AT_surfxml_bypassASroute_src;
+#define AU_surfxml_bypassASroute_src NULL
+typedef int AT_surfxml_peer_bw___in;
+#define AU_surfxml_peer_bw___in NULL
+typedef enum { AU_surfxml_trace___connect_kind, A_surfxml_trace___connect_kind_HOST___AVAIL,A_surfxml_trace___connect_kind_POWER,A_surfxml_trace___connect_kind_LINK___AVAIL,A_surfxml_trace___connect_kind_BANDWIDTH,A_surfxml_trace___connect_kind_LATENCY } AT_surfxml_trace___connect_kind;
+typedef int AT_surfxml_cluster_prefix;
+#define AU_surfxml_cluster_prefix NULL
+typedef enum { AU_surfxml_host_state, A_surfxml_host_state_ON,A_surfxml_host_state_OFF } AT_surfxml_host_state;
+typedef int AT_surfxml_cabinet_power;
+#define AU_surfxml_cabinet_power NULL
+typedef int AT_surfxml_model___prop_value;
+#define AU_surfxml_model___prop_value NULL
 typedef int AT_surfxml_route_dst;
 #define AU_surfxml_route_dst NULL
-typedef int AT_surfxml_cluster_limiter___link;
-#define AU_surfxml_cluster_limiter___link NULL
-typedef int AT_surfxml_host_pstate;
-#define AU_surfxml_host_pstate NULL
+typedef int AT_surfxml_storage___type_size;
+#define AU_surfxml_storage___type_size NULL
+typedef int AT_surfxml_host_id;
+#define AU_surfxml_host_id NULL
+typedef int AT_surfxml_ASroute_gw___src;
+#define AU_surfxml_ASroute_gw___src NULL
+typedef int AT_surfxml_peer_coordinates;
+#define AU_surfxml_peer_coordinates NULL
+typedef int AT_surfxml_cabinet_bw;
+#define AU_surfxml_cabinet_bw NULL
 typedef int AT_surfxml_cluster_availability___file;
 #define AU_surfxml_cluster_availability___file NULL
-typedef int AT_surfxml_random_id;
-#define AU_surfxml_random_id NULL
+typedef int AT_surfxml_host_coordinates;
+#define AU_surfxml_host_coordinates NULL
+typedef int AT_surfxml_random_max;
+#define AU_surfxml_random_max NULL
+typedef int AT_surfxml_trace___connect_trace;
+#define AU_surfxml_trace___connect_trace NULL
+typedef int AT_surfxml_storage_id;
+#define AU_surfxml_storage_id NULL
+typedef enum { AU_surfxml_ASroute_symmetrical, A_surfxml_ASroute_symmetrical_YES,A_surfxml_ASroute_symmetrical_NO } AT_surfxml_ASroute_symmetrical;
+typedef int AT_surfxml_random_seed;
+#define AU_surfxml_random_seed NULL
+typedef int AT_surfxml_process_start___time;
+#define AU_surfxml_process_start___time NULL
+typedef int AT_surfxml_cluster_state___file;
+#define AU_surfxml_cluster_state___file NULL
+typedef int AT_surfxml_host_power;
+#define AU_surfxml_host_power NULL
 typedef int AT_surfxml_random_radical;
 #define AU_surfxml_random_radical NULL
-typedef int AT_surfxml_router_coordinates;
-#define AU_surfxml_router_coordinates NULL
-typedef enum { AU_surfxml_ASroute_symmetrical, A_surfxml_ASroute_symmetrical_YES,A_surfxml_ASroute_symmetrical_NO } AT_surfxml_ASroute_symmetrical;
-typedef int AT_surfxml_gpu_name;
-#define AU_surfxml_gpu_name NULL
-typedef enum { AU_surfxml_link_state, A_surfxml_link_state_ON,A_surfxml_link_state_OFF } AT_surfxml_link_state;
-typedef int AT_surfxml_bypassRoute_src;
-#define AU_surfxml_bypassRoute_src NULL
-typedef enum { AU_surfxml_AS_routing, A_surfxml_AS_routing_Full,A_surfxml_AS_routing_Floyd,A_surfxml_AS_routing_Dijkstra,A_surfxml_AS_routing_DijkstraCache,A_surfxml_AS_routing_None,A_surfxml_AS_routing_Vivaldi,A_surfxml_AS_routing_Cluster,A_surfxml_AS_routing_Cluster___torus,A_surfxml_AS_routing_Cluster___fat___tree } AT_surfxml_AS_routing;
-typedef int AT_surfxml_cluster_radical;
-#define AU_surfxml_cluster_radical NULL
-typedef int AT_surfxml_link_id;
-#define AU_surfxml_link_id NULL
-typedef enum { AU_surfxml_process_on___failure, A_surfxml_process_on___failure_DIE,A_surfxml_process_on___failure_RESTART } AT_surfxml_process_on___failure;
-typedef int AT_surfxml_backbone_bandwidth;
-#define AU_surfxml_backbone_bandwidth NULL
-typedef int AT_surfxml_mstorage_name;
-#define AU_surfxml_mstorage_name NULL
-typedef int AT_surfxml_cabinet_bw;
-#define AU_surfxml_cabinet_bw NULL
+typedef int AT_surfxml_storage___type_id;
+#define AU_surfxml_storage___type_id NULL
+typedef int AT_surfxml_random_id;
+#define AU_surfxml_random_id NULL
+typedef int AT_surfxml_cabinet_suffix;
+#define AU_surfxml_cabinet_suffix NULL
+typedef enum { AU_surfxml_route_symmetrical, A_surfxml_route_symmetrical_YES,A_surfxml_route_symmetrical_NO } AT_surfxml_route_symmetrical;
+typedef int AT_surfxml_cabinet_lat;
+#define AU_surfxml_cabinet_lat NULL
 typedef int AT_surfxml_bypassASroute_gw___src;
 #define AU_surfxml_bypassASroute_gw___src NULL
-typedef int AT_surfxml_cluster_id;
-#define AU_surfxml_cluster_id NULL
-typedef int AT_surfxml_host_availability;
-#define AU_surfxml_host_availability NULL
-typedef int AT_surfxml_peer_id;
-#define AU_surfxml_peer_id NULL
-typedef int AT_surfxml_link_bandwidth___file;
-#define AU_surfxml_link_bandwidth___file NULL
-typedef int AT_surfxml_peer_coordinates;
-#define AU_surfxml_peer_coordinates NULL
-typedef int AT_surfxml_bypassASroute_src;
-#define AU_surfxml_bypassASroute_src NULL
-typedef enum { AU_surfxml_cluster_bb___sharing___policy, A_surfxml_cluster_bb___sharing___policy_SHARED,A_surfxml_cluster_bb___sharing___policy_FATPIPE } AT_surfxml_cluster_bb___sharing___policy;
-typedef int AT_surfxml_ASroute_gw___dst;
-#define AU_surfxml_ASroute_gw___dst NULL
-typedef int AT_surfxml_peer_bw___in;
-#define AU_surfxml_peer_bw___in NULL
-typedef int AT_surfxml_storage_typeId;
-#define AU_surfxml_storage_typeId NULL
-typedef int AT_surfxml_storage___type_model;
-#define AU_surfxml_storage___type_model NULL
-typedef int AT_surfxml_link_bandwidth;
-#define AU_surfxml_link_bandwidth NULL
-typedef int AT_surfxml_cluster_router___id;
-#define AU_surfxml_cluster_router___id NULL
+typedef int AT_surfxml_storage___type_content___type;
+#define AU_surfxml_storage___type_content___type NULL
 typedef int AT_surfxml_link___ctn_id;
 #define AU_surfxml_link___ctn_id NULL
-typedef int AT_surfxml_prop_value;
-#define AU_surfxml_prop_value NULL
-typedef int AT_surfxml_host___link_id;
-#define AU_surfxml_host___link_id NULL
-typedef int AT_surfxml_cluster_power;
-#define AU_surfxml_cluster_power NULL
-typedef int AT_surfxml_mount_storageId;
-#define AU_surfxml_mount_storageId NULL
-typedef int AT_surfxml_host_power;
-#define AU_surfxml_host_power NULL
-typedef int AT_surfxml_model___prop_id;
-#define AU_surfxml_model___prop_id NULL
-typedef int AT_surfxml_AS_id;
-#define AU_surfxml_AS_id NULL
-typedef int AT_surfxml_mstorage_typeId;
-#define AU_surfxml_mstorage_typeId NULL
-typedef enum { AU_surfxml_route_symmetrical, A_surfxml_route_symmetrical_YES,A_surfxml_route_symmetrical_NO } AT_surfxml_route_symmetrical;
+typedef int AT_surfxml_host_state___file;
+#define AU_surfxml_host_state___file NULL
+typedef int AT_surfxml_link_bandwidth;
+#define AU_surfxml_link_bandwidth NULL
+typedef int AT_surfxml_cluster_loopback___lat;
+#define AU_surfxml_cluster_loopback___lat NULL
+typedef int AT_surfxml_process_function;
+#define AU_surfxml_process_function NULL
+typedef int AT_surfxml_backbone_latency;
+#define AU_surfxml_backbone_latency NULL
+typedef enum { AU_surfxml_process_on___failure, A_surfxml_process_on___failure_DIE,A_surfxml_process_on___failure_RESTART } AT_surfxml_process_on___failure;
+typedef int AT_surfxml_host_core;
+#define AU_surfxml_host_core NULL
 typedef enum { AU_surfxml_random_generator, A_surfxml_random_generator_DRAND48,A_surfxml_random_generator_RAND,A_surfxml_random_generator_RNGSTREAM,A_surfxml_random_generator_NONE } AT_surfxml_random_generator;
-typedef int AT_surfxml_include_file;
-#define AU_surfxml_include_file NULL
-typedef int AT_surfxml_bypassASroute_dst;
-#define AU_surfxml_bypassASroute_dst NULL
-typedef int AT_surfxml_host_id;
-#define AU_surfxml_host_id NULL
-typedef enum { AU_surfxml_trace___connect_kind, A_surfxml_trace___connect_kind_HOST___AVAIL,A_surfxml_trace___connect_kind_POWER,A_surfxml_trace___connect_kind_LINK___AVAIL,A_surfxml_trace___connect_kind_BANDWIDTH,A_surfxml_trace___connect_kind_LATENCY } AT_surfxml_trace___connect_kind;
+typedef int AT_surfxml_random_mean;
+#define AU_surfxml_random_mean NULL
+typedef int AT_surfxml_ASroute_gw___dst;
+#define AU_surfxml_ASroute_gw___dst NULL
+typedef int AT_surfxml_peer_availability___file;
+#define AU_surfxml_peer_availability___file NULL
+typedef int AT_surfxml_link_bandwidth___file;
+#define AU_surfxml_link_bandwidth___file NULL
+typedef enum { AU_surfxml_cluster_sharing___policy, A_surfxml_cluster_sharing___policy_SHARED,A_surfxml_cluster_sharing___policy_FULLDUPLEX,A_surfxml_cluster_sharing___policy_FATPIPE } AT_surfxml_cluster_sharing___policy;
 typedef int AT_surfxml_process_host;
 #define AU_surfxml_process_host NULL
-typedef int AT_surfxml_cabinet_id;
-#define AU_surfxml_cabinet_id NULL
-typedef int AT_surfxml_config_id;
-#define AU_surfxml_config_id NULL
+typedef int AT_surfxml_trace_periodicity;
+#define AU_surfxml_trace_periodicity NULL
 typedef int AT_surfxml_peer_lat;
 #define AU_surfxml_peer_lat NULL
-typedef int AT_surfxml_storage_content;
-#define AU_surfxml_storage_content NULL
-typedef int AT_surfxml_bypassRoute_dst;
-#define AU_surfxml_bypassRoute_dst NULL
+typedef int AT_surfxml_peer_power;
+#define AU_surfxml_peer_power NULL
 typedef int AT_surfxml_storage_attach;
 #define AU_surfxml_storage_attach NULL
-typedef int AT_surfxml_cluster_state___file;
-#define AU_surfxml_cluster_state___file NULL
-typedef int AT_surfxml_cluster_topo___parameters;
-#define AU_surfxml_cluster_topo___parameters NULL
-typedef int AT_surfxml_cluster_core;
-#define AU_surfxml_cluster_core NULL
-typedef int AT_surfxml_peer_state___file;
-#define AU_surfxml_peer_state___file NULL
+typedef int AT_surfxml_router_coordinates;
+#define AU_surfxml_router_coordinates NULL
 typedef int AT_surfxml_cabinet_prefix;
 #define AU_surfxml_cabinet_prefix NULL
+typedef int AT_surfxml_cluster_bw;
+#define AU_surfxml_cluster_bw NULL
+typedef int AT_surfxml_storage___type_content;
+#define AU_surfxml_storage___type_content NULL
+typedef int AT_surfxml_mstorage_typeId;
+#define AU_surfxml_mstorage_typeId NULL
+typedef int AT_surfxml_model___prop_id;
+#define AU_surfxml_model___prop_id NULL
+typedef int AT_surfxml_backbone_id;
+#define AU_surfxml_backbone_id NULL
+typedef int AT_surfxml_config_id;
+#define AU_surfxml_config_id NULL
+typedef int AT_surfxml_cluster_lat;
+#define AU_surfxml_cluster_lat NULL
 typedef int AT_surfxml_platform_version;
 #define AU_surfxml_platform_version NULL
+typedef int AT_surfxml_trace___connect_element;
+#define AU_surfxml_trace___connect_element NULL
+typedef int AT_surfxml_mount_storageId;
+#define AU_surfxml_mount_storageId NULL
+typedef int AT_surfxml_cluster_bb___bw;
+#define AU_surfxml_cluster_bb___bw NULL
+typedef int AT_surfxml_ASroute_dst;
+#define AU_surfxml_ASroute_dst NULL
+typedef int AT_surfxml_host_pstate;
+#define AU_surfxml_host_pstate NULL
+typedef int AT_surfxml_peer_id;
+#define AU_surfxml_peer_id NULL
 typedef int AT_surfxml_ASroute_src;
 #define AU_surfxml_ASroute_src NULL
-typedef int AT_surfxml_link_state___file;
-#define AU_surfxml_link_state___file NULL
-typedef enum { AU_surfxml_cluster_topology, A_surfxml_cluster_topology_FLAT,A_surfxml_cluster_topology_TORUS,A_surfxml_cluster_topology_FAT___TREE } AT_surfxml_cluster_topology;
-typedef enum { AU_surfxml_host_state, A_surfxml_host_state_ON,A_surfxml_host_state_OFF } AT_surfxml_host_state;
+typedef int AT_surfxml_gpu_name;
+#define AU_surfxml_gpu_name NULL
+typedef int AT_surfxml_host_availability;
+#define AU_surfxml_host_availability NULL
+typedef int AT_surfxml_mstorage_name;
+#define AU_surfxml_mstorage_name NULL
+typedef int AT_surfxml_cabinet_id;
+#define AU_surfxml_cabinet_id NULL
+typedef int AT_surfxml_storage_typeId;
+#define AU_surfxml_storage_typeId NULL
+typedef int AT_surfxml_cluster_bb___lat;
+#define AU_surfxml_cluster_bb___lat NULL
 typedef int AT_surfxml_trace_file;
 #define AU_surfxml_trace_file NULL
-typedef int AT_surfxml_random_mean;
-#define AU_surfxml_random_mean NULL
-typedef int AT_surfxml_peer_power;
-#define AU_surfxml_peer_power NULL
-typedef int AT_surfxml_cabinet_lat;
-#define AU_surfxml_cabinet_lat NULL
+typedef int AT_surfxml_cluster_limiter___link;
+#define AU_surfxml_cluster_limiter___link NULL
+typedef int AT_surfxml_cluster_radical;
+#define AU_surfxml_cluster_radical NULL
+typedef int AT_surfxml_router_id;
+#define AU_surfxml_router_id NULL
 typedef int AT_surfxml_trace_id;
 #define AU_surfxml_trace_id NULL
-typedef int AT_surfxml_cluster_bb___bw;
-#define AU_surfxml_cluster_bb___bw NULL
-typedef int AT_surfxml_host_coordinates;
-#define AU_surfxml_host_coordinates NULL
-typedef int AT_surfxml_cabinet_power;
-#define AU_surfxml_cabinet_power NULL
-typedef int AT_surfxml_storage_content___type;
-#define AU_surfxml_storage_content___type NULL
-typedef int AT_surfxml_cluster_loopback___bw;
-#define AU_surfxml_cluster_loopback___bw NULL
-typedef int AT_surfxml_link_latency___file;
-#define AU_surfxml_link_latency___file NULL
-typedef int AT_surfxml_process_start___time;
-#define AU_surfxml_process_start___time NULL
+typedef enum { AU_surfxml_link_state, A_surfxml_link_state_ON,A_surfxml_link_state_OFF } AT_surfxml_link_state;
 typedef int AT_surfxml_prop_id;
 #define AU_surfxml_prop_id NULL
-typedef enum { AU_surfxml_cluster_sharing___policy, A_surfxml_cluster_sharing___policy_SHARED,A_surfxml_cluster_sharing___policy_FULLDUPLEX,A_surfxml_cluster_sharing___policy_FATPIPE } AT_surfxml_cluster_sharing___policy;
-typedef int AT_surfxml_random_max;
-#define AU_surfxml_random_max NULL
-typedef int AT_surfxml_router_id;
-#define AU_surfxml_router_id NULL
-typedef int AT_surfxml_backbone_latency;
-#define AU_surfxml_backbone_latency NULL
-typedef int AT_surfxml_cluster_prefix;
-#define AU_surfxml_cluster_prefix NULL
-typedef int AT_surfxml_cluster_bw;
-#define AU_surfxml_cluster_bw NULL
-typedef int AT_surfxml_link_latency;
-#define AU_surfxml_link_latency NULL
-typedef int AT_surfxml_cabinet_suffix;
-#define AU_surfxml_cabinet_suffix NULL
 typedef int AT_surfxml_host___link_down;
 #define AU_surfxml_host___link_down NULL
-typedef int AT_surfxml_cluster_loopback___lat;
-#define AU_surfxml_cluster_loopback___lat NULL
-typedef int AT_surfxml_host_state___file;
-#define AU_surfxml_host_state___file NULL
-typedef int AT_surfxml_model___prop_value;
-#define AU_surfxml_model___prop_value NULL
-typedef int AT_surfxml_random_std___deviation;
-#define AU_surfxml_random_std___deviation NULL
-typedef int AT_surfxml_process_function;
-#define AU_surfxml_process_function NULL
-typedef int AT_surfxml_storage___type_size;
-#define AU_surfxml_storage___type_size NULL
-typedef int AT_surfxml_host_availability___file;
-#define AU_surfxml_host_availability___file NULL
-typedef int AT_surfxml_backbone_id;
-#define AU_surfxml_backbone_id NULL
-typedef int AT_surfxml_trace_periodicity;
-#define AU_surfxml_trace_periodicity NULL
-typedef int AT_surfxml_cluster_bb___lat;
-#define AU_surfxml_cluster_bb___lat NULL
-typedef int AT_surfxml_storage___type_content___type;
-#define AU_surfxml_storage___type_content___type NULL
+typedef int AT_surfxml_link_state___file;
+#define AU_surfxml_link_state___file NULL
+typedef int AT_surfxml_cluster_topo___parameters;
+#define AU_surfxml_cluster_topo___parameters NULL
+typedef int AT_surfxml_cluster_suffix;
+#define AU_surfxml_cluster_suffix NULL
 
 /* FleXML-provided data. */
 XBT_PUBLIC_DATA(int) surfxml_pcdata_ix;
 XBT_PUBLIC_DATA(char *) surfxml_bufferstack;
 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
-XBT_PUBLIC_DATA(AT_surfxml_storage_id) AX_surfxml_storage_id;
-#define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id)
-XBT_PUBLIC_DATA(short int) surfxml_storage_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_sharing___policy) AX_surfxml_link_sharing___policy;
-#define A_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy
-XBT_PUBLIC_DATA(short int) surfxml_link_sharing___policy_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace___connect_element) AX_surfxml_trace___connect_element;
-#define A_surfxml_trace___connect_element (surfxml_bufferstack + AX_surfxml_trace___connect_element)
-XBT_PUBLIC_DATA(short int) surfxml_trace___connect_element_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_dst) AX_surfxml_ASroute_dst;
-#define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_lat) AX_surfxml_cluster_lat;
-#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_lat_isset;
+XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_dst) AX_surfxml_bypassASroute_dst;
+#define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst)
+XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_latency___file) AX_surfxml_link_latency___file;
+#define A_surfxml_link_latency___file (surfxml_bufferstack + AX_surfxml_link_latency___file)
+XBT_PUBLIC_DATA(short int) surfxml_link_latency___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_prop_value) AX_surfxml_prop_value;
+#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
+XBT_PUBLIC_DATA(short int) surfxml_prop_value_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_power) AX_surfxml_cluster_power;
+#define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_power_isset;
 XBT_PUBLIC_DATA(AT_surfxml_random_min) AX_surfxml_random_min;
 #define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
 XBT_PUBLIC_DATA(short int) surfxml_random_min_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_id) AX_surfxml_storage___type_id;
-#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host___link_up) AX_surfxml_host___link_up;
-#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up)
-XBT_PUBLIC_DATA(short int) surfxml_host___link_up_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_seed) AX_surfxml_random_seed;
-#define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
-XBT_PUBLIC_DATA(short int) surfxml_random_seed_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_suffix) AX_surfxml_cluster_suffix;
-#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_suffix_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link___ctn_direction) AX_surfxml_link___ctn_direction;
-#define A_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction
-XBT_PUBLIC_DATA(short int) surfxml_link___ctn_direction_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_content) AX_surfxml_storage___type_content;
-#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_content_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_bw___out) AX_surfxml_peer_bw___out;
-#define A_surfxml_peer_bw___out (surfxml_bufferstack + AX_surfxml_peer_bw___out)
-XBT_PUBLIC_DATA(short int) surfxml_peer_bw___out_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_gw___src) AX_surfxml_ASroute_gw___src;
-#define A_surfxml_ASroute_gw___src (surfxml_bufferstack + AX_surfxml_ASroute_gw___src)
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_gw___src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___dst) AX_surfxml_bypassASroute_gw___dst;
-#define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_gw___dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_kill___time) AX_surfxml_process_kill___time;
-#define A_surfxml_process_kill___time (surfxml_bufferstack + AX_surfxml_process_kill___time)
-XBT_PUBLIC_DATA(short int) surfxml_process_kill___time_isset;
-XBT_PUBLIC_DATA(AT_surfxml_route_src) AX_surfxml_route_src;
-#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
-XBT_PUBLIC_DATA(short int) surfxml_route_src_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_availability___file) AX_surfxml_host_availability___file;
+#define A_surfxml_host_availability___file (surfxml_bufferstack + AX_surfxml_host_availability___file)
+XBT_PUBLIC_DATA(short int) surfxml_host_availability___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_sharing___policy) AX_surfxml_link_sharing___policy;
+#define A_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy
+XBT_PUBLIC_DATA(short int) surfxml_link_sharing___policy_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_model) AX_surfxml_storage___type_model;
+#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model)
+XBT_PUBLIC_DATA(short int) surfxml_storage___type_model_isset;
 XBT_PUBLIC_DATA(AT_surfxml_argument_value) AX_surfxml_argument_value;
 #define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
 XBT_PUBLIC_DATA(short int) surfxml_argument_value_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_availability___file) AX_surfxml_peer_availability___file;
-#define A_surfxml_peer_availability___file (surfxml_bufferstack + AX_surfxml_peer_availability___file)
-XBT_PUBLIC_DATA(short int) surfxml_peer_availability___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_radical) AX_surfxml_cabinet_radical;
-#define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_radical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace___connect_trace) AX_surfxml_trace___connect_trace;
-#define A_surfxml_trace___connect_trace (surfxml_bufferstack + AX_surfxml_trace___connect_trace)
-XBT_PUBLIC_DATA(short int) surfxml_trace___connect_trace_isset;
+XBT_PUBLIC_DATA(AT_surfxml_AS_id) AX_surfxml_AS_id;
+#define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
+XBT_PUBLIC_DATA(short int) surfxml_AS_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_loopback___bw) AX_surfxml_cluster_loopback___bw;
+#define A_surfxml_cluster_loopback___bw (surfxml_bufferstack + AX_surfxml_cluster_loopback___bw)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_loopback___bw_isset;
 XBT_PUBLIC_DATA(AT_surfxml_mount_name) AX_surfxml_mount_name;
 #define A_surfxml_mount_name (surfxml_bufferstack + AX_surfxml_mount_name)
 XBT_PUBLIC_DATA(short int) surfxml_mount_name_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_core) AX_surfxml_host_core;
-#define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
-XBT_PUBLIC_DATA(short int) surfxml_host_core_isset;
-XBT_PUBLIC_DATA(AT_surfxml_route_dst) AX_surfxml_route_dst;
-#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
-XBT_PUBLIC_DATA(short int) surfxml_route_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_limiter___link) AX_surfxml_cluster_limiter___link;
-#define A_surfxml_cluster_limiter___link (surfxml_bufferstack + AX_surfxml_cluster_limiter___link)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_limiter___link_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_pstate) AX_surfxml_host_pstate;
-#define A_surfxml_host_pstate (surfxml_bufferstack + AX_surfxml_host_pstate)
-XBT_PUBLIC_DATA(short int) surfxml_host_pstate_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_availability___file) AX_surfxml_cluster_availability___file;
-#define A_surfxml_cluster_availability___file (surfxml_bufferstack + AX_surfxml_cluster_availability___file)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_availability___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_id) AX_surfxml_random_id;
-#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
-XBT_PUBLIC_DATA(short int) surfxml_random_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_radical) AX_surfxml_random_radical;
-#define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
-XBT_PUBLIC_DATA(short int) surfxml_random_radical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_router_coordinates) AX_surfxml_router_coordinates;
-#define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
-XBT_PUBLIC_DATA(short int) surfxml_router_coordinates_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_symmetrical) AX_surfxml_ASroute_symmetrical;
-#define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_symmetrical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_gpu_name) AX_surfxml_gpu_name;
-#define A_surfxml_gpu_name (surfxml_bufferstack + AX_surfxml_gpu_name)
-XBT_PUBLIC_DATA(short int) surfxml_gpu_name_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_state) AX_surfxml_link_state;
-#define A_surfxml_link_state AX_surfxml_link_state
-XBT_PUBLIC_DATA(short int) surfxml_link_state_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_router___id) AX_surfxml_cluster_router___id;
+#define A_surfxml_cluster_router___id (surfxml_bufferstack + AX_surfxml_cluster_router___id)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_router___id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_id) AX_surfxml_cluster_id;
+#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___sharing___policy) AX_surfxml_cluster_bb___sharing___policy;
+#define A_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy
+XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___sharing___policy_isset;
+XBT_PUBLIC_DATA(AT_surfxml_peer_bw___out) AX_surfxml_peer_bw___out;
+#define A_surfxml_peer_bw___out (surfxml_bufferstack + AX_surfxml_peer_bw___out)
+XBT_PUBLIC_DATA(short int) surfxml_peer_bw___out_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_core) AX_surfxml_cluster_core;
+#define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_core_isset;
+XBT_PUBLIC_DATA(AT_surfxml_random_std___deviation) AX_surfxml_random_std___deviation;
+#define A_surfxml_random_std___deviation (surfxml_bufferstack + AX_surfxml_random_std___deviation)
+XBT_PUBLIC_DATA(short int) surfxml_random_std___deviation_isset;
 XBT_PUBLIC_DATA(AT_surfxml_bypassRoute_src) AX_surfxml_bypassRoute_src;
 #define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
 XBT_PUBLIC_DATA(short int) surfxml_bypassRoute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_AS_routing) AX_surfxml_AS_routing;
-#define A_surfxml_AS_routing AX_surfxml_AS_routing
-XBT_PUBLIC_DATA(short int) surfxml_AS_routing_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_radical) AX_surfxml_cluster_radical;
-#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_radical_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_id) AX_surfxml_link_id;
-#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
-XBT_PUBLIC_DATA(short int) surfxml_link_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_on___failure) AX_surfxml_process_on___failure;
-#define A_surfxml_process_on___failure AX_surfxml_process_on___failure
-XBT_PUBLIC_DATA(short int) surfxml_process_on___failure_isset;
 XBT_PUBLIC_DATA(AT_surfxml_backbone_bandwidth) AX_surfxml_backbone_bandwidth;
 #define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth)
 XBT_PUBLIC_DATA(short int) surfxml_backbone_bandwidth_isset;
-XBT_PUBLIC_DATA(AT_surfxml_mstorage_name) AX_surfxml_mstorage_name;
-#define A_surfxml_mstorage_name (surfxml_bufferstack + AX_surfxml_mstorage_name)
-XBT_PUBLIC_DATA(short int) surfxml_mstorage_name_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_bw) AX_surfxml_cabinet_bw;
-#define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___src) AX_surfxml_bypassASroute_gw___src;
-#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src)
-XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_gw___src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_id) AX_surfxml_cluster_id;
-#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_availability) AX_surfxml_host_availability;
-#define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
-XBT_PUBLIC_DATA(short int) surfxml_host_availability_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_id) AX_surfxml_peer_id;
-#define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
-XBT_PUBLIC_DATA(short int) surfxml_peer_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_bandwidth___file) AX_surfxml_link_bandwidth___file;
-#define A_surfxml_link_bandwidth___file (surfxml_bufferstack + AX_surfxml_link_bandwidth___file)
-XBT_PUBLIC_DATA(short int) surfxml_link_bandwidth___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_coordinates) AX_surfxml_peer_coordinates;
-#define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
-XBT_PUBLIC_DATA(short int) surfxml_peer_coordinates_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cabinet_radical) AX_surfxml_cabinet_radical;
+#define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical)
+XBT_PUBLIC_DATA(short int) surfxml_cabinet_radical_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage_content) AX_surfxml_storage_content;
+#define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content)
+XBT_PUBLIC_DATA(short int) surfxml_storage_content_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_id) AX_surfxml_link_id;
+#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
+XBT_PUBLIC_DATA(short int) surfxml_link_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host___link_id) AX_surfxml_host___link_id;
+#define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id)
+XBT_PUBLIC_DATA(short int) surfxml_host___link_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_include_file) AX_surfxml_include_file;
+#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
+XBT_PUBLIC_DATA(short int) surfxml_include_file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage_content___type) AX_surfxml_storage_content___type;
+#define A_surfxml_storage_content___type (surfxml_bufferstack + AX_surfxml_storage_content___type)
+XBT_PUBLIC_DATA(short int) surfxml_storage_content___type_isset;
+XBT_PUBLIC_DATA(AT_surfxml_process_kill___time) AX_surfxml_process_kill___time;
+#define A_surfxml_process_kill___time (surfxml_bufferstack + AX_surfxml_process_kill___time)
+XBT_PUBLIC_DATA(short int) surfxml_process_kill___time_isset;
+XBT_PUBLIC_DATA(AT_surfxml_peer_state___file) AX_surfxml_peer_state___file;
+#define A_surfxml_peer_state___file (surfxml_bufferstack + AX_surfxml_peer_state___file)
+XBT_PUBLIC_DATA(short int) surfxml_peer_state___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link___ctn_direction) AX_surfxml_link___ctn_direction;
+#define A_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction
+XBT_PUBLIC_DATA(short int) surfxml_link___ctn_direction_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host___link_up) AX_surfxml_host___link_up;
+#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up)
+XBT_PUBLIC_DATA(short int) surfxml_host___link_up_isset;
+XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___dst) AX_surfxml_bypassASroute_gw___dst;
+#define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst)
+XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_gw___dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_AS_routing) AX_surfxml_AS_routing;
+#define A_surfxml_AS_routing AX_surfxml_AS_routing
+XBT_PUBLIC_DATA(short int) surfxml_AS_routing_isset;
+XBT_PUBLIC_DATA(AT_surfxml_bypassRoute_dst) AX_surfxml_bypassRoute_dst;
+#define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
+XBT_PUBLIC_DATA(short int) surfxml_bypassRoute_dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_topology) AX_surfxml_cluster_topology;
+#define A_surfxml_cluster_topology AX_surfxml_cluster_topology
+XBT_PUBLIC_DATA(short int) surfxml_cluster_topology_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_latency) AX_surfxml_link_latency;
+#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
+XBT_PUBLIC_DATA(short int) surfxml_link_latency_isset;
+XBT_PUBLIC_DATA(AT_surfxml_route_src) AX_surfxml_route_src;
+#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
+XBT_PUBLIC_DATA(short int) surfxml_route_src_isset;
 XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_src) AX_surfxml_bypassASroute_src;
 #define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src)
 XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___sharing___policy) AX_surfxml_cluster_bb___sharing___policy;
-#define A_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___sharing___policy_isset;
-XBT_PUBLIC_DATA(AT_surfxml_ASroute_gw___dst) AX_surfxml_ASroute_gw___dst;
-#define A_surfxml_ASroute_gw___dst (surfxml_bufferstack + AX_surfxml_ASroute_gw___dst)
-XBT_PUBLIC_DATA(short int) surfxml_ASroute_gw___dst_isset;
 XBT_PUBLIC_DATA(AT_surfxml_peer_bw___in) AX_surfxml_peer_bw___in;
 #define A_surfxml_peer_bw___in (surfxml_bufferstack + AX_surfxml_peer_bw___in)
 XBT_PUBLIC_DATA(short int) surfxml_peer_bw___in_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage_typeId) AX_surfxml_storage_typeId;
-#define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId)
-XBT_PUBLIC_DATA(short int) surfxml_storage_typeId_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_model) AX_surfxml_storage___type_model;
-#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_model_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_bandwidth) AX_surfxml_link_bandwidth;
-#define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
-XBT_PUBLIC_DATA(short int) surfxml_link_bandwidth_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_router___id) AX_surfxml_cluster_router___id;
-#define A_surfxml_cluster_router___id (surfxml_bufferstack + AX_surfxml_cluster_router___id)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_router___id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link___ctn_id) AX_surfxml_link___ctn_id;
-#define A_surfxml_link___ctn_id (surfxml_bufferstack + AX_surfxml_link___ctn_id)
-XBT_PUBLIC_DATA(short int) surfxml_link___ctn_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_prop_value) AX_surfxml_prop_value;
-#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
-XBT_PUBLIC_DATA(short int) surfxml_prop_value_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host___link_id) AX_surfxml_host___link_id;
-#define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id)
-XBT_PUBLIC_DATA(short int) surfxml_host___link_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_power) AX_surfxml_cluster_power;
-#define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_power_isset;
-XBT_PUBLIC_DATA(AT_surfxml_mount_storageId) AX_surfxml_mount_storageId;
-#define A_surfxml_mount_storageId (surfxml_bufferstack + AX_surfxml_mount_storageId)
-XBT_PUBLIC_DATA(short int) surfxml_mount_storageId_isset;
+XBT_PUBLIC_DATA(AT_surfxml_trace___connect_kind) AX_surfxml_trace___connect_kind;
+#define A_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind
+XBT_PUBLIC_DATA(short int) surfxml_trace___connect_kind_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_prefix) AX_surfxml_cluster_prefix;
+#define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_prefix_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_state) AX_surfxml_host_state;
+#define A_surfxml_host_state AX_surfxml_host_state
+XBT_PUBLIC_DATA(short int) surfxml_host_state_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cabinet_power) AX_surfxml_cabinet_power;
+#define A_surfxml_cabinet_power (surfxml_bufferstack + AX_surfxml_cabinet_power)
+XBT_PUBLIC_DATA(short int) surfxml_cabinet_power_isset;
+XBT_PUBLIC_DATA(AT_surfxml_model___prop_value) AX_surfxml_model___prop_value;
+#define A_surfxml_model___prop_value (surfxml_bufferstack + AX_surfxml_model___prop_value)
+XBT_PUBLIC_DATA(short int) surfxml_model___prop_value_isset;
+XBT_PUBLIC_DATA(AT_surfxml_route_dst) AX_surfxml_route_dst;
+#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
+XBT_PUBLIC_DATA(short int) surfxml_route_dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_size) AX_surfxml_storage___type_size;
+#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size)
+XBT_PUBLIC_DATA(short int) surfxml_storage___type_size_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_id) AX_surfxml_host_id;
+#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
+XBT_PUBLIC_DATA(short int) surfxml_host_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_ASroute_gw___src) AX_surfxml_ASroute_gw___src;
+#define A_surfxml_ASroute_gw___src (surfxml_bufferstack + AX_surfxml_ASroute_gw___src)
+XBT_PUBLIC_DATA(short int) surfxml_ASroute_gw___src_isset;
+XBT_PUBLIC_DATA(AT_surfxml_peer_coordinates) AX_surfxml_peer_coordinates;
+#define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
+XBT_PUBLIC_DATA(short int) surfxml_peer_coordinates_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cabinet_bw) AX_surfxml_cabinet_bw;
+#define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw)
+XBT_PUBLIC_DATA(short int) surfxml_cabinet_bw_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_availability___file) AX_surfxml_cluster_availability___file;
+#define A_surfxml_cluster_availability___file (surfxml_bufferstack + AX_surfxml_cluster_availability___file)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_availability___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_coordinates) AX_surfxml_host_coordinates;
+#define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
+XBT_PUBLIC_DATA(short int) surfxml_host_coordinates_isset;
+XBT_PUBLIC_DATA(AT_surfxml_random_max) AX_surfxml_random_max;
+#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
+XBT_PUBLIC_DATA(short int) surfxml_random_max_isset;
+XBT_PUBLIC_DATA(AT_surfxml_trace___connect_trace) AX_surfxml_trace___connect_trace;
+#define A_surfxml_trace___connect_trace (surfxml_bufferstack + AX_surfxml_trace___connect_trace)
+XBT_PUBLIC_DATA(short int) surfxml_trace___connect_trace_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage_id) AX_surfxml_storage_id;
+#define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id)
+XBT_PUBLIC_DATA(short int) surfxml_storage_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_ASroute_symmetrical) AX_surfxml_ASroute_symmetrical;
+#define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
+XBT_PUBLIC_DATA(short int) surfxml_ASroute_symmetrical_isset;
+XBT_PUBLIC_DATA(AT_surfxml_random_seed) AX_surfxml_random_seed;
+#define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
+XBT_PUBLIC_DATA(short int) surfxml_random_seed_isset;
+XBT_PUBLIC_DATA(AT_surfxml_process_start___time) AX_surfxml_process_start___time;
+#define A_surfxml_process_start___time (surfxml_bufferstack + AX_surfxml_process_start___time)
+XBT_PUBLIC_DATA(short int) surfxml_process_start___time_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_state___file) AX_surfxml_cluster_state___file;
+#define A_surfxml_cluster_state___file (surfxml_bufferstack + AX_surfxml_cluster_state___file)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_state___file_isset;
 XBT_PUBLIC_DATA(AT_surfxml_host_power) AX_surfxml_host_power;
 #define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
 XBT_PUBLIC_DATA(short int) surfxml_host_power_isset;
-XBT_PUBLIC_DATA(AT_surfxml_model___prop_id) AX_surfxml_model___prop_id;
-#define A_surfxml_model___prop_id (surfxml_bufferstack + AX_surfxml_model___prop_id)
-XBT_PUBLIC_DATA(short int) surfxml_model___prop_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_AS_id) AX_surfxml_AS_id;
-#define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
-XBT_PUBLIC_DATA(short int) surfxml_AS_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_mstorage_typeId) AX_surfxml_mstorage_typeId;
-#define A_surfxml_mstorage_typeId (surfxml_bufferstack + AX_surfxml_mstorage_typeId)
-XBT_PUBLIC_DATA(short int) surfxml_mstorage_typeId_isset;
+XBT_PUBLIC_DATA(AT_surfxml_random_radical) AX_surfxml_random_radical;
+#define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
+XBT_PUBLIC_DATA(short int) surfxml_random_radical_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_id) AX_surfxml_storage___type_id;
+#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id)
+XBT_PUBLIC_DATA(short int) surfxml_storage___type_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_random_id) AX_surfxml_random_id;
+#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
+XBT_PUBLIC_DATA(short int) surfxml_random_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cabinet_suffix) AX_surfxml_cabinet_suffix;
+#define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix)
+XBT_PUBLIC_DATA(short int) surfxml_cabinet_suffix_isset;
 XBT_PUBLIC_DATA(AT_surfxml_route_symmetrical) AX_surfxml_route_symmetrical;
 #define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
 XBT_PUBLIC_DATA(short int) surfxml_route_symmetrical_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cabinet_lat) AX_surfxml_cabinet_lat;
+#define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat)
+XBT_PUBLIC_DATA(short int) surfxml_cabinet_lat_isset;
+XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_gw___src) AX_surfxml_bypassASroute_gw___src;
+#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src)
+XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_gw___src_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_content___type) AX_surfxml_storage___type_content___type;
+#define A_surfxml_storage___type_content___type (surfxml_bufferstack + AX_surfxml_storage___type_content___type)
+XBT_PUBLIC_DATA(short int) surfxml_storage___type_content___type_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link___ctn_id) AX_surfxml_link___ctn_id;
+#define A_surfxml_link___ctn_id (surfxml_bufferstack + AX_surfxml_link___ctn_id)
+XBT_PUBLIC_DATA(short int) surfxml_link___ctn_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_state___file) AX_surfxml_host_state___file;
+#define A_surfxml_host_state___file (surfxml_bufferstack + AX_surfxml_host_state___file)
+XBT_PUBLIC_DATA(short int) surfxml_host_state___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_bandwidth) AX_surfxml_link_bandwidth;
+#define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
+XBT_PUBLIC_DATA(short int) surfxml_link_bandwidth_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_loopback___lat) AX_surfxml_cluster_loopback___lat;
+#define A_surfxml_cluster_loopback___lat (surfxml_bufferstack + AX_surfxml_cluster_loopback___lat)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_loopback___lat_isset;
+XBT_PUBLIC_DATA(AT_surfxml_process_function) AX_surfxml_process_function;
+#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
+XBT_PUBLIC_DATA(short int) surfxml_process_function_isset;
+XBT_PUBLIC_DATA(AT_surfxml_backbone_latency) AX_surfxml_backbone_latency;
+#define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency)
+XBT_PUBLIC_DATA(short int) surfxml_backbone_latency_isset;
+XBT_PUBLIC_DATA(AT_surfxml_process_on___failure) AX_surfxml_process_on___failure;
+#define A_surfxml_process_on___failure AX_surfxml_process_on___failure
+XBT_PUBLIC_DATA(short int) surfxml_process_on___failure_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_core) AX_surfxml_host_core;
+#define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
+XBT_PUBLIC_DATA(short int) surfxml_host_core_isset;
 XBT_PUBLIC_DATA(AT_surfxml_random_generator) AX_surfxml_random_generator;
 #define A_surfxml_random_generator AX_surfxml_random_generator
 XBT_PUBLIC_DATA(short int) surfxml_random_generator_isset;
-XBT_PUBLIC_DATA(AT_surfxml_include_file) AX_surfxml_include_file;
-#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
-XBT_PUBLIC_DATA(short int) surfxml_include_file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassASroute_dst) AX_surfxml_bypassASroute_dst;
-#define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassASroute_dst_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_id) AX_surfxml_host_id;
-#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
-XBT_PUBLIC_DATA(short int) surfxml_host_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace___connect_kind) AX_surfxml_trace___connect_kind;
-#define A_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind
-XBT_PUBLIC_DATA(short int) surfxml_trace___connect_kind_isset;
+XBT_PUBLIC_DATA(AT_surfxml_random_mean) AX_surfxml_random_mean;
+#define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
+XBT_PUBLIC_DATA(short int) surfxml_random_mean_isset;
+XBT_PUBLIC_DATA(AT_surfxml_ASroute_gw___dst) AX_surfxml_ASroute_gw___dst;
+#define A_surfxml_ASroute_gw___dst (surfxml_bufferstack + AX_surfxml_ASroute_gw___dst)
+XBT_PUBLIC_DATA(short int) surfxml_ASroute_gw___dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_peer_availability___file) AX_surfxml_peer_availability___file;
+#define A_surfxml_peer_availability___file (surfxml_bufferstack + AX_surfxml_peer_availability___file)
+XBT_PUBLIC_DATA(short int) surfxml_peer_availability___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_bandwidth___file) AX_surfxml_link_bandwidth___file;
+#define A_surfxml_link_bandwidth___file (surfxml_bufferstack + AX_surfxml_link_bandwidth___file)
+XBT_PUBLIC_DATA(short int) surfxml_link_bandwidth___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_sharing___policy) AX_surfxml_cluster_sharing___policy;
+#define A_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy
+XBT_PUBLIC_DATA(short int) surfxml_cluster_sharing___policy_isset;
 XBT_PUBLIC_DATA(AT_surfxml_process_host) AX_surfxml_process_host;
 #define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
 XBT_PUBLIC_DATA(short int) surfxml_process_host_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_id) AX_surfxml_cabinet_id;
-#define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_config_id) AX_surfxml_config_id;
-#define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
-XBT_PUBLIC_DATA(short int) surfxml_config_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_trace_periodicity) AX_surfxml_trace_periodicity;
+#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
+XBT_PUBLIC_DATA(short int) surfxml_trace_periodicity_isset;
 XBT_PUBLIC_DATA(AT_surfxml_peer_lat) AX_surfxml_peer_lat;
 #define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat)
 XBT_PUBLIC_DATA(short int) surfxml_peer_lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage_content) AX_surfxml_storage_content;
-#define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content)
-XBT_PUBLIC_DATA(short int) surfxml_storage_content_isset;
-XBT_PUBLIC_DATA(AT_surfxml_bypassRoute_dst) AX_surfxml_bypassRoute_dst;
-#define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
-XBT_PUBLIC_DATA(short int) surfxml_bypassRoute_dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_peer_power) AX_surfxml_peer_power;
+#define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
+XBT_PUBLIC_DATA(short int) surfxml_peer_power_isset;
 XBT_PUBLIC_DATA(AT_surfxml_storage_attach) AX_surfxml_storage_attach;
 #define A_surfxml_storage_attach (surfxml_bufferstack + AX_surfxml_storage_attach)
 XBT_PUBLIC_DATA(short int) surfxml_storage_attach_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_state___file) AX_surfxml_cluster_state___file;
-#define A_surfxml_cluster_state___file (surfxml_bufferstack + AX_surfxml_cluster_state___file)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_state___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_topo___parameters) AX_surfxml_cluster_topo___parameters;
-#define A_surfxml_cluster_topo___parameters (surfxml_bufferstack + AX_surfxml_cluster_topo___parameters)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_topo___parameters_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_core) AX_surfxml_cluster_core;
-#define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_core_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_state___file) AX_surfxml_peer_state___file;
-#define A_surfxml_peer_state___file (surfxml_bufferstack + AX_surfxml_peer_state___file)
-XBT_PUBLIC_DATA(short int) surfxml_peer_state___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_router_coordinates) AX_surfxml_router_coordinates;
+#define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
+XBT_PUBLIC_DATA(short int) surfxml_router_coordinates_isset;
 XBT_PUBLIC_DATA(AT_surfxml_cabinet_prefix) AX_surfxml_cabinet_prefix;
 #define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix)
 XBT_PUBLIC_DATA(short int) surfxml_cabinet_prefix_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_bw) AX_surfxml_cluster_bw;
+#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_bw_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage___type_content) AX_surfxml_storage___type_content;
+#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content)
+XBT_PUBLIC_DATA(short int) surfxml_storage___type_content_isset;
+XBT_PUBLIC_DATA(AT_surfxml_mstorage_typeId) AX_surfxml_mstorage_typeId;
+#define A_surfxml_mstorage_typeId (surfxml_bufferstack + AX_surfxml_mstorage_typeId)
+XBT_PUBLIC_DATA(short int) surfxml_mstorage_typeId_isset;
+XBT_PUBLIC_DATA(AT_surfxml_model___prop_id) AX_surfxml_model___prop_id;
+#define A_surfxml_model___prop_id (surfxml_bufferstack + AX_surfxml_model___prop_id)
+XBT_PUBLIC_DATA(short int) surfxml_model___prop_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_backbone_id) AX_surfxml_backbone_id;
+#define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id)
+XBT_PUBLIC_DATA(short int) surfxml_backbone_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_config_id) AX_surfxml_config_id;
+#define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
+XBT_PUBLIC_DATA(short int) surfxml_config_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_lat) AX_surfxml_cluster_lat;
+#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_lat_isset;
 XBT_PUBLIC_DATA(AT_surfxml_platform_version) AX_surfxml_platform_version;
 #define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
 XBT_PUBLIC_DATA(short int) surfxml_platform_version_isset;
+XBT_PUBLIC_DATA(AT_surfxml_trace___connect_element) AX_surfxml_trace___connect_element;
+#define A_surfxml_trace___connect_element (surfxml_bufferstack + AX_surfxml_trace___connect_element)
+XBT_PUBLIC_DATA(short int) surfxml_trace___connect_element_isset;
+XBT_PUBLIC_DATA(AT_surfxml_mount_storageId) AX_surfxml_mount_storageId;
+#define A_surfxml_mount_storageId (surfxml_bufferstack + AX_surfxml_mount_storageId)
+XBT_PUBLIC_DATA(short int) surfxml_mount_storageId_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___bw) AX_surfxml_cluster_bb___bw;
+#define A_surfxml_cluster_bb___bw (surfxml_bufferstack + AX_surfxml_cluster_bb___bw)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___bw_isset;
+XBT_PUBLIC_DATA(AT_surfxml_ASroute_dst) AX_surfxml_ASroute_dst;
+#define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
+XBT_PUBLIC_DATA(short int) surfxml_ASroute_dst_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_pstate) AX_surfxml_host_pstate;
+#define A_surfxml_host_pstate (surfxml_bufferstack + AX_surfxml_host_pstate)
+XBT_PUBLIC_DATA(short int) surfxml_host_pstate_isset;
+XBT_PUBLIC_DATA(AT_surfxml_peer_id) AX_surfxml_peer_id;
+#define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
+XBT_PUBLIC_DATA(short int) surfxml_peer_id_isset;
 XBT_PUBLIC_DATA(AT_surfxml_ASroute_src) AX_surfxml_ASroute_src;
 #define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
 XBT_PUBLIC_DATA(short int) surfxml_ASroute_src_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_state___file) AX_surfxml_link_state___file;
-#define A_surfxml_link_state___file (surfxml_bufferstack + AX_surfxml_link_state___file)
-XBT_PUBLIC_DATA(short int) surfxml_link_state___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_topology) AX_surfxml_cluster_topology;
-#define A_surfxml_cluster_topology AX_surfxml_cluster_topology
-XBT_PUBLIC_DATA(short int) surfxml_cluster_topology_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_state) AX_surfxml_host_state;
-#define A_surfxml_host_state AX_surfxml_host_state
-XBT_PUBLIC_DATA(short int) surfxml_host_state_isset;
+XBT_PUBLIC_DATA(AT_surfxml_gpu_name) AX_surfxml_gpu_name;
+#define A_surfxml_gpu_name (surfxml_bufferstack + AX_surfxml_gpu_name)
+XBT_PUBLIC_DATA(short int) surfxml_gpu_name_isset;
+XBT_PUBLIC_DATA(AT_surfxml_host_availability) AX_surfxml_host_availability;
+#define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
+XBT_PUBLIC_DATA(short int) surfxml_host_availability_isset;
+XBT_PUBLIC_DATA(AT_surfxml_mstorage_name) AX_surfxml_mstorage_name;
+#define A_surfxml_mstorage_name (surfxml_bufferstack + AX_surfxml_mstorage_name)
+XBT_PUBLIC_DATA(short int) surfxml_mstorage_name_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cabinet_id) AX_surfxml_cabinet_id;
+#define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id)
+XBT_PUBLIC_DATA(short int) surfxml_cabinet_id_isset;
+XBT_PUBLIC_DATA(AT_surfxml_storage_typeId) AX_surfxml_storage_typeId;
+#define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId)
+XBT_PUBLIC_DATA(short int) surfxml_storage_typeId_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___lat) AX_surfxml_cluster_bb___lat;
+#define A_surfxml_cluster_bb___lat (surfxml_bufferstack + AX_surfxml_cluster_bb___lat)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___lat_isset;
 XBT_PUBLIC_DATA(AT_surfxml_trace_file) AX_surfxml_trace_file;
 #define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
 XBT_PUBLIC_DATA(short int) surfxml_trace_file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_mean) AX_surfxml_random_mean;
-#define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
-XBT_PUBLIC_DATA(short int) surfxml_random_mean_isset;
-XBT_PUBLIC_DATA(AT_surfxml_peer_power) AX_surfxml_peer_power;
-#define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
-XBT_PUBLIC_DATA(short int) surfxml_peer_power_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_lat) AX_surfxml_cabinet_lat;
-#define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_lat_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_limiter___link) AX_surfxml_cluster_limiter___link;
+#define A_surfxml_cluster_limiter___link (surfxml_bufferstack + AX_surfxml_cluster_limiter___link)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_limiter___link_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_radical) AX_surfxml_cluster_radical;
+#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_radical_isset;
+XBT_PUBLIC_DATA(AT_surfxml_router_id) AX_surfxml_router_id;
+#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
+XBT_PUBLIC_DATA(short int) surfxml_router_id_isset;
 XBT_PUBLIC_DATA(AT_surfxml_trace_id) AX_surfxml_trace_id;
 #define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
 XBT_PUBLIC_DATA(short int) surfxml_trace_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___bw) AX_surfxml_cluster_bb___bw;
-#define A_surfxml_cluster_bb___bw (surfxml_bufferstack + AX_surfxml_cluster_bb___bw)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_coordinates) AX_surfxml_host_coordinates;
-#define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
-XBT_PUBLIC_DATA(short int) surfxml_host_coordinates_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_power) AX_surfxml_cabinet_power;
-#define A_surfxml_cabinet_power (surfxml_bufferstack + AX_surfxml_cabinet_power)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_power_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage_content___type) AX_surfxml_storage_content___type;
-#define A_surfxml_storage_content___type (surfxml_bufferstack + AX_surfxml_storage_content___type)
-XBT_PUBLIC_DATA(short int) surfxml_storage_content___type_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_loopback___bw) AX_surfxml_cluster_loopback___bw;
-#define A_surfxml_cluster_loopback___bw (surfxml_bufferstack + AX_surfxml_cluster_loopback___bw)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_loopback___bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_latency___file) AX_surfxml_link_latency___file;
-#define A_surfxml_link_latency___file (surfxml_bufferstack + AX_surfxml_link_latency___file)
-XBT_PUBLIC_DATA(short int) surfxml_link_latency___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_start___time) AX_surfxml_process_start___time;
-#define A_surfxml_process_start___time (surfxml_bufferstack + AX_surfxml_process_start___time)
-XBT_PUBLIC_DATA(short int) surfxml_process_start___time_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_state) AX_surfxml_link_state;
+#define A_surfxml_link_state AX_surfxml_link_state
+XBT_PUBLIC_DATA(short int) surfxml_link_state_isset;
 XBT_PUBLIC_DATA(AT_surfxml_prop_id) AX_surfxml_prop_id;
 #define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
 XBT_PUBLIC_DATA(short int) surfxml_prop_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_sharing___policy) AX_surfxml_cluster_sharing___policy;
-#define A_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy
-XBT_PUBLIC_DATA(short int) surfxml_cluster_sharing___policy_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_max) AX_surfxml_random_max;
-#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
-XBT_PUBLIC_DATA(short int) surfxml_random_max_isset;
-XBT_PUBLIC_DATA(AT_surfxml_router_id) AX_surfxml_router_id;
-#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
-XBT_PUBLIC_DATA(short int) surfxml_router_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_backbone_latency) AX_surfxml_backbone_latency;
-#define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency)
-XBT_PUBLIC_DATA(short int) surfxml_backbone_latency_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_prefix) AX_surfxml_cluster_prefix;
-#define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_prefix_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bw) AX_surfxml_cluster_bw;
-#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bw_isset;
-XBT_PUBLIC_DATA(AT_surfxml_link_latency) AX_surfxml_link_latency;
-#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
-XBT_PUBLIC_DATA(short int) surfxml_link_latency_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cabinet_suffix) AX_surfxml_cabinet_suffix;
-#define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix)
-XBT_PUBLIC_DATA(short int) surfxml_cabinet_suffix_isset;
 XBT_PUBLIC_DATA(AT_surfxml_host___link_down) AX_surfxml_host___link_down;
 #define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down)
 XBT_PUBLIC_DATA(short int) surfxml_host___link_down_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_loopback___lat) AX_surfxml_cluster_loopback___lat;
-#define A_surfxml_cluster_loopback___lat (surfxml_bufferstack + AX_surfxml_cluster_loopback___lat)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_loopback___lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_state___file) AX_surfxml_host_state___file;
-#define A_surfxml_host_state___file (surfxml_bufferstack + AX_surfxml_host_state___file)
-XBT_PUBLIC_DATA(short int) surfxml_host_state___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_model___prop_value) AX_surfxml_model___prop_value;
-#define A_surfxml_model___prop_value (surfxml_bufferstack + AX_surfxml_model___prop_value)
-XBT_PUBLIC_DATA(short int) surfxml_model___prop_value_isset;
-XBT_PUBLIC_DATA(AT_surfxml_random_std___deviation) AX_surfxml_random_std___deviation;
-#define A_surfxml_random_std___deviation (surfxml_bufferstack + AX_surfxml_random_std___deviation)
-XBT_PUBLIC_DATA(short int) surfxml_random_std___deviation_isset;
-XBT_PUBLIC_DATA(AT_surfxml_process_function) AX_surfxml_process_function;
-#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
-XBT_PUBLIC_DATA(short int) surfxml_process_function_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_size) AX_surfxml_storage___type_size;
-#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_size_isset;
-XBT_PUBLIC_DATA(AT_surfxml_host_availability___file) AX_surfxml_host_availability___file;
-#define A_surfxml_host_availability___file (surfxml_bufferstack + AX_surfxml_host_availability___file)
-XBT_PUBLIC_DATA(short int) surfxml_host_availability___file_isset;
-XBT_PUBLIC_DATA(AT_surfxml_backbone_id) AX_surfxml_backbone_id;
-#define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id)
-XBT_PUBLIC_DATA(short int) surfxml_backbone_id_isset;
-XBT_PUBLIC_DATA(AT_surfxml_trace_periodicity) AX_surfxml_trace_periodicity;
-#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
-XBT_PUBLIC_DATA(short int) surfxml_trace_periodicity_isset;
-XBT_PUBLIC_DATA(AT_surfxml_cluster_bb___lat) AX_surfxml_cluster_bb___lat;
-#define A_surfxml_cluster_bb___lat (surfxml_bufferstack + AX_surfxml_cluster_bb___lat)
-XBT_PUBLIC_DATA(short int) surfxml_cluster_bb___lat_isset;
-XBT_PUBLIC_DATA(AT_surfxml_storage___type_content___type) AX_surfxml_storage___type_content___type;
-#define A_surfxml_storage___type_content___type (surfxml_bufferstack + AX_surfxml_storage___type_content___type)
-XBT_PUBLIC_DATA(short int) surfxml_storage___type_content___type_isset;
+XBT_PUBLIC_DATA(AT_surfxml_link_state___file) AX_surfxml_link_state___file;
+#define A_surfxml_link_state___file (surfxml_bufferstack + AX_surfxml_link_state___file)
+XBT_PUBLIC_DATA(short int) surfxml_link_state___file_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_topo___parameters) AX_surfxml_cluster_topo___parameters;
+#define A_surfxml_cluster_topo___parameters (surfxml_bufferstack + AX_surfxml_cluster_topo___parameters)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_topo___parameters_isset;
+XBT_PUBLIC_DATA(AT_surfxml_cluster_suffix) AX_surfxml_cluster_suffix;
+#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
+XBT_PUBLIC_DATA(short int) surfxml_cluster_suffix_isset;
 
 /* XML application utilities. */
 XBT_PUBLIC(int) surfxml_element_context(int);
index 5f89b84..8404f6f 100644 (file)
@@ -60,25 +60,25 @@ typedef int AT_graphxml_node_position___y;
 #define AU_graphxml_node_position___y NULL
 typedef int AT_graphxml_node_position___x;
 #define AU_graphxml_node_position___x NULL
-typedef int AT_graphxml_edge_source;
-#define AU_graphxml_edge_source NULL
-typedef enum { AU_graphxml_graph_isDirected, A_graphxml_graph_isDirected_true,A_graphxml_graph_isDirected_false } AT_graphxml_graph_isDirected;
 typedef int AT_graphxml_node_data;
 #define AU_graphxml_node_data NULL
-typedef int AT_graphxml_edge_name;
-#define AU_graphxml_edge_name NULL
-typedef int AT_graphxml_edge_data;
-#define AU_graphxml_edge_data NULL
 typedef int AT_graphxml_edge_length;
 #define AU_graphxml_edge_length NULL
-typedef int AT_graphxml_node_name;
-#define AU_graphxml_node_name NULL
-typedef int AT_graphxml_edge_label;
-#define AU_graphxml_edge_label NULL
-typedef int AT_graphxml_edge_target;
-#define AU_graphxml_edge_target NULL
 typedef int AT_graphxml_node_label;
 #define AU_graphxml_node_label NULL
+typedef enum { AU_graphxml_graph_isDirected, A_graphxml_graph_isDirected_true,A_graphxml_graph_isDirected_false } AT_graphxml_graph_isDirected;
+typedef int AT_graphxml_edge_data;
+#define AU_graphxml_edge_data NULL
+typedef int AT_graphxml_edge_name;
+#define AU_graphxml_edge_name NULL
+typedef int AT_graphxml_edge_target;
+#define AU_graphxml_edge_target NULL
+typedef int AT_graphxml_edge_source;
+#define AU_graphxml_edge_source NULL
+typedef int AT_graphxml_edge_label;
+#define AU_graphxml_edge_label NULL
+typedef int AT_graphxml_node_name;
+#define AU_graphxml_node_name NULL
 
 /* FleXML-provided data. */
 XBT_PUBLIC_DATA(int) graphxml_pcdata_ix;
@@ -90,36 +90,36 @@ XBT_PUBLIC_DATA(short int) graphxml_node_position___y_isset;
 XBT_PUBLIC_DATA(AT_graphxml_node_position___x) AX_graphxml_node_position___x;
 #define A_graphxml_node_position___x (graphxml_bufferstack + AX_graphxml_node_position___x)
 XBT_PUBLIC_DATA(short int) graphxml_node_position___x_isset;
-XBT_PUBLIC_DATA(AT_graphxml_edge_source) AX_graphxml_edge_source;
-#define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
-XBT_PUBLIC_DATA(short int) graphxml_edge_source_isset;
-XBT_PUBLIC_DATA(AT_graphxml_graph_isDirected) AX_graphxml_graph_isDirected;
-#define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
-XBT_PUBLIC_DATA(short int) graphxml_graph_isDirected_isset;
 XBT_PUBLIC_DATA(AT_graphxml_node_data) AX_graphxml_node_data;
 #define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
 XBT_PUBLIC_DATA(short int) graphxml_node_data_isset;
-XBT_PUBLIC_DATA(AT_graphxml_edge_name) AX_graphxml_edge_name;
-#define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
-XBT_PUBLIC_DATA(short int) graphxml_edge_name_isset;
-XBT_PUBLIC_DATA(AT_graphxml_edge_data) AX_graphxml_edge_data;
-#define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
-XBT_PUBLIC_DATA(short int) graphxml_edge_data_isset;
 XBT_PUBLIC_DATA(AT_graphxml_edge_length) AX_graphxml_edge_length;
 #define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
 XBT_PUBLIC_DATA(short int) graphxml_edge_length_isset;
-XBT_PUBLIC_DATA(AT_graphxml_node_name) AX_graphxml_node_name;
-#define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
-XBT_PUBLIC_DATA(short int) graphxml_node_name_isset;
-XBT_PUBLIC_DATA(AT_graphxml_edge_label) AX_graphxml_edge_label;
-#define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
-XBT_PUBLIC_DATA(short int) graphxml_edge_label_isset;
-XBT_PUBLIC_DATA(AT_graphxml_edge_target) AX_graphxml_edge_target;
-#define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
-XBT_PUBLIC_DATA(short int) graphxml_edge_target_isset;
 XBT_PUBLIC_DATA(AT_graphxml_node_label) AX_graphxml_node_label;
 #define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
 XBT_PUBLIC_DATA(short int) graphxml_node_label_isset;
+XBT_PUBLIC_DATA(AT_graphxml_graph_isDirected) AX_graphxml_graph_isDirected;
+#define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
+XBT_PUBLIC_DATA(short int) graphxml_graph_isDirected_isset;
+XBT_PUBLIC_DATA(AT_graphxml_edge_data) AX_graphxml_edge_data;
+#define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
+XBT_PUBLIC_DATA(short int) graphxml_edge_data_isset;
+XBT_PUBLIC_DATA(AT_graphxml_edge_name) AX_graphxml_edge_name;
+#define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
+XBT_PUBLIC_DATA(short int) graphxml_edge_name_isset;
+XBT_PUBLIC_DATA(AT_graphxml_edge_target) AX_graphxml_edge_target;
+#define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
+XBT_PUBLIC_DATA(short int) graphxml_edge_target_isset;
+XBT_PUBLIC_DATA(AT_graphxml_edge_source) AX_graphxml_edge_source;
+#define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
+XBT_PUBLIC_DATA(short int) graphxml_edge_source_isset;
+XBT_PUBLIC_DATA(AT_graphxml_edge_label) AX_graphxml_edge_label;
+#define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
+XBT_PUBLIC_DATA(short int) graphxml_edge_label_isset;
+XBT_PUBLIC_DATA(AT_graphxml_node_name) AX_graphxml_node_name;
+#define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
+XBT_PUBLIC_DATA(short int) graphxml_node_name_isset;
 
 /* XML application utilities. */
 XBT_PUBLIC(int) graphxml_element_context(int);
index 2c8e641..a260c0d 100644 (file)
@@ -83,7 +83,6 @@ XBT_PUBLIC(void) xbt_mutex_acquire(xbt_mutex_t mutex);
  * Tries to lock a mutex, return 1 if the mutex is unlocked, else 0.
  * This function does not block and wait for the mutex to be unlocked.
  * \param mutex The mutex
- * \param issuer The process that tries to acquire the mutex
  * \return 1 - mutex free, 0 - mutex used
  */
 XBT_PUBLIC(int) xbt_mutex_try_acquire(xbt_mutex_t mutex);
index c25f3b7..b858c49 100644 (file)
@@ -156,9 +156,7 @@ public class VM extends Host{
         */     
        public void migrate(Host destination) throws HostFailureException{
                try {
-                       Msg.info("Migrate begins");
                        this.internalmig(destination);
-                       Msg.info("Migrate ends");
                } catch (Exception e){
                  Msg.info("an exception occurs during the migration of VM "+this.getName());
                  throw new HostFailureException();
index 9fdffda..7bef769 100644 (file)
@@ -63,7 +63,6 @@ public class NetworkLink extends Resource {
   
   /**
     * @param value The new bandwidth
-    * @param date When to change the bandwidth
     */
   public void updateBandwidth(double value, double date) {
     SurfJNI.NetworkLink_updateBandwidth__SWIG_0(swigCPtr, this, value, date);
@@ -88,7 +87,6 @@ public class NetworkLink extends Resource {
   
   /**
     * @param value The new latency
-    * @param date When to change the latency
     */
   public void updateLatency(double value, double date) {
     SurfJNI.NetworkLink_updateLatency__SWIG_0(swigCPtr, this, value, date);
index cf32554..2a5dc0a 100644 (file)
@@ -284,6 +284,24 @@ XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst(lmm_system_t sys,
                                      lmm_constraint_t cnst,
                                      lmm_element_t * elem);
 
+/**
+ * @brief Get a var associated to a constraint
+ * @details Get the first variable of the next variable of elem if elem is not NULL
+ *
+ * @param sys The system associated to the variable (not used)
+ * @param cnst A constraint
+ * @param elem A element of constraint of the constraint or NULL
+ * @param nextelem A element of constraint of the constraint or NULL, the one after elem
+ * @param numelem parameter representing the number of elements to go
+ *
+ * @return A variable associated to a constraint
+ */
+XBT_PUBLIC(lmm_variable_t) lmm_get_var_from_cnst_safe(lmm_system_t /*sys*/,
+                                     lmm_constraint_t cnst,
+                                     lmm_element_t * elem,
+                                     lmm_element_t * nextelem,
+                                     int * numelem);
+
 /**
  * @brief Get the first active constraint of a system
  * 
index 1a9d56e..c9f19e8 100644 (file)
@@ -1008,6 +1008,16 @@ XBT_PUBLIC_DATA(surf_network_model_t) surf_network_model;
  */
 XBT_PUBLIC(void) surf_network_model_init_SMPI(void);
 
+/** \ingroup SURF_models
+ *  \brief Same as network model 'LagrangeVelho', only with different correction factors.
+ *
+ * This model impelments a variant of the contention model on Infinband networks based on
+ * the works of Jérôme Vienne : http://mescal.imag.fr/membres/jean-marc.vincent/index.html/PhD/Vienne.pdf
+ *
+ *  \see surf_workstation_model_init_IB()
+ */
+XBT_PUBLIC(void) surf_network_model_init_IB(void);
+
 /** \ingroup SURF_models
  *  \brief Initializes the platform with the network model 'LegrandVelho'
  *
index 9b21eb1..d205926 100644 (file)
@@ -7,9 +7,11 @@
 #define _GNU_SOURCE
 #define UNW_LOCAL_ONLY
 
+#include <unistd.h>
 
 #include <string.h>
 #include <link.h>
+#include <dirent.h>
 
 #include "internal_config.h"
 #include "mc_private.h"
@@ -22,6 +24,7 @@
 
 #include "../simix/smx_private.h"
 
+#define UNW_LOCAL_ONLY
 #include <libunwind.h>
 #include <libelf.h>
 
@@ -102,7 +105,7 @@ void MC_free_snapshot(mc_snapshot_t snapshot)
 /*******************************  Snapshot regions ********************************/
 /*********************************************************************************/
 
-  static mc_mem_region_t mc_region_new_dense(int type, void *start_addr, void* permanent_addr, size_t size, mc_mem_region_t ref_reg)
+static mc_mem_region_t mc_region_new_dense(int type, void *start_addr, void* permanent_addr, size_t size, mc_mem_region_t ref_reg)
 {
   mc_mem_region_t new_reg = xbt_new(s_mc_mem_region_t, 1);
   new_reg->start_addr = start_addr;
@@ -245,50 +248,6 @@ void MC_init_memory_map_info()
 
 }
 
-/** \brief Fill/lookup the "subtype" field.
- */
-static void MC_resolve_subtype(mc_object_info_t info, dw_type_t type)
-{
-
-  if (type->dw_type_id == NULL)
-    return;
-  type->subtype = xbt_dict_get_or_null(info->types, type->dw_type_id);
-  if (type->subtype == NULL)
-    return;
-  if (type->subtype->byte_size != 0)
-    return;
-  if (type->subtype->name == NULL)
-    return;
-  // Try to find a more complete description of the type:
-  // We need to fix in order to support C++.
-
-  dw_type_t subtype =
-      xbt_dict_get_or_null(info->full_types_by_name, type->subtype->name);
-  if (subtype != NULL) {
-    type->subtype = subtype;
-  }
-
-}
-
-void MC_post_process_types(mc_object_info_t info)
-{
-  xbt_dict_cursor_t cursor = NULL;
-  char *origin;
-  dw_type_t type;
-
-  // Lookup "subtype" field:
-  xbt_dict_foreach(info->types, cursor, origin, type) {
-    MC_resolve_subtype(info, type);
-
-    dw_type_t member;
-    unsigned int i = 0;
-    if (type->members != NULL)
-      xbt_dynar_foreach(type->members, i, member) {
-      MC_resolve_subtype(info, member);
-      }
-  }
-}
-
 /** \brief Fills the position of the segments (executable, read-only, read/write).
  *
  * TODO, use dl_iterate_phdr to be more robust
@@ -389,12 +348,22 @@ static void mc_fill_local_variables_values(mc_stack_frame_t stack_frame,
     if (current_variable->address != NULL) {
       new_var->address = current_variable->address;
     } else if (current_variable->locations.size != 0) {
-      new_var->address =
-          (void *) mc_dwarf_resolve_locations(&current_variable->locations,
+      s_mc_location_t location;
+      mc_dwarf_resolve_locations(&location, &current_variable->locations,
                                               current_variable->object_info,
                                               &(stack_frame->unw_cursor),
                                               (void *) stack_frame->frame_base,
                                               NULL, process_index);
+
+      switch(mc_get_location_type(&location)) {
+      case MC_LOCATION_TYPE_ADDRESS:
+        new_var->address = location.memory_location;
+        break;
+      case MC_LOCATION_TYPE_REGISTER:
+      default:
+        xbt_die("Cannot handle non-address variable");
+      }
+
     } else {
       xbt_die("No address");
     }
@@ -599,13 +568,86 @@ static void MC_snapshot_ignore_restore(mc_snapshot_t snapshot)
 int mc_important_snapshot(mc_snapshot_t snapshot)
 {
   // We need this snapshot in order to know which
-  // pages needs to be stored in the next snapshot:
+  // pages needs to be stored in the next snapshot.
+  // This field is only non-NULL when using soft-dirty
+  // page tracking.
   if (snapshot == mc_model_checker->parent_snapshot)
     return true;
 
   return false;
 }
 
+static void MC_get_current_fd(mc_snapshot_t snapshot){
+
+  snapshot->total_fd = 0;
+
+  const size_t fd_dir_path_size = 20;
+  char fd_dir_path[fd_dir_path_size];
+  if (snprintf(fd_dir_path, fd_dir_path_size,
+    "/proc/%lli/fd", (long long int) getpid()) > fd_dir_path_size)
+    xbt_die("Unexpected buffer is too small for fd_dir_path");
+
+  DIR* fd_dir = opendir (fd_dir_path);
+  if (fd_dir == NULL)
+    xbt_die("Cannot open directory '/proc/self/fd'\n");
+
+  size_t total_fd = 0;
+  struct dirent* fd_number;
+  while ((fd_number = readdir(fd_dir))) {
+
+    int fd_value = atoi(fd_number->d_name);
+
+    if(fd_value < 3)
+      continue;
+
+    const size_t source_size = 25;
+    char source[25];
+    if (snprintf(source, source_size, "/proc/self/fd/%s", fd_number->d_name) > source_size)
+      xbt_die("Unexpected buffer is too small for fd %s", fd_number->d_name);
+
+    const size_t link_size = 200;
+    char link[200];
+    int res = readlink(source, link, link_size);
+    if (res<0) {
+      xbt_die("Could not read link for %s", source);
+    }
+    if (res==200) {
+      xbt_die("Buffer to small for link of %s", source);
+    }
+    link[res] = '\0';
+
+    if(smpi_is_privatisation_file(link))
+      continue;
+
+    // This is (probably) the DIR* we are reading:
+    // TODO, read all the file entries at once and close the DIR.*
+    if(strcmp(fd_dir_path, link) == 0)
+      continue;
+
+    // We don't handle them.
+    // It does not mean we should silently ignore them however.
+    if (strncmp(link, "pipe:", 5) == 0 || strncmp(link, "socket:", 7) == 0)
+      continue;
+
+    // This is probably a shared memory used by lttng-ust:
+    if(strncmp("/dev/shm/ust-shm-tmp-", link, 21)==0)
+      continue;
+
+    // Add an entry for this FD in the snapshot:
+    fd_infos_t fd = xbt_new0(s_fd_infos_t, 1);
+    fd->filename = strdup(link);
+    fd->number = fd_value;
+    fd->flags = fcntl(fd_value, F_GETFL) | fcntl(fd_value, F_GETFD) ;
+    fd->current_position = lseek(fd_value, 0, SEEK_CUR);
+    snapshot->current_fd = xbt_realloc(snapshot->current_fd, (total_fd + 1) * sizeof(fd_infos_t));
+    snapshot->current_fd[total_fd] = fd;
+    total_fd++;
+  }
+
+  snapshot->total_fd = total_fd;
+  closedir (fd_dir);
+}
+
 mc_snapshot_t MC_take_snapshot(int num_state)
 {
 
@@ -618,6 +660,8 @@ mc_snapshot_t MC_take_snapshot(int num_state)
 
   MC_snapshot_handle_ignore(snapshot);
 
+  MC_get_current_fd(snapshot);
+
   /* Save the std heap and the writable mapped pages of libsimgrid and binary */
   MC_get_memory_regions(snapshot);
   if (_sg_mc_sparse_checkpoint && _sg_mc_soft_dirty) {
@@ -649,6 +693,7 @@ void MC_restore_snapshot(mc_snapshot_t snapshot)
 {
   mc_snapshot_t parent_snapshot = mc_model_checker->parent_snapshot;
 
+  int new_fd;
   unsigned int i;
   for (i = 0; i < NB_REGIONS; i++) {
     // For privatized, variables we decided it was not necessary to take the snapshot:
@@ -669,10 +714,31 @@ void MC_restore_snapshot(mc_snapshot_t snapshot)
     }
   }
   if(snapshot->privatization_index >= 0) {
-    smpi_switch_data_segment(snapshot->privatization_index);
+    // We just rewrote the global variables.
+    // The privatisation segment SMPI thinks
+    // is mapped might be inconsistent with the segment which
+    // is really mapped in memory (kernel state).
+    // We ask politely SMPI to map the segment anyway,
+    // even if it thinks it is the current one:
+    smpi_really_switch_data_segment(snapshot->privatization_index);
   }
 #endif
 
+  for(i=0; i < snapshot->total_fd; i++){
+    
+    new_fd = open(snapshot->current_fd[i]->filename, snapshot->current_fd[i]->flags);
+    if (new_fd <0) {
+      xbt_die("Could not reopen the file %s fo restoring the file descriptor",
+        snapshot->current_fd[i]->filename);
+    }
+    if(new_fd != -1 && new_fd != snapshot->current_fd[i]->number){
+      dup2(new_fd, snapshot->current_fd[i]->number);
+      //fprintf(stderr, "%p\n", fdopen(snapshot->current_fd[i]->number, "rw"));
+      close(new_fd);
+    };
+    lseek(snapshot->current_fd[i]->number, snapshot->current_fd[i]->current_position, SEEK_SET);
+  }
+
   if (_sg_mc_sparse_checkpoint && _sg_mc_soft_dirty) {
     mc_softdirty_reset();
   }
@@ -681,9 +747,10 @@ void MC_restore_snapshot(mc_snapshot_t snapshot)
   if (_sg_mc_sparse_checkpoint && _sg_mc_soft_dirty) {
     mc_model_checker->parent_snapshot = snapshot;
   }
+
 }
 
-mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall)
+mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall)
 {
   return MC_take_snapshot(1);
 }
index 1555981..79bff80 100644 (file)
@@ -146,7 +146,7 @@ static void print_communications_pattern(xbt_dynar_t comms_pattern)
   }
 }
 
-static void update_comm_pattern(mc_comm_pattern_t comm_pattern, smx_action_t comm)
+static void update_comm_pattern(mc_comm_pattern_t comm_pattern, smx_synchro_t comm)
 {
   void *addr_pointed;
   comm_pattern->src_proc = comm->comm.src_proc->pid;
@@ -168,14 +168,14 @@ static void update_comm_pattern(mc_comm_pattern_t comm_pattern, smx_action_t com
 
 /********** Non Static functions ***********/
 
-void get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, int call)
+void get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, mc_call_type call_type)
 {
   mc_comm_pattern_t pattern = NULL;
   pattern = xbt_new0(s_mc_comm_pattern_t, 1);
   pattern->num = ++nb_comm_pattern;
   pattern->data_size = -1;
   void *addr_pointed;
-  if (call == 1) {              // ISEND
+  if (call_type == MC_CALL_TYPE_SEND) {              // ISEND
     pattern->type = SIMIX_COMM_SEND;
     pattern->comm = simcall_comm_isend__get__result(request);
     pattern->src_proc = pattern->comm->comm.src_proc->pid;
@@ -187,11 +187,13 @@ void get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, int call)
       memcpy(pattern->data, addr_pointed, pattern->data_size);
     else
       memcpy(pattern->data, pattern->comm->comm.src_buff, pattern->data_size);
-  } else {                      // IRECV
+  } else if (call_type == MC_CALL_TYPE_RECV) {                      // IRECV
     pattern->type = SIMIX_COMM_RECEIVE;
     pattern->comm = simcall_comm_irecv__get__result(request);
     pattern->dst_proc = pattern->comm->comm.dst_proc->pid;
     pattern->dst_host = simcall_host_get_name(request->issuer->smx_host);
+  } else {
+    xbt_die("Unexpected call_type %i", (int) call_type);
   }
 
   if (pattern->comm->comm.rdv != NULL)
@@ -205,7 +207,7 @@ void get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, int call)
 
 }
 
-void complete_comm_pattern(xbt_dynar_t list, smx_action_t comm)
+void complete_comm_pattern(xbt_dynar_t list, smx_synchro_t comm)
 {
   mc_comm_pattern_t current_comm_pattern;
   unsigned int cursor = 0;
@@ -310,12 +312,11 @@ void MC_modelcheck_comm_determinism(void)
 {
 
   char *req_str = NULL;
-  int value, call = 0;
+  int value;
   mc_visited_state_t visited_state = NULL;
   smx_simcall_t req = NULL;
   smx_process_t process = NULL;
   mc_state_t state = NULL, next_state = NULL;
-  smx_action_t current_comm;
   xbt_dynar_t current_pattern;
 
   while (xbt_fifo_size(mc_stack) > 0) {
@@ -337,55 +338,31 @@ void MC_modelcheck_comm_determinism(void)
         && (req = MC_state_get_request(state, &value))
         && (visited_state == NULL)) {
 
-      /* Debug information */
-      if (XBT_LOG_ISENABLED(mc_comm_determinism, xbt_log_priority_debug)) {
-        req_str = MC_request_to_string(req, value);
-        XBT_DEBUG("Execute: %s", req_str);
-        xbt_free(req_str);
-      }
+      MC_LOG_REQUEST(mc_comm_determinism, req, value);
 
-      MC_SET_MC_HEAP;
-      if (dot_output != NULL)
+      if (dot_output != NULL) {
+        MC_SET_MC_HEAP;
         req_str = MC_request_get_dot_output(req, value);
-      MC_SET_STD_HEAP;
+        MC_SET_STD_HEAP;
+      }
 
       MC_state_set_executed_request(state, req, value);
       mc_stats->executed_transitions++;
 
       /* TODO : handle test and testany simcalls */
+      mc_call_type call = MC_CALL_TYPE_NONE;
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism) {
-        if (req->call == SIMCALL_COMM_ISEND)
-          call = 1;
-        else if (req->call == SIMCALL_COMM_IRECV)
-          call = 2;
-        else if (req->call == SIMCALL_COMM_WAIT)
-          call = 3;
-        else if (req->call == SIMCALL_COMM_WAITANY)
-          call = 4;
+        call = mc_get_call_type(req);
       }
 
       /* Answer the request */
-      SIMIX_simcall_enter(req, value);    /* After this call req is no longer usefull */
+      SIMIX_simcall_handle(req, value);    /* After this call req is no longer useful */
 
       MC_SET_MC_HEAP;
       current_pattern = !initial_global_state->initial_communications_pattern_done ? initial_communications_pattern : communications_pattern; 
-      if (call == 1) { /* Send */
-        get_comm_pattern(current_pattern, req, call);
-      } else if (call == 2) { /* Recv */
-        get_comm_pattern(current_pattern, req, call);
-      } else if (call == 3) { /* Wait */
-        current_comm = simcall_comm_wait__get__comm(req);
-        if (current_comm->comm.refcount == 1)  /* First wait only must be considered */
-          complete_comm_pattern(current_pattern, current_comm);
-      } else if (call == 4) { /* WaitAny */
-        current_comm = xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t);
-        if (current_comm->comm.refcount == 1) /* First wait only must be considered */
-          complete_comm_pattern(current_pattern, current_comm);
-      }
+      mc_update_comm_pattern(call, req, value, current_pattern);
       MC_SET_STD_HEAP;
 
-      call = 0;
-
       /* Wait for requests (schedules processes) */
       MC_wait_for_requests();
 
index 1891f31..0958d2d 100644 (file)
@@ -18,6 +18,8 @@
 #include "xbt/mmalloc.h"
 #include "xbt/mmalloc/mmprivate.h"
 
+#include <xbt/probes.h>
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_compare, mc,
                                 "Logging specific to mc_compare");
 
@@ -280,6 +282,7 @@ static int compare_global_variables(mc_object_info_t object_info,
                                 (char *) current_var->address, snapshot2, r2,
                                 bvariable_type, 0);
     if (res == 1) {
+      XBT_TRACE3(mc, global_diff, -1, -1, current_var->name);
       XBT_VERB("Global variable %s (%p) is different between snapshots",
                current_var->name, (char *) current_var->address);
       return 1;
@@ -336,6 +339,7 @@ static int compare_local_variables(int process_index,
 
       if (res == 1) {
         // TODO, fix current_varX->subprogram->name to include name if DW_TAG_inlined_subprogram
+        XBT_TRACE3(mc, local_diff, -1, -1, current_var1->name);
         XBT_VERB
             ("Local variable %s (%p - %p) in frame %s  is different between snapshots",
              current_var1->name, current_var1->address, current_var2->address,
@@ -382,6 +386,7 @@ int snapshot_compare(void *state1, void *state2)
   if (_sg_mc_hash) {
     hash_result = (s1->hash != s2->hash);
     if (hash_result) {
+      XBT_TRACE2(mc, hash_diff, num1, num2);
       XBT_VERB("(%d - %d) Different hash : 0x%" PRIx64 "--0x%" PRIx64, num1,
                num2, s1->hash, s2->hash);
 #ifndef MC_DEBUG
@@ -396,8 +401,11 @@ int snapshot_compare(void *state1, void *state2)
   unsigned int cursor;
   int pid;
   xbt_dynar_foreach(s1->enabled_processes, cursor, pid){
-    if(!xbt_dynar_member(s2->enabled_processes, &pid))
+    if(!xbt_dynar_member(s2->enabled_processes, &pid)) {
+      //XBT_TRACE3(mc, state_diff, num1, num2, "Different enabled processes");
       XBT_VERB("(%d - %d) Different enabled processes", num1, num2);
+      // return 1; ??
+    }
   }
 
   unsigned long i = 0;
@@ -424,6 +432,7 @@ int snapshot_compare(void *state1, void *state2)
       XBT_VERB("(%d - %d) Different size used in stacks : %zu - %zu", num1,
                num2, size_used1, size_used2);
 #endif
+      XBT_TRACE3(mc, state_diff, num1, num2, "Different stack size");
 
       xbt_os_walltimer_stop(timer);
       xbt_os_timer_free(timer);
@@ -455,6 +464,7 @@ int snapshot_compare(void *state1, void *state2)
     errors++;
 #else
 #ifdef MC_VERBOSE
+    XBT_TRACE3(mc, state_diff, num1, num2, "Different heap information");
     XBT_VERB("(%d - %d) Different heap information", num1, num2);
 #endif
 
@@ -492,6 +502,7 @@ int snapshot_compare(void *state1, void *state2)
     else diff_local =
         compare_local_variables(stack1->process_index, s1, s2, stack1, stack2);
     if (diff_local > 0) {
+      XBT_TRACE3(mc, state_diff, num1, num2, "Different local variables");
 #ifdef MC_DEBUG
       if (is_diff == 0) {
         xbt_os_walltimer_stop(timer);
@@ -559,6 +570,7 @@ int snapshot_compare(void *state1, void *state2)
         compare_global_variables(object_infos[k], MC_NO_PROCESS_INDEX, s1->regions[k], s2->regions[k], s1, s2);
 
     if (is_diff != 0) {
+      XBT_TRACE3(mc, state_diff, num1, num2, "Different global variables");
 #ifdef MC_DEBUG
       xbt_os_walltimer_stop(timer);
       *times[k] = xbt_os_timer_elapsed(timer);
@@ -589,6 +601,7 @@ int snapshot_compare(void *state1, void *state2)
 
   /* Compare heap */
   if (mmalloc_compare_heap(s1, s2) > 0) {
+    XBT_TRACE3(mc, state_diff, num1, num2, "Different heap");
 
 #ifdef MC_DEBUG
     xbt_os_walltimer_stop(timer);
@@ -674,7 +687,7 @@ void print_comparison_times()
 /**************************** MC snapshot compare simcall **************************/
 /***********************************************************************************/
 
-int SIMIX_pre_mc_compare_snapshots(smx_simcall_t simcall,
+int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall,
                                    mc_snapshot_t s1, mc_snapshot_t s2)
 {
   return snapshot_compare(s1, s2);
diff --git a/src/mc/mc_config.c b/src/mc/mc_config.c
new file mode 100644 (file)
index 0000000..eeb080a
--- /dev/null
@@ -0,0 +1,152 @@
+/* Copyright (c) 2008-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. */
+
+#include <strings.h>
+
+#include <xbt/log.h>
+#include <xbt/config.h>
+
+#include <mc/mc.h>
+
+#include <simgrid/sg_config.h>
+
+#include "mc_private.h"
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_config, mc,
+                                "Configuration of MC");
+
+/* Configuration support */
+e_mc_reduce_t mc_reduce_kind = e_mc_reduce_unset;
+
+int _sg_do_model_check = 0;
+int _sg_mc_checkpoint = 0;
+int _sg_mc_sparse_checkpoint = 0;
+int _sg_mc_soft_dirty = 0;
+char *_sg_mc_property_file = NULL;
+int _sg_mc_timeout = 0;
+int _sg_mc_hash = 0;
+int _sg_mc_max_depth = 1000;
+int _sg_mc_visited = 0;
+char *_sg_mc_dot_output_file = NULL;
+int _sg_mc_comms_determinism = 0;
+int _sg_mc_send_determinism = 0;
+int _sg_mc_safety = 0;
+int _sg_mc_liveness = 0;
+
+
+void _mc_cfg_cb_reduce(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a reduction strategy after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  char *val = xbt_cfg_get_string(_sg_cfg_set, name);
+  if (!strcasecmp(val, "none")) {
+    mc_reduce_kind = e_mc_reduce_none;
+  } else if (!strcasecmp(val, "dpor")) {
+    mc_reduce_kind = e_mc_reduce_dpor;
+  } else {
+    xbt_die("configuration option %s can only take 'none' or 'dpor' as a value",
+            name);
+  }
+}
+
+void _mc_cfg_cb_checkpoint(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a checkpointing value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_checkpoint = xbt_cfg_get_int(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_sparse_checkpoint(const char *name, int pos) {
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die("You are specifying a checkpointing value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_sparse_checkpoint = xbt_cfg_get_boolean(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_soft_dirty(const char *name, int pos) {
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die("You are specifying a soft dirty value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_soft_dirty = xbt_cfg_get_boolean(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_property(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a property after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_property_file = xbt_cfg_get_string(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_timeout(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a value to enable/disable timeout for wait requests after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_timeout = xbt_cfg_get_boolean(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_hash(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a value to enable/disable the use of global hash to speedup state comparaison, but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_hash = xbt_cfg_get_boolean(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_max_depth(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a max depth value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_max_depth = xbt_cfg_get_int(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_visited(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a number of stored visited states after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_visited = xbt_cfg_get_int(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_dot_output(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a file name for a dot output of graph state after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_dot_output_file = xbt_cfg_get_string(_sg_cfg_set, name);
+}
+
+void _mc_cfg_cb_comms_determinism(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a value to enable/disable the detection of determinism in the communications schemes after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_comms_determinism = xbt_cfg_get_boolean(_sg_cfg_set, name);
+  mc_reduce_kind = e_mc_reduce_none;
+}
+
+void _mc_cfg_cb_send_determinism(const char *name, int pos)
+{
+  if (_sg_cfg_init_status && !_sg_do_model_check) {
+    xbt_die
+        ("You are specifying a value to enable/disable the detection of send-determinism in the communications schemes after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
+  }
+  _sg_mc_send_determinism = xbt_cfg_get_boolean(_sg_cfg_set, name);
+  mc_reduce_kind = e_mc_reduce_none;
+}
index c1fd447..eabe5af 100644 (file)
@@ -159,7 +159,6 @@ static mc_tag_class MC_dwarf_tag_classify(int tag)
   case DW_TAG_restrict_type:
   case DW_TAG_interface_type:
   case DW_TAG_unspecified_type:
-  case DW_TAG_mutable_type:
   case DW_TAG_shared_type:
     return mc_tag_type;
 
@@ -1259,6 +1258,51 @@ static void MC_post_process_functions(mc_object_info_t info)
   }
 }
 
+
+/** \brief Fill/lookup the "subtype" field.
+ */
+static void MC_resolve_subtype(mc_object_info_t info, dw_type_t type)
+{
+
+  if (type->dw_type_id == NULL)
+    return;
+  type->subtype = xbt_dict_get_or_null(info->types, type->dw_type_id);
+  if (type->subtype == NULL)
+    return;
+  if (type->subtype->byte_size != 0)
+    return;
+  if (type->subtype->name == NULL)
+    return;
+  // Try to find a more complete description of the type:
+  // We need to fix in order to support C++.
+
+  dw_type_t subtype =
+      xbt_dict_get_or_null(info->full_types_by_name, type->subtype->name);
+  if (subtype != NULL) {
+    type->subtype = subtype;
+  }
+
+}
+
+static void MC_post_process_types(mc_object_info_t info)
+{
+  xbt_dict_cursor_t cursor = NULL;
+  char *origin;
+  dw_type_t type;
+
+  // Lookup "subtype" field:
+  xbt_dict_foreach(info->types, cursor, origin, type) {
+    MC_resolve_subtype(info, type);
+
+    dw_type_t member;
+    unsigned int i = 0;
+    if (type->members != NULL)
+      xbt_dynar_foreach(type->members, i, member) {
+      MC_resolve_subtype(info, member);
+      }
+  }
+}
+
 /** \brief Finds informations about a given shared object/executable */
 mc_object_info_t MC_find_object_info(memory_map_t maps, char *name,
                                      int executable)
index 3b6c9a4..ea58470 100644 (file)
@@ -403,11 +403,12 @@ int mc_dwarf_execute_expression(size_t n, const Dwarf_Op * ops,
 /** \brief Resolve a location expression
  *  \deprecated Use mc_dwarf_resolve_expression
  */
-uintptr_t mc_dwarf_resolve_location(mc_expression_t expression,
-                                    mc_object_info_t object_info,
-                                    unw_cursor_t * c,
-                                    void *frame_pointer_address,
-                                    mc_snapshot_t snapshot, int process_index)
+void mc_dwarf_resolve_location(mc_location_t location,
+                               mc_expression_t expression,
+                               mc_object_info_t object_info,
+                               unw_cursor_t * c,
+                               void *frame_pointer_address,
+                               mc_snapshot_t snapshot, int process_index)
 {
   s_mc_expression_state_t state;
   memset(&state, 0, sizeof(s_mc_expression_state_t));
@@ -417,37 +418,62 @@ uintptr_t mc_dwarf_resolve_location(mc_expression_t expression,
   state.object_info = object_info;
   state.process_index = process_index;
 
+  if (expression->size >= 1
+    && expression->ops[0].atom >=DW_OP_reg0 && expression->ops[0].atom <= DW_OP_reg31) {
+    int dwarf_register = expression->ops[0].atom - DW_OP_reg0;
+    xbt_assert(c, "Missing frame context for register operation DW_OP_reg%i",
+      dwarf_register);
+    location->memory_location = NULL;
+    location->cursor = c;
+    location->register_id = mc_dwarf_register_to_libunwind(dwarf_register);
+    return;
+  }
+
   if (mc_dwarf_execute_expression(expression->size, expression->ops, &state))
     xbt_die("Error evaluating DWARF expression");
   if (state.stack_size == 0)
     xbt_die("No value on the stack");
-  else
-    return state.stack[state.stack_size - 1];
+  else {
+    location->memory_location = (void*) state.stack[state.stack_size - 1];
+    location->cursor = NULL;
+    location->register_id = 0;
+  }
+}
+
+static mc_expression_t mc_find_expression(mc_location_list_t locations, unw_word_t ip) {
+  for (size_t i = 0; i != locations->size; ++i) {
+    mc_expression_t expression = locations->locations + i;
+    if ((expression->lowpc == NULL && expression->highpc == NULL)
+        || (ip && ip >= (unw_word_t) expression->lowpc
+            && ip < (unw_word_t) expression->highpc)) {
+      return expression;
+    }
+  }
+  return NULL;
 }
 
-uintptr_t mc_dwarf_resolve_locations(mc_location_list_t locations,
+void mc_dwarf_resolve_locations(mc_location_t location,
+                                     mc_location_list_t locations,
                                      mc_object_info_t object_info,
                                      unw_cursor_t * c,
                                      void *frame_pointer_address,
                                      mc_snapshot_t snapshot, int process_index)
 {
 
-  unw_word_t ip;
+  unw_word_t ip = 0;
   if (c) {
     if (unw_get_reg(c, UNW_REG_IP, &ip))
       xbt_die("Could not resolve IP");
   }
 
-  for (size_t i = 0; i != locations->size; ++i) {
-    mc_expression_t expression = locations->locations + i;
-    if ((expression->lowpc == NULL && expression->highpc == NULL)
-        || (c && ip >= (unw_word_t) expression->lowpc
-            && ip < (unw_word_t) expression->highpc)) {
-      return mc_dwarf_resolve_location(expression, object_info, c,
-                                       frame_pointer_address, snapshot, process_index);
-    }
+  mc_expression_t expression = mc_find_expression(locations, ip);
+  if (expression) {
+    mc_dwarf_resolve_location(location,
+                              expression, object_info, c,
+                              frame_pointer_address, snapshot, process_index);
+  } else {
+    xbt_die("Could not resolve location");
   }
-  xbt_die("Could not resolve location");
 }
 
 /** \brief Find the frame base of a given frame
@@ -458,8 +484,29 @@ uintptr_t mc_dwarf_resolve_locations(mc_location_list_t locations,
 void *mc_find_frame_base(dw_frame_t frame, mc_object_info_t object_info,
                          unw_cursor_t * unw_cursor)
 {
-  return (void *) mc_dwarf_resolve_locations(&frame->frame_base, object_info,
-                                             unw_cursor, NULL, NULL, -1);
+  s_mc_location_t location;
+  mc_dwarf_resolve_locations(&location,
+                             &frame->frame_base, object_info,
+                             unw_cursor, NULL, NULL, -1);
+  switch(mc_get_location_type(&location)) {
+  case MC_LOCATION_TYPE_ADDRESS:
+    return location.memory_location;
+
+  case MC_LOCATION_TYPE_REGISTER: {
+      // This is a special case.
+      // The register if not the location of the frame base
+      // (a frame base cannot be located in a register)
+      // Instead, DWARF defines this to mean that the register
+      // contains the address of the frame base.
+      unw_word_t word;
+      unw_get_reg(location.cursor, location.register_id, &word);
+      return (void*) word;
+    }
+
+  default:
+    xbt_die("Cannot handle non-address frame base");
+    return NULL; // Unreachable
+  }
 }
 
 void mc_dwarf_expression_clear(mc_expression_t expression)
index e87aec4..5be001b 100644 (file)
@@ -59,7 +59,6 @@ case 0x3a: return "DW_TAG_imported_module";
 case 0x3b: return "DW_TAG_unspecified_type";
 case 0x3c: return "DW_TAG_partial_unit";
 case 0x3d: return "DW_TAG_imported_unit";
-case 0x3e: return "DW_TAG_mutable_type";
 case 0x3f: return "DW_TAG_condition";
 case 0x40: return "DW_TAG_shared_type";
 case 0x41: return "DW_TAG_type_unit";
index cdbec20..5d163b1 100644 (file)
@@ -11,6 +11,9 @@
 #include <sys/mman.h>
 #include <libgen.h>
 
+#define UNW_LOCAL_ONLY
+#include <libunwind.h>
+
 #include "simgrid/sg_config.h"
 #include "../surf/surf_private.h"
 #include "../simix/smx_private.h"
@@ -24,140 +27,8 @@ XBT_LOG_NEW_CATEGORY(mc, "All MC categories");
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc,
                                 "Logging specific to MC (global)");
 
-/* Configuration support */
-e_mc_reduce_t mc_reduce_kind = e_mc_reduce_unset;
-
-int _sg_do_model_check = 0;
-int _sg_mc_checkpoint = 0;
-int _sg_mc_sparse_checkpoint = 0;
-int _sg_mc_soft_dirty = 0;
-char *_sg_mc_property_file = NULL;
-int _sg_mc_timeout = 0;
-int _sg_mc_hash = 0;
-int _sg_mc_max_depth = 1000;
-int _sg_mc_visited = 0;
-char *_sg_mc_dot_output_file = NULL;
-int _sg_mc_comms_determinism = 0;
-int _sg_mc_send_determinism = 0;
-int _sg_mc_safety = 0;
-int _sg_mc_liveness = 0;
-
 int user_max_depth_reached = 0;
 
-void _mc_cfg_cb_reduce(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a reduction strategy after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  char *val = xbt_cfg_get_string(_sg_cfg_set, name);
-  if (!strcasecmp(val, "none")) {
-    mc_reduce_kind = e_mc_reduce_none;
-  } else if (!strcasecmp(val, "dpor")) {
-    mc_reduce_kind = e_mc_reduce_dpor;
-  } else {
-    xbt_die("configuration option %s can only take 'none' or 'dpor' as a value",
-            name);
-  }
-}
-
-void _mc_cfg_cb_checkpoint(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a checkpointing value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_checkpoint = xbt_cfg_get_int(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_sparse_checkpoint(const char *name, int pos) {
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die("You are specifying a checkpointing value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_sparse_checkpoint = xbt_cfg_get_boolean(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_soft_dirty(const char *name, int pos) {
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die("You are specifying a soft dirty value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_soft_dirty = xbt_cfg_get_boolean(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_property(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a property after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_property_file = xbt_cfg_get_string(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_timeout(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a value to enable/disable timeout for wait requests after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_timeout = xbt_cfg_get_boolean(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_hash(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a value to enable/disable the use of global hash to speedup state comparaison, but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_hash = xbt_cfg_get_boolean(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_max_depth(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a max depth value after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_max_depth = xbt_cfg_get_int(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_visited(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a number of stored visited states after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_visited = xbt_cfg_get_int(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_dot_output(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a file name for a dot output of graph state after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_dot_output_file = xbt_cfg_get_string(_sg_cfg_set, name);
-}
-
-void _mc_cfg_cb_comms_determinism(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a value to enable/disable the detection of determinism in the communications schemes after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_comms_determinism = xbt_cfg_get_boolean(_sg_cfg_set, name);
-  mc_reduce_kind = e_mc_reduce_none;
-}
-
-void _mc_cfg_cb_send_determinism(const char *name, int pos)
-{
-  if (_sg_cfg_init_status && !_sg_do_model_check) {
-    xbt_die
-        ("You are specifying a value to enable/disable the detection of send-determinism in the communications schemes after the initialization (through MSG_config?), but model-checking was not activated at config time (through --cfg=model-check:1). This won't work, sorry.");
-  }
-  _sg_mc_send_determinism = xbt_cfg_get_boolean(_sg_cfg_set, name);
-  mc_reduce_kind = e_mc_reduce_none;
-}
-
 /* MC global data structures */
 mc_state_t mc_current_state = NULL;
 char mc_replay_mode = FALSE;
@@ -454,7 +325,7 @@ void MC_exit(void)
   //xbt_abort();
 }
 
-int SIMIX_pre_mc_random(smx_simcall_t simcall, int min, int max)
+int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max)
 {
 
   return simcall->mc_value;
@@ -478,10 +349,10 @@ void MC_wait_for_requests(void)
 
   while (!xbt_dynar_is_empty(simix_global->process_to_run)) {
     SIMIX_process_runall();
-    xbt_dynar_foreach(simix_global->process_that_ran, iter, process) {
+      xbt_dynar_foreach(simix_global->process_that_ran, iter, process) {
       req = &process->simcall;
       if (req->call != SIMCALL_NONE && !MC_request_is_visible(req))
-        SIMIX_simcall_enter(req, 0);
+        SIMIX_simcall_handle(req, 0);
     }
   }
 }
@@ -493,8 +364,7 @@ int MC_deadlock_check()
   if (xbt_swag_size(simix_global->process_list)) {
     deadlock = TRUE;
     xbt_swag_foreach(process, simix_global->process_list) {
-      if (process->simcall.call != SIMCALL_NONE
-          && MC_request_is_enabled(&process->simcall)) {
+      if (MC_request_is_enabled(&process->simcall)) {
         deadlock = FALSE;
         break;
       }
@@ -503,6 +373,31 @@ int MC_deadlock_check()
   return deadlock;
 }
 
+void mc_update_comm_pattern(mc_call_type call_type, smx_simcall_t req, int value, xbt_dynar_t pattern) {
+  switch(call_type) {
+  case MC_CALL_TYPE_NONE:
+    break;
+  case MC_CALL_TYPE_SEND:
+  case MC_CALL_TYPE_RECV:
+    get_comm_pattern(pattern, req, call_type);
+    break;
+  case MC_CALL_TYPE_WAIT:
+    {
+      smx_synchro_t current_comm = NULL;
+      if (call_type == MC_CALL_TYPE_WAIT)
+        current_comm = simcall_comm_wait__get__comm(req);
+      else
+        current_comm = xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_synchro_t);
+      // First wait only must be considered:
+      if (current_comm->comm.refcount == 1)
+        complete_comm_pattern(pattern, current_comm);
+      break;
+    }
+  default:
+    xbt_die("Unexpected call type %i", (int)call_type);
+  }
+}
+
 /**
  * \brief Re-executes from the state at position start all the transitions indicated by
  *        a given model-checker stack.
@@ -513,13 +408,12 @@ void MC_replay(xbt_fifo_t stack, int start)
 {
   int raw_mem = (mmalloc_get_current_heap() == mc_heap);
 
-  int value, i = 1, count = 1, call = 0, j;
+  int value, i = 1, count = 1, j;
   char *req_str;
   smx_simcall_t req = NULL, saved_req = NULL;
   xbt_fifo_item_t item, start_item;
   mc_state_t state;
   smx_process_t process = NULL;
-  smx_action_t current_comm;
 
   XBT_DEBUG("**** Begin Replay ****");
 
@@ -595,39 +489,19 @@ void MC_replay(xbt_fifo_t stack, int start)
       }
 
       /* TODO : handle test and testany simcalls */
+      mc_call_type call = MC_CALL_TYPE_NONE;
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism) {
-        if (req->call == SIMCALL_COMM_ISEND)
-          call = 1;
-        else if (req->call == SIMCALL_COMM_IRECV)
-          call = 2;
-        else if (req->call == SIMCALL_COMM_WAIT)
-          call = 3;
-        else if (req->call == SIMCALL_COMM_WAITANY)
-          call = 4;
+        call = mc_get_call_type(req);
       }
 
-      SIMIX_simcall_enter(req, value);
+      SIMIX_simcall_handle(req, value);
 
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism) {
         MC_SET_MC_HEAP;
-        if (call == 1) { /* Send */
-          get_comm_pattern(communications_pattern, req, call);
-        } else if (call == 2) { /* Recv */
-          get_comm_pattern(communications_pattern, req, call);
-        } else if (call == 3) { /* Wait */
-          current_comm = simcall_comm_wait__get__comm(req);
-          if (current_comm->comm.refcount == 1)  /* First wait only must be considered */
-            complete_comm_pattern(communications_pattern, current_comm);
-        } else if (call == 4) { /* WaitAny */
-          current_comm = xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value, smx_action_t);
-          if (current_comm->comm.refcount == 1) /* First wait only must be considered */
-            complete_comm_pattern(communications_pattern, current_comm);
-        }
+        mc_update_comm_pattern(call, req, value, communications_pattern);
         MC_SET_STD_HEAP;
-        call = 0;
       }
 
-
       MC_wait_for_requests();
 
       count++;
@@ -715,7 +589,7 @@ void MC_replay_liveness(xbt_fifo_t stack, int all_stack)
 
         }
 
-        SIMIX_simcall_enter(req, value);
+        SIMIX_simcall_handle(req, value);
         MC_wait_for_requests();
       }
 
@@ -953,3 +827,33 @@ void MC_automaton_new_propositional_symbol(const char *id, void *fct)
     MC_SET_MC_HEAP;
 
 }
+
+void MC_dump_stacks(FILE* file)
+{
+  int raw_mem_set = (mmalloc_get_current_heap() == mc_heap);
+  MC_SET_MC_HEAP;
+
+  int nstack = 0;
+  stack_region_t current_stack;
+  unsigned cursor;
+  xbt_dynar_foreach(stacks_areas, cursor, current_stack) {
+    unw_context_t * context = (unw_context_t *)current_stack->context;
+    fprintf(file, "Stack %i:\n", nstack);
+
+    int nframe = 0;
+    char buffer[100];
+    unw_cursor_t c;
+    unw_init_local (&c, context);
+    unw_word_t off;
+    do {
+      const char * name = !unw_get_proc_name(&c, buffer, 100, &off) ? buffer : "?";
+      fprintf(file, "  %i: %s\n", nframe, name);
+      ++nframe;
+    } while(unw_step(&c));
+
+    ++nstack;
+  }
+
+  if (raw_mem_set)
+    MC_SET_MC_HEAP;
+}
index 0105f37..d4afe68 100644 (file)
@@ -13,11 +13,6 @@ SG_BEGIN_DECL()
 
 typedef struct s_mc_snapshot *mc_snapshot_t;
 
-/* These are the MC-specific simcalls, that smx_user needs to see */
-mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall);
-int SIMIX_pre_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
-int SIMIX_pre_mc_random(smx_simcall_t simcall, int min, int max);
-
 SG_END_DECL()
 
 #endif
index 15e552a..42d7c89 100644 (file)
@@ -252,7 +252,7 @@ void MC_pre_modelcheck_liveness(void)
       initial_pair->search_cycle = 0;
 
       xbt_fifo_unshift(mc_stack, initial_pair);
-
+      
       MC_SET_STD_HEAP;
 
       MC_modelcheck_liveness();
@@ -298,7 +298,6 @@ void MC_modelcheck_liveness()
 
   int value;
   smx_simcall_t req = NULL;
-  char *req_str;
 
   xbt_automaton_transition_t transition_succ;
   unsigned int cursor = 0;
@@ -370,12 +369,7 @@ void MC_modelcheck_liveness()
           }
           MC_SET_STD_HEAP;
 
-          /* Debug information */
-          if (XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)) {
-            req_str = MC_request_to_string(req, value);
-            XBT_DEBUG("Execute: %s", req_str);
-            xbt_free(req_str);
-          }
+          MC_LOG_REQUEST(mc_liveness, req, value);
 
           MC_SET_MC_HEAP;
           if (dot_output != NULL) {
@@ -391,7 +385,7 @@ void MC_modelcheck_liveness()
           mc_stats->executed_transitions++;
 
           /* Answer the request */
-          SIMIX_simcall_enter(req, value);
+          SIMIX_simcall_handle(req, value);
 
           /* Wait for requests (schedules processes) */
           MC_wait_for_requests();
index 77d9284..655418d 100644 (file)
@@ -25,7 +25,7 @@ void MC_memory_init()
   std_heap = mmalloc_get_default_md();
   xbt_assert(std_heap != NULL);
 
-#if defined HAVE_GNU_LD && !defined MMALLOC_WANT_OVERRIDE_LEGACY
+#if 0 && defined HAVE_GNU_LD && !defined MMALLOC_WANT_OVERRIDE_LEGACY
   /* use the system malloc for the model-checker data */
   mc_heap = NULL;
 #else
index 1147044..a44df30 100644 (file)
@@ -95,6 +95,13 @@ typedef struct s_mc_snapshot_ignored_data {
   void* data;
 } s_mc_snapshot_ignored_data_t, *mc_snapshot_ignored_data_t;
 
+typedef struct s_fd_infos{
+  char *filename;
+  int number;
+  off_t current_position;
+  int flags;
+}s_fd_infos_t, *fd_infos_t;
+
 typedef struct s_mc_snapshot{
   size_t heap_bytes_used;
   mc_mem_region_t regions[NB_REGIONS];
@@ -106,8 +113,11 @@ typedef struct s_mc_snapshot{
   xbt_dynar_t to_ignore;
   uint64_t hash;
   xbt_dynar_t ignored_data;
+  int total_fd;
+  fd_infos_t *current_fd;
 } s_mc_snapshot_t;
 
+
 /** @brief Process index used when no process is available
  *
  *  The expected behaviour is that if a process index is needed it will fail.
@@ -247,9 +257,23 @@ char* MC_request_to_string(smx_simcall_t req, int value);
 unsigned int MC_request_testany_fail(smx_simcall_t req);
 /*int MC_waitany_is_enabled_by_comm(smx_req_t req, unsigned int comm);*/
 int MC_request_is_visible(smx_simcall_t req);
+
+/** Can this requests can be executed.
+ *
+ *  Most requests are always enabled but WAIT and WAITANY
+ *  are not always enabled: a WAIT where the communication does not
+ *  have both a source and a destination yet is not enabled
+ *  (unless timeout is enabled in the wait and enabeld in SimGridMC).
+ */
 int MC_request_is_enabled(smx_simcall_t req);
 int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx);
+
+/** Is the process ready to execute its simcall?
+ *
+ *  This is true if the request associated with the process is ready.
+ */
 int MC_process_is_enabled(smx_process_t process);
+
 char *MC_request_get_dot_output(smx_simcall_t req, int value);
 
 
@@ -276,7 +300,7 @@ typedef struct mc_procstate{
 typedef struct mc_state {
   unsigned long max_pid;            /* Maximum pid at state's creation time */
   mc_procstate_t proc_status;       /* State's exploration status by process */
-  s_smx_action_t internal_comm;     /* To be referenced by the internal_req */
+  s_smx_synchro_t internal_comm;     /* To be referenced by the internal_req */
   s_smx_simcall_t internal_req;         /* Internal translation of request */
   s_smx_simcall_t executed_req;         /* The executed request of the state */
   int req_num;                      /* The request number (in the case of a
@@ -499,7 +523,6 @@ extern mc_object_info_t mc_object_infos[2];
 extern size_t mc_object_infos_size;
 
 void MC_find_object_address(memory_map_t maps, mc_object_info_t result);
-void MC_post_process_types(mc_object_info_t info);
 void MC_post_process_object_info(mc_object_info_t info);
 
 // ***** Expressions
@@ -518,8 +541,49 @@ typedef struct s_mc_location_list {
   mc_expression_t locations;
 } s_mc_location_list_t, *mc_location_list_t;
 
-uintptr_t mc_dwarf_resolve_location(mc_expression_t expression, mc_object_info_t object_info, unw_cursor_t* c, void* frame_pointer_address, mc_snapshot_t snapshot, int process_index);
-uintptr_t mc_dwarf_resolve_locations(mc_location_list_t locations, mc_object_info_t object_info, unw_cursor_t* c, void* frame_pointer_address, mc_snapshot_t snapshot, int process_index);
+/** A location is either a location in memory of a register location
+ *
+ *  Usage:
+ *
+ *    * mc_dwarf_resolve_locations or mc_dwarf_resolve_location is used
+ *      to find the location of a given location expression or location list;
+ *
+ *    * mc_get_location_type MUST be used to find the location type;
+ *
+ *    * for MC_LOCATION_TYPE_ADDRESS, memory_address is the resulting address
+ *
+ *    * for MC_LOCATION_TYPE_REGISTER, unw_get_reg(l.cursor, l.register_id, value)
+ *        and unw_get_reg(l.cursor, l.register_id, value) can be used to read/write
+ *        the value.
+ *  </ul>
+ */
+typedef struct s_mc_location {
+  void* memory_location;
+  unw_cursor_t* cursor;
+  int register_id;
+} s_mc_location_t, *mc_location_t;
+
+/** Type of a given location
+ *
+ *  Use `mc_get_location_type(location)` to find the type.
+ * */
+typedef enum mc_location_type {
+  MC_LOCATION_TYPE_ADDRESS,
+  MC_LOCATION_TYPE_REGISTER
+} mc_location_type;
+
+/** Find the type of a location */
+static inline __attribute__ ((always_inline))
+enum mc_location_type mc_get_location_type(mc_location_t location) {
+  if (location->cursor) {
+    return MC_LOCATION_TYPE_REGISTER;
+  } else {
+    return MC_LOCATION_TYPE_ADDRESS;
+  }
+}
+
+void mc_dwarf_resolve_location(mc_location_t location, mc_expression_t expression, mc_object_info_t object_info, unw_cursor_t* c, void* frame_pointer_address, mc_snapshot_t snapshot, int process_index);
+void mc_dwarf_resolve_locations(mc_location_t location, mc_location_list_t locations, mc_object_info_t object_info, unw_cursor_t* c, void* frame_pointer_address, mc_snapshot_t snapshot, int process_index);
 
 void mc_dwarf_expression_clear(mc_expression_t expression);
 void mc_dwarf_expression_init(mc_expression_t expression, size_t len, Dwarf_Op* ops);
@@ -654,7 +718,7 @@ typedef struct s_local_variable{
 
 typedef struct s_mc_comm_pattern{
   int num;
-  smx_action_t comm;
+  smx_synchro_t comm;
   e_smx_comm_type_t type;
   unsigned long src_proc;
   unsigned long dst_proc;
@@ -669,8 +733,33 @@ extern xbt_dynar_t initial_communications_pattern;
 extern xbt_dynar_t communications_pattern;
 extern xbt_dynar_t incomplete_communications_pattern;
 
-void get_comm_pattern(xbt_dynar_t communications_pattern, smx_simcall_t request, int call);
-void complete_comm_pattern(xbt_dynar_t list, smx_action_t comm);
+// Can we use the SIMIX syscall for this?
+typedef enum mc_call_type {
+  MC_CALL_TYPE_NONE,
+  MC_CALL_TYPE_SEND,
+  MC_CALL_TYPE_RECV,
+  MC_CALL_TYPE_WAIT,
+  MC_CALL_TYPE_WAITANY,
+} mc_call_type;
+
+static inline mc_call_type mc_get_call_type(smx_simcall_t req) {
+  switch(req->call) {
+  case SIMCALL_COMM_ISEND:
+    return MC_CALL_TYPE_SEND;
+  case SIMCALL_COMM_IRECV:
+    return MC_CALL_TYPE_RECV;
+  case SIMCALL_COMM_WAIT:
+    return MC_CALL_TYPE_WAIT;
+  case SIMCALL_COMM_WAITANY:
+    return MC_CALL_TYPE_WAITANY;
+  default:
+    return MC_CALL_TYPE_NONE;
+  }
+}
+
+void get_comm_pattern(xbt_dynar_t communications_pattern, smx_simcall_t request, mc_call_type call_type);
+void mc_update_comm_pattern(mc_call_type call_type, smx_simcall_t request, int value, xbt_dynar_t current_pattern);
+void complete_comm_pattern(xbt_dynar_t list, smx_synchro_t comm);
 void MC_pre_modelcheck_comm_determinism(void);
 void MC_modelcheck_comm_determinism(void);
 
@@ -813,6 +902,22 @@ void* mc_snapshot_read_pointer_region(void* addr, mc_mem_region_t region)
   return *(void**) mc_snapshot_read_region(addr, region, &res, sizeof(void*));
 }
 
+#define MC_LOG_REQUEST(log, req, value) \
+  if (XBT_LOG_ISENABLED(log, xbt_log_priority_debug)) { \
+    char* req_str = MC_request_to_string(req, value); \
+    XBT_DEBUG("Execute: %s", req_str); \
+    xbt_free(req_str); \
+  }
+
+/** @brief Dump the stacks of the application processes
+ *
+ *   This functions is currently not used but it is quite convenient
+ *   to call from the debugger.
+ *
+ *   Does not work when an application thread is running.
+ */
+void MC_dump_stacks(FILE* file);
+
 SG_END_DECL()
 
 #endif
index cb13045..4d8154e 100644 (file)
@@ -228,7 +228,7 @@ static char *buff_size_to_string(size_t buff_size)
 char *MC_request_to_string(smx_simcall_t req, int value)
 {
   char *type = NULL, *args = NULL, *str = NULL, *p = NULL, *bs = NULL;
-  smx_action_t act = NULL;
+  smx_synchro_t act = NULL;
   size_t size = 0;
 
   switch (req->call) {
@@ -305,7 +305,7 @@ char *MC_request_to_string(smx_simcall_t req, int value)
     if (!xbt_dynar_is_empty(simcall_comm_waitany__get__comms(req))) {
       p = pointer_to_string(xbt_dynar_get_as
                             (simcall_comm_waitany__get__comms(req), value,
-                             smx_action_t));
+                             smx_synchro_t));
       args =
           bprintf("comm=%s (%d of %lu)", p, value + 1,
                   xbt_dynar_length(simcall_comm_waitany__get__comms(req)));
@@ -367,7 +367,7 @@ char *MC_request_to_string(smx_simcall_t req, int value)
 unsigned int MC_request_testany_fail(smx_simcall_t req)
 {
   unsigned int cursor;
-  smx_action_t action;
+  smx_synchro_t action;
 
   xbt_dynar_foreach(simcall_comm_testany__get__comms(req), cursor, action) {
     if (action->comm.src_proc && action->comm.dst_proc)
@@ -393,51 +393,44 @@ int MC_request_is_visible(smx_simcall_t req)
 int MC_request_is_enabled(smx_simcall_t req)
 {
   unsigned int index = 0;
-  smx_action_t act;
+  smx_synchro_t act = 0;
 
   switch (req->call) {
+  case SIMCALL_NONE:
+    return FALSE;
 
   case SIMCALL_COMM_WAIT:
     /* FIXME: check also that src and dst processes are not suspended */
-
-    /* If it has a timeout it will be always be enabled, because even if the
-     * communication is not ready, it can timeout and won't block.
-     * On the other hand if it hasn't a timeout, check if the comm is ready.*/
+    act = simcall_comm_wait__get__comm(req);
     if (simcall_comm_wait__get__timeout(req) >= 0) {
-      if (_sg_mc_timeout == 1) {
+      /* If it has a timeout it will be always be enabled, because even if the
+       * communication is not ready, it can timeout and won't block. */
+      if (_sg_mc_timeout == 1)
         return TRUE;
-      } else {
-        act = simcall_comm_wait__get__comm(req);
-        return (act->comm.src_proc && act->comm.dst_proc);
-      }
     } else {
-      act = simcall_comm_wait__get__comm(req);
+      /* On the other hand if it hasn't a timeout, check if the comm is ready.*/
       if (act->comm.detached && act->comm.src_proc == NULL
           && act->comm.type == SIMIX_COMM_READY)
         return (act->comm.dst_proc != NULL);
-      return (act->comm.src_proc && act->comm.dst_proc);
     }
-    break;
+    return (act->comm.src_proc && act->comm.dst_proc);
 
   case SIMCALL_COMM_WAITANY:
     /* Check if it has at least one communication ready */
-    xbt_dynar_foreach(simcall_comm_waitany__get__comms(req), index, act) {
-      if (act->comm.src_proc && act->comm.dst_proc) {
+    xbt_dynar_foreach(simcall_comm_waitany__get__comms(req), index, act)
+      if (act->comm.src_proc && act->comm.dst_proc)
         return TRUE;
-      }
-    }
     return FALSE;
-    break;
 
   default:
-    /* The rest of the request are always enabled */
+    /* The rest of the requests are always enabled */
     return TRUE;
   }
 }
 
 int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
 {
-  smx_action_t act;
+  smx_synchro_t act;
 
   switch (req->call) {
 
@@ -450,14 +443,14 @@ int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
   case SIMCALL_COMM_WAITANY:
     act =
         xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), idx,
-                         smx_action_t);
+                         smx_synchro_t);
     return (act->comm.src_proc && act->comm.dst_proc);
     break;
 
   case SIMCALL_COMM_TESTANY:
     act =
         xbt_dynar_get_as(simcall_comm_testany__get__comms(req), idx,
-                         smx_action_t);
+                         smx_synchro_t);
     return (act->comm.src_proc && act->comm.dst_proc);
     break;
 
@@ -468,18 +461,14 @@ int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
 
 int MC_process_is_enabled(smx_process_t process)
 {
-  if (process->simcall.call != SIMCALL_NONE
-      && MC_request_is_enabled(&process->simcall))
-    return TRUE;
-
-  return FALSE;
+  return MC_request_is_enabled(&process->simcall);
 }
 
 char *MC_request_get_dot_output(smx_simcall_t req, int value)
 {
 
   char *str = NULL, *label = NULL;
-  smx_action_t act = NULL;
+  smx_synchro_t act = NULL;
 
   switch (req->call) {
   case SIMCALL_COMM_ISEND:
index 7807097..486b320 100644 (file)
@@ -117,17 +117,13 @@ void MC_modelcheck_safety(void)
     if (xbt_fifo_size(mc_stack) <= _sg_mc_max_depth && !user_max_depth_reached
         && (req = MC_state_get_request(state, &value)) && visited_state == NULL) {
 
-      /* Debug information */
-      if (XBT_LOG_ISENABLED(mc_safety, xbt_log_priority_debug)) {
-        req_str = MC_request_to_string(req, value);
-        XBT_DEBUG("Execute: %s", req_str);
-        xbt_free(req_str);
-      }
+      MC_LOG_REQUEST(mc_safety, req, value);
 
-      MC_SET_MC_HEAP;
-      if (dot_output != NULL)
+      if (dot_output != NULL) {
+        MC_SET_MC_HEAP;
         req_str = MC_request_get_dot_output(req, value);
-      MC_SET_STD_HEAP;
+        MC_SET_STD_HEAP;
+      }
 
       MC_state_set_executed_request(state, req, value);
       mc_stats->executed_transitions++;
@@ -141,7 +137,7 @@ void MC_modelcheck_safety(void)
       }
 
       /* Answer the request */
-      SIMIX_simcall_enter(req, value);
+      SIMIX_simcall_handle(req, value);
 
       /* Wait for requests (schedules processes) */
       MC_wait_for_requests();
index d48d10c..4724523 100644 (file)
@@ -83,7 +83,7 @@ void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req,
     state->internal_req.issuer = req->issuer;
     state->internal_comm =
         *xbt_dynar_get_as(simcall_comm_waitany__get__comms(req), value,
-                          smx_action_t);
+                          smx_synchro_t);
     simcall_comm_wait__set__comm(&state->internal_req, &state->internal_comm);
     simcall_comm_wait__set__timeout(&state->internal_req, 0);
     break;
@@ -95,7 +95,7 @@ void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req,
     if (value > 0)
       state->internal_comm =
           *xbt_dynar_get_as(simcall_comm_testany__get__comms(req), value,
-                            smx_action_t);
+                            smx_synchro_t);
 
     simcall_comm_test__set__comm(&state->internal_req, &state->internal_comm);
     simcall_comm_test__set__result(&state->internal_req, value);
@@ -150,7 +150,7 @@ smx_simcall_t MC_state_get_request(mc_state_t state, int *value)
   smx_process_t process = NULL;
   mc_procstate_t procstate = NULL;
   unsigned int start_count;
-  smx_action_t act = NULL;
+  smx_synchro_t act = NULL;
 
   xbt_swag_foreach(process, simix_global->process_list) {
     procstate = &state->proc_status[process->pid];
index 3171f4d..825b71b 100644 (file)
@@ -74,7 +74,7 @@ void TRACE_msg_vm_start(msg_vm_t vm)
 
     container_t vm_container = PJ_container_get (instr_vm_id(vm, str, len));
     type_t type = PJ_type_get ("MSG_VM_STATE", vm_container->type);
-    val_t value = PJ_value_get ("start", type);
+    val_t value = PJ_value_get_or_new ("start", "0 0 1", type); //start is blue
     new_pajePushState (MSG_get_clock(), vm_container, type, value);
   }
 
@@ -100,7 +100,7 @@ void TRACE_msg_vm_suspend(msg_vm_t vm)
 
     container_t vm_container = PJ_container_get (instr_vm_id(vm, str, len));
     type_t type = PJ_type_get ("MSG_VM_STATE", vm_container->type);
-    val_t value = PJ_value_get ("suspend", type);
+    val_t value = PJ_value_get_or_new ("suspend", "1 0 0", type); //suspend is red
     new_pajePushState (MSG_get_clock(), vm_container, type, value);
   }
 }
@@ -125,7 +125,7 @@ void TRACE_msg_vm_save(msg_vm_t vm)
 
     container_t vm_container = PJ_container_get (instr_vm_id(vm, str, len));
     type_t type = PJ_type_get ("MSG_VM_STATE", vm_container->type);
-    val_t value = PJ_value_get ("save", type);
+    val_t value = PJ_value_get_or_new ("save", "0 1 0", type); //save is green
     new_pajePushState (MSG_get_clock(), vm_container, type, value);
   }
 }
index 73c91df..c2e853b 100644 (file)
@@ -399,7 +399,7 @@ MSG_task_receive_ext_bounded(msg_task_t * task, const char *alias, double timeou
  */
 static XBT_INLINE
 msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
-                                   int (*match_fun)(void*,void*, smx_action_t),
+                                   int (*match_fun)(void*,void*, smx_synchro_t),
                                    void *match_data, void_f_pvoid_t cleanup,
                                    int detached)
 {
@@ -436,7 +436,7 @@ msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *alias,
   msg_global->sent_msg++;
 
   /* Send it by calling SIMIX network layer */
-  smx_action_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->message_size,
+  smx_synchro_t act = simcall_comm_isend(SIMIX_process_self(), mailbox, t_simdata->message_size,
                                         t_simdata->rate, task, sizeof(void *),
                                         match_fun, cleanup, NULL, match_data,detached);
   t_simdata->comm = act; /* FIXME: is the field t_simdata->comm still useful? */
@@ -517,7 +517,7 @@ msg_comm_t MSG_task_isend_bounded(msg_task_t task, const char *alias,
  */
 msg_comm_t MSG_task_isend_with_matching(msg_task_t task, const char *alias,
                                         int (*match_fun)(void*, void*,
-                                                         smx_action_t),
+                                                         smx_synchro_t),
                                         void *match_data)
 {
   return MSG_task_isend_internal(task, alias, match_fun, match_data, NULL, 0);
@@ -676,7 +676,7 @@ int MSG_comm_testany(xbt_dynar_t comms)
   int finished_index = -1;
 
   /* create the equivalent dynar with SIMIX objects */
-  xbt_dynar_t s_comms = xbt_dynar_new(sizeof(smx_action_t), NULL);
+  xbt_dynar_t s_comms = xbt_dynar_new(sizeof(smx_synchro_t), NULL);
   msg_comm_t comm;
   unsigned int cursor;
   xbt_dynar_foreach(comms, cursor, comm) {
@@ -799,7 +799,7 @@ int MSG_comm_waitany(xbt_dynar_t comms)
   int finished_index = -1;
 
   /* create the equivalent dynar with SIMIX objects */
-  xbt_dynar_t s_comms = xbt_dynar_new(sizeof(smx_action_t), NULL);
+  xbt_dynar_t s_comms = xbt_dynar_new(sizeof(smx_synchro_t), NULL);
   msg_comm_t comm;
   unsigned int cursor;
   xbt_dynar_foreach(comms, cursor, comm) {
@@ -876,7 +876,7 @@ msg_task_t MSG_comm_get_task(msg_comm_t comm)
  * \param buff the data copied
  * \param buff_size size of the buffer
  */
-void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_size) {
+void MSG_comm_copy_data_from_SIMIX(smx_synchro_t comm, void* buff, size_t buff_size) {
 
   // copy the task
   SIMIX_comm_copy_pointer_callback(comm, buff, buff_size);
index fce4953..53f99df 100644 (file)
@@ -29,7 +29,7 @@ int MSG_mailbox_is_empty(msg_mailbox_t mailbox)
 
 msg_task_t MSG_mailbox_get_head(msg_mailbox_t mailbox)
 {
-  smx_action_t comm = simcall_rdv_get_head(mailbox);
+  smx_synchro_t comm = simcall_rdv_get_head(mailbox);
 
   if (!comm)
     return NULL;
@@ -206,7 +206,7 @@ MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
 
   /* Try to send it by calling SIMIX network layer */
   TRY {
-    smx_action_t comm = NULL; /* MC needs the comm to be set to NULL during the simix call  */
+    smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simix call  */
     comm = simcall_comm_isend(SIMIX_process_self(), mailbox,t_simdata->message_size,
                                   t_simdata->rate, task, sizeof(void *),
                                   NULL, NULL, NULL, task, 0);
diff --git a/src/msg/msg_new_api.c b/src/msg/msg_new_api.c
deleted file mode 100644 (file)
index 0bc6ba8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright (c) 2004-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. */
-
-#include "msg_private.h"
-#include "xbt/log.h"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_new_API, msg,
-                                "Logging specific to MSG (new_API)");
-
-
-/* ****************************************************************************************** */
-/* TUTORIAL: New API                                                                        */
-/* All functions for the API                                                                  */
-/* ****************************************************************************************** */
-int MSG_new_API_fct(const char* param1, double param2)
-{
-  int result = simcall_new_api_fct(param1, param2);
-  return result;
-}
index d461ecc..c6c17a3 100644 (file)
@@ -39,8 +39,8 @@ SG_BEGIN_DECL()
   ptr = _xbt_ex_t; } while(0)
 
 typedef struct simdata_task {
-  smx_action_t compute;         /* SIMIX modeling of computation */
-  smx_action_t comm;            /* SIMIX modeling of communication */
+  smx_synchro_t compute;         /* SIMIX modeling of computation */
+  smx_synchro_t comm;            /* SIMIX modeling of communication */
   double message_size;          /* Data size */
   double computation_amount;    /* Computation size */
   msg_process_t sender;
@@ -83,7 +83,7 @@ typedef struct simdata_process {
 #ifdef MSG_USE_DEPRECATED
   m_channel_t put_channel;      /* used for debugging purposes */
 #endif
-  smx_action_t waiting_action;
+  smx_synchro_t waiting_action;
   msg_task_t waiting_task;
   char **argv;                  /* arguments table if any */
   int argc;                     /* arguments number if any */
@@ -103,7 +103,7 @@ typedef struct process_arg {
 } s_process_arg_t, *process_arg_t;
 
 typedef struct msg_comm {
-  smx_action_t s_comm;          /* SIMIX communication object encapsulated (the same for both processes) */
+  smx_synchro_t s_comm;          /* SIMIX communication object encapsulated (the same for both processes) */
   msg_task_t task_sent;           /* task sent (NULL for the receiver) */
   msg_task_t *task_received;      /* where the task will be received (NULL for the sender) */
   msg_error_t status;           /* status of the communication once finished */
@@ -167,7 +167,7 @@ void MSG_process_create_from_SIMIX(smx_process_t *process, const char *name,
                                    int argc, char **argv,
                                    xbt_dict_t properties, int auto_restart,
                                    smx_process_t parent_process);
-void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_size);
+void MSG_comm_copy_data_from_SIMIX(smx_synchro_t comm, void* buff, size_t buff_size);
 
 void MSG_post_create_environment(void);
 
index 537364d..2488dac 100644 (file)
@@ -266,7 +266,7 @@ void MSG_task_set_name(msg_task_t task, const char *name)
  */
 msg_error_t MSG_task_destroy(msg_task_t task)
 {
-  smx_action_t action = NULL;
+  smx_synchro_t action = NULL;
   xbt_assert((task != NULL), "Invalid parameter");
 
   if (task->simdata->isused) {
@@ -535,7 +535,7 @@ void MSG_task_set_affinity(msg_task_t task, msg_host_t host, unsigned long mask)
   }
 
   {
-    smx_action_t compute = task->simdata->compute;
+    smx_synchro_t compute = task->simdata->compute;
     msg_host_t host_now = compute->execution.host;  // simix_private.h is necessary
     if (host_now != host) {
       /* task is not yet executed on this host */
index 301b65c..5591e08 100644 (file)
@@ -75,7 +75,7 @@ void MSG_vm_set_property_value(msg_vm_t vm, const char *name, void *value, void_
 
 msg_vm_t MSG_vm_get_by_name(const char *name)
 {
-       return MSG_get_host_by_name(name);
+  return MSG_get_host_by_name(name);
 }
 
 /** \ingroup m_vm_management
@@ -339,8 +339,6 @@ static inline char *get_mig_task_name(msg_vm_t vm, msg_host_t src_pm, msg_host_t
   return bprintf("__task_mig_stage%d:%s(%s-%s)", stage, vm_name, src_pm_name, dst_pm_name);
 }
 
-static void launch_deferred_exec_process(msg_host_t host, double computation, double prio);
-
 
 struct migration_session {
   msg_vm_t vm;
@@ -365,29 +363,22 @@ static int migration_rx_fun(int argc, char *argv[])
 
   s_ws_params_t params;
   simcall_host_get_params(ms->vm, &params);
-  const double xfer_cpu_overhead = params.xfer_cpu_overhead;
 
   int need_exit = 0;
 
   char *finalize_task_name = get_mig_task_name(ms->vm, ms->src_pm, ms->dst_pm, 3);
 
-  int ret = 0; 
+  int ret = 0;
   for (;;) {
     msg_task_t task = NULL;
     ret = MSG_task_recv(&task, ms->mbox);
     {
-      double received ;
-      if (ret == MSG_OK)
-       received = MSG_task_get_data_size(task);
-      else{
-       // An error occured, clean the code and return
+      if (ret != MSG_OK) {
+        // An error occured, clean the code and return
         // The owner did not change, hence the task should be only destroyed on the other side
         xbt_free(finalize_task_name);
-         return 0;
+        return 0;
       }
-      /* TODO: clean up */
-      // const double alpha = 0.22L * 1.0E8 / (80L * 1024 * 1024);
-      launch_deferred_exec_process(ms->vm, received * xfer_cpu_overhead, 1);
     }
 
     if (strcmp(task->name, finalize_task_name) == 0)
@@ -399,14 +390,14 @@ static int migration_rx_fun(int argc, char *argv[])
       break;
   }
 
-  // Here Stage 1, 2  and 3 have been performed. 
+  // Here Stage 1, 2  and 3 have been performed.
   // Hence complete the migration
 
   // Copy the reference to the vm (if SRC crashes now, do_migration will free ms)
   // This is clearly ugly but I (Adrien) need more time to do something cleaner (actually we should copy the whole ms structure at the begining and free it at the end of each function)
-   msg_vm_t vm = ms->vm; 
-   msg_host_t src_pm = ms->src_pm; 
-   msg_host_t dst_pm = ms-> dst_pm; 
+   msg_vm_t vm = ms->vm;
+   msg_host_t src_pm = ms->src_pm;
+   msg_host_t dst_pm = ms-> dst_pm;
    msg_host_priv_t priv = msg_host_resource_priv(vm);
 
 // TODO: we have an issue, if the DST node is turning off during the three next calls, then the VM is in an inconsistent state
@@ -416,7 +407,7 @@ static int migration_rx_fun(int argc, char *argv[])
 
   /* Update the vm location */
   simcall_vm_migrate(vm, dst_pm);
-  
   /* Resume the VM */
   simcall_vm_resume(vm);
 
@@ -437,7 +428,7 @@ static int migration_rx_fun(int argc, char *argv[])
    #ifdef HAVE_TRACING
     TRACE_msg_vm_change_host(ms->vm, ms->src_pm, ms->dst_pm);
    #endif
-  
+
   }
   // Inform the SRC that the migration has been correctly performed
   {
@@ -446,13 +437,13 @@ static int migration_rx_fun(int argc, char *argv[])
     msg_error_t ret = MSG_task_send(task, ms->mbox_ctl);
     // xbt_assert(ret == MSG_OK);
     if(ret == MSG_HOST_FAILURE){
-    // The DST has crashed, this is a problem has the VM since we are not sure whether SRC is considering that the VM has been correctly migrated on the DST node
-    // TODO What does it mean ? What should we do ? 
-     MSG_task_destroy(task);
+      // The DST has crashed, this is a problem has the VM since we are not sure whether SRC is considering that the VM has been correctly migrated on the DST node
+      // TODO What does it mean ? What should we do ?
+      MSG_task_destroy(task);
     } else if(ret == MSG_TRANSFER_FAILURE){
-    // The SRC has crashed, this is not a problem has the VM has been correctly migrated on the DST node
-       MSG_task_destroy(task);
-     }
+      // The SRC has crashed, this is not a problem has the VM has been correctly migrated on the DST node
+      MSG_task_destroy(task);
+    }
 
     xbt_free(task_name);
   }
@@ -536,7 +527,7 @@ static double lookup_computed_flop_counts(msg_vm_t vm, int stage_for_fancy_debug
   xbt_dict_foreach(priv->dp_objs, cursor, key, dp) {
     double remaining = MSG_task_get_remaining_computation(dp->task);
 
-        double clock = MSG_get_clock();
+    double clock = MSG_get_clock();
 
     // total += calc_updated_pages(key, vm, dp, remaining, clock);
     total += get_computed(key, vm, dp, remaining, clock);
@@ -614,256 +605,12 @@ void MSG_host_del_task(msg_host_t host, msg_task_t task)
 }
 
 
-static int deferred_exec_fun(int argc, char *argv[])
-{
-  xbt_assert(argc == 3);
-  const char *comp_str = argv[1];
-  double computaion = atof(comp_str);
-  const char *prio_str = argv[2];
-  double prio = atof(prio_str);
-
-  msg_task_t task = MSG_task_create("__task_deferred", computaion, 0, NULL);
-  // XBT_INFO("exec deferred %f", computation);
-
-  /* dpt is the results of the VM activity */
-  MSG_task_set_priority(task, prio);
-  MSG_task_execute(task);
-
-
-
-  MSG_task_destroy(task);
-
-  return 0;
-}
-
-static void launch_deferred_exec_process(msg_host_t host, double computation, double prio)
-{
-  char *pr_name = bprintf("__pr_deferred_exec_%s", MSG_host_get_name(host));
-
-  int nargvs = 4;
-  char **argv = xbt_new(char *, nargvs);
-  argv[0] = pr_name;
-  argv[1] = bprintf("%f", computation);
-  argv[2] = bprintf("%f", prio);
-  argv[3] = NULL;
-
-  MSG_process_create_with_arguments(pr_name, deferred_exec_fun, NULL, host, nargvs - 1, argv);
-}
-
-
-static int task_tx_overhead_fun(int argc, char *argv[])
-{
-  xbt_assert(argc == 2);
-  const char *mbox = argv[1];
-
-  int need_exit = 0;
-
-  // XBT_INFO("start %s", mbox);
-
-  for (;;) {
-    msg_task_t task = NULL;
-    MSG_task_recv(&task, mbox);
-
-    // XBT_INFO("task->name %s", task->name);
-
-    if (strcmp(task->name, "finalize_making_overhead") == 0)
-      need_exit = 1;
 
-    // XBT_INFO("exec");
-    // MSG_task_set_priority(task, 1000000);
-    MSG_task_execute(task);
-    MSG_task_destroy(task);
 
-    if (need_exit)
-      break;
-  }
-
-  // XBT_INFO("bye");
-
-  return 0;
-}
-
-static void start_overhead_process(msg_task_t comm_task)
-{
-  char *pr_name = bprintf("__pr_task_tx_overhead_%s", MSG_task_get_name(comm_task));
-  char *mbox    = bprintf("__mb_task_tx_overhead_%s", MSG_task_get_name(comm_task));
-
-  int nargvs = 3;
-  char **argv = xbt_new(char *, nargvs);
-  argv[0] = pr_name;
-  argv[1] = mbox;
-  argv[2] = NULL;
-
-  // XBT_INFO("micro start: mbox %s", mbox);
-  MSG_process_create_with_arguments(pr_name, task_tx_overhead_fun, NULL, MSG_host_self(), nargvs - 1, argv);
-}
-
-static void shutdown_overhead_process(msg_task_t comm_task)
-{
-  char *mbox = bprintf("__mb_task_tx_overhead_%s", MSG_task_get_name(comm_task));
-
-  msg_task_t task = MSG_task_create("finalize_making_overhead", 0, 0, NULL);
-
-  // XBT_INFO("micro shutdown: mbox %s", mbox);
-  msg_error_t ret = MSG_task_send(task, mbox);
-  if(ret != MSG_OK)
-    xbt_die("shutdown error - task not sent");
-
-  xbt_free(mbox);
-  // XBT_INFO("shutdown done");
-}
-
-static void request_overhead(msg_task_t comm_task, double computation)
-{
-  char *mbox = bprintf("__mb_task_tx_overhead_%s", MSG_task_get_name(comm_task));
-
-  msg_task_t task = MSG_task_create("micro", computation, 0, NULL);
-
-  // XBT_INFO("req overhead");
-  msg_error_t ret = MSG_task_send(task, mbox);
-  if(ret != MSG_OK)
-    xbt_die("req overhead error - task not sent");
-
-  xbt_free(mbox);
-}
-
-/* alpha is (floating_operations / bytes).
- *
- * When actual migration traffic was 32 mbytes/s, we observed the CPU
- * utilization of the main thread of the Qemu process was 10 %. 
- *   alpha = 0.1 * C / (32 * 1024 * 1024)
- * where the CPU capacity of the PM is C flops/s.
- *
- * */
-static void task_send_bounded_with_cpu_overhead(msg_task_t comm_task, char *mbox, double mig_speed, double alpha)
-{
-  const double chunk_size = 1024 * 1024 * 10;
-  double remaining = MSG_task_get_data_size(comm_task);
-
-  start_overhead_process(comm_task);
-
-
-  while (remaining > 0) {
-    double data_size = chunk_size;
-    if (remaining < chunk_size)
-      data_size = remaining;
-
-    remaining -= data_size;
-
-    // XBT_INFO("remaining %f bytes", remaining);
-
-
-    double clock_sta = MSG_get_clock();
-
-    /* create a micro task */
-    {
-      char *mtask_name = bprintf("__micro_%s", MSG_task_get_name(comm_task));
-      msg_task_t mtask = MSG_task_create(mtask_name, 0, data_size, NULL);
-
-      request_overhead(comm_task, data_size * alpha);
-
-      msg_error_t ret = MSG_task_send(mtask, mbox);
-      if(ret != MSG_OK)
-        xbt_die("migration error - task not sent");
-
-      xbt_free(mtask_name);
-    }
-
-#if 0
-    {
-      /* In the real world, sending data involves small CPU computation. */
-      char *mtask_name = bprintf("__micro_%s", MSG_task_get_name(comm_task));
-      msg_task_t mtask = MSG_task_create(mtask_name, data_size * alpha, data_size, NULL);
-      MSG_task_execute(mtask);
-      MSG_task_destroy(mtask);
-      xbt_free(mtask_name);
-    }
-#endif
-   
-    /* TODO */
-
-    double clock_end = MSG_get_clock();
-
-
-    if (mig_speed > 0) {
-      /*
-       * (max bandwidth) > data_size / ((elapsed time) + time_to_sleep)
-       *
-       * Thus, we get
-       *   time_to_sleep > data_size / (max bandwidth) - (elapsed time)
-       *
-       * If time_to_sleep is smaller than zero, the elapsed time was too big. We
-       * do not need a micro sleep.
-       **/
-      double time_to_sleep = data_size / mig_speed - (clock_end - clock_sta);
-      if (time_to_sleep > 0)
-        MSG_process_sleep(time_to_sleep);
-
-
-      //XBT_INFO("duration %f", clock_end - clock_sta);
-      //XBT_INFO("time_to_sleep %f", time_to_sleep);
-    }
-  }
-
-  // XBT_INFO("%s", MSG_task_get_name(comm_task));
-  shutdown_overhead_process(comm_task);
-
-}
-
-
-#if 0
-static void make_cpu_overhead_of_data_transfer(msg_task_t comm_task, double init_comm_size)
-{
-  double prev_remaining = init_comm_size;
-
-  for (;;) {
-    double remaining = MSG_task_get_remaining_communication(comm_task);
-    if (remaining == 0)
-      need_exit = 1;
-
-    double sent = prev_remaining - remaining;
-    double comp_size = sent * overhead;
-
-
-    char *comp_task_name = bprintf("__sender_overhead%s", MSG_task_get_name(comm_task));
-    msg_task_t comp_task = MSG_task_create(comp_task_name, comp_size, 0, NULL);
-    MSG_task_execute(comp_task);
-    MSG_task_destroy(comp_task);
-
-    if (need_exit)
-      break;
-
-    prev_remaining = remaining;
-
-  }
-
-  xbt_free(comp_task_name);
-}
-#endif
-
-// #define USE_MICRO_TASK 1
-
-#if 0
-// const double alpha = 0.1L * 1.0E8 / (32L * 1024 * 1024);
-// const double alpha = 0.25L * 1.0E8 / (85L * 1024 * 1024);
-// const double alpha = 0.20L * 1.0E8 / (85L * 1024 * 1024);
-// const double alpha = 0.25L * 1.0E8 / (85L * 1024 * 1024);
-// const double alpha = 0.32L * 1.0E8 / (24L * 1024 * 1024);   // makes super good values for 32 mbytes/s
-//const double alpha = 0.32L * 1.0E8 / (32L * 1024 * 1024);
-// const double alpha = 0.56L * 1.0E8 / (80L * 1024 * 1024);
-////const double alpha = 0.20L * 1.0E8 / (80L * 1024 * 1024);
-// const double alpha = 0.56L * 1.0E8 / (90L * 1024 * 1024);
-// const double alpha = 0.66L * 1.0E8 / (90L * 1024 * 1024);
-// const double alpha = 0.20L * 1.0E8 / (80L * 1024 * 1024);
-
-/* CPU 22% when 80Mbyte/s */
-const double alpha = 0.22L * 1.0E8 / (80L * 1024 * 1024);
-#endif
-
-
-static void send_migration_data(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm,
-    sg_size_t size, char *mbox, int stage, int stage2_round, double mig_speed, double xfer_cpu_overhead)
+static sg_size_t send_migration_data(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm,
+    sg_size_t size, char *mbox, int stage, int stage2_round, double mig_speed, double timeout)
 {
+  sg_size_t sent = 0;
   char *task_name = get_mig_task_name(vm, src_pm, dst_pm, stage);
   msg_task_t task = MSG_task_create(task_name, 0, size, NULL);
 
@@ -871,79 +618,47 @@ static void send_migration_data(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_p
 
   double clock_sta = MSG_get_clock();
 
-#ifdef USE_MICRO_TASK
-
-  task_send_bounded_with_cpu_overhead(task, mbox, mig_speed, xfer_cpu_overhead);
-
-#else
   msg_error_t ret;
   if (mig_speed > 0)
-    ret = MSG_task_send_bounded(task, mbox, mig_speed);
+    ret = MSG_task_send_with_timeout_bounded(task, mbox, timeout, mig_speed);
   else
     ret = MSG_task_send(task, mbox);
 
-//  xbt_assert(ret == MSG_OK);
   xbt_free(task_name);
+
+  if (ret == MSG_OK) {
+    sent = size;
+  } else if (ret == MSG_TIMEOUT) {
+    sg_size_t remaining = MSG_task_get_remaining_communication(task);
+    sent = size - remaining;
+    XBT_INFO("timeout (%lf s) in sending_migration_data, remaining %llu bytes of %llu",
+        timeout, remaining, size);
+  }
+
+  /* FIXME: why try-and-catch is used here? */
   if(ret == MSG_HOST_FAILURE){
-       //XBT_INFO("SRC host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
-       MSG_task_destroy(task);
-       THROWF(host_error, 0, "SRC host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
-   }else if(ret == MSG_TRANSFER_FAILURE){
-       //XBT_INFO("DST host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
-       MSG_task_destroy(task);
-       THROWF(host_error, 0, "DST host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
+    //XBT_INFO("SRC host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
+    MSG_task_destroy(task);
+    THROWF(host_error, 0, "SRC host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
+  }else if(ret == MSG_TRANSFER_FAILURE){
+    //XBT_INFO("DST host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
+    MSG_task_destroy(task);
+    THROWF(host_error, 0, "DST host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
   }
-//else
-//   XBT_INFO("Ret != FAILURE !!!!"); 
-#endif
 
   double clock_end = MSG_get_clock();
   double duration = clock_end - clock_sta;
   double actual_speed = size / duration;
-#ifdef USE_MICRO_TASK
-  double cpu_utilization = size * xfer_cpu_overhead / duration / 1.0E8;
-#else
-  double cpu_utilization = 0;
-#endif
-
-  if (stage == 2){
-    XBT_DEBUG("mig-stage%d.%d: sent %llu duration %f actual_speed %f (target %f) cpu %f", stage, stage2_round, size, duration, actual_speed, mig_speed, cpu_utilization);}
-  else{
-    XBT_DEBUG("mig-stage%d: sent %llu duration %f actual_speed %f (target %f) cpu %f", stage, size, duration, actual_speed, mig_speed, cpu_utilization);
-  }
-
-
-#ifdef USE_MICRO_TASK
-  /* The name of a micro task starts with __micro, which does not match the
-   * special name that finalizes the receiver loop. Thus, we send the special task.
-   **/
-  {
-    if (stage == 3) {
-      char *task_name = get_mig_task_name(vm_name, src_pm_name, dst_pm_name, stage);
-      msg_task_t task = MSG_task_create(task_name, 0, 0, NULL);
-      msg_error_t ret = MSG_task_send(task, mbox);
-//      xbt_assert(ret == MSG_OK);
-      xbt_free(task_name);
-      if(ret == MSG_HOST_FAILURE){
-       //XBT_INFO("SRC host failed during migration of %s (stage 3)", sg_host_name(vm));
-       MSG_task_destroy(task);
-       THROWF(host_error, 0, "SRC host failed during migration of VM %s (stage 3)", sg_host_name(vm));
-        // The owner of the task did not change so destroy the task 
-       return; 
-      }else if(ret == MSG_TRANSFER_FAILURE){
-       //XBT_INFO("DST host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
-       MSG_task_destroy(task);
-       THROWF(host_error, 0, "DST host failed during migration of %s (stage %d)", sg_host_name(vm), stage);
-       return; 
-     }
 
-    }
-  }
-#endif
+  if (stage == 2)
+    XBT_DEBUG("mig-stage%d.%d: sent %llu duration %f actual_speed %f (target %f)", stage, stage2_round, size, duration, actual_speed, mig_speed);
+  else
+    XBT_DEBUG("mig-stage%d: sent %llu duration %f actual_speed %f (target %f)", stage, size, duration, actual_speed, mig_speed);
 
+  return sent;
 }
 
-static double get_updated_size(double computed, double dp_rate, double dp_cap)
+static sg_size_t get_updated_size(double computed, double dp_rate, double dp_cap)
 {
   double updated_size = computed * dp_rate;
   XBT_DEBUG("updated_size %f dp_rate %f", updated_size, dp_rate);
@@ -952,11 +667,11 @@ static double get_updated_size(double computed, double dp_rate, double dp_cap)
     updated_size = dp_cap;
   }
 
-  return updated_size;
+  return (sg_size_t) updated_size;
 }
 
 static double send_stage1(struct migration_session *ms,
-    sg_size_t ramsize, double mig_speed, double xfer_cpu_overhead, double dp_rate, double dp_cap, double dpt_cpu_overhead)
+    sg_size_t ramsize, double mig_speed, double dp_rate, double dp_cap)
 {
 
   // const long chunksize = (sg_size_t)1024 * 1024 * 100;
@@ -970,16 +685,9 @@ static double send_stage1(struct migration_session *ms,
       datasize = remaining;
 
     remaining -= datasize;
-    send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, datasize, ms->mbox, 1, 0, mig_speed, xfer_cpu_overhead);
+    send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, datasize, ms->mbox, 1, 0, mig_speed, -1);
     double computed = lookup_computed_flop_counts(ms->vm, 1, 0);
     computed_total += computed;
-
-    // {
-    //   double updated_size = get_updated_size(computed, dp_rate, dp_cap);
-
-    //   double overhead = dpt_cpu_overhead * updated_size;
-    //   launch_deferred_exec_process(vm, overhead, 10000);
-    // }
   }
 
   return computed_total;
@@ -989,18 +697,14 @@ static double send_stage1(struct migration_session *ms,
 
 static double get_threshold_value(double bandwidth, double max_downtime)
 {
-  /* This value assumes the network link is 1Gbps. */
-  // double threshold = max_downtime * 125 * 1024 * 1024;
-  double threshold = max_downtime * bandwidth;
-
-  return threshold;
+  return max_downtime * bandwidth;
 }
 
 static int migration_tx_fun(int argc, char *argv[])
 {
   XBT_DEBUG("mig: tx_start");
 
-  // Note that the ms structure has been allocated in do_migration and hence should be freed in the same function ;) 
+  // Note that the ms structure has been allocated in do_migration and hence should be freed in the same function ;)
   struct migration_session *ms = MSG_process_get_data(MSG_process_self());
 
   s_ws_params_t params;
@@ -1008,56 +712,66 @@ static int migration_tx_fun(int argc, char *argv[])
   const sg_size_t ramsize   = params.ramsize;
   const sg_size_t devsize   = params.devsize;
   const int skip_stage1     = params.skip_stage1;
-  const int skip_stage2     = params.skip_stage2;
+  int skip_stage2           = params.skip_stage2;
   const double dp_rate      = params.dp_rate;
   const double dp_cap       = params.dp_cap;
   const double mig_speed    = params.mig_speed;
-  const double xfer_cpu_overhead = params.xfer_cpu_overhead;
-  const double dpt_cpu_overhead = params.dpt_cpu_overhead;
+  double max_downtime       = params.max_downtime;
 
-  msg_vm_t vm=ms->vm; 
+  /* hard code it temporally. Fix Me */
+#define MIGRATION_TIMEOUT_DO_NOT_HARDCODE_ME 10000000.0
+  double mig_timeout = MIGRATION_TIMEOUT_DO_NOT_HARDCODE_ME;
 
   double remaining_size = ramsize + devsize;
+  double threshold = 0.0;
+
+  /* check parameters */
+  if (ramsize == 0)
+    XBT_WARN("migrate a VM, but ramsize is zero");
 
-  double max_downtime = params.max_downtime;
   if (max_downtime == 0) {
     XBT_WARN("use the default max_downtime value 30ms");
     max_downtime = 0.03;
   }
 
-  double threshold = 0.00001; /* TODO: cleanup */
-
-  /* setting up parameters has done */
-
-
-  if (ramsize == 0)
-    XBT_WARN("migrate a VM, but ramsize is zero");
-
-
-  XBT_DEBUG("mig-stage1: remaining_size %f", remaining_size);
-
   /* Stage1: send all memory pages to the destination. */
-  start_dirty_page_tracking(vm);
+  XBT_DEBUG("mig-stage1: remaining_size %f", remaining_size);
+  start_dirty_page_tracking(ms->vm);
 
   double computed_during_stage1 = 0;
   if (!skip_stage1) {
-    // send_migration_data(vm_name, src_pm_name, dst_pm_name, ramsize, mbox, 1, 0, mig_speed, xfer_cpu_overhead);
-
-    /* send ramsize, but split it */
     double clock_prev_send = MSG_get_clock();
 
-    TRY{
-       computed_during_stage1 = send_stage1(ms, ramsize, mig_speed, xfer_cpu_overhead, dp_rate, dp_cap, dpt_cpu_overhead);
-    } CATCH_ANONYMOUS{
+    TRY {
+      /* At stage 1, we do not need timeout. We have to send all the memory
+       * pages even though the duration of this tranfer exceeds the timeout
+       * value. */
+      sg_size_t sent = send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, ramsize, ms->mbox, 1, 0, mig_speed, -1);
+      remaining_size -= sent;
+      computed_during_stage1 = lookup_computed_flop_counts(ms->vm, 1, 0);
+
+      if (sent < ramsize) {
+        XBT_INFO("mig-stage1: timeout, force moving to stage 3");
+        skip_stage2 = 1;
+      } else if (sent > ramsize)
+        XBT_CRITICAL("bug");
+
+    } CATCH_ANONYMOUS {
       //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
-      // Stop the dirty page tracking an return (there is no memory space to release) 
-      stop_dirty_page_tracking(vm);
-      XBT_INFO ("Process tx migration catches an expection and thus return");
-      return 0; 
+      // Stop the dirty page tracking an return (there is no memory space to release)
+      stop_dirty_page_tracking(ms->vm);
+      return 0;
     }
-    remaining_size -= ramsize;
 
     double clock_post_send = MSG_get_clock();
+    mig_timeout -= (clock_post_send - clock_prev_send);
+    if (mig_timeout < 0) {
+      XBT_INFO("The duration of stage 1 exceeds the timeout value (%lf > %lf), skip stage 2",
+          (clock_post_send - clock_prev_send), MIGRATION_TIMEOUT_DO_NOT_HARDCODE_ME);
+      skip_stage2 = 1;
+    }
+
+    /* estimate bandwidth */
     double bandwidth = ramsize / (clock_post_send - clock_prev_send);
     threshold = get_threshold_value(bandwidth, max_downtime);
     XBT_DEBUG("actual bandwidth %f (MB/s), threshold %f", bandwidth / 1024 / 1024, threshold);
@@ -1068,86 +782,89 @@ static int migration_tx_fun(int argc, char *argv[])
    * becomes smaller than the threshold value. */
   if (skip_stage2)
     goto stage3;
-  if (max_downtime == 0) {
-    XBT_WARN("no max_downtime parameter, skip stage2");
-    goto stage3;
-  }
 
 
   int stage2_round = 0;
   for (;;) {
 
-    double updated_size = 0;
-    if (stage2_round == 0)  {
-      /* just after stage1, nothing has been updated. But, we have to send the data updated during stage1 */
+    sg_size_t updated_size = 0;
+    if (stage2_round == 0) {
+      /* just after stage1, nothing has been updated. But, we have to send the
+       * data updated during stage1 */
       updated_size = get_updated_size(computed_during_stage1, dp_rate, dp_cap);
     } else {
       double computed = lookup_computed_flop_counts(ms->vm, 2, stage2_round);
       updated_size = get_updated_size(computed, dp_rate, dp_cap);
     }
 
-    XBT_DEBUG("mig-stage 2:%d updated_size %f computed_during_stage1 %f dp_rate %f dp_cap %f",
+    XBT_DEBUG("mig-stage 2:%d updated_size %llu computed_during_stage1 %f dp_rate %f dp_cap %f",
         stage2_round, updated_size, computed_during_stage1, dp_rate, dp_cap);
 
 
-    // if (stage2_round != 0) {
-    //   /* during stage1, we have already created overhead tasks */
-    //   double overhead = dpt_cpu_overhead * updated_size;
-    //   XBT_DEBUG("updated %f overhead %f", updated_size, overhead);
-    //   launch_deferred_exec_process(vm, overhead, 10000);
-    // }
-
-
-    {
-      remaining_size += updated_size;
-
-      XBT_DEBUG("mig-stage2.%d: remaining_size %f (%s threshold %f)", stage2_round,
-          remaining_size, (remaining_size < threshold) ? "<" : ">", threshold);
+    /* Check whether the remaining size is below the threshold value. If so,
+     * move to stage 3. */
+    remaining_size += updated_size;
+    XBT_DEBUG("mig-stage2.%d: remaining_size %f (%s threshold %f)", stage2_round,
+        remaining_size, (remaining_size < threshold) ? "<" : ">", threshold);
+    if (remaining_size < threshold)
+      break;
 
-      if (remaining_size < threshold)
-        break;
-    }
 
+    sg_size_t sent = 0;
     double clock_prev_send = MSG_get_clock();
-    TRY{
-      send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, updated_size, ms->mbox, 2, stage2_round, mig_speed, xfer_cpu_overhead);
-    }CATCH_ANONYMOUS{
+    TRY {
+      sent = send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, updated_size, ms->mbox, 2, stage2_round, mig_speed, mig_timeout);
+    } CATCH_ANONYMOUS {
       //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
-      // Stop the dirty page tracking an return (there is no memory space to release) 
-      XBT_INFO ("Process tx migration catches an expection and thus return");
-      stop_dirty_page_tracking(vm);
-      return 0; 
+      // Stop the dirty page tracking an return (there is no memory space to release)
+      stop_dirty_page_tracking(ms->vm);
+      return 0;
     }
     double clock_post_send = MSG_get_clock();
 
-    double bandwidth = updated_size / (clock_post_send - clock_prev_send);
-    threshold = get_threshold_value(bandwidth, max_downtime);
-    XBT_DEBUG("actual bandwidth %f, threshold %f", bandwidth / 1024 / 1024, threshold);
+    if (sent == updated_size) {
+      /* timeout did not happen */
+      double bandwidth = updated_size / (clock_post_send - clock_prev_send);
+      threshold = get_threshold_value(bandwidth, max_downtime);
+      XBT_DEBUG("actual bandwidth %f, threshold %f", bandwidth / 1024 / 1024, threshold);
+      remaining_size -= sent;
+      stage2_round += 1;
+      mig_timeout -= (clock_post_send - clock_prev_send);
+      xbt_assert(mig_timeout > 0);
+
+    } else if (sent < updated_size) {
+      /* When timeout happens, we move to stage 3. The size of memory pages
+       * updated before timeout must be added to the remaining size. */
+      XBT_INFO("mig-stage2.%d: timeout, force moving to stage 3. sent %llu / %llu, eta %lf",
+          stage2_round, sent, updated_size, (clock_post_send - clock_prev_send));
+      remaining_size -= sent;
 
+      double computed = lookup_computed_flop_counts(ms->vm, 2, stage2_round);
+      updated_size = get_updated_size(computed, dp_rate, dp_cap);
+      remaining_size += updated_size;
+      break;
 
-    remaining_size -= updated_size;
-    stage2_round += 1;
+    } else
+      XBT_CRITICAL("bug");
   }
 
 
 stage3:
   /* Stage3: stop the VM and copy the rest of states. */
   XBT_DEBUG("mig-stage3: remaining_size %f", remaining_size);
-  simcall_vm_suspend(vm);
-  stop_dirty_page_tracking(vm);
- TRY{
-    send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, remaining_size, ms->mbox, 3, 0, mig_speed, xfer_cpu_overhead);
-  }CATCH_ANONYMOUS{
-      //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
-      // Stop the dirty page tracking an return (there is no memory space to release) 
-      XBT_INFO ("Process tx migration catches an expection and thus return");
-      simcall_vm_resume(vm);
-      return 0; 
-    }
-  
- // At that point the Migration is considered valid for the SRC node but remind that the DST side should relocate effectively the VM on the DST node. 
+  simcall_vm_suspend(ms->vm);
+  stop_dirty_page_tracking(ms->vm);
+
+  TRY {
+    send_migration_data(ms->vm, ms->src_pm, ms->dst_pm, remaining_size, ms->mbox, 3, 0, mig_speed, -1);
+  } CATCH_ANONYMOUS {
+    //hostfailure (if you want to know whether this is the SRC or the DST please check directly in send_migration_data code)
+    // Stop the dirty page tracking an return (there is no memory space to release)
+    simcall_vm_resume(ms->vm);
+    return 0;
+  }
 
+  // At that point the Migration is considered valid for the SRC node but remind that the DST side should relocate effectively the VM on the DST node.
   XBT_INFO("mig: tx_done");
 
   return 0;
@@ -1163,7 +880,7 @@ static int do_migration(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
   ms->dst_pm = dst_pm;
   ms->mbox_ctl = get_mig_mbox_ctl(vm, src_pm, dst_pm);
   ms->mbox = get_mig_mbox_src_dst(vm, src_pm, dst_pm);
-  
 
   char *pr_rx_name = get_mig_process_rx_name(vm, src_pm, dst_pm);
   char *pr_tx_name = get_mig_process_tx_name(vm, src_pm, dst_pm);
@@ -1190,21 +907,20 @@ static int do_migration(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
   {
     XBT_DEBUG("wait for reception of the final ACK (i.e. migration has been correctly performed");
     msg_task_t task = NULL;
-    msg_error_t ret = MSG_TIMEOUT; 
-    while (ret == MSG_TIMEOUT && MSG_host_is_on(dst_pm)) //Wait while you receive the message ok
-                                                       // Active waiting, evaluation is performed every one second.
-     ret = MSG_task_receive_with_timeout(&task, ms->mbox_ctl, 1);
+    msg_error_t ret = MSG_TIMEOUT;
+    while (ret == MSG_TIMEOUT && MSG_host_is_on(dst_pm)) //Wait while you receive the message o
+     ret = MSG_task_receive_with_timeout(&task, ms->mbox_ctl, 3);
 
     xbt_free(ms->mbox_ctl);
     xbt_free(ms->mbox);
     xbt_free(ms);
-    
+   
     //xbt_assert(ret == MSG_OK);
     if(ret == MSG_HOST_FAILURE){
         // Note that since the communication failed, the owner did not change and the task should be destroyed on the other side.
         // Hence, just throw the execption
         XBT_INFO("SRC crashes, throw an exception (m-control)");
-        MSG_process_kill(tx_process);
+        MSG_process_kill(tx_process); // Adrien, I made a merge on Nov 28th 2014, I'm not sure whether this line is required or not 
         return -1; 
     } 
     else if((ret == MSG_TRANSFER_FAILURE) || (ret == MSG_TIMEOUT)){ // MSG_TIMEOUT here means that MSG_host_is_avail() returned false.
@@ -1212,12 +928,12 @@ static int do_migration(msg_vm_t vm, msg_host_t src_pm, msg_host_t dst_pm)
         return -2;  
     }
 
-    
+   
     char *expected_task_name = get_mig_task_name(vm, src_pm, dst_pm, 4);
     xbt_assert(strcmp(task->name, expected_task_name) == 0);
     xbt_free(expected_task_name);
     MSG_task_destroy(task);
-    return 0; 
+    return 0;
   }
 }
 
@@ -1251,7 +967,7 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t new_pm)
    *   physical host.
    *
    * The second one would be easier.
-   *   
+   *  
    */
 
   msg_host_t old_pm = simcall_vm_get_pm(vm);
@@ -1266,13 +982,13 @@ void MSG_vm_migrate(msg_vm_t vm, msg_host_t new_pm)
   priv->is_migrating = 1;
 
   {
-   
-    int ret = do_migration(vm, old_pm, new_pm); 
+  
+    int ret = do_migration(vm, old_pm, new_pm);
     if (ret == -1){
      priv->is_migrating = 0;
      THROWF(host_error, 0, "SRC host failed during migration");
     }
-    else if(ret == -2){ 
+    else if(ret == -2){
      priv->is_migrating = 0;
      THROWF(host_error, 0, "DST host failed during migration");
     }
@@ -1382,7 +1098,7 @@ msg_host_t MSG_vm_get_pm(msg_vm_t vm)
  *  On PM0, there are Task1 and VM0.
  *  On VM0, there is Task2.
  * Now we bound 75% to Task1\@PM0 and bound 25% to Task2\@VM0.
- * Then, 
+ * Then,
  *  Task1\@PM0 gets 50%.
  *  Task2\@VM0 gets 25%.
  * This is NOT 75% for Task1\@PM0 and 25% for Task2\@VM0, respectively.
@@ -1408,7 +1124,7 @@ msg_host_t MSG_vm_get_pm(msg_vm_t vm)
  */
 void MSG_vm_set_bound(msg_vm_t vm, double bound)
 {
-       return simcall_vm_set_bound(vm, bound);
+  return simcall_vm_set_bound(vm, bound);
 }
 
 
diff --git a/src/probes.tp b/src/probes.tp
new file mode 100644 (file)
index 0000000..6ccc0aa
--- /dev/null
@@ -0,0 +1,61 @@
+TRACEPOINT_EVENT(
+  mc,
+  state_diff,
+  TP_ARGS(
+    int, state1,
+    int, state2,
+    char*, message
+  ),
+  TP_FIELDS(
+    ctf_integer(int, state1, state1)
+    ctf_integer(int, state2, state2)
+    ctf_string(message, message)
+  )
+)
+TRACEPOINT_LOGLEVEL(mc, state_diff, TRACE_INFO)
+
+TRACEPOINT_EVENT(
+  mc,
+  hash_diff,
+  TP_ARGS(
+    int, state1,
+    int, state2
+  ),
+  TP_FIELDS(
+    ctf_integer(int, state1, state1)
+    ctf_integer(int, state2, state2)
+  )
+)
+TRACEPOINT_LOGLEVEL(mc, hash_diff, TRACE_INFO)
+
+TRACEPOINT_EVENT(
+  mc,
+  global_diff,
+  TP_ARGS(
+    int, state1,
+    int, state2,
+    char*, variable
+  ),
+  TP_FIELDS(
+    ctf_integer(int, state1, state1)
+    ctf_integer(int, state2, state2)
+    ctf_string(variable, variable)
+  )
+)
+TRACEPOINT_LOGLEVEL(mc, global_diff, TRACE_INFO)
+
+TRACEPOINT_EVENT(
+  mc,
+  local_diff,
+  TP_ARGS(
+    int, state1,
+    int, state2,
+    char*, variable
+  ),
+  TP_FIELDS(
+    ctf_integer(int, state1, state1)
+    ctf_integer(int, state2, state2)
+    ctf_string(variable, variable)
+  )
+)
+TRACEPOINT_LOGLEVEL(mc, local_diff, TRACE_INFO)
index bdf87cc..df71452 100644 (file)
@@ -1344,81 +1344,81 @@ const char dax__flexml_version[] = "1.9.6";
 int dax__pcdata_ix;
 extern char *dax__bufferstack;
 #define dax__pcdata (dax__bufferstack + dax__pcdata_ix)
-AT_dax__uses_file AX_dax__uses_file;
-#define A_dax__uses_file (dax__bufferstack + AX_dax__uses_file)
-short int dax__uses_file_isset;
-AT_dax__adag_count AX_dax__adag_count;
-#define A_dax__adag_count (dax__bufferstack + AX_dax__adag_count)
-short int dax__adag_count_isset;
+AT_dax__uses_type AX_dax__uses_type;
+#define A_dax__uses_type (dax__bufferstack + AX_dax__uses_type)
+short int dax__uses_type_isset;
 AT_dax__uses_register AX_dax__uses_register;
 #define A_dax__uses_register AX_dax__uses_register
 short int dax__uses_register_isset;
+AT_dax__job_name AX_dax__job_name;
+#define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
+short int dax__job_name_isset;
+AT_dax__uses_optional AX_dax__uses_optional;
+#define A_dax__uses_optional AX_dax__uses_optional
+short int dax__uses_optional_isset;
 AT_dax__uses_size AX_dax__uses_size;
 #define A_dax__uses_size (dax__bufferstack + AX_dax__uses_size)
 short int dax__uses_size_isset;
-AT_dax__uses_link AX_dax__uses_link;
-#define A_dax__uses_link AX_dax__uses_link
-short int dax__uses_link_isset;
+AT_dax__job_runtime AX_dax__job_runtime;
+#define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
+short int dax__job_runtime_isset;
 AT_dax__adag_fileCount AX_dax__adag_fileCount;
 #define A_dax__adag_fileCount (dax__bufferstack + AX_dax__adag_fileCount)
 short int dax__adag_fileCount_isset;
-AT_dax__adag_childCount AX_dax__adag_childCount;
-#define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
-short int dax__adag_childCount_isset;
+AT_dax__uses_link AX_dax__uses_link;
+#define A_dax__uses_link AX_dax__uses_link
+short int dax__uses_link_isset;
+AT_dax__uses_transfer AX_dax__uses_transfer;
+#define A_dax__uses_transfer AX_dax__uses_transfer
+short int dax__uses_transfer_isset;
+AT_dax__adag_jobCount AX_dax__adag_jobCount;
+#define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
+short int dax__adag_jobCount_isset;
+AT_dax__adag_xmlns AX_dax__adag_xmlns;
+#define A_dax__adag_xmlns (dax__bufferstack + AX_dax__adag_xmlns)
+short int dax__adag_xmlns_isset;
 AT_dax__job_level AX_dax__job_level;
 #define A_dax__job_level (dax__bufferstack + AX_dax__job_level)
 short int dax__job_level_isset;
-AT_dax__child_ref AX_dax__child_ref;
-#define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
-short int dax__child_ref_isset;
-AT_dax__job_version AX_dax__job_version;
-#define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
-short int dax__job_version_isset;
+AT_dax__adag_version AX_dax__adag_version;
+#define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
+short int dax__adag_version_isset;
+AT_dax__job_id AX_dax__job_id;
+#define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
+short int dax__job_id_isset;
 AT_dax__job_namespace AX_dax__job_namespace;
 #define A_dax__job_namespace (dax__bufferstack + AX_dax__job_namespace)
 short int dax__job_namespace_isset;
 AT_dax__parent_ref AX_dax__parent_ref;
 #define A_dax__parent_ref (dax__bufferstack + AX_dax__parent_ref)
 short int dax__parent_ref_isset;
-AT_dax__adag_xmlns AX_dax__adag_xmlns;
-#define A_dax__adag_xmlns (dax__bufferstack + AX_dax__adag_xmlns)
-short int dax__adag_xmlns_isset;
-AT_dax__uses_optional AX_dax__uses_optional;
-#define A_dax__uses_optional AX_dax__uses_optional
-short int dax__uses_optional_isset;
-AT_dax__job_runtime AX_dax__job_runtime;
-#define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
-short int dax__job_runtime_isset;
-AT_dax__adag_name AX_dax__adag_name;
-#define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
-short int dax__adag_name_isset;
-AT_dax__adag_version AX_dax__adag_version;
-#define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
-short int dax__adag_version_isset;
+AT_dax__adag_count AX_dax__adag_count;
+#define A_dax__adag_count (dax__bufferstack + AX_dax__adag_count)
+short int dax__adag_count_isset;
+AT_dax__adag_childCount AX_dax__adag_childCount;
+#define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
+short int dax__adag_childCount_isset;
 AT_dax__adag_xsi_c_schemaLocation AX_dax__adag_xsi_c_schemaLocation;
 #define A_dax__adag_xsi_c_schemaLocation (dax__bufferstack + AX_dax__adag_xsi_c_schemaLocation)
 short int dax__adag_xsi_c_schemaLocation_isset;
-AT_dax__uses_transfer AX_dax__uses_transfer;
-#define A_dax__uses_transfer AX_dax__uses_transfer
-short int dax__uses_transfer_isset;
-AT_dax__adag_index AX_dax__adag_index;
-#define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
-short int dax__adag_index_isset;
-AT_dax__uses_type AX_dax__uses_type;
-#define A_dax__uses_type (dax__bufferstack + AX_dax__uses_type)
-short int dax__uses_type_isset;
-AT_dax__job_id AX_dax__job_id;
-#define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
-short int dax__job_id_isset;
+AT_dax__uses_file AX_dax__uses_file;
+#define A_dax__uses_file (dax__bufferstack + AX_dax__uses_file)
+short int dax__uses_file_isset;
 AT_dax__adag_xmlns_c_xsi AX_dax__adag_xmlns_c_xsi;
 #define A_dax__adag_xmlns_c_xsi (dax__bufferstack + AX_dax__adag_xmlns_c_xsi)
 short int dax__adag_xmlns_c_xsi_isset;
-AT_dax__adag_jobCount AX_dax__adag_jobCount;
-#define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
-short int dax__adag_jobCount_isset;
-AT_dax__job_name AX_dax__job_name;
-#define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
-short int dax__job_name_isset;
+AT_dax__child_ref AX_dax__child_ref;
+#define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
+short int dax__child_ref_isset;
+AT_dax__adag_index AX_dax__adag_index;
+#define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
+short int dax__adag_index_isset;
+AT_dax__adag_name AX_dax__adag_name;
+#define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
+short int dax__adag_name_isset;
+AT_dax__job_version AX_dax__job_version;
+#define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
+short int dax__job_version_isset;
 
 /* XML state. */
 #ifdef FLEX_DEBUG
@@ -2212,11 +2212,11 @@ case 44:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</adag>' expected.",dax_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_dax__adag):
-case YY_STATE_EOF(S_dax__adag_1):
 case YY_STATE_EOF(S_dax__adag):
 case YY_STATE_EOF(S_dax__adag_3):
+case YY_STATE_EOF(S_dax__adag_1):
 case YY_STATE_EOF(S_dax__adag_5):
+case YY_STATE_EOF(E_dax__adag):
 FAIL("Premature EOF: `</adag>' expected.");
        YY_BREAK
 
@@ -2322,7 +2322,7 @@ YY_RULE_SETUP
   if (!AX_dax__job_runtime) FAIL("Required attribute `runtime' not set for `job' element.");
   LEAVE; STag_dax__job(); dax__pcdata_ix = 0; ETag_dax__job(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_dax__adag_3: case S_dax__adag: case S_dax__adag_2: SET(S_dax__adag_3); break;
+   case S_dax__adag_2: case S_dax__adag: case S_dax__adag_3: SET(S_dax__adag_3); break;
   }
  }
        YY_BREAK
@@ -2346,7 +2346,7 @@ YY_RULE_SETUP
   ETag_dax__job();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_dax__adag_3: case S_dax__adag: case S_dax__adag_2: SET(S_dax__adag_3); break;
+   case S_dax__adag_2: case S_dax__adag: case S_dax__adag_3: SET(S_dax__adag_3); break;
   }
  }
        YY_BREAK
@@ -2359,9 +2359,9 @@ case 65:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</job>' expected.",dax_text[0]);
        YY_BREAK
-case YY_STATE_EOF(S_dax__job):
-case YY_STATE_EOF(S_dax__job_2):
 case YY_STATE_EOF(E_dax__job):
+case YY_STATE_EOF(S_dax__job_2):
+case YY_STATE_EOF(S_dax__job):
 FAIL("Premature EOF: `</job>' expected.");
        YY_BREAK
 
@@ -2495,7 +2495,7 @@ YY_RULE_SETUP
   if (!AX_dax__uses_size) FAIL("Required attribute `size' not set for `uses' element.");
   LEAVE; STag_dax__uses(); dax__pcdata_ix = 0; ETag_dax__uses(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_dax__job_1: case S_dax__job: case S_dax__job_2: SET(S_dax__job_2); break;
+   case S_dax__job: case S_dax__job_2: case S_dax__job_1: SET(S_dax__job_2); break;
   }
  }
        YY_BREAK
@@ -2519,7 +2519,7 @@ YY_RULE_SETUP
   ETag_dax__uses();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_dax__job_1: case S_dax__job: case S_dax__job_2: SET(S_dax__job_2); break;
+   case S_dax__job: case S_dax__job_2: case S_dax__job_1: SET(S_dax__job_2); break;
   }
  }
        YY_BREAK
@@ -2574,7 +2574,7 @@ YY_RULE_SETUP
   if (!AX_dax__child_ref) FAIL("Required attribute `ref' not set for `child' element.");
   LEAVE; STag_dax__child(); dax__pcdata_ix = 0; ETag_dax__child(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_dax__adag_3: case S_dax__adag_5: case S_dax__adag_1: case S_dax__adag: case S_dax__adag_4: SET(S_dax__adag_5); break;
+   case S_dax__adag_4: case S_dax__adag: case S_dax__adag_3: case S_dax__adag_1: case S_dax__adag_5: SET(S_dax__adag_5); break;
   }
  }
        YY_BREAK
@@ -2598,7 +2598,7 @@ YY_RULE_SETUP
   ETag_dax__child();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_dax__adag_3: case S_dax__adag_5: case S_dax__adag_1: case S_dax__adag: case S_dax__adag_4: SET(S_dax__adag_5); break;
+   case S_dax__adag_4: case S_dax__adag: case S_dax__adag_3: case S_dax__adag_1: case S_dax__adag_5: SET(S_dax__adag_5); break;
   }
  }
        YY_BREAK
@@ -2611,9 +2611,9 @@ case 107:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</child>' expected.",dax_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_dax__child):
-case YY_STATE_EOF(S_dax__child):
 case YY_STATE_EOF(S_dax__child_2):
+case YY_STATE_EOF(S_dax__child):
+case YY_STATE_EOF(E_dax__child):
 FAIL("Premature EOF: `</child>' expected.");
        YY_BREAK
 
index 3649459..da77875 100644 (file)
@@ -60,132 +60,132 @@ XBT_PUBLIC(void) STag_dax__parent(void);
 XBT_PUBLIC(void) ETag_dax__parent(void);
 
 /* XML application data. */
-typedef int AT_dax__job_id;
-#define AU_dax__job_id NULL
-typedef int AT_dax__job_version;
-#define AU_dax__job_version NULL
 typedef int AT_dax__uses_type;
 #define AU_dax__uses_type NULL
-typedef int AT_dax__adag_childCount;
-#define AU_dax__adag_childCount NULL
-typedef enum { AU_dax__uses_optional, A_dax__uses_optional_false,A_dax__uses_optional_true } AT_dax__uses_optional;
-typedef enum { AU_dax__uses_link, A_dax__uses_link_input,A_dax__uses_link_output } AT_dax__uses_link;
-typedef int AT_dax__adag_xmlns_c_xsi;
-#define AU_dax__adag_xmlns_c_xsi NULL
-typedef int AT_dax__job_runtime;
-#define AU_dax__job_runtime NULL
+typedef int AT_dax__parent_ref;
+#define AU_dax__parent_ref NULL
 typedef int AT_dax__uses_file;
 #define AU_dax__uses_file NULL
-typedef int AT_dax__adag_jobCount;
-#define AU_dax__adag_jobCount NULL
-typedef enum { AU_dax__uses_register, A_dax__uses_register_false,A_dax__uses_register_true } AT_dax__uses_register;
-typedef int AT_dax__adag_name;
-#define AU_dax__adag_name NULL
-typedef int AT_dax__job_level;
-#define AU_dax__job_level NULL
+typedef int AT_dax__job_name;
+#define AU_dax__job_name NULL
+typedef int AT_dax__job_version;
+#define AU_dax__job_version NULL
 typedef int AT_dax__job_namespace;
 #define AU_dax__job_namespace NULL
+typedef int AT_dax__adag_xsi_c_schemaLocation;
+#define AU_dax__adag_xsi_c_schemaLocation NULL
 typedef int AT_dax__adag_fileCount;
 #define AU_dax__adag_fileCount NULL
-typedef enum { AU_dax__uses_transfer, A_dax__uses_transfer_false,A_dax__uses_transfer_true } AT_dax__uses_transfer;
 typedef int AT_dax__adag_count;
 #define AU_dax__adag_count NULL
-typedef int AT_dax__child_ref;
-#define AU_dax__child_ref NULL
-typedef int AT_dax__adag_version;
-#define AU_dax__adag_version NULL
-typedef int AT_dax__job_name;
-#define AU_dax__job_name NULL
+typedef int AT_dax__adag_index;
+#define AU_dax__adag_index NULL
+typedef int AT_dax__adag_xmlns_c_xsi;
+#define AU_dax__adag_xmlns_c_xsi NULL
+typedef int AT_dax__adag_childCount;
+#define AU_dax__adag_childCount NULL
 typedef int AT_dax__adag_xmlns;
 #define AU_dax__adag_xmlns NULL
-typedef int AT_dax__adag_xsi_c_schemaLocation;
-#define AU_dax__adag_xsi_c_schemaLocation NULL
-typedef int AT_dax__parent_ref;
-#define AU_dax__parent_ref NULL
+typedef int AT_dax__adag_name;
+#define AU_dax__adag_name NULL
+typedef int AT_dax__adag_jobCount;
+#define AU_dax__adag_jobCount NULL
+typedef enum { AU_dax__uses_register, A_dax__uses_register_false,A_dax__uses_register_true } AT_dax__uses_register;
+typedef int AT_dax__adag_version;
+#define AU_dax__adag_version NULL
+typedef enum { AU_dax__uses_optional, A_dax__uses_optional_false,A_dax__uses_optional_true } AT_dax__uses_optional;
+typedef int AT_dax__job_level;
+#define AU_dax__job_level NULL
+typedef int AT_dax__job_runtime;
+#define AU_dax__job_runtime NULL
 typedef int AT_dax__uses_size;
 #define AU_dax__uses_size NULL
-typedef int AT_dax__adag_index;
-#define AU_dax__adag_index NULL
+typedef enum { AU_dax__uses_transfer, A_dax__uses_transfer_false,A_dax__uses_transfer_true } AT_dax__uses_transfer;
+typedef int AT_dax__job_id;
+#define AU_dax__job_id NULL
+typedef int AT_dax__child_ref;
+#define AU_dax__child_ref NULL
+typedef enum { AU_dax__uses_link, A_dax__uses_link_input,A_dax__uses_link_output } AT_dax__uses_link;
 
 /* FleXML-provided data. */
 XBT_PUBLIC_DATA(int) dax__pcdata_ix;
 XBT_PUBLIC_DATA(char *) dax__bufferstack;
 #define dax__pcdata (dax__bufferstack + dax__pcdata_ix)
-XBT_PUBLIC_DATA(AT_dax__job_id) AX_dax__job_id;
-#define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
-XBT_PUBLIC_DATA(short int) dax__job_id_isset;
-XBT_PUBLIC_DATA(AT_dax__job_version) AX_dax__job_version;
-#define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
-XBT_PUBLIC_DATA(short int) dax__job_version_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_type) AX_dax__uses_type;
 #define A_dax__uses_type (dax__bufferstack + AX_dax__uses_type)
 XBT_PUBLIC_DATA(short int) dax__uses_type_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_childCount) AX_dax__adag_childCount;
-#define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
-XBT_PUBLIC_DATA(short int) dax__adag_childCount_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_optional) AX_dax__uses_optional;
-#define A_dax__uses_optional AX_dax__uses_optional
-XBT_PUBLIC_DATA(short int) dax__uses_optional_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_link) AX_dax__uses_link;
-#define A_dax__uses_link AX_dax__uses_link
-XBT_PUBLIC_DATA(short int) dax__uses_link_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_xmlns_c_xsi) AX_dax__adag_xmlns_c_xsi;
-#define A_dax__adag_xmlns_c_xsi (dax__bufferstack + AX_dax__adag_xmlns_c_xsi)
-XBT_PUBLIC_DATA(short int) dax__adag_xmlns_c_xsi_isset;
-XBT_PUBLIC_DATA(AT_dax__job_runtime) AX_dax__job_runtime;
-#define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
-XBT_PUBLIC_DATA(short int) dax__job_runtime_isset;
+XBT_PUBLIC_DATA(AT_dax__parent_ref) AX_dax__parent_ref;
+#define A_dax__parent_ref (dax__bufferstack + AX_dax__parent_ref)
+XBT_PUBLIC_DATA(short int) dax__parent_ref_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_file) AX_dax__uses_file;
 #define A_dax__uses_file (dax__bufferstack + AX_dax__uses_file)
 XBT_PUBLIC_DATA(short int) dax__uses_file_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_jobCount) AX_dax__adag_jobCount;
-#define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
-XBT_PUBLIC_DATA(short int) dax__adag_jobCount_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_register) AX_dax__uses_register;
-#define A_dax__uses_register AX_dax__uses_register
-XBT_PUBLIC_DATA(short int) dax__uses_register_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_name) AX_dax__adag_name;
-#define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
-XBT_PUBLIC_DATA(short int) dax__adag_name_isset;
-XBT_PUBLIC_DATA(AT_dax__job_level) AX_dax__job_level;
-#define A_dax__job_level (dax__bufferstack + AX_dax__job_level)
-XBT_PUBLIC_DATA(short int) dax__job_level_isset;
+XBT_PUBLIC_DATA(AT_dax__job_name) AX_dax__job_name;
+#define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
+XBT_PUBLIC_DATA(short int) dax__job_name_isset;
+XBT_PUBLIC_DATA(AT_dax__job_version) AX_dax__job_version;
+#define A_dax__job_version (dax__bufferstack + AX_dax__job_version)
+XBT_PUBLIC_DATA(short int) dax__job_version_isset;
 XBT_PUBLIC_DATA(AT_dax__job_namespace) AX_dax__job_namespace;
 #define A_dax__job_namespace (dax__bufferstack + AX_dax__job_namespace)
 XBT_PUBLIC_DATA(short int) dax__job_namespace_isset;
+XBT_PUBLIC_DATA(AT_dax__adag_xsi_c_schemaLocation) AX_dax__adag_xsi_c_schemaLocation;
+#define A_dax__adag_xsi_c_schemaLocation (dax__bufferstack + AX_dax__adag_xsi_c_schemaLocation)
+XBT_PUBLIC_DATA(short int) dax__adag_xsi_c_schemaLocation_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_fileCount) AX_dax__adag_fileCount;
 #define A_dax__adag_fileCount (dax__bufferstack + AX_dax__adag_fileCount)
 XBT_PUBLIC_DATA(short int) dax__adag_fileCount_isset;
-XBT_PUBLIC_DATA(AT_dax__uses_transfer) AX_dax__uses_transfer;
-#define A_dax__uses_transfer AX_dax__uses_transfer
-XBT_PUBLIC_DATA(short int) dax__uses_transfer_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_count) AX_dax__adag_count;
 #define A_dax__adag_count (dax__bufferstack + AX_dax__adag_count)
 XBT_PUBLIC_DATA(short int) dax__adag_count_isset;
-XBT_PUBLIC_DATA(AT_dax__child_ref) AX_dax__child_ref;
-#define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
-XBT_PUBLIC_DATA(short int) dax__child_ref_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_version) AX_dax__adag_version;
-#define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
-XBT_PUBLIC_DATA(short int) dax__adag_version_isset;
-XBT_PUBLIC_DATA(AT_dax__job_name) AX_dax__job_name;
-#define A_dax__job_name (dax__bufferstack + AX_dax__job_name)
-XBT_PUBLIC_DATA(short int) dax__job_name_isset;
+XBT_PUBLIC_DATA(AT_dax__adag_index) AX_dax__adag_index;
+#define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
+XBT_PUBLIC_DATA(short int) dax__adag_index_isset;
+XBT_PUBLIC_DATA(AT_dax__adag_xmlns_c_xsi) AX_dax__adag_xmlns_c_xsi;
+#define A_dax__adag_xmlns_c_xsi (dax__bufferstack + AX_dax__adag_xmlns_c_xsi)
+XBT_PUBLIC_DATA(short int) dax__adag_xmlns_c_xsi_isset;
+XBT_PUBLIC_DATA(AT_dax__adag_childCount) AX_dax__adag_childCount;
+#define A_dax__adag_childCount (dax__bufferstack + AX_dax__adag_childCount)
+XBT_PUBLIC_DATA(short int) dax__adag_childCount_isset;
 XBT_PUBLIC_DATA(AT_dax__adag_xmlns) AX_dax__adag_xmlns;
 #define A_dax__adag_xmlns (dax__bufferstack + AX_dax__adag_xmlns)
 XBT_PUBLIC_DATA(short int) dax__adag_xmlns_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_xsi_c_schemaLocation) AX_dax__adag_xsi_c_schemaLocation;
-#define A_dax__adag_xsi_c_schemaLocation (dax__bufferstack + AX_dax__adag_xsi_c_schemaLocation)
-XBT_PUBLIC_DATA(short int) dax__adag_xsi_c_schemaLocation_isset;
-XBT_PUBLIC_DATA(AT_dax__parent_ref) AX_dax__parent_ref;
-#define A_dax__parent_ref (dax__bufferstack + AX_dax__parent_ref)
-XBT_PUBLIC_DATA(short int) dax__parent_ref_isset;
+XBT_PUBLIC_DATA(AT_dax__adag_name) AX_dax__adag_name;
+#define A_dax__adag_name (dax__bufferstack + AX_dax__adag_name)
+XBT_PUBLIC_DATA(short int) dax__adag_name_isset;
+XBT_PUBLIC_DATA(AT_dax__adag_jobCount) AX_dax__adag_jobCount;
+#define A_dax__adag_jobCount (dax__bufferstack + AX_dax__adag_jobCount)
+XBT_PUBLIC_DATA(short int) dax__adag_jobCount_isset;
+XBT_PUBLIC_DATA(AT_dax__uses_register) AX_dax__uses_register;
+#define A_dax__uses_register AX_dax__uses_register
+XBT_PUBLIC_DATA(short int) dax__uses_register_isset;
+XBT_PUBLIC_DATA(AT_dax__adag_version) AX_dax__adag_version;
+#define A_dax__adag_version (dax__bufferstack + AX_dax__adag_version)
+XBT_PUBLIC_DATA(short int) dax__adag_version_isset;
+XBT_PUBLIC_DATA(AT_dax__uses_optional) AX_dax__uses_optional;
+#define A_dax__uses_optional AX_dax__uses_optional
+XBT_PUBLIC_DATA(short int) dax__uses_optional_isset;
+XBT_PUBLIC_DATA(AT_dax__job_level) AX_dax__job_level;
+#define A_dax__job_level (dax__bufferstack + AX_dax__job_level)
+XBT_PUBLIC_DATA(short int) dax__job_level_isset;
+XBT_PUBLIC_DATA(AT_dax__job_runtime) AX_dax__job_runtime;
+#define A_dax__job_runtime (dax__bufferstack + AX_dax__job_runtime)
+XBT_PUBLIC_DATA(short int) dax__job_runtime_isset;
 XBT_PUBLIC_DATA(AT_dax__uses_size) AX_dax__uses_size;
 #define A_dax__uses_size (dax__bufferstack + AX_dax__uses_size)
 XBT_PUBLIC_DATA(short int) dax__uses_size_isset;
-XBT_PUBLIC_DATA(AT_dax__adag_index) AX_dax__adag_index;
-#define A_dax__adag_index (dax__bufferstack + AX_dax__adag_index)
-XBT_PUBLIC_DATA(short int) dax__adag_index_isset;
+XBT_PUBLIC_DATA(AT_dax__uses_transfer) AX_dax__uses_transfer;
+#define A_dax__uses_transfer AX_dax__uses_transfer
+XBT_PUBLIC_DATA(short int) dax__uses_transfer_isset;
+XBT_PUBLIC_DATA(AT_dax__job_id) AX_dax__job_id;
+#define A_dax__job_id (dax__bufferstack + AX_dax__job_id)
+XBT_PUBLIC_DATA(short int) dax__job_id_isset;
+XBT_PUBLIC_DATA(AT_dax__child_ref) AX_dax__child_ref;
+#define A_dax__child_ref (dax__bufferstack + AX_dax__child_ref)
+XBT_PUBLIC_DATA(short int) dax__child_ref_isset;
+XBT_PUBLIC_DATA(AT_dax__uses_link) AX_dax__uses_link;
+#define A_dax__uses_link AX_dax__uses_link
+XBT_PUBLIC_DATA(short int) dax__uses_link_isset;
 
 /* XML application utilities. */
 XBT_PUBLIC(int) dax__element_context(int);
index 5bf6c4a..9117342 100644 (file)
@@ -837,6 +837,11 @@ void sg_config_init(int *argc, char **argv)
                      xbt_cfgelm_string, 1, 1, NULL, NULL);
     xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/lat_factor", "65472:11.6436;15424:3.48845;9376:2.59299;5776:2.18796;3484:1.88101;1426:1.61075;732:1.9503;257:1.95341;0:2.01467");
 
+    xbt_cfg_register(&_sg_cfg_set, "smpi/IB_penalty_factors",
+                     "Correction factor to communications using Infiniband model with contention (default value based on Stampede cluster profiling)",
+                     xbt_cfgelm_string, 1, 1, NULL, NULL);
+    xbt_cfg_setdefault_string(_sg_cfg_set, "smpi/IB_penalty_factors", "0.965;0.925;1.35");
+
     xbt_cfg_register(&_sg_cfg_set, "smpi/os",
                      "Small messages timings (MPI_Send minimum time for small messages)",
                      xbt_cfgelm_string, 1, 1, NULL, NULL);
similarity index 82%
rename from src/simix/smx_user.c
rename to src/simix/libsmx.c
index 16e1f6a..199f085 100644 (file)
@@ -1,10 +1,14 @@
-/* smx_user.c - public interface to simix                                   */
+/* libsmx.c - public interface to simix                                       */
+/* --------                                                                   */
+/* These functions are the only ones that are visible from the higher levels  */
+/* (most of them simply add some documentation to the generated simcall body) */
+/*                                                                            */
+/* This is somehow the "libc" of SimGrid                                      */
 
-/* Copyright (c) 2010-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* 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. */
+ * under the terms of the license (GNU LGPL) which comes with this package.   */
 
 #include "smx_private.h"
 #include "mc/mc_interface.h"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
-/* generate strings from the enumeration values */
-static const char* simcall_names[] = {
-#include "simcalls_generated_string.c"
-[SIMCALL_NONE] = "NONE"
-};
-
-#include "simcalls_generated_body.c"
+#include "popping_bodies.c"
 
 /**
  * \ingroup simix_host_management
@@ -218,20 +216,20 @@ double simcall_host_get_consumed_energy(smx_host_t host)
 
 /**
  * \ingroup simix_host_management
- * \brief Creates an action that executes some computation of an host.
+ * \brief Creates a synchro that executes some computation of an host.
  *
  * This function creates a SURF action and allocates the data necessary
- * to create the SIMIX action. It can raise a host_error exception if the host crashed.
+ * to create the SIMIX synchro. It can raise a host_error exception if the host crashed.
  *
- * \param name Name of the execution action to create
- * \param host SIMIX host where the action will be executed
+ * \param name Name of the execution synchro to create
+ * \param host SIMIX host where the synchro will be executed
  * \param computation_amount amount Computation amount (in bytes)
  * \param priority computation priority
  * \param bound
  * \param affinity_mask
- * \return A new SIMIX execution action
+ * \return A new SIMIX execution synchronization
  */
-smx_action_t simcall_host_execute(const char *name, smx_host_t host,
+smx_synchro_t simcall_host_execute(const char *name, smx_host_t host,
                                     double computation_amount,
                                     double priority, double bound, unsigned long affinity_mask)
 {
@@ -244,20 +242,20 @@ smx_action_t simcall_host_execute(const char *name, smx_host_t host,
 
 /**
  * \ingroup simix_host_management
- * \brief Creates an action that may involve parallel computation on
+ * \brief Creates a synchro that may involve parallel computation on
  * several hosts and communication between them.
  *
- * \param name Name of the execution action to create
- * \param host_nb Number of hosts where the action will be executed
- * \param host_list Array (of size host_nb) of hosts where the action will be executed
+ * \param name Name of the execution synchro to create
+ * \param host_nb Number of hosts where the synchro will be executed
+ * \param host_list Array (of size host_nb) of hosts where the synchro will be executed
  * \param computation_amount Array (of size host_nb) of computation amount of hosts (in bytes)
  * \param communication_amount Array (of size host_nb * host_nb) representing the communication
  * amount between each pair of hosts
  * \param amount the SURF action amount
  * \param rate the SURF action rate
- * \return A new SIMIX execution action
+ * \return A new SIMIX execution synchronization
  */
-smx_action_t simcall_host_parallel_execute(const char *name,
+smx_synchro_t simcall_host_parallel_execute(const char *name,
                                          int host_nb,
                                          smx_host_t *host_list,
                                          double *computation_amount,
@@ -287,61 +285,61 @@ smx_action_t simcall_host_parallel_execute(const char *name,
 
 /**
  * \ingroup simix_host_management
- * \brief Destroys an execution action.
+ * \brief Destroys an execution synchro.
  *
- * Destroys an action, freing its memory. This function cannot be called if there are a conditional waiting for it.
- * \param execution The execution action to destroy
+ * Destroys a synchro, freeing its memory. This function cannot be called if there are a conditional waiting for it.
+ * \param execution The execution synchro to destroy
  */
-void simcall_host_execution_destroy(smx_action_t execution)
+void simcall_host_execution_destroy(smx_synchro_t execution)
 {
   simcall_BODY_host_execution_destroy(execution);
 }
 
 /**
  * \ingroup simix_host_management
- * \brief Cancels an execution action.
+ * \brief Cancels an execution synchro.
  *
  * This functions stops the execution. It calls a surf function.
- * \param execution The execution action to cancel
+ * \param execution The execution synchro to cancel
  */
-void simcall_host_execution_cancel(smx_action_t execution)
+void simcall_host_execution_cancel(smx_synchro_t execution)
 {
   simcall_BODY_host_execution_cancel(execution);
 }
 
 /**
  * \ingroup simix_host_management
- * \brief Returns how much of an execution action remains to be done.
+ * \brief Returns how much of an execution synchro remains to be done.
  *
- * \param execution The execution action
+ * \param execution The execution synchro
  * \return The remaining amount
  */
-double simcall_host_execution_get_remains(smx_action_t execution)
+double simcall_host_execution_get_remains(smx_synchro_t execution)
 {
   return simcall_BODY_host_execution_get_remains(execution);
 }
 
 /**
  * \ingroup simix_host_management
- * \brief Returns the state of an execution action.
+ * \brief Returns the state of an execution synchro.
  *
- * \param execution The execution action
+ * \param execution The execution synchro
  * \return The state
  */
-e_smx_state_t simcall_host_execution_get_state(smx_action_t execution)
+e_smx_state_t simcall_host_execution_get_state(smx_synchro_t execution)
 {
   return simcall_BODY_host_execution_get_state(execution);
 }
 
 /**
  * \ingroup simix_host_management
- * \brief Changes the priority of an execution action.
+ * \brief Changes the priority of an execution synchro.
  *
  * This functions changes the priority only. It calls a surf function.
- * \param execution The execution action
+ * \param execution The execution synchro
  * \param priority The new priority
  */
-void simcall_host_execution_set_priority(smx_action_t execution, double priority)
+void simcall_host_execution_set_priority(smx_synchro_t execution, double priority)
 {
   /* checking for infinite values */
   xbt_assert(isfinite(priority), "priority is not finite!");
@@ -351,38 +349,38 @@ void simcall_host_execution_set_priority(smx_action_t execution, double priority
 
 /**
  * \ingroup simix_host_management
- * \brief Changes the capping (the maximum CPU utilization) of an execution action.
+ * \brief Changes the capping (the maximum CPU utilization) of an execution synchro.
  *
  * This functions changes the capping only. It calls a surf function.
- * \param execution The execution action
+ * \param execution The execution synchro
  * \param bound The new bound
  */
-void simcall_host_execution_set_bound(smx_action_t execution, double bound)
+void simcall_host_execution_set_bound(smx_synchro_t execution, double bound)
 {
   simcall_BODY_host_execution_set_bound(execution, bound);
 }
 
 /**
  * \ingroup simix_host_management
- * \brief Changes the CPU affinity of an execution action.
+ * \brief Changes the CPU affinity of an execution synchro.
  *
- * This functions changes the CPU affinity of an execution action. See taskset(1) on Linux.
- * \param execution The execution action
+ * This functions changes the CPU affinity of an execution synchro. See taskset(1) on Linux.
+ * \param execution The execution synchro
  * \param host Host
  * \param mask Affinity mask
  */
-void simcall_host_execution_set_affinity(smx_action_t execution, smx_host_t host, unsigned long mask)
+void simcall_host_execution_set_affinity(smx_synchro_t execution, smx_host_t host, unsigned long mask)
 {
   simcall_BODY_host_execution_set_affinity(execution, host, mask);
 }
 
 /**
  * \ingroup simix_host_management
- * \brief Waits for the completion of an execution action and destroy it.
+ * \brief Waits for the completion of an execution synchro and destroy it.
  *
- * \param execution The execution action
+ * \param execution The execution synchro
  */
-e_smx_state_t simcall_host_execution_wait(smx_action_t execution)
+e_smx_state_t simcall_host_execution_wait(smx_synchro_t execution)
 {
   return simcall_BODY_host_execution_wait(execution);
 }
@@ -398,7 +396,6 @@ e_smx_state_t simcall_host_execution_wait(smx_action_t execution)
  * \return The host object of the VM
  */
 void* simcall_vm_create(const char *name, smx_host_t phys_host){
-  /* will jump to SIMIX_pre_vm_create() in src/simix/smx_smurf_private.h */
   return simcall_BODY_vm_create(name, phys_host);
 }
 
@@ -410,7 +407,6 @@ void* simcall_vm_create(const char *name, smx_host_t phys_host){
  */
 void simcall_vm_start(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_start in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_start(vm);
 }
 
@@ -423,7 +419,6 @@ void simcall_vm_start(smx_host_t vm)
  */
 int simcall_vm_get_state(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_get_state in src/simix/smx_smurf_private.h */
   return simcall_BODY_vm_get_state(vm);
 }
 
@@ -436,31 +431,26 @@ int simcall_vm_get_state(smx_host_t vm)
  */
 void *simcall_vm_get_pm(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_get_pm in src/simix/smx_smurf_private.h */
   return simcall_BODY_vm_get_pm(vm);
 }
 
 void simcall_vm_set_bound(smx_host_t vm, double bound)
 {
-  /* will jump to SIMIX_pre_vm_set_bound in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_set_bound(vm, bound);
 }
 
 void simcall_vm_set_affinity(smx_host_t vm, smx_host_t pm, unsigned long mask)
 {
-  /* will jump to SIMIX_pre_vm_set_affinity in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_set_affinity(vm, pm, mask);
 }
 
 void simcall_host_get_params(smx_host_t vm, ws_params_t params)
 {
-  /* will jump to SIMIX_pre_host_get_params in src/simix/smx_smurf_private.h */
   simcall_BODY_host_get_params(vm, params);
 }
 
 void simcall_host_set_params(smx_host_t vm, ws_params_t params)
 {
-  /* will jump to SIMIX_pre_host_set_params in src/simix/smx_smurf_private.h */
   simcall_BODY_host_set_params(vm, params);
 }
 
@@ -473,7 +463,6 @@ void simcall_host_set_params(smx_host_t vm, ws_params_t params)
  */
 void simcall_vm_migrate(smx_host_t vm, smx_host_t host)
 {
-  /* will jump to SIMIX_pre_vm_migrate in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_migrate(vm, host);
 }
 
@@ -485,7 +474,6 @@ void simcall_vm_migrate(smx_host_t vm, smx_host_t host)
  */
 void simcall_vm_suspend(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_suspend in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_suspend(vm);
 }
 
@@ -497,7 +485,6 @@ void simcall_vm_suspend(smx_host_t vm)
  */
 void simcall_vm_resume(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_resume in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_resume(vm);
 }
 
@@ -509,7 +496,6 @@ void simcall_vm_resume(smx_host_t vm)
  */
 void simcall_vm_save(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_save in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_save(vm);
 }
 
@@ -521,7 +507,6 @@ void simcall_vm_save(smx_host_t vm)
  */
 void simcall_vm_restore(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_restore in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_restore(vm);
 }
 
@@ -533,7 +518,6 @@ void simcall_vm_restore(smx_host_t vm)
  */
 void simcall_vm_shutdown(smx_host_t vm)
 {
-  /* will jump to SIMIX_pre_vm_shutdown in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_shutdown(vm);
 }
 
@@ -545,7 +529,6 @@ void simcall_vm_shutdown(smx_host_t vm)
  */
 void simcall_vm_destroy(smx_host_t vm)
 {
-   /* will jump to SIMIX_pre_vm_destroy in src/simix/smx_smurf_private.h */
   simcall_BODY_vm_destroy(vm);
 }
 
@@ -637,7 +620,7 @@ void simcall_process_join(smx_process_t process, double timeout)
  * \ingroup simix_process_management
  * \brief Suspends a process.
  *
- * This function suspends the process by suspending the action
+ * This function suspends the process by suspending the synchro
  * it was waiting for completion.
  *
  * \param process a SIMIX process
@@ -653,7 +636,7 @@ void simcall_process_suspend(smx_process_t process)
  * \ingroup simix_process_management
  * \brief Resumes a suspended process.
  *
- * This function resumes a suspended process by resuming the action
+ * This function resumes a suspended process by resuming the synchro
  * it was waiting for completion.
  *
  * \param process a SIMIX process
@@ -843,11 +826,11 @@ XBT_PUBLIC(smx_process_t) simcall_process_restart(smx_process_t process)
 }
 /**
  * \ingroup simix_process_management
- * \brief Creates a new sleep SIMIX action.
+ * \brief Creates a new sleep SIMIX synchro.
  *
  * This function creates a SURF action and allocates the data necessary
- * to create the SIMIX action. It can raise a host_error exception if the
- * host crashed. The default SIMIX name of the action is "sleep".
+ * to create the SIMIX synchro. It can raise a host_error exception if the
+ * host crashed. The default SIMIX name of the synchro is "sleep".
  *
  *   \param duration Time duration of the sleep.
  *   \return A result telling whether the sleep was successful
@@ -897,11 +880,11 @@ smx_rdv_t simcall_rdv_get_by_name(const char *name)
 
 /**
  *  \ingroup simix_rdv_management
- *  \brief Counts the number of communication actions of a given host pending
+ *  \brief Counts the number of communication synchros of a given host pending
  *         on a rendez-vous point.
  *  \param rdv The rendez-vous point
  *  \param host The host to be counted
- *  \return The number of comm actions pending in the rdv
+ *  \return The number of comm synchros pending in the rdv
  */
 int simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
 {
@@ -914,7 +897,7 @@ int simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
  *  \param rdv The rendez-vous point
  *  \return The communication or NULL if empty
  */
-smx_action_t simcall_rdv_get_head(smx_rdv_t rdv)
+smx_synchro_t simcall_rdv_get_head(smx_rdv_t rdv)
 {
   return simcall_BODY_rdv_get_head(rdv);
 }
@@ -934,8 +917,8 @@ smx_process_t simcall_rdv_get_receiver(smx_rdv_t rdv)
  */
 void simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate,
                          void *src_buff, size_t src_buff_size,
-                         int (*match_fun)(void *, void *, smx_action_t),
-                         void (*copy_data_fun)(smx_action_t, void*, size_t), void *data,
+                         int (*match_fun)(void *, void *, smx_synchro_t),
+                         void (*copy_data_fun)(smx_synchro_t, void*, size_t), void *data,
                          double timeout)
 {
   /* checking for infinite values */
@@ -947,7 +930,7 @@ void simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, doubl
 
   if (MC_is_active()) {
     /* the model-checker wants two separate simcalls */
-    smx_action_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
+    smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
     comm = simcall_comm_isend(src, rdv, task_size, rate,
         src_buff, src_buff_size, match_fun, NULL, copy_data_fun, data, 0);
     simcall_comm_wait(comm, timeout);
@@ -962,11 +945,11 @@ void simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, doubl
 /**
  * \ingroup simix_comm_management
  */
-smx_action_t simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate,
+smx_synchro_t simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate,
                               void *src_buff, size_t src_buff_size,
-                              int (*match_fun)(void *, void *, smx_action_t),
+                              int (*match_fun)(void *, void *, smx_synchro_t),
                               void (*clean_fun)(void *),
-                              void (*copy_data_fun)(smx_action_t, void*, size_t),
+                              void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                               void *data,
                               int detached)
 {
@@ -985,8 +968,8 @@ smx_action_t simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_si
  * \ingroup simix_comm_management
  */
 void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
-                       int (*match_fun)(void *, void *, smx_action_t),
-                       void (*copy_data_fun)(smx_action_t, void*, size_t),
+                       int (*match_fun)(void *, void *, smx_synchro_t),
+                       void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                        void *data, double timeout, double rate)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
@@ -994,7 +977,7 @@ void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
 
   if (MC_is_active()) {
     /* the model-checker wants two separate simcalls */
-    smx_action_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
+    smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
     comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
                               match_fun, copy_data_fun, data, rate);
     simcall_comm_wait(comm, timeout);
@@ -1008,9 +991,9 @@ void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
 /**
  * \ingroup simix_comm_management
  */
-smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size,
-                                int (*match_fun)(void *, void *, smx_action_t),
-                                void (*copy_data_fun)(smx_action_t, void*, size_t),
+smx_synchro_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size,
+                                int (*match_fun)(void *, void *, smx_synchro_t),
+                                void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                 void *data, double rate)
 {
   xbt_assert(rdv, "No rendez-vous point defined for irecv");
@@ -1022,8 +1005,8 @@ smx_action_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_
 /**
  * \ingroup simix_comm_management
  */
-smx_action_t simcall_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag,
-                                int (*match_fun)(void *, void *, smx_action_t), void *data)
+smx_synchro_t simcall_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag,
+                                int (*match_fun)(void *, void *, smx_synchro_t), void *data)
 {
   xbt_assert(rdv, "No rendez-vous point defined for iprobe");
 
@@ -1033,7 +1016,7 @@ smx_action_t simcall_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag,
 /**
  * \ingroup simix_comm_management
  */
-void simcall_comm_cancel(smx_action_t comm)
+void simcall_comm_cancel(smx_synchro_t comm)
 {
   simcall_BODY_comm_cancel(comm);
 }
@@ -1059,7 +1042,7 @@ int simcall_comm_testany(xbt_dynar_t comms)
 /**
  * \ingroup simix_comm_management
  */
-void simcall_comm_wait(smx_action_t comm, double timeout)
+void simcall_comm_wait(smx_synchro_t comm, double timeout)
 {
   xbt_assert(isfinite(timeout), "timeout is not finite!");
   simcall_BODY_comm_wait(comm, timeout);
@@ -1067,18 +1050,18 @@ void simcall_comm_wait(smx_action_t comm, double timeout)
 
 #ifdef HAVE_TRACING
 /**
- * \brief Set the category of an action.
+ * \brief Set the category of an synchro.
  *
  * This functions changes the category only. It calls a surf function.
- * \param execution The execution action
+ * \param execution The execution synchro
  * \param category The tracing category
  */
-void simcall_set_category(smx_action_t action, const char *category)
+void simcall_set_category(smx_synchro_t synchro, const char *category)
 {
   if (category == NULL) {
     return;
   }
-  simcall_BODY_set_category(action, category);
+  simcall_BODY_set_category(synchro, category);
 }
 #endif
 
@@ -1086,7 +1069,7 @@ void simcall_set_category(smx_action_t action, const char *category)
  * \ingroup simix_comm_management
  *
  */
-int simcall_comm_test(smx_action_t comm)
+int simcall_comm_test(smx_synchro_t comm)
 {
   return simcall_BODY_comm_test(comm);
 }
@@ -1095,7 +1078,7 @@ int simcall_comm_test(smx_action_t comm)
  * \ingroup simix_comm_management
  *
  */
-double simcall_comm_get_remains(smx_action_t comm)
+double simcall_comm_get_remains(smx_synchro_t comm)
 {
   return simcall_BODY_comm_get_remains(comm);
 }
@@ -1104,7 +1087,7 @@ double simcall_comm_get_remains(smx_action_t comm)
  * \ingroup simix_comm_management
  *
  */
-e_smx_state_t simcall_comm_get_state(smx_action_t comm)
+e_smx_state_t simcall_comm_get_state(smx_synchro_t comm)
 {
   return simcall_BODY_comm_get_state(comm);
 }
@@ -1113,7 +1096,7 @@ e_smx_state_t simcall_comm_get_state(smx_action_t comm)
  * \ingroup simix_comm_management
  *
  */
-void *simcall_comm_get_src_data(smx_action_t comm)
+void *simcall_comm_get_src_data(smx_synchro_t comm)
 {
   return simcall_BODY_comm_get_src_data(comm);
 }
@@ -1122,7 +1105,7 @@ void *simcall_comm_get_src_data(smx_action_t comm)
  * \ingroup simix_comm_management
  *
  */
-void *simcall_comm_get_dst_data(smx_action_t comm)
+void *simcall_comm_get_dst_data(smx_synchro_t comm)
 {
   return simcall_BODY_comm_get_dst_data(comm);
 }
@@ -1131,7 +1114,7 @@ void *simcall_comm_get_dst_data(smx_action_t comm)
  * \ingroup simix_comm_management
  *
  */
-smx_process_t simcall_comm_get_src_proc(smx_action_t comm)
+smx_process_t simcall_comm_get_src_proc(smx_synchro_t comm)
 {
   return simcall_BODY_comm_get_src_proc(comm);
 }
@@ -1140,13 +1123,13 @@ smx_process_t simcall_comm_get_src_proc(smx_action_t comm)
  * \ingroup simix_comm_management
  *
  */
-smx_process_t simcall_comm_get_dst_proc(smx_action_t comm)
+smx_process_t simcall_comm_get_dst_proc(smx_synchro_t comm)
 {
   return simcall_BODY_comm_get_dst_proc(comm);
 }
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-int simcall_comm_is_latency_bounded(smx_action_t comm)
+int simcall_comm_is_latency_bounded(smx_synchro_t comm)
 {
   return simcall_BODY_comm_is_latency_bounded(comm);
 }
@@ -1476,39 +1459,24 @@ xbt_dict_t simcall_storage_get_content(smx_storage_t storage)
   return simcall_BODY_storage_get_content(storage);
 }
 
+
+
 #ifdef HAVE_MC
 
-void *simcall_mc_snapshot(void)
-{
+void *simcall_mc_snapshot(void) {
   return simcall_BODY_mc_snapshot();
 }
 
-int simcall_mc_compare_snapshots(void *s1, void *s2){
+int simcall_mc_compare_snapshots(void *s1, void *s2) {
   return simcall_BODY_mc_compare_snapshots(s1, s2);
 }
 
-int simcall_mc_random(int min, int max)
-{
+int simcall_mc_random(int min, int max) {
   return simcall_BODY_mc_random(min, max);
 }
 
-
 #endif /* HAVE_MC */
 
-/* ****************************************************************************************** */
-/* TUTORIAL: New API                                                                          */
-/* All functions for simcall                                                                  */
-/* ****************************************************************************************** */
-int simcall_new_api_fct(const char* param1, double param2){
-  smx_simcall_t simcall = SIMIX_simcall_mine();
-  simcall->call = SIMCALL_NEW_API_INIT;
-  simcall->new_api.param1 = param1;
-  simcall->new_api.param2 = param2;
-
-  SIMIX_simcall_push(simcall->issuer);
-  return simcall->new_api.result;
-}
-
 /* ************************************************************************** */
 
 /** @brief returns a printable string representing a simcall */
diff --git a/src/simix/popping.c b/src/simix/popping.c
new file mode 100644 (file)
index 0000000..0d510c5
--- /dev/null
@@ -0,0 +1,61 @@
+/* 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. */
+
+#include "smx_private.h"
+#include "xbt/fifo.h"
+#include "xbt/xbt_os_thread.h"
+#ifdef HAVE_MC
+#include "mc/mc_private.h"
+#endif
+
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_popping, simix,
+                                "Popping part of SIMIX (transmuting from user request into kernel handlers)");
+
+void SIMIX_simcall_answer(smx_simcall_t simcall)
+{
+  if (simcall->issuer != simix_global->maestro_process){
+    XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call,
+        simcall->issuer->name, simcall->issuer);
+    simcall->issuer->simcall.call = SIMCALL_NONE;
+/*    This check should be useless and slows everyone. Reactivate if you see something
+ *    weird in process scheduling.
+ */
+/*    if(!xbt_dynar_member(simix_global->process_to_run, &(simcall->issuer))) */
+    xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, simcall->issuer);
+/*    else DIE_IMPOSSIBLE; */
+  }
+}
+
+void SIMIX_simcall_exit(smx_synchro_t synchro)
+{
+  switch (synchro->type) {
+
+    case SIMIX_SYNC_EXECUTE:
+    case SIMIX_SYNC_PARALLEL_EXECUTE:
+      SIMIX_post_host_execute(synchro);
+      break;
+
+    case SIMIX_SYNC_COMMUNICATE:
+      SIMIX_post_comm(synchro);
+      break;
+
+    case SIMIX_SYNC_SLEEP:
+      SIMIX_post_process_sleep(synchro);
+      break;
+
+    case SIMIX_SYNC_JOIN:
+      SIMIX_post_process_sleep(synchro);
+      break;
+
+    case SIMIX_SYNC_SYNCHRO:
+      SIMIX_post_synchro(synchro);
+      break;
+
+    case SIMIX_SYNC_IO:
+      SIMIX_post_io(synchro);
+      break;
+  }
+}
similarity index 53%
rename from src/simix/simcalls_generated_args_getter_setter.h
rename to src/simix/popping_accessors.h
index 9a9635e..aa44bae 100644 (file)
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
-
-static inline const char* simcall_host_get_by_name__get__name(smx_simcall_t simcall){
+/**********************************************************************/
+/* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
+
+/*
+ * Note that the name comes from http://en.wikipedia.org/wiki/Popping
+ * Indeed, the control flow is doing a strange dance in there.
+ *
+ * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
+ */
+
+
+static inline const char* simcall_host_get_by_name__get__name(smx_simcall_t simcall) {
   return  simcall->args[0].cc;
 }
-static inline void simcall_host_get_by_name__set__name(smx_simcall_t simcall, const char* arg){
+static inline void simcall_host_get_by_name__set__name(smx_simcall_t simcall, const char* arg) {
     simcall->args[0].cc = arg;
 }
-static inline smx_host_t simcall_host_get_name__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_host_get_by_name__get__result(smx_simcall_t simcall){
+    return (smx_host_t) simcall->result.dp;
+}
+static inline void simcall_host_get_by_name__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_host_t simcall_host_get_name__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_name__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_name__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_on__get__host(smx_simcall_t simcall){
+static inline const char* simcall_host_get_name__get__result(smx_simcall_t simcall){
+    return  simcall->result.cc;
+}
+static inline void simcall_host_get_name__set__result(smx_simcall_t simcall, const char* result){
+    simcall->result.cc = result;
+}
+
+static inline smx_host_t simcall_host_on__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_on__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_on__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_off__get__host(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_host_off__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_off__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_off__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_properties__get__host(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_host_get_properties__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_properties__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_properties__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_core__get__host(smx_simcall_t simcall){
+static inline xbt_dict_t simcall_host_get_properties__get__result(smx_simcall_t simcall){
+    return (xbt_dict_t) simcall->result.dp;
+}
+static inline void simcall_host_get_properties__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_host_t simcall_host_get_core__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_core__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_core__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_process_list__get__host(smx_simcall_t simcall){
+static inline int simcall_host_get_core__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_host_get_core__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_host_t simcall_host_get_process_list__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_process_list__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_process_list__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_speed__get__host(smx_simcall_t simcall){
+static inline xbt_swag_t simcall_host_get_process_list__get__result(smx_simcall_t simcall){
+    return (xbt_swag_t) simcall->result.dp;
+}
+static inline void simcall_host_get_process_list__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_host_t simcall_host_get_speed__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_speed__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_speed__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_available_speed__get__host(smx_simcall_t simcall){
+static inline double simcall_host_get_speed__get__result(smx_simcall_t simcall){
+    return  simcall->result.d;
+}
+static inline void simcall_host_get_speed__set__result(smx_simcall_t simcall, double result){
+    simcall->result.d = result;
+}
+
+static inline smx_host_t simcall_host_get_available_speed__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_available_speed__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_available_speed__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_state__get__host(smx_simcall_t simcall){
+static inline double simcall_host_get_available_speed__get__result(smx_simcall_t simcall){
+    return  simcall->result.d;
+}
+static inline void simcall_host_get_available_speed__set__result(smx_simcall_t simcall, double result){
+    simcall->result.d = result;
+}
+
+static inline smx_host_t simcall_host_get_state__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_state__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_state__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_current_power_peak__get__host(smx_simcall_t simcall){
+static inline int simcall_host_get_state__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_host_get_state__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_host_t simcall_host_get_current_power_peak__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_current_power_peak__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_current_power_peak__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_power_peak_at__get__host(smx_simcall_t simcall){
+static inline double simcall_host_get_current_power_peak__get__result(smx_simcall_t simcall){
+    return  simcall->result.d;
+}
+static inline void simcall_host_get_current_power_peak__set__result(smx_simcall_t simcall, double result){
+    simcall->result.d = result;
+}
+
+static inline smx_host_t simcall_host_get_power_peak_at__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_power_peak_at__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_power_peak_at__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_host_get_power_peak_at__get__pstate_index(smx_simcall_t simcall){
+static inline int simcall_host_get_power_peak_at__get__pstate_index(smx_simcall_t simcall) {
   return  simcall->args[1].i;
 }
-static inline void simcall_host_get_power_peak_at__set__pstate_index(smx_simcall_t simcall, int arg){
+static inline void simcall_host_get_power_peak_at__set__pstate_index(smx_simcall_t simcall, int arg) {
     simcall->args[1].i = arg;
 }
-static inline smx_host_t simcall_host_get_nb_pstates__get__host(smx_simcall_t simcall){
+static inline double simcall_host_get_power_peak_at__get__result(smx_simcall_t simcall){
+    return  simcall->result.d;
+}
+static inline void simcall_host_get_power_peak_at__set__result(smx_simcall_t simcall, double result){
+    simcall->result.d = result;
+}
+
+static inline smx_host_t simcall_host_get_nb_pstates__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_nb_pstates__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_nb_pstates__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_set_power_peak_at__get__host(smx_simcall_t simcall){
+static inline int simcall_host_get_nb_pstates__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_host_get_nb_pstates__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_host_t simcall_host_set_power_peak_at__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_set_power_peak_at__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_set_power_peak_at__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_host_set_power_peak_at__get__pstate_index(smx_simcall_t simcall){
+static inline int simcall_host_set_power_peak_at__get__pstate_index(smx_simcall_t simcall) {
   return  simcall->args[1].i;
 }
-static inline void simcall_host_set_power_peak_at__set__pstate_index(smx_simcall_t simcall, int arg){
+static inline void simcall_host_set_power_peak_at__set__pstate_index(smx_simcall_t simcall, int arg) {
     simcall->args[1].i = arg;
 }
-static inline smx_host_t simcall_host_get_consumed_energy__get__host(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_host_get_consumed_energy__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_consumed_energy__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_consumed_energy__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_host_execute__get__name(smx_simcall_t simcall){
+static inline double simcall_host_get_consumed_energy__get__result(smx_simcall_t simcall){
+    return  simcall->result.d;
+}
+static inline void simcall_host_get_consumed_energy__set__result(smx_simcall_t simcall, double result){
+    simcall->result.d = result;
+}
+
+static inline const char* simcall_host_execute__get__name(smx_simcall_t simcall) {
   return  simcall->args[0].cc;
 }
-static inline void simcall_host_execute__set__name(smx_simcall_t simcall, const char* arg){
+static inline void simcall_host_execute__set__name(smx_simcall_t simcall, const char* arg) {
     simcall->args[0].cc = arg;
 }
-static inline smx_host_t simcall_host_execute__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_host_execute__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_host_execute__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execute__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline double simcall_host_execute__get__computation_amount(smx_simcall_t simcall){
+static inline double simcall_host_execute__get__computation_amount(smx_simcall_t simcall) {
   return  simcall->args[2].d;
 }
-static inline void simcall_host_execute__set__computation_amount(smx_simcall_t simcall, double arg){
+static inline void simcall_host_execute__set__computation_amount(smx_simcall_t simcall, double arg) {
     simcall->args[2].d = arg;
 }
-static inline double simcall_host_execute__get__priority(smx_simcall_t simcall){
+static inline double simcall_host_execute__get__priority(smx_simcall_t simcall) {
   return  simcall->args[3].d;
 }
-static inline void simcall_host_execute__set__priority(smx_simcall_t simcall, double arg){
+static inline void simcall_host_execute__set__priority(smx_simcall_t simcall, double arg) {
     simcall->args[3].d = arg;
 }
-static inline double simcall_host_execute__get__bound(smx_simcall_t simcall){
+static inline double simcall_host_execute__get__bound(smx_simcall_t simcall) {
   return  simcall->args[4].d;
 }
-static inline void simcall_host_execute__set__bound(smx_simcall_t simcall, double arg){
+static inline void simcall_host_execute__set__bound(smx_simcall_t simcall, double arg) {
     simcall->args[4].d = arg;
 }
-static inline unsigned long simcall_host_execute__get__affinity_mask(smx_simcall_t simcall){
+static inline unsigned long simcall_host_execute__get__affinity_mask(smx_simcall_t simcall) {
   return  simcall->args[5].ul;
 }
-static inline void simcall_host_execute__set__affinity_mask(smx_simcall_t simcall, unsigned long arg){
+static inline void simcall_host_execute__set__affinity_mask(smx_simcall_t simcall, unsigned long arg) {
     simcall->args[5].ul = arg;
 }
-static inline const char* simcall_host_parallel_execute__get__name(smx_simcall_t simcall){
+static inline smx_synchro_t simcall_host_execute__get__result(smx_simcall_t simcall){
+    return (smx_synchro_t) simcall->result.dp;
+}
+static inline void simcall_host_execute__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline const char* simcall_host_parallel_execute__get__name(smx_simcall_t simcall) {
   return  simcall->args[0].cc;
 }
-static inline void simcall_host_parallel_execute__set__name(smx_simcall_t simcall, const char* arg){
+static inline void simcall_host_parallel_execute__set__name(smx_simcall_t simcall, const char* arg) {
     simcall->args[0].cc = arg;
 }
-static inline int simcall_host_parallel_execute__get__host_nb(smx_simcall_t simcall){
+static inline int simcall_host_parallel_execute__get__host_nb(smx_simcall_t simcall) {
   return  simcall->args[1].i;
 }
-static inline void simcall_host_parallel_execute__set__host_nb(smx_simcall_t simcall, int arg){
+static inline void simcall_host_parallel_execute__set__host_nb(smx_simcall_t simcall, int arg) {
     simcall->args[1].i = arg;
 }
-static inline smx_host_t* simcall_host_parallel_execute__get__host_list(smx_simcall_t simcall){
+static inline smx_host_t* simcall_host_parallel_execute__get__host_list(smx_simcall_t simcall) {
   return (smx_host_t*) simcall->args[2].dp;
 }
-static inline void simcall_host_parallel_execute__set__host_list(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_parallel_execute__set__host_list(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline double* simcall_host_parallel_execute__get__computation_amount(smx_simcall_t simcall){
+static inline double* simcall_host_parallel_execute__get__computation_amount(smx_simcall_t simcall) {
   return (double*) simcall->args[3].dp;
 }
-static inline void simcall_host_parallel_execute__set__computation_amount(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_parallel_execute__set__computation_amount(smx_simcall_t simcall, void* arg) {
     simcall->args[3].dp = arg;
 }
-static inline double* simcall_host_parallel_execute__get__communication_amount(smx_simcall_t simcall){
+static inline double* simcall_host_parallel_execute__get__communication_amount(smx_simcall_t simcall) {
   return (double*) simcall->args[4].dp;
 }
-static inline void simcall_host_parallel_execute__set__communication_amount(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_parallel_execute__set__communication_amount(smx_simcall_t simcall, void* arg) {
     simcall->args[4].dp = arg;
 }
-static inline double simcall_host_parallel_execute__get__amount(smx_simcall_t simcall){
+static inline double simcall_host_parallel_execute__get__amount(smx_simcall_t simcall) {
   return  simcall->args[5].d;
 }
-static inline void simcall_host_parallel_execute__set__amount(smx_simcall_t simcall, double arg){
+static inline void simcall_host_parallel_execute__set__amount(smx_simcall_t simcall, double arg) {
     simcall->args[5].d = arg;
 }
-static inline double simcall_host_parallel_execute__get__rate(smx_simcall_t simcall){
+static inline double simcall_host_parallel_execute__get__rate(smx_simcall_t simcall) {
   return  simcall->args[6].d;
 }
-static inline void simcall_host_parallel_execute__set__rate(smx_simcall_t simcall, double arg){
+static inline void simcall_host_parallel_execute__set__rate(smx_simcall_t simcall, double arg) {
     simcall->args[6].d = arg;
 }
-static inline smx_action_t simcall_host_execution_destroy__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline smx_synchro_t simcall_host_parallel_execute__get__result(smx_simcall_t simcall){
+    return (smx_synchro_t) simcall->result.dp;
 }
-static inline void simcall_host_execution_destroy__set__execution(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_parallel_execute__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_synchro_t simcall_host_execution_destroy__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_host_execution_destroy__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_host_execution_cancel__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_host_execution_cancel__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_host_execution_cancel__set__execution(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execution_cancel__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_host_execution_get_remains__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_host_execution_get_remains__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_host_execution_get_remains__set__execution(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execution_get_remains__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_host_execution_get_state__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline double simcall_host_execution_get_remains__get__result(smx_simcall_t simcall){
+    return  simcall->result.d;
 }
-static inline void simcall_host_execution_get_state__set__execution(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execution_get_remains__set__result(smx_simcall_t simcall, double result){
+    simcall->result.d = result;
+}
+
+static inline smx_synchro_t simcall_host_execution_get_state__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_host_execution_get_state__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_host_execution_set_priority__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline e_smx_state_t simcall_host_execution_get_state__get__result(smx_simcall_t simcall){
+    return (e_smx_state_t) simcall->result.i;
+}
+static inline void simcall_host_execution_get_state__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
 }
-static inline void simcall_host_execution_set_priority__set__execution(smx_simcall_t simcall, void* arg){
+
+static inline smx_synchro_t simcall_host_execution_set_priority__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_host_execution_set_priority__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline double simcall_host_execution_set_priority__get__priority(smx_simcall_t simcall){
+static inline double simcall_host_execution_set_priority__get__priority(smx_simcall_t simcall) {
   return  simcall->args[1].d;
 }
-static inline void simcall_host_execution_set_priority__set__priority(smx_simcall_t simcall, double arg){
+static inline void simcall_host_execution_set_priority__set__priority(smx_simcall_t simcall, double arg) {
     simcall->args[1].d = arg;
 }
-static inline smx_action_t simcall_host_execution_set_bound__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_host_execution_set_bound__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_host_execution_set_bound__set__execution(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execution_set_bound__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline double simcall_host_execution_set_bound__get__bound(smx_simcall_t simcall){
+static inline double simcall_host_execution_set_bound__get__bound(smx_simcall_t simcall) {
   return  simcall->args[1].d;
 }
-static inline void simcall_host_execution_set_bound__set__bound(smx_simcall_t simcall, double arg){
+static inline void simcall_host_execution_set_bound__set__bound(smx_simcall_t simcall, double arg) {
     simcall->args[1].d = arg;
 }
-static inline smx_action_t simcall_host_execution_set_affinity__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_host_execution_set_affinity__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_host_execution_set_affinity__set__execution(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execution_set_affinity__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_execution_set_affinity__get__ws(smx_simcall_t simcall){
+static inline smx_host_t simcall_host_execution_set_affinity__get__ws(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_host_execution_set_affinity__set__ws(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execution_set_affinity__set__ws(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline unsigned long simcall_host_execution_set_affinity__get__mask(smx_simcall_t simcall){
+static inline unsigned long simcall_host_execution_set_affinity__get__mask(smx_simcall_t simcall) {
   return  simcall->args[2].ul;
 }
-static inline void simcall_host_execution_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg){
+static inline void simcall_host_execution_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg) {
     simcall->args[2].ul = arg;
 }
-static inline smx_action_t simcall_host_execution_wait__get__execution(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_host_execution_wait__get__execution(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_host_execution_wait__set__execution(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_execution_wait__set__execution(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_mounted_storage_list__get__host(smx_simcall_t simcall){
+static inline int simcall_host_execution_wait__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_host_execution_wait__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_host_t simcall_host_get_mounted_storage_list__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_mounted_storage_list__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_mounted_storage_list__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_attached_storage_list__get__host(smx_simcall_t simcall){
+static inline xbt_dict_t simcall_host_get_mounted_storage_list__get__result(smx_simcall_t simcall){
+    return (xbt_dict_t) simcall->result.dp;
+}
+static inline void simcall_host_get_mounted_storage_list__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_host_t simcall_host_get_attached_storage_list__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_attached_storage_list__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_attached_storage_list__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_host_get_params__get__ind_vm(smx_simcall_t simcall){
+static inline xbt_dynar_t simcall_host_get_attached_storage_list__get__result(smx_simcall_t simcall){
+    return (xbt_dynar_t) simcall->result.dp;
+}
+static inline void simcall_host_get_attached_storage_list__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_host_t simcall_host_get_params__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_get_params__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_params__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline ws_params_t simcall_host_get_params__get__params(smx_simcall_t simcall){
+static inline ws_params_t simcall_host_get_params__get__params(smx_simcall_t simcall) {
   return (ws_params_t) simcall->args[1].dp;
 }
-static inline void simcall_host_get_params__set__params(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_get_params__set__params(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_host_t simcall_host_set_params__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_host_set_params__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_host_set_params__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_set_params__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline ws_params_t simcall_host_set_params__get__params(smx_simcall_t simcall){
+static inline ws_params_t simcall_host_set_params__get__params(smx_simcall_t simcall) {
   return (ws_params_t) simcall->args[1].dp;
 }
-static inline void simcall_host_set_params__set__params(smx_simcall_t simcall, void* arg){
+static inline void simcall_host_set_params__set__params(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline const char* simcall_vm_create__get__name(smx_simcall_t simcall){
+
+static inline const char* simcall_vm_create__get__name(smx_simcall_t simcall) {
   return  simcall->args[0].cc;
 }
-static inline void simcall_vm_create__set__name(smx_simcall_t simcall, const char* arg){
+static inline void simcall_vm_create__set__name(smx_simcall_t simcall, const char* arg) {
     simcall->args[0].cc = arg;
 }
-static inline smx_host_t simcall_vm_create__get__ind_pm(smx_simcall_t simcall){
+static inline smx_host_t simcall_vm_create__get__ind_pm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_vm_create__set__ind_pm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_create__set__ind_pm(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_host_t simcall_vm_start__get__ind_vm(smx_simcall_t simcall){
+static inline smx_host_t simcall_vm_create__get__result(smx_simcall_t simcall){
+    return (smx_host_t) simcall->result.dp;
+}
+static inline void simcall_vm_create__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_host_t simcall_vm_start__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_start__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_start__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_get_state__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_get_state__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_get_state__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_get_state__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_migrate__get__ind_vm(smx_simcall_t simcall){
+static inline int simcall_vm_get_state__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_vm_get_state__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_host_t simcall_vm_migrate__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_migrate__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_migrate__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_migrate__get__ind_dst_pm(smx_simcall_t simcall){
+static inline smx_host_t simcall_vm_migrate__get__ind_dst_pm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_vm_migrate__set__ind_dst_pm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_migrate__set__ind_dst_pm(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_host_t simcall_vm_get_pm__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_get_pm__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_get_pm__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_get_pm__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_set_bound__get__ind_vm(smx_simcall_t simcall){
+static inline void* simcall_vm_get_pm__get__result(smx_simcall_t simcall){
+    return  simcall->result.dp;
+}
+static inline void simcall_vm_get_pm__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_host_t simcall_vm_set_bound__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_set_bound__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_set_bound__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline double simcall_vm_set_bound__get__bound(smx_simcall_t simcall){
+static inline double simcall_vm_set_bound__get__bound(smx_simcall_t simcall) {
   return  simcall->args[1].d;
 }
-static inline void simcall_vm_set_bound__set__bound(smx_simcall_t simcall, double arg){
+static inline void simcall_vm_set_bound__set__bound(smx_simcall_t simcall, double arg) {
     simcall->args[1].d = arg;
 }
-static inline smx_host_t simcall_vm_set_affinity__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_set_affinity__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_set_affinity__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_set_affinity__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_set_affinity__get__ind_pm(smx_simcall_t simcall){
+static inline smx_host_t simcall_vm_set_affinity__get__ind_pm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_vm_set_affinity__set__ind_pm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_set_affinity__set__ind_pm(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline unsigned long simcall_vm_set_affinity__get__mask(smx_simcall_t simcall){
+static inline unsigned long simcall_vm_set_affinity__get__mask(smx_simcall_t simcall) {
   return  simcall->args[2].ul;
 }
-static inline void simcall_vm_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg){
+static inline void simcall_vm_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg) {
     simcall->args[2].ul = arg;
 }
-static inline smx_host_t simcall_vm_destroy__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_destroy__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_destroy__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_destroy__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_suspend__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_suspend__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_suspend__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_suspend__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_resume__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_resume__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_resume__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_resume__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_shutdown__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_shutdown__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_shutdown__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_shutdown__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_save__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_save__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_save__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_save__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_vm_restore__get__ind_vm(smx_simcall_t simcall){
+
+static inline smx_host_t simcall_vm_restore__get__ind_vm(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[0].dp;
 }
-static inline void simcall_vm_restore__set__ind_vm(smx_simcall_t simcall, void* arg){
+static inline void simcall_vm_restore__set__ind_vm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t* simcall_process_create__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t* simcall_process_create__get__process(smx_simcall_t simcall) {
   return (smx_process_t*) simcall->args[0].dp;
 }
-static inline void simcall_process_create__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_create__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_process_create__get__name(smx_simcall_t simcall){
+static inline const char* simcall_process_create__get__name(smx_simcall_t simcall) {
   return  simcall->args[1].cc;
 }
-static inline void simcall_process_create__set__name(smx_simcall_t simcall, const char* arg){
+static inline void simcall_process_create__set__name(smx_simcall_t simcall, const char* arg) {
     simcall->args[1].cc = arg;
 }
-static inline xbt_main_func_t simcall_process_create__get__code(smx_simcall_t simcall){
+static inline xbt_main_func_t simcall_process_create__get__code(smx_simcall_t simcall) {
   return (xbt_main_func_t) simcall->args[2].fp;
 }
-static inline void simcall_process_create__set__code(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_process_create__set__code(smx_simcall_t simcall, FPtr arg) {
     simcall->args[2].fp = arg;
 }
-static inline void* simcall_process_create__get__data(smx_simcall_t simcall){
+static inline void* simcall_process_create__get__data(smx_simcall_t simcall) {
   return  simcall->args[3].dp;
 }
-static inline void simcall_process_create__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_create__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[3].dp = arg;
 }
-static inline const char* simcall_process_create__get__hostname(smx_simcall_t simcall){
+static inline const char* simcall_process_create__get__hostname(smx_simcall_t simcall) {
   return  simcall->args[4].cc;
 }
-static inline void simcall_process_create__set__hostname(smx_simcall_t simcall, const char* arg){
+static inline void simcall_process_create__set__hostname(smx_simcall_t simcall, const char* arg) {
     simcall->args[4].cc = arg;
 }
-static inline double simcall_process_create__get__kill_time(smx_simcall_t simcall){
+static inline double simcall_process_create__get__kill_time(smx_simcall_t simcall) {
   return  simcall->args[5].d;
 }
-static inline void simcall_process_create__set__kill_time(smx_simcall_t simcall, double arg){
+static inline void simcall_process_create__set__kill_time(smx_simcall_t simcall, double arg) {
     simcall->args[5].d = arg;
 }
-static inline int simcall_process_create__get__argc(smx_simcall_t simcall){
+static inline int simcall_process_create__get__argc(smx_simcall_t simcall) {
   return  simcall->args[6].i;
 }
-static inline void simcall_process_create__set__argc(smx_simcall_t simcall, int arg){
+static inline void simcall_process_create__set__argc(smx_simcall_t simcall, int arg) {
     simcall->args[6].i = arg;
 }
-static inline char** simcall_process_create__get__argv(smx_simcall_t simcall){
+static inline char** simcall_process_create__get__argv(smx_simcall_t simcall) {
   return (char**) simcall->args[7].dp;
 }
-static inline void simcall_process_create__set__argv(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_create__set__argv(smx_simcall_t simcall, void* arg) {
     simcall->args[7].dp = arg;
 }
-static inline xbt_dict_t simcall_process_create__get__properties(smx_simcall_t simcall){
+static inline xbt_dict_t simcall_process_create__get__properties(smx_simcall_t simcall) {
   return (xbt_dict_t) simcall->args[8].dp;
 }
-static inline void simcall_process_create__set__properties(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_create__set__properties(smx_simcall_t simcall, void* arg) {
     simcall->args[8].dp = arg;
 }
-static inline int simcall_process_create__get__auto_restart(smx_simcall_t simcall){
+static inline int simcall_process_create__get__auto_restart(smx_simcall_t simcall) {
   return  simcall->args[9].i;
 }
-static inline void simcall_process_create__set__auto_restart(smx_simcall_t simcall, int arg){
+static inline void simcall_process_create__set__auto_restart(smx_simcall_t simcall, int arg) {
     simcall->args[9].i = arg;
 }
-static inline smx_process_t simcall_process_kill__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_kill__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_kill__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_kill__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_process_killall__get__reset_pid(smx_simcall_t simcall){
+
+static inline int simcall_process_killall__get__reset_pid(smx_simcall_t simcall) {
   return  simcall->args[0].i;
 }
-static inline void simcall_process_killall__set__reset_pid(smx_simcall_t simcall, int arg){
+static inline void simcall_process_killall__set__reset_pid(smx_simcall_t simcall, int arg) {
     simcall->args[0].i = arg;
 }
-static inline smx_process_t simcall_process_cleanup__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_cleanup__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_cleanup__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_cleanup__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_change_host__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_change_host__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_change_host__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_change_host__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_process_change_host__get__dest(smx_simcall_t simcall){
+static inline smx_host_t simcall_process_change_host__get__dest(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_process_change_host__set__dest(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_change_host__set__dest(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_process_t simcall_process_suspend__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_suspend__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_suspend__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_suspend__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_resume__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_resume__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_resume__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_resume__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
 
-static inline smx_process_t simcall_process_get_PID__get__process(smx_simcall_t simcall){
+static inline int simcall_process_count__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_process_count__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_process_t simcall_process_get_PID__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_get_PID__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_get_PID__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_get_PPID__get__process(smx_simcall_t simcall){
+static inline int simcall_process_get_PID__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_process_get_PID__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_process_t simcall_process_get_PPID__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_get_PPID__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_get_PPID__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_get_data__get__process(smx_simcall_t simcall){
+static inline int simcall_process_get_PPID__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_process_get_PPID__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_process_t simcall_process_get_data__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_get_data__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_get_data__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_set_data__get__process(smx_simcall_t simcall){
+static inline void* simcall_process_get_data__get__result(smx_simcall_t simcall){
+    return  simcall->result.dp;
+}
+static inline void simcall_process_get_data__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_process_t simcall_process_set_data__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_set_data__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_set_data__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline void* simcall_process_set_data__get__data(smx_simcall_t simcall){
+static inline void* simcall_process_set_data__get__data(smx_simcall_t simcall) {
   return  simcall->args[1].dp;
 }
-static inline void simcall_process_set_data__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_set_data__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_process_t simcall_process_get_host__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_get_host__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_get_host__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_get_host__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_get_name__get__process(smx_simcall_t simcall){
+static inline smx_host_t simcall_process_get_host__get__result(smx_simcall_t simcall){
+    return (smx_host_t) simcall->result.dp;
+}
+static inline void simcall_process_get_host__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_process_t simcall_process_get_name__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_get_name__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_get_name__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_is_suspended__get__process(smx_simcall_t simcall){
+static inline const char* simcall_process_get_name__get__result(smx_simcall_t simcall){
+    return  simcall->result.cc;
+}
+static inline void simcall_process_get_name__set__result(smx_simcall_t simcall, const char* result){
+    simcall->result.cc = result;
+}
+
+static inline smx_process_t simcall_process_is_suspended__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_is_suspended__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_is_suspended__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_get_properties__get__process(smx_simcall_t simcall){
+static inline int simcall_process_is_suspended__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_process_is_suspended__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_process_t simcall_process_get_properties__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_get_properties__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_get_properties__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_process_join__get__process(smx_simcall_t simcall){
+static inline xbt_dict_t simcall_process_get_properties__get__result(smx_simcall_t simcall){
+    return (xbt_dict_t) simcall->result.dp;
+}
+static inline void simcall_process_get_properties__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_process_t simcall_process_join__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_join__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_join__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline double simcall_process_join__get__timeout(smx_simcall_t simcall){
+static inline double simcall_process_join__get__timeout(smx_simcall_t simcall) {
   return  simcall->args[1].d;
 }
-static inline void simcall_process_join__set__timeout(smx_simcall_t simcall, double arg){
+static inline void simcall_process_join__set__timeout(smx_simcall_t simcall, double arg) {
     simcall->args[1].d = arg;
 }
-static inline double simcall_process_sleep__get__duration(smx_simcall_t simcall){
+static inline int simcall_process_join__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_process_join__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline double simcall_process_sleep__get__duration(smx_simcall_t simcall) {
   return  simcall->args[0].d;
 }
-static inline void simcall_process_sleep__set__duration(smx_simcall_t simcall, double arg){
+static inline void simcall_process_sleep__set__duration(smx_simcall_t simcall, double arg) {
     simcall->args[0].d = arg;
 }
-static inline smx_process_t simcall_process_on_exit__get__process(smx_simcall_t simcall){
+static inline int simcall_process_sleep__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_process_t simcall_process_on_exit__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_on_exit__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_on_exit__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int_f_pvoid_pvoid_t simcall_process_on_exit__get__fun(smx_simcall_t simcall){
+static inline int_f_pvoid_pvoid_t simcall_process_on_exit__get__fun(smx_simcall_t simcall) {
   return (int_f_pvoid_pvoid_t) simcall->args[1].fp;
 }
-static inline void simcall_process_on_exit__set__fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_process_on_exit__set__fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[1].fp = arg;
 }
-static inline void* simcall_process_on_exit__get__data(smx_simcall_t simcall){
+static inline void* simcall_process_on_exit__get__data(smx_simcall_t simcall) {
   return  simcall->args[2].dp;
 }
-static inline void simcall_process_on_exit__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_on_exit__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline smx_process_t simcall_process_auto_restart_set__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_auto_restart_set__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_auto_restart_set__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_auto_restart_set__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_process_auto_restart_set__get__auto_restart(smx_simcall_t simcall){
+static inline int simcall_process_auto_restart_set__get__auto_restart(smx_simcall_t simcall) {
   return  simcall->args[1].i;
 }
-static inline void simcall_process_auto_restart_set__set__auto_restart(smx_simcall_t simcall, int arg){
+static inline void simcall_process_auto_restart_set__set__auto_restart(smx_simcall_t simcall, int arg) {
     simcall->args[1].i = arg;
 }
-static inline smx_process_t simcall_process_restart__get__process(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_process_restart__get__process(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_process_restart__set__process(smx_simcall_t simcall, void* arg){
+static inline void simcall_process_restart__set__process(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_rdv_create__get__name(smx_simcall_t simcall){
+static inline smx_process_t simcall_process_restart__get__result(smx_simcall_t simcall){
+    return (smx_process_t) simcall->result.dp;
+}
+static inline void simcall_process_restart__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline const char* simcall_rdv_create__get__name(smx_simcall_t simcall) {
   return  simcall->args[0].cc;
 }
-static inline void simcall_rdv_create__set__name(smx_simcall_t simcall, const char* arg){
+static inline void simcall_rdv_create__set__name(smx_simcall_t simcall, const char* arg) {
     simcall->args[0].cc = arg;
 }
-static inline smx_rdv_t simcall_rdv_destroy__get__rdv(smx_simcall_t simcall){
+static inline smx_rdv_t simcall_rdv_create__get__result(smx_simcall_t simcall){
+    return (smx_rdv_t) simcall->result.dp;
+}
+static inline void simcall_rdv_create__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_rdv_t simcall_rdv_destroy__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_rdv_destroy__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_rdv_destroy__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_rdv_t simcall_rdv_comm_count_by_host__get__rdv(smx_simcall_t simcall){
+
+static inline smx_rdv_t simcall_rdv_comm_count_by_host__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_rdv_comm_count_by_host__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_rdv_comm_count_by_host__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_rdv_comm_count_by_host__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_rdv_comm_count_by_host__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_rdv_comm_count_by_host__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_rdv_comm_count_by_host__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_rdv_t simcall_rdv_get_head__get__rdv(smx_simcall_t simcall){
+static inline unsigned int simcall_rdv_comm_count_by_host__get__result(smx_simcall_t simcall){
+    return  simcall->result.ui;
+}
+static inline void simcall_rdv_comm_count_by_host__set__result(smx_simcall_t simcall, unsigned int result){
+    simcall->result.ui = result;
+}
+
+static inline smx_rdv_t simcall_rdv_get_head__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_rdv_get_head__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_rdv_get_head__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_rdv_t simcall_rdv_set_receiver__get__rdv(smx_simcall_t simcall){
+static inline smx_synchro_t simcall_rdv_get_head__get__result(smx_simcall_t simcall){
+    return (smx_synchro_t) simcall->result.dp;
+}
+static inline void simcall_rdv_get_head__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_rdv_t simcall_rdv_set_receiver__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_rdv_set_receiver__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_rdv_set_receiver__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_process_t simcall_rdv_set_receiver__get__receiver(smx_simcall_t simcall){
+static inline smx_process_t simcall_rdv_set_receiver__get__receiver(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[1].dp;
 }
-static inline void simcall_rdv_set_receiver__set__receiver(smx_simcall_t simcall, void* arg){
+static inline void simcall_rdv_set_receiver__set__receiver(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_rdv_t simcall_rdv_get_receiver__get__rdv(smx_simcall_t simcall){
+
+static inline smx_rdv_t simcall_rdv_get_receiver__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_rdv_get_receiver__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_rdv_get_receiver__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_rdv_t simcall_comm_iprobe__get__rdv(smx_simcall_t simcall){
+static inline smx_process_t simcall_rdv_get_receiver__get__result(smx_simcall_t simcall){
+    return (smx_process_t) simcall->result.dp;
+}
+static inline void simcall_rdv_get_receiver__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_rdv_t simcall_comm_iprobe__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_iprobe__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_iprobe__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_comm_iprobe__get__type(smx_simcall_t simcall){
+static inline int simcall_comm_iprobe__get__type(smx_simcall_t simcall) {
   return  simcall->args[1].i;
 }
-static inline void simcall_comm_iprobe__set__type(smx_simcall_t simcall, int arg){
+static inline void simcall_comm_iprobe__set__type(smx_simcall_t simcall, int arg) {
     simcall->args[1].i = arg;
 }
-static inline int simcall_comm_iprobe__get__src(smx_simcall_t simcall){
+static inline int simcall_comm_iprobe__get__src(smx_simcall_t simcall) {
   return  simcall->args[2].i;
 }
-static inline void simcall_comm_iprobe__set__src(smx_simcall_t simcall, int arg){
+static inline void simcall_comm_iprobe__set__src(smx_simcall_t simcall, int arg) {
     simcall->args[2].i = arg;
 }
-static inline int simcall_comm_iprobe__get__tag(smx_simcall_t simcall){
+static inline int simcall_comm_iprobe__get__tag(smx_simcall_t simcall) {
   return  simcall->args[3].i;
 }
-static inline void simcall_comm_iprobe__set__tag(smx_simcall_t simcall, int arg){
+static inline void simcall_comm_iprobe__set__tag(smx_simcall_t simcall, int arg) {
     simcall->args[3].i = arg;
 }
-static inline simix_match_func_t simcall_comm_iprobe__get__match_fun(smx_simcall_t simcall){
+static inline simix_match_func_t simcall_comm_iprobe__get__match_fun(smx_simcall_t simcall) {
   return (simix_match_func_t) simcall->args[4].fp;
 }
-static inline void simcall_comm_iprobe__set__match_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_iprobe__set__match_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[4].fp = arg;
 }
-static inline void* simcall_comm_iprobe__get__data(smx_simcall_t simcall){
+static inline void* simcall_comm_iprobe__get__data(smx_simcall_t simcall) {
   return  simcall->args[5].dp;
 }
-static inline void simcall_comm_iprobe__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_iprobe__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[5].dp = arg;
 }
-static inline smx_process_t simcall_comm_send__get__src(smx_simcall_t simcall){
+static inline smx_synchro_t simcall_comm_iprobe__get__result(smx_simcall_t simcall){
+    return (smx_synchro_t) simcall->result.dp;
+}
+static inline void simcall_comm_iprobe__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_process_t simcall_comm_send__get__src(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_send__set__src(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_send__set__src(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_rdv_t simcall_comm_send__get__rdv(smx_simcall_t simcall){
+static inline smx_rdv_t simcall_comm_send__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[1].dp;
 }
-static inline void simcall_comm_send__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_send__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline double simcall_comm_send__get__task_size(smx_simcall_t simcall){
+static inline double simcall_comm_send__get__task_size(smx_simcall_t simcall) {
   return  simcall->args[2].d;
 }
-static inline void simcall_comm_send__set__task_size(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_send__set__task_size(smx_simcall_t simcall, double arg) {
     simcall->args[2].d = arg;
 }
-static inline double simcall_comm_send__get__rate(smx_simcall_t simcall){
+static inline double simcall_comm_send__get__rate(smx_simcall_t simcall) {
   return  simcall->args[3].d;
 }
-static inline void simcall_comm_send__set__rate(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_send__set__rate(smx_simcall_t simcall, double arg) {
     simcall->args[3].d = arg;
 }
-static inline void* simcall_comm_send__get__src_buff(smx_simcall_t simcall){
+static inline void* simcall_comm_send__get__src_buff(smx_simcall_t simcall) {
   return  simcall->args[4].dp;
 }
-static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_send__set__src_buff(smx_simcall_t simcall, void* arg) {
     simcall->args[4].dp = arg;
 }
-static inline size_t simcall_comm_send__get__src_buff_size(smx_simcall_t simcall){
+static inline size_t simcall_comm_send__get__src_buff_size(smx_simcall_t simcall) {
   return  simcall->args[5].sz;
 }
-static inline void simcall_comm_send__set__src_buff_size(smx_simcall_t simcall, size_t arg){
+static inline void simcall_comm_send__set__src_buff_size(smx_simcall_t simcall, size_t arg) {
     simcall->args[5].sz = arg;
 }
-static inline simix_match_func_t simcall_comm_send__get__match_fun(smx_simcall_t simcall){
+static inline simix_match_func_t simcall_comm_send__get__match_fun(smx_simcall_t simcall) {
   return (simix_match_func_t) simcall->args[6].fp;
 }
-static inline void simcall_comm_send__set__match_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_send__set__match_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[6].fp = arg;
 }
-static inline simix_copy_data_func_t simcall_comm_send__get__copy_data_fun(smx_simcall_t simcall){
+static inline simix_copy_data_func_t simcall_comm_send__get__copy_data_fun(smx_simcall_t simcall) {
   return (simix_copy_data_func_t) simcall->args[7].fp;
 }
-static inline void simcall_comm_send__set__copy_data_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_send__set__copy_data_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[7].fp = arg;
 }
-static inline void* simcall_comm_send__get__data(smx_simcall_t simcall){
+static inline void* simcall_comm_send__get__data(smx_simcall_t simcall) {
   return  simcall->args[8].dp;
 }
-static inline void simcall_comm_send__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_send__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[8].dp = arg;
 }
-static inline double simcall_comm_send__get__timeout(smx_simcall_t simcall){
+static inline double simcall_comm_send__get__timeout(smx_simcall_t simcall) {
   return  simcall->args[9].d;
 }
-static inline void simcall_comm_send__set__timeout(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_send__set__timeout(smx_simcall_t simcall, double arg) {
     simcall->args[9].d = arg;
 }
-static inline smx_process_t simcall_comm_isend__get__src(smx_simcall_t simcall){
+
+static inline smx_process_t simcall_comm_isend__get__src(smx_simcall_t simcall) {
   return (smx_process_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_isend__set__src(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_isend__set__src(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_rdv_t simcall_comm_isend__get__rdv(smx_simcall_t simcall){
+static inline smx_rdv_t simcall_comm_isend__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[1].dp;
 }
-static inline void simcall_comm_isend__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_isend__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline double simcall_comm_isend__get__task_size(smx_simcall_t simcall){
+static inline double simcall_comm_isend__get__task_size(smx_simcall_t simcall) {
   return  simcall->args[2].d;
 }
-static inline void simcall_comm_isend__set__task_size(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_isend__set__task_size(smx_simcall_t simcall, double arg) {
     simcall->args[2].d = arg;
 }
-static inline double simcall_comm_isend__get__rate(smx_simcall_t simcall){
+static inline double simcall_comm_isend__get__rate(smx_simcall_t simcall) {
   return  simcall->args[3].d;
 }
-static inline void simcall_comm_isend__set__rate(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_isend__set__rate(smx_simcall_t simcall, double arg) {
     simcall->args[3].d = arg;
 }
-static inline void* simcall_comm_isend__get__src_buff(smx_simcall_t simcall){
+static inline void* simcall_comm_isend__get__src_buff(smx_simcall_t simcall) {
   return  simcall->args[4].dp;
 }
-static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_isend__set__src_buff(smx_simcall_t simcall, void* arg) {
     simcall->args[4].dp = arg;
 }
-static inline size_t simcall_comm_isend__get__src_buff_size(smx_simcall_t simcall){
+static inline size_t simcall_comm_isend__get__src_buff_size(smx_simcall_t simcall) {
   return  simcall->args[5].sz;
 }
-static inline void simcall_comm_isend__set__src_buff_size(smx_simcall_t simcall, size_t arg){
+static inline void simcall_comm_isend__set__src_buff_size(smx_simcall_t simcall, size_t arg) {
     simcall->args[5].sz = arg;
 }
-static inline simix_match_func_t simcall_comm_isend__get__match_fun(smx_simcall_t simcall){
+static inline simix_match_func_t simcall_comm_isend__get__match_fun(smx_simcall_t simcall) {
   return (simix_match_func_t) simcall->args[6].fp;
 }
-static inline void simcall_comm_isend__set__match_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_isend__set__match_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[6].fp = arg;
 }
-static inline simix_clean_func_t simcall_comm_isend__get__clean_fun(smx_simcall_t simcall){
+static inline simix_clean_func_t simcall_comm_isend__get__clean_fun(smx_simcall_t simcall) {
   return (simix_clean_func_t) simcall->args[7].fp;
 }
-static inline void simcall_comm_isend__set__clean_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_isend__set__clean_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[7].fp = arg;
 }
-static inline simix_copy_data_func_t simcall_comm_isend__get__copy_data_fun(smx_simcall_t simcall){
+static inline simix_copy_data_func_t simcall_comm_isend__get__copy_data_fun(smx_simcall_t simcall) {
   return (simix_copy_data_func_t) simcall->args[8].fp;
 }
-static inline void simcall_comm_isend__set__copy_data_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_isend__set__copy_data_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[8].fp = arg;
 }
-static inline void* simcall_comm_isend__get__data(smx_simcall_t simcall){
+static inline void* simcall_comm_isend__get__data(smx_simcall_t simcall) {
   return  simcall->args[9].dp;
 }
-static inline void simcall_comm_isend__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_isend__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[9].dp = arg;
 }
-static inline int simcall_comm_isend__get__detached(smx_simcall_t simcall){
+static inline int simcall_comm_isend__get__detached(smx_simcall_t simcall) {
   return  simcall->args[10].i;
 }
-static inline void simcall_comm_isend__set__detached(smx_simcall_t simcall, int arg){
+static inline void simcall_comm_isend__set__detached(smx_simcall_t simcall, int arg) {
     simcall->args[10].i = arg;
 }
-static inline smx_rdv_t simcall_comm_recv__get__rdv(smx_simcall_t simcall){
+static inline smx_synchro_t simcall_comm_isend__get__result(smx_simcall_t simcall){
+    return (smx_synchro_t) simcall->result.dp;
+}
+static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_rdv_t simcall_comm_recv__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_recv__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_recv__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline void* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall){
+static inline void* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall) {
   return  simcall->args[1].dp;
 }
-static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall){
+static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall) {
   return (size_t*) simcall->args[2].dp;
 }
-static inline void simcall_comm_recv__set__dst_buff_size(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_recv__set__dst_buff_size(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline simix_match_func_t simcall_comm_recv__get__match_fun(smx_simcall_t simcall){
+static inline simix_match_func_t simcall_comm_recv__get__match_fun(smx_simcall_t simcall) {
   return (simix_match_func_t) simcall->args[3].fp;
 }
-static inline void simcall_comm_recv__set__match_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_recv__set__match_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[3].fp = arg;
 }
-static inline simix_copy_data_func_t simcall_comm_recv__get__copy_data_fun(smx_simcall_t simcall){
+static inline simix_copy_data_func_t simcall_comm_recv__get__copy_data_fun(smx_simcall_t simcall) {
   return (simix_copy_data_func_t) simcall->args[4].fp;
 }
-static inline void simcall_comm_recv__set__copy_data_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_recv__set__copy_data_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[4].fp = arg;
 }
-static inline void* simcall_comm_recv__get__data(smx_simcall_t simcall){
+static inline void* simcall_comm_recv__get__data(smx_simcall_t simcall) {
   return  simcall->args[5].dp;
 }
-static inline void simcall_comm_recv__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_recv__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[5].dp = arg;
 }
-static inline double simcall_comm_recv__get__timeout(smx_simcall_t simcall){
+static inline double simcall_comm_recv__get__timeout(smx_simcall_t simcall) {
   return  simcall->args[6].d;
 }
-static inline void simcall_comm_recv__set__timeout(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_recv__set__timeout(smx_simcall_t simcall, double arg) {
     simcall->args[6].d = arg;
 }
-static inline double simcall_comm_recv__get__rate(smx_simcall_t simcall){
+static inline double simcall_comm_recv__get__rate(smx_simcall_t simcall) {
   return  simcall->args[7].d;
 }
-static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double arg) {
     simcall->args[7].d = arg;
 }
-static inline smx_rdv_t simcall_comm_irecv__get__rdv(smx_simcall_t simcall){
+
+static inline smx_rdv_t simcall_comm_irecv__get__rdv(smx_simcall_t simcall) {
   return (smx_rdv_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_irecv__set__rdv(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_irecv__set__rdv(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline void* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall){
+static inline void* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall) {
   return  simcall->args[1].dp;
 }
-static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall){
+static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall) {
   return (size_t*) simcall->args[2].dp;
 }
-static inline void simcall_comm_irecv__set__dst_buff_size(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_irecv__set__dst_buff_size(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline simix_match_func_t simcall_comm_irecv__get__match_fun(smx_simcall_t simcall){
+static inline simix_match_func_t simcall_comm_irecv__get__match_fun(smx_simcall_t simcall) {
   return (simix_match_func_t) simcall->args[3].fp;
 }
-static inline void simcall_comm_irecv__set__match_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_irecv__set__match_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[3].fp = arg;
 }
-static inline simix_copy_data_func_t simcall_comm_irecv__get__copy_data_fun(smx_simcall_t simcall){
+static inline simix_copy_data_func_t simcall_comm_irecv__get__copy_data_fun(smx_simcall_t simcall) {
   return (simix_copy_data_func_t) simcall->args[4].fp;
 }
-static inline void simcall_comm_irecv__set__copy_data_fun(smx_simcall_t simcall, FPtr arg){
+static inline void simcall_comm_irecv__set__copy_data_fun(smx_simcall_t simcall, FPtr arg) {
     simcall->args[4].fp = arg;
 }
-static inline void* simcall_comm_irecv__get__data(smx_simcall_t simcall){
+static inline void* simcall_comm_irecv__get__data(smx_simcall_t simcall) {
   return  simcall->args[5].dp;
 }
-static inline void simcall_comm_irecv__set__data(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_irecv__set__data(smx_simcall_t simcall, void* arg) {
     simcall->args[5].dp = arg;
 }
-static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall){
+static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall) {
   return  simcall->args[6].d;
 }
-static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg) {
     simcall->args[6].d = arg;
 }
-static inline smx_action_t simcall_comm_cancel__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline smx_synchro_t simcall_comm_irecv__get__result(smx_simcall_t simcall){
+    return (smx_synchro_t) simcall->result.dp;
+}
+static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
 }
-static inline void simcall_comm_cancel__set__comm(smx_simcall_t simcall, void* arg){
+
+static inline smx_synchro_t simcall_comm_cancel__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_cancel__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline xbt_dynar_t simcall_comm_waitany__get__comms(smx_simcall_t simcall){
+
+static inline xbt_dynar_t simcall_comm_waitany__get__comms(smx_simcall_t simcall) {
   return (xbt_dynar_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_waitany__set__comms(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_waitany__set__comms(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_comm_wait__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline int simcall_comm_waitany__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
 }
-static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_synchro_t simcall_comm_wait__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_wait__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline double simcall_comm_wait__get__timeout(smx_simcall_t simcall){
+static inline double simcall_comm_wait__get__timeout(smx_simcall_t simcall) {
   return  simcall->args[1].d;
 }
-static inline void simcall_comm_wait__set__timeout(smx_simcall_t simcall, double arg){
+static inline void simcall_comm_wait__set__timeout(smx_simcall_t simcall, double arg) {
     simcall->args[1].d = arg;
 }
-static inline smx_action_t simcall_comm_test__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_comm_test__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_test__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline xbt_dynar_t simcall_comm_testany__get__comms(smx_simcall_t simcall){
+static inline int simcall_comm_test__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline xbt_dynar_t simcall_comm_testany__get__comms(smx_simcall_t simcall) {
   return (xbt_dynar_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_testany__set__comms(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_comm_get_remains__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline int simcall_comm_testany__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
 }
-static inline void simcall_comm_get_remains__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_synchro_t simcall_comm_get_remains__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_get_remains__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_comm_get_state__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline double simcall_comm_get_remains__get__result(smx_simcall_t simcall){
+    return  simcall->result.d;
+}
+static inline void simcall_comm_get_remains__set__result(smx_simcall_t simcall, double result){
+    simcall->result.d = result;
+}
+
+static inline smx_synchro_t simcall_comm_get_state__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_get_state__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_get_state__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_comm_get_src_data__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline e_smx_state_t simcall_comm_get_state__get__result(smx_simcall_t simcall){
+    return (e_smx_state_t) simcall->result.i;
 }
-static inline void simcall_comm_get_src_data__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_get_state__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_synchro_t simcall_comm_get_src_data__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_get_src_data__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_comm_get_dst_data__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline void* simcall_comm_get_src_data__get__result(smx_simcall_t simcall){
+    return  simcall->result.dp;
 }
-static inline void simcall_comm_get_dst_data__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_get_src_data__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_synchro_t simcall_comm_get_dst_data__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_get_dst_data__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_comm_get_src_proc__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline void* simcall_comm_get_dst_data__get__result(smx_simcall_t simcall){
+    return  simcall->result.dp;
+}
+static inline void simcall_comm_get_dst_data__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_synchro_t simcall_comm_get_src_proc__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_get_src_proc__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_get_src_proc__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_action_t simcall_comm_get_dst_proc__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+static inline smx_process_t simcall_comm_get_src_proc__get__result(smx_simcall_t simcall){
+    return (smx_process_t) simcall->result.dp;
 }
-static inline void simcall_comm_get_dst_proc__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_get_src_proc__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_synchro_t simcall_comm_get_dst_proc__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_get_dst_proc__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
+static inline smx_process_t simcall_comm_get_dst_proc__get__result(smx_simcall_t simcall){
+    return (smx_process_t) simcall->result.dp;
+}
+static inline void simcall_comm_get_dst_proc__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
 
-static inline smx_mutex_t simcall_mutex_destroy__get__mutex(smx_simcall_t simcall){
+static inline smx_mutex_t simcall_mutex_init__get__result(smx_simcall_t simcall){
+    return (smx_mutex_t) simcall->result.dp;
+}
+static inline void simcall_mutex_init__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_mutex_t simcall_mutex_destroy__get__mutex(smx_simcall_t simcall) {
   return (smx_mutex_t) simcall->args[0].dp;
 }
-static inline void simcall_mutex_destroy__set__mutex(smx_simcall_t simcall, void* arg){
+static inline void simcall_mutex_destroy__set__mutex(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_mutex_t simcall_mutex_lock__get__mutex(smx_simcall_t simcall){
+
+static inline smx_mutex_t simcall_mutex_lock__get__mutex(smx_simcall_t simcall) {
   return (smx_mutex_t) simcall->args[0].dp;
 }
-static inline void simcall_mutex_lock__set__mutex(smx_simcall_t simcall, void* arg){
+static inline void simcall_mutex_lock__set__mutex(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_mutex_t simcall_mutex_trylock__get__mutex(smx_simcall_t simcall){
+
+static inline smx_mutex_t simcall_mutex_trylock__get__mutex(smx_simcall_t simcall) {
   return (smx_mutex_t) simcall->args[0].dp;
 }
-static inline void simcall_mutex_trylock__set__mutex(smx_simcall_t simcall, void* arg){
+static inline void simcall_mutex_trylock__set__mutex(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_mutex_t simcall_mutex_unlock__get__mutex(smx_simcall_t simcall){
+static inline int simcall_mutex_trylock__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_mutex_t simcall_mutex_unlock__get__mutex(smx_simcall_t simcall) {
   return (smx_mutex_t) simcall->args[0].dp;
 }
-static inline void simcall_mutex_unlock__set__mutex(smx_simcall_t simcall, void* arg){
+static inline void simcall_mutex_unlock__set__mutex(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
 
-static inline smx_cond_t simcall_cond_destroy__get__cond(smx_simcall_t simcall){
+static inline smx_cond_t simcall_cond_init__get__result(smx_simcall_t simcall){
+    return (smx_cond_t) simcall->result.dp;
+}
+static inline void simcall_cond_init__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_cond_t simcall_cond_destroy__get__cond(smx_simcall_t simcall) {
   return (smx_cond_t) simcall->args[0].dp;
 }
-static inline void simcall_cond_destroy__set__cond(smx_simcall_t simcall, void* arg){
+static inline void simcall_cond_destroy__set__cond(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_cond_t simcall_cond_signal__get__cond(smx_simcall_t simcall){
+
+static inline smx_cond_t simcall_cond_signal__get__cond(smx_simcall_t simcall) {
   return (smx_cond_t) simcall->args[0].dp;
 }
-static inline void simcall_cond_signal__set__cond(smx_simcall_t simcall, void* arg){
+static inline void simcall_cond_signal__set__cond(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_cond_t simcall_cond_wait__get__cond(smx_simcall_t simcall){
+
+static inline smx_cond_t simcall_cond_wait__get__cond(smx_simcall_t simcall) {
   return (smx_cond_t) simcall->args[0].dp;
 }
-static inline void simcall_cond_wait__set__cond(smx_simcall_t simcall, void* arg){
+static inline void simcall_cond_wait__set__cond(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_mutex_t simcall_cond_wait__get__mutex(smx_simcall_t simcall){
+static inline smx_mutex_t simcall_cond_wait__get__mutex(smx_simcall_t simcall) {
   return (smx_mutex_t) simcall->args[1].dp;
 }
-static inline void simcall_cond_wait__set__mutex(smx_simcall_t simcall, void* arg){
+static inline void simcall_cond_wait__set__mutex(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_cond_t simcall_cond_wait_timeout__get__cond(smx_simcall_t simcall){
+
+static inline smx_cond_t simcall_cond_wait_timeout__get__cond(smx_simcall_t simcall) {
   return (smx_cond_t) simcall->args[0].dp;
 }
-static inline void simcall_cond_wait_timeout__set__cond(smx_simcall_t simcall, void* arg){
+static inline void simcall_cond_wait_timeout__set__cond(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_mutex_t simcall_cond_wait_timeout__get__mutex(smx_simcall_t simcall){
+static inline smx_mutex_t simcall_cond_wait_timeout__get__mutex(smx_simcall_t simcall) {
   return (smx_mutex_t) simcall->args[1].dp;
 }
-static inline void simcall_cond_wait_timeout__set__mutex(smx_simcall_t simcall, void* arg){
+static inline void simcall_cond_wait_timeout__set__mutex(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline double simcall_cond_wait_timeout__get__timeout(smx_simcall_t simcall){
+static inline double simcall_cond_wait_timeout__get__timeout(smx_simcall_t simcall) {
   return  simcall->args[2].d;
 }
-static inline void simcall_cond_wait_timeout__set__timeout(smx_simcall_t simcall, double arg){
+static inline void simcall_cond_wait_timeout__set__timeout(smx_simcall_t simcall, double arg) {
     simcall->args[2].d = arg;
 }
-static inline smx_cond_t simcall_cond_broadcast__get__cond(smx_simcall_t simcall){
+
+static inline smx_cond_t simcall_cond_broadcast__get__cond(smx_simcall_t simcall) {
   return (smx_cond_t) simcall->args[0].dp;
 }
-static inline void simcall_cond_broadcast__set__cond(smx_simcall_t simcall, void* arg){
+static inline void simcall_cond_broadcast__set__cond(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline int simcall_sem_init__get__capacity(smx_simcall_t simcall){
-  return  simcall->args[0].i;
+
+static inline unsigned int simcall_sem_init__get__capacity(smx_simcall_t simcall) {
+  return  simcall->args[0].ui;
 }
-static inline void simcall_sem_init__set__capacity(smx_simcall_t simcall, int arg){
-    simcall->args[0].i = arg;
+static inline void simcall_sem_init__set__capacity(smx_simcall_t simcall, unsigned int arg) {
+    simcall->args[0].ui = arg;
 }
-static inline smx_sem_t simcall_sem_destroy__get__sem(smx_simcall_t simcall){
+static inline smx_sem_t simcall_sem_init__get__result(smx_simcall_t simcall){
+    return (smx_sem_t) simcall->result.dp;
+}
+static inline void simcall_sem_init__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_sem_t simcall_sem_destroy__get__sem(smx_simcall_t simcall) {
   return (smx_sem_t) simcall->args[0].dp;
 }
-static inline void simcall_sem_destroy__set__sem(smx_simcall_t simcall, void* arg){
+static inline void simcall_sem_destroy__set__sem(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_sem_t simcall_sem_release__get__sem(smx_simcall_t simcall){
+
+static inline smx_sem_t simcall_sem_release__get__sem(smx_simcall_t simcall) {
   return (smx_sem_t) simcall->args[0].dp;
 }
-static inline void simcall_sem_release__set__sem(smx_simcall_t simcall, void* arg){
+static inline void simcall_sem_release__set__sem(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_sem_t simcall_sem_would_block__get__sem(smx_simcall_t simcall){
+
+static inline smx_sem_t simcall_sem_would_block__get__sem(smx_simcall_t simcall) {
   return (smx_sem_t) simcall->args[0].dp;
 }
-static inline void simcall_sem_would_block__set__sem(smx_simcall_t simcall, void* arg){
+static inline void simcall_sem_would_block__set__sem(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_sem_t simcall_sem_acquire__get__sem(smx_simcall_t simcall){
+static inline int simcall_sem_would_block__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_sem_would_block__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_sem_t simcall_sem_acquire__get__sem(smx_simcall_t simcall) {
   return (smx_sem_t) simcall->args[0].dp;
 }
-static inline void simcall_sem_acquire__set__sem(smx_simcall_t simcall, void* arg){
+static inline void simcall_sem_acquire__set__sem(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_sem_t simcall_sem_acquire_timeout__get__sem(smx_simcall_t simcall){
+
+static inline smx_sem_t simcall_sem_acquire_timeout__get__sem(smx_simcall_t simcall) {
   return (smx_sem_t) simcall->args[0].dp;
 }
-static inline void simcall_sem_acquire_timeout__set__sem(smx_simcall_t simcall, void* arg){
+static inline void simcall_sem_acquire_timeout__set__sem(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline double simcall_sem_acquire_timeout__get__timeout(smx_simcall_t simcall){
+static inline double simcall_sem_acquire_timeout__get__timeout(smx_simcall_t simcall) {
   return  simcall->args[1].d;
 }
-static inline void simcall_sem_acquire_timeout__set__timeout(smx_simcall_t simcall, double arg){
+static inline void simcall_sem_acquire_timeout__set__timeout(smx_simcall_t simcall, double arg) {
     simcall->args[1].d = arg;
 }
-static inline smx_sem_t simcall_sem_get_capacity__get__sem(smx_simcall_t simcall){
+
+static inline smx_sem_t simcall_sem_get_capacity__get__sem(smx_simcall_t simcall) {
   return (smx_sem_t) simcall->args[0].dp;
 }
-static inline void simcall_sem_get_capacity__set__sem(smx_simcall_t simcall, void* arg){
+static inline void simcall_sem_get_capacity__set__sem(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_file_t simcall_file_read__get__fd(smx_simcall_t simcall){
+static inline int simcall_sem_get_capacity__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_sem_get_capacity__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_file_t simcall_file_read__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_read__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_read__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline sg_size_t simcall_file_read__get__size(smx_simcall_t simcall){
+static inline sg_size_t simcall_file_read__get__size(smx_simcall_t simcall) {
   return  simcall->args[1].sgsz;
 }
-static inline void simcall_file_read__set__size(smx_simcall_t simcall, sg_size_t arg){
+static inline void simcall_file_read__set__size(smx_simcall_t simcall, sg_size_t arg) {
     simcall->args[1].sgsz = arg;
 }
-static inline smx_host_t simcall_file_read__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_file_read__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[2].dp;
 }
-static inline void simcall_file_read__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_read__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline smx_file_t simcall_file_write__get__fd(smx_simcall_t simcall){
+static inline sg_size_t simcall_file_read__get__result(smx_simcall_t simcall){
+    return  simcall->result.sgsz;
+}
+static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size_t result){
+    simcall->result.sgsz = result;
+}
+
+static inline smx_file_t simcall_file_write__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_write__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_write__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline sg_size_t simcall_file_write__get__size(smx_simcall_t simcall){
+static inline sg_size_t simcall_file_write__get__size(smx_simcall_t simcall) {
   return  simcall->args[1].sgsz;
 }
-static inline void simcall_file_write__set__size(smx_simcall_t simcall, sg_size_t arg){
+static inline void simcall_file_write__set__size(smx_simcall_t simcall, sg_size_t arg) {
     simcall->args[1].sgsz = arg;
 }
-static inline smx_host_t simcall_file_write__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_file_write__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[2].dp;
 }
-static inline void simcall_file_write__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_write__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[2].dp = arg;
 }
-static inline const char* simcall_file_open__get__fullpath(smx_simcall_t simcall){
+static inline sg_size_t simcall_file_write__get__result(smx_simcall_t simcall){
+    return  simcall->result.sgsz;
+}
+static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_size_t result){
+    simcall->result.sgsz = result;
+}
+
+static inline const char* simcall_file_open__get__fullpath(smx_simcall_t simcall) {
   return  simcall->args[0].cc;
 }
-static inline void simcall_file_open__set__fullpath(smx_simcall_t simcall, const char* arg){
+static inline void simcall_file_open__set__fullpath(smx_simcall_t simcall, const char* arg) {
     simcall->args[0].cc = arg;
 }
-static inline smx_host_t simcall_file_open__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_file_open__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_file_open__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_open__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_file_t simcall_file_close__get__fd(smx_simcall_t simcall){
+static inline smx_file_t simcall_file_open__get__result(smx_simcall_t simcall){
+    return (smx_file_t) simcall->result.dp;
+}
+static inline void simcall_file_open__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_file_t simcall_file_close__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_close__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_close__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_file_close__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_file_close__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_file_close__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_close__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_file_t simcall_file_unlink__get__fd(smx_simcall_t simcall){
+static inline int simcall_file_close__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_file_close__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_file_t simcall_file_unlink__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_unlink__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_unlink__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_host_t simcall_file_unlink__get__host(smx_simcall_t simcall){
+static inline smx_host_t simcall_file_unlink__get__host(smx_simcall_t simcall) {
   return (smx_host_t) simcall->args[1].dp;
 }
-static inline void simcall_file_unlink__set__host(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_unlink__set__host(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline smx_file_t simcall_file_get_size__get__fd(smx_simcall_t simcall){
+static inline int simcall_file_unlink__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_file_unlink__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_file_t simcall_file_get_size__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_get_size__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_get_size__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_file_t simcall_file_tell__get__fd(smx_simcall_t simcall){
+static inline sg_size_t simcall_file_get_size__get__result(smx_simcall_t simcall){
+    return  simcall->result.sgsz;
+}
+static inline void simcall_file_get_size__set__result(smx_simcall_t simcall, sg_size_t result){
+    simcall->result.sgsz = result;
+}
+
+static inline smx_file_t simcall_file_tell__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_tell__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_tell__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_file_t simcall_file_seek__get__fd(smx_simcall_t simcall){
+static inline sg_size_t simcall_file_tell__get__result(smx_simcall_t simcall){
+    return  simcall->result.sgsz;
+}
+static inline void simcall_file_tell__set__result(smx_simcall_t simcall, sg_size_t result){
+    simcall->result.sgsz = result;
+}
+
+static inline smx_file_t simcall_file_seek__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_seek__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_seek__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline sg_offset_t simcall_file_seek__get__offset(smx_simcall_t simcall){
+static inline sg_offset_t simcall_file_seek__get__offset(smx_simcall_t simcall) {
   return  simcall->args[1].sgoff;
 }
-static inline void simcall_file_seek__set__offset(smx_simcall_t simcall, sg_offset_t arg){
+static inline void simcall_file_seek__set__offset(smx_simcall_t simcall, sg_offset_t arg) {
     simcall->args[1].sgoff = arg;
 }
-static inline int simcall_file_seek__get__origin(smx_simcall_t simcall){
+static inline int simcall_file_seek__get__origin(smx_simcall_t simcall) {
   return  simcall->args[2].i;
 }
-static inline void simcall_file_seek__set__origin(smx_simcall_t simcall, int arg){
+static inline void simcall_file_seek__set__origin(smx_simcall_t simcall, int arg) {
     simcall->args[2].i = arg;
 }
-static inline smx_file_t simcall_file_get_info__get__fd(smx_simcall_t simcall){
+static inline int simcall_file_seek__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_file_seek__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_file_t simcall_file_get_info__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_get_info__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_get_info__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_file_t simcall_file_move__get__fd(smx_simcall_t simcall){
+static inline xbt_dynar_t simcall_file_get_info__get__result(smx_simcall_t simcall){
+    return (xbt_dynar_t) simcall->result.dp;
+}
+static inline void simcall_file_get_info__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_file_t simcall_file_move__get__fd(smx_simcall_t simcall) {
   return (smx_file_t) simcall->args[0].dp;
 }
-static inline void simcall_file_move__set__fd(smx_simcall_t simcall, void* arg){
+static inline void simcall_file_move__set__fd(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_file_move__get__fullpath(smx_simcall_t simcall){
+static inline const char* simcall_file_move__get__fullpath(smx_simcall_t simcall) {
   return  simcall->args[1].cc;
 }
-static inline void simcall_file_move__set__fullpath(smx_simcall_t simcall, const char* arg){
+static inline void simcall_file_move__set__fullpath(smx_simcall_t simcall, const char* arg) {
     simcall->args[1].cc = arg;
 }
-static inline smx_storage_t simcall_storage_get_free_size__get__storage(smx_simcall_t simcall){
+static inline int simcall_file_move__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_file_move__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline smx_storage_t simcall_storage_get_free_size__get__storage(smx_simcall_t simcall) {
   return (smx_storage_t) simcall->args[0].dp;
 }
-static inline void simcall_storage_get_free_size__set__storage(smx_simcall_t simcall, void* arg){
+static inline void simcall_storage_get_free_size__set__storage(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_storage_t simcall_storage_get_used_size__get__name(smx_simcall_t simcall){
+static inline sg_size_t simcall_storage_get_free_size__get__result(smx_simcall_t simcall){
+    return  simcall->result.sgsz;
+}
+static inline void simcall_storage_get_free_size__set__result(smx_simcall_t simcall, sg_size_t result){
+    simcall->result.sgsz = result;
+}
+
+static inline smx_storage_t simcall_storage_get_used_size__get__name(smx_simcall_t simcall) {
   return (smx_storage_t) simcall->args[0].dp;
 }
-static inline void simcall_storage_get_used_size__set__name(smx_simcall_t simcall, void* arg){
+static inline void simcall_storage_get_used_size__set__name(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_storage_t simcall_storage_get_properties__get__storage(smx_simcall_t simcall){
+static inline sg_size_t simcall_storage_get_used_size__get__result(smx_simcall_t simcall){
+    return  simcall->result.sgsz;
+}
+static inline void simcall_storage_get_used_size__set__result(smx_simcall_t simcall, sg_size_t result){
+    simcall->result.sgsz = result;
+}
+
+static inline smx_storage_t simcall_storage_get_properties__get__storage(smx_simcall_t simcall) {
   return (smx_storage_t) simcall->args[0].dp;
 }
-static inline void simcall_storage_get_properties__set__storage(smx_simcall_t simcall, void* arg){
+static inline void simcall_storage_get_properties__set__storage(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline smx_storage_t simcall_storage_get_content__get__storage(smx_simcall_t simcall){
+static inline xbt_dict_t simcall_storage_get_properties__get__result(smx_simcall_t simcall){
+    return (xbt_dict_t) simcall->result.dp;
+}
+static inline void simcall_storage_get_properties__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline smx_storage_t simcall_storage_get_content__get__storage(smx_simcall_t simcall) {
   return (smx_storage_t) simcall->args[0].dp;
 }
-static inline void simcall_storage_get_content__set__storage(smx_simcall_t simcall, void* arg){
+static inline void simcall_storage_get_content__set__storage(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_asr_get_properties__get__name(smx_simcall_t simcall){
+static inline xbt_dict_t simcall_storage_get_content__get__result(smx_simcall_t simcall){
+    return (xbt_dict_t) simcall->result.dp;
+}
+static inline void simcall_storage_get_content__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
+
+static inline const char* simcall_asr_get_properties__get__name(smx_simcall_t simcall) {
   return  simcall->args[0].cc;
 }
-static inline void simcall_asr_get_properties__set__name(smx_simcall_t simcall, const char* arg){
+static inline void simcall_asr_get_properties__set__name(smx_simcall_t simcall, const char* arg) {
     simcall->args[0].cc = arg;
 }
+static inline xbt_dict_t simcall_asr_get_properties__get__result(smx_simcall_t simcall){
+    return (xbt_dict_t) simcall->result.dp;
+}
+static inline void simcall_asr_get_properties__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
+}
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-static inline smx_action_t simcall_comm_is_latency_bounded__get__comm(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_comm_is_latency_bounded__get__comm(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_comm_is_latency_bounded__set__comm(smx_simcall_t simcall, void* arg){
+static inline void simcall_comm_is_latency_bounded__set__comm(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
+static inline int simcall_comm_is_latency_bounded__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_comm_is_latency_bounded__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
 #endif
 
 #ifdef HAVE_TRACING
-static inline smx_action_t simcall_set_category__get__action(smx_simcall_t simcall){
-  return (smx_action_t) simcall->args[0].dp;
+
+static inline smx_synchro_t simcall_set_category__get__synchro(smx_simcall_t simcall) {
+  return (smx_synchro_t) simcall->args[0].dp;
 }
-static inline void simcall_set_category__set__action(smx_simcall_t simcall, void* arg){
+static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline const char* simcall_set_category__get__category(smx_simcall_t simcall){
+static inline const char* simcall_set_category__get__category(smx_simcall_t simcall) {
   return  simcall->args[1].cc;
 }
-static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg){
+static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg) {
     simcall->args[1].cc = arg;
 }
 #endif
 
 #ifdef HAVE_MC
 
-static inline void* simcall_mc_compare_snapshots__get__s1(smx_simcall_t simcall){
-  return  simcall->args[0].dp;
+static inline mc_snapshot_t simcall_mc_snapshot__get__result(smx_simcall_t simcall){
+    return (mc_snapshot_t) simcall->result.dp;
+}
+static inline void simcall_mc_snapshot__set__result(smx_simcall_t simcall, void* result){
+    simcall->result.dp = result;
 }
-static inline void simcall_mc_compare_snapshots__set__s1(smx_simcall_t simcall, void* arg){
+
+static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s1(smx_simcall_t simcall) {
+  return (mc_snapshot_t) simcall->args[0].dp;
+}
+static inline void simcall_mc_compare_snapshots__set__s1(smx_simcall_t simcall, void* arg) {
     simcall->args[0].dp = arg;
 }
-static inline void* simcall_mc_compare_snapshots__get__s2(smx_simcall_t simcall){
-  return  simcall->args[1].dp;
+static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s2(smx_simcall_t simcall) {
+  return (mc_snapshot_t) simcall->args[1].dp;
 }
-static inline void simcall_mc_compare_snapshots__set__s2(smx_simcall_t simcall, void* arg){
+static inline void simcall_mc_compare_snapshots__set__s2(smx_simcall_t simcall, void* arg) {
     simcall->args[1].dp = arg;
 }
-static inline int simcall_mc_random__get__min(smx_simcall_t simcall){
+static inline int simcall_mc_compare_snapshots__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_mc_compare_snapshots__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+
+static inline int simcall_mc_random__get__min(smx_simcall_t simcall) {
   return  simcall->args[0].i;
 }
-static inline void simcall_mc_random__set__min(smx_simcall_t simcall, int arg){
+static inline void simcall_mc_random__set__min(smx_simcall_t simcall, int arg) {
     simcall->args[0].i = arg;
 }
-static inline int simcall_mc_random__get__max(smx_simcall_t simcall){
+static inline int simcall_mc_random__get__max(smx_simcall_t simcall) {
   return  simcall->args[1].i;
 }
-static inline void simcall_mc_random__set__max(smx_simcall_t simcall, int arg){
+static inline void simcall_mc_random__set__max(smx_simcall_t simcall, int arg) {
     simcall->args[1].i = arg;
 }
+static inline int simcall_mc_random__get__result(smx_simcall_t simcall){
+    return  simcall->result.i;
+}
+static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result){
+    simcall->result.i = result;
+}
+#endif
+
+
+/* The prototype of all simcall handlers, automatically generated for you */
+
+void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t host);
+void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_synchro_t execution);
+void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm);
+void simcall_HANDLER_process_create(smx_simcall_t simcall, smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart);
+void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid);
+void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process, smx_host_t dest);
+void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process);
+void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout);
+void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration);
+smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process);
+smx_synchro_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data);
+void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
+smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached);
+void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate);
+smx_synchro_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
+void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t comms);
+void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t comm, double timeout);
+void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_synchro_t comm);
+void simcall_HANDLER_comm_testany(smx_simcall_t simcall, xbt_dynar_t comms);
+smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall);
+void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex);
+int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex);
+void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex);
+void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex);
+void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex, double timeout);
+void simcall_HANDLER_sem_release(smx_simcall_t simcall, smx_sem_t sem);
+int simcall_HANDLER_sem_would_block(smx_simcall_t simcall, smx_sem_t sem);
+void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem);
+void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout);
+int simcall_HANDLER_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem);
+void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host);
+void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host);
+void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host);
+void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host);
+sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd);
+sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd);
+int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin);
+xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd);
+int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t fd, const char* fullpath);
+sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage);
+sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t name);
+xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char* name);
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+
+#endif
+
+#ifdef HAVE_TRACING
+
+#endif
+
+#ifdef HAVE_MC
+mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall);
+int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
+int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
 #endif
similarity index 79%
rename from src/simix/simcalls_generated_body.c
rename to src/simix/popping_bodies.c
index d1e2a6d..fd28480 100644 (file)
@@ -1,15 +1,27 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
+/**********************************************************************/
+/* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
 
-  inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
+/*
+ * Note that the name comes from http://en.wikipedia.org/wiki/Popping
+ * Indeed, the control flow is doing a strange dance in there.
+ *
+ * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
+ */
+
+#include "smx_private.h"
+#include "mc/mc_interface.h"
+#include "xbt/ex.h"
+  
+inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_by_name(&self->simcall, name);
+    if (0) SIMIX_host_get_by_name(name);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_BY_NAME;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
+  
+inline static const char* simcall_BODY_host_get_name(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_name(&self->simcall, host);
+    if (0) SIMIX_host_get_name(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_NAME;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.cc;
   }
-  inline static void simcall_BODY_host_on(smx_host_t host) {
+  
+inline static void simcall_BODY_host_on(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_on(&self->simcall, host);
+    if (0) SIMIX_host_on(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_ON;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_host_off(smx_host_t host) {
+  
+inline static void simcall_BODY_host_off(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_off(&self->simcall, host);
+    if (0) simcall_HANDLER_host_off(&self->simcall, host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_OFF;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
+  
+inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_properties(&self->simcall, host);
+    if (0) SIMIX_host_get_properties(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_PROPERTIES;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_host_get_core(smx_host_t host) {
+  
+inline static int simcall_BODY_host_get_core(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_core(&self->simcall, host);
+    if (0) SIMIX_host_get_core(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_CORE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
+  
+inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_process_list(&self->simcall, host);
+    if (0) SIMIX_host_get_process_list(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static double simcall_BODY_host_get_speed(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_speed(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_speed(&self->simcall, host);
+    if (0) SIMIX_host_get_speed(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_SPEED;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.d;
   }
-  inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_available_speed(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_available_speed(&self->simcall, host);
+    if (0) SIMIX_host_get_available_speed(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_host_get_state(smx_host_t host) {
+  
+inline static int simcall_BODY_host_get_state(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_state(&self->simcall, host);
+    if (0) SIMIX_host_get_state(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_STATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_current_power_peak(&self->simcall, host);
+    if (0) SIMIX_host_get_current_power_peak(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.d;
   }
-  inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
+  
+inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_power_peak_at(&self->simcall, host, pstate_index);
+    if (0) SIMIX_host_get_power_peak_at(host, pstate_index);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
+  
+inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_nb_pstates(&self->simcall, host);
+    if (0) SIMIX_host_get_nb_pstates(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
+  
+inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_set_power_peak_at(&self->simcall, host, pstate_index);
+    if (0) SIMIX_host_set_power_peak_at(host, pstate_index);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_SET_POWER_PEAK_AT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
+  
+inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_consumed_energy(&self->simcall, host);
+    if (0) SIMIX_host_get_consumed_energy(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.d;
   }
-  inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
+  
+inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execute(&self->simcall, name, host, computation_amount, priority, bound, affinity_mask);
+    if (0) SIMIX_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
+  
+inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_parallel_execute(&self->simcall, name, host_nb, host_list, computation_amount, communication_amount, amount, rate);
+    if (0) SIMIX_host_parallel_execute(name, host_nb, host_list, computation_amount, communication_amount, amount, rate);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) {
+  
+inline static void simcall_BODY_host_execution_destroy(smx_synchro_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_destroy(&self->simcall, execution);
+    if (0) SIMIX_host_execution_destroy(execution);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) {
+  
+inline static void simcall_BODY_host_execution_cancel(smx_synchro_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_cancel(&self->simcall, execution);
+    if (0) SIMIX_host_execution_cancel(execution);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) {
+  
+inline static double simcall_BODY_host_execution_get_remains(smx_synchro_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_get_remains(&self->simcall, execution);
+    if (0) SIMIX_host_execution_get_remains(execution);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) {
+  
+inline static e_smx_state_t simcall_BODY_host_execution_get_state(smx_synchro_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_get_state(&self->simcall, execution);
+    if (0) SIMIX_host_execution_get_state(execution);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) {
+  
+inline static void simcall_BODY_host_execution_set_priority(smx_synchro_t execution, double priority) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_set_priority(&self->simcall, execution, priority);
+    if (0) SIMIX_host_execution_set_priority(execution, priority);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) {
+  
+inline static void simcall_BODY_host_execution_set_bound(smx_synchro_t execution, double bound) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_set_bound(&self->simcall, execution, bound);
+    if (0) SIMIX_host_execution_set_bound(execution, bound);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) {
+  
+inline static void simcall_BODY_host_execution_set_affinity(smx_synchro_t execution, smx_host_t ws, unsigned long mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_set_affinity(&self->simcall, execution, ws, mask);
+    if (0) SIMIX_host_execution_set_affinity(execution, ws, mask);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_host_execution_wait(smx_action_t execution) {
+  
+inline static int simcall_BODY_host_execution_wait(smx_synchro_t execution) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_execution_wait(&self->simcall, execution);
+    if (0) simcall_HANDLER_host_execution_wait(&self->simcall, execution);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
+  
+inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_mounted_storage_list(&self->simcall, host);
+    if (0) SIMIX_host_get_mounted_storage_list(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
+  
+inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_attached_storage_list(&self->simcall, host);
+    if (0) SIMIX_host_get_attached_storage_list(host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
+  
+inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_get_params(&self->simcall, ind_vm, params);
+    if (0) SIMIX_host_get_params(ind_vm, params);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_GET_PARAMS;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
+  
+inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_host_set_params(&self->simcall, ind_vm, params);
+    if (0) SIMIX_host_set_params(ind_vm, params);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_HOST_SET_PARAMS;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
+  
+inline static smx_host_t simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_create(&self->simcall, name, ind_pm);
+    if (0) SIMIX_vm_create(name, ind_pm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_CREATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_start(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_start(&self->simcall, ind_vm);
+    if (0) SIMIX_vm_start(ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_START;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
+  
+inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_get_state(&self->simcall, ind_vm);
+    if (0) SIMIX_vm_get_state(ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_GET_STATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
+  
+inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_migrate(&self->simcall, ind_vm, ind_dst_pm);
+    if (0) SIMIX_vm_migrate(ind_vm, ind_dst_pm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_MIGRATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
+  
+inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_get_pm(&self->simcall, ind_vm);
+    if (0) SIMIX_vm_get_pm(ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_GET_PM;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
+  
+inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_set_bound(&self->simcall, ind_vm, bound);
+    if (0) SIMIX_vm_set_bound(ind_vm, bound);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_SET_BOUND;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
+  
+inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_set_affinity(&self->simcall, ind_vm, ind_pm, mask);
+    if (0) SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_SET_AFFINITY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_destroy(&self->simcall, ind_vm);
+    if (0) SIMIX_vm_destroy(ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_DESTROY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_suspend(&self->simcall, ind_vm);
+    if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_SUSPEND;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_resume(&self->simcall, ind_vm);
+    if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_RESUME;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_shutdown(&self->simcall, ind_vm);
+    if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_SHUTDOWN;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_save(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_save(&self->simcall, ind_vm);
+    if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_SAVE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
+  
+inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_vm_restore(&self->simcall, ind_vm);
+    if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_VM_RESTORE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_create(smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart) {
+  
+inline static void simcall_BODY_process_create(smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
+    if (0) simcall_HANDLER_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_CREATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_kill(smx_process_t process) {
+  
+inline static void simcall_BODY_process_kill(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_kill(&self->simcall, process);
+    if (0) simcall_HANDLER_process_kill(&self->simcall, process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_KILL;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_killall(int reset_pid) {
+  
+inline static void simcall_BODY_process_killall(int reset_pid) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_killall(&self->simcall, reset_pid);
+    if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_KILLALL;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_cleanup(smx_process_t process) {
+  
+inline static void simcall_BODY_process_cleanup(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_cleanup(&self->simcall, process);
+    if (0) SIMIX_process_cleanup(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_CLEANUP;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
+  
+inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_change_host(&self->simcall, process, dest);
+    if (0) simcall_HANDLER_process_change_host(&self->simcall, process, dest);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_suspend(smx_process_t process) {
+  
+inline static void simcall_BODY_process_suspend(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_suspend(&self->simcall, process);
+    if (0) simcall_HANDLER_process_suspend(&self->simcall, process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_SUSPEND;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_resume(smx_process_t process) {
+  
+inline static void simcall_BODY_process_resume(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_resume(&self->simcall, process);
+    if (0) simcall_HANDLER_process_resume(&self->simcall, process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_RESUME;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_process_count() {
+  
+inline static int simcall_BODY_process_count() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_count(&self->simcall);
+    if (0) SIMIX_process_count();
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_COUNT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_process_get_PID(smx_process_t process) {
+  
+inline static int simcall_BODY_process_get_PID(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_get_PID(&self->simcall, process);
+    if (0) SIMIX_process_get_PID(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_GET_PID;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
+  
+inline static int simcall_BODY_process_get_PPID(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_get_PPID(&self->simcall, process);
+    if (0) SIMIX_process_get_PPID(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_GET_PPID;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void* simcall_BODY_process_get_data(smx_process_t process) {
+  
+inline static void* simcall_BODY_process_get_data(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_get_data(&self->simcall, process);
+    if (0) SIMIX_process_get_data(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_GET_DATA;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
+  
+inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_set_data(&self->simcall, process, data);
+    if (0) SIMIX_process_set_data(process, data);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_SET_DATA;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
+  
+inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_get_host(&self->simcall, process);
+    if (0) SIMIX_process_get_host(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_GET_HOST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
+  
+inline static const char* simcall_BODY_process_get_name(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_get_name(&self->simcall, process);
+    if (0) SIMIX_process_get_name(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_GET_NAME;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.cc;
   }
-  inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
+  
+inline static int simcall_BODY_process_is_suspended(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_is_suspended(&self->simcall, process);
+    if (0) SIMIX_process_is_suspended(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
+  
+inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_get_properties(&self->simcall, process);
+    if (0) SIMIX_process_get_properties(process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
+  
+inline static int simcall_BODY_process_join(smx_process_t process, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_join(&self->simcall, process, timeout);
+    if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_JOIN;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_process_sleep(double duration) {
+  
+inline static int simcall_BODY_process_sleep(double duration) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_sleep(&self->simcall, duration);
+    if (0) simcall_HANDLER_process_sleep(&self->simcall, duration);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_SLEEP;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
+  
+inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_on_exit(&self->simcall, process, fun, data);
+    if (0) SIMIX_process_on_exit(process, fun, data);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_ON_EXIT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
+  
+inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_auto_restart_set(&self->simcall, process, auto_restart);
+    if (0) SIMIX_process_auto_restart_set(process, auto_restart);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
+  
+inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_process_restart(&self->simcall, process);
+    if (0) simcall_HANDLER_process_restart(&self->simcall, process);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_PROCESS_RESTART;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
+  
+inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_rdv_create(&self->simcall, name);
+    if (0) SIMIX_rdv_create(name);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_RDV_CREATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
+  
+inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_rdv_destroy(&self->simcall, rdv);
+    if (0) SIMIX_rdv_destroy(rdv);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_RDV_DESTROY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
+  
+inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_rdv_comm_count_by_host(&self->simcall, rdv, host);
+    if (0) SIMIX_rdv_comm_count_by_host(rdv, host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.ui;
   }
-  inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
+  
+inline static smx_synchro_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_rdv_get_head(&self->simcall, rdv);
+    if (0) SIMIX_rdv_get_head(rdv);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_RDV_GET_HEAD;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
+  
+inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_rdv_set_receiver(&self->simcall, rdv, receiver);
+    if (0) SIMIX_rdv_set_receiver(rdv, receiver);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_RDV_SET_RECEIVER;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
+  
+inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_rdv_get_receiver(&self->simcall, rdv);
+    if (0) SIMIX_rdv_get_receiver(rdv);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_RDV_GET_RECEIVER;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
+  
+inline static smx_synchro_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
+    if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_IPROBE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
+  
+inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
+    if (0) simcall_HANDLER_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_SEND;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
+  
+inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
+    if (0) simcall_HANDLER_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_ISEND;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
+  
+inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
+    if (0) simcall_HANDLER_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_RECV;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
+  
+inline static smx_synchro_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
+    if (0) simcall_HANDLER_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_IRECV;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_comm_cancel(smx_action_t comm) {
+  
+inline static void simcall_BODY_comm_cancel(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_cancel(&self->simcall, comm);
+    if (0) SIMIX_comm_cancel(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_CANCEL;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
+  
+inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_waitany(&self->simcall, comms);
+    if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_WAITANY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) {
+  
+inline static void simcall_BODY_comm_wait(smx_synchro_t comm, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_wait(&self->simcall, comm, timeout);
+    if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_WAIT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_comm_test(smx_action_t comm) {
+  
+inline static int simcall_BODY_comm_test(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_test(&self->simcall, comm);
+    if (0) simcall_HANDLER_comm_test(&self->simcall, comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_TEST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
+  
+inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_testany(&self->simcall, comms);
+    if (0) simcall_HANDLER_comm_testany(&self->simcall, comms);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_TESTANY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static double simcall_BODY_comm_get_remains(smx_action_t comm) {
+  
+inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_get_remains(&self->simcall, comm);
+    if (0) SIMIX_comm_get_remains(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_GET_REMAINS;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.d;
   }
-  inline static int simcall_BODY_comm_get_state(smx_action_t comm) {
+  
+inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_get_state(&self->simcall, comm);
+    if (0) SIMIX_comm_get_state(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_GET_STATE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) {
+  
+inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_get_src_data(&self->simcall, comm);
+    if (0) SIMIX_comm_get_src_data(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_GET_SRC_DATA;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) {
+  
+inline static void* simcall_BODY_comm_get_dst_data(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_get_dst_data(&self->simcall, comm);
+    if (0) SIMIX_comm_get_dst_data(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_GET_DST_DATA;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) {
+  
+inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_get_src_proc(&self->simcall, comm);
+    if (0) SIMIX_comm_get_src_proc(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_GET_SRC_PROC;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) {
+  
+inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_get_dst_proc(&self->simcall, comm);
+    if (0) SIMIX_comm_get_dst_proc(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_GET_DST_PROC;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static smx_mutex_t simcall_BODY_mutex_init() {
+  
+inline static smx_mutex_t simcall_BODY_mutex_init() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mutex_init(&self->simcall);
+    if (0) simcall_HANDLER_mutex_init(&self->simcall);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MUTEX_INIT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mutex_destroy(&self->simcall, mutex);
+    if (0) SIMIX_mutex_destroy(mutex);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MUTEX_DESTROY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mutex_lock(&self->simcall, mutex);
+    if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MUTEX_LOCK;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
+  
+inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mutex_trylock(&self->simcall, mutex);
+    if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MUTEX_TRYLOCK;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mutex_unlock(&self->simcall, mutex);
+    if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MUTEX_UNLOCK;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static smx_cond_t simcall_BODY_cond_init() {
+  
+inline static smx_cond_t simcall_BODY_cond_init() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_cond_init(&self->simcall);
+    if (0) SIMIX_cond_init();
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COND_INIT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
+  
+inline static void simcall_BODY_cond_destroy(smx_cond_t cond) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_cond_destroy(&self->simcall, cond);
+    if (0) SIMIX_cond_destroy(cond);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COND_DESTROY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
+  
+inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_cond_signal(&self->simcall, cond);
+    if (0) SIMIX_cond_signal(cond);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COND_SIGNAL;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
+  
+inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_cond_wait(&self->simcall, cond, mutex);
+    if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COND_WAIT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
+  
+inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
+    if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
+  
+inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_cond_broadcast(&self->simcall, cond);
+    if (0) SIMIX_cond_broadcast(cond);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COND_BROADCAST;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static smx_sem_t simcall_BODY_sem_init(int capacity) {
+  
+inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_sem_init(&self->simcall, capacity);
+    if (0) SIMIX_sem_init(capacity);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SEM_INIT;
     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].i = (int) capacity;
+    self->simcall.args[0].ui = (unsigned int) capacity;
     if (self != simix_global->maestro_process) {
       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
+  
+inline static void simcall_BODY_sem_destroy(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_sem_destroy(&self->simcall, sem);
+    if (0) SIMIX_sem_destroy(sem);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SEM_DESTROY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_sem_release(smx_sem_t sem) {
+  
+inline static void simcall_BODY_sem_release(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_sem_release(&self->simcall, sem);
+    if (0) simcall_HANDLER_sem_release(&self->simcall, sem);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SEM_RELEASE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
+  
+inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_sem_would_block(&self->simcall, sem);
+    if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SEM_WOULD_BLOCK;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
+  
+inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_sem_acquire(&self->simcall, sem);
+    if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SEM_ACQUIRE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
+  
+inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_sem_acquire_timeout(&self->simcall, sem, timeout);
+    if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
-  inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
+  
+inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_sem_get_capacity(&self->simcall, sem);
+    if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SEM_GET_CAPACITY;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
+  
+inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_read(&self->simcall, fd, size, host);
+    if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_READ;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.sgsz;
   }
-  inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
+  
+inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_write(&self->simcall, fd, size, host);
+    if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_WRITE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.sgsz;
   }
-  inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
+  
+inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_open(&self->simcall, fullpath, host);
+    if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_OPEN;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
+  
+inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_close(&self->simcall, fd, host);
+    if (0) simcall_HANDLER_file_close(&self->simcall, fd, host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_CLOSE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
+  
+inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_unlink(&self->simcall, fd, host);
+    if (0) SIMIX_file_unlink(fd, host);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_UNLINK;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
+  
+inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_get_size(&self->simcall, fd);
+    if (0) simcall_HANDLER_file_get_size(&self->simcall, fd);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_GET_SIZE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.sgsz;
   }
-  inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
+  
+inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_tell(&self->simcall, fd);
+    if (0) simcall_HANDLER_file_tell(&self->simcall, fd);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_TELL;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.sgsz;
   }
-  inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
+  
+inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_seek(&self->simcall, fd, offset, origin);
+    if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_SEEK;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
+  
+inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_get_info(&self->simcall, fd);
+    if (0) simcall_HANDLER_file_get_info(&self->simcall, fd);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_GET_INFO;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
+  
+inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_file_move(&self->simcall, fd, fullpath);
+    if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_FILE_MOVE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
+  
+inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_storage_get_free_size(&self->simcall, storage);
+    if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.sgsz;
   }
-  inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
+  
+inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_storage_get_used_size(&self->simcall, name);
+    if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.sgsz;
   }
-  inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
+  
+inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_storage_get_properties(&self->simcall, storage);
+    if (0) SIMIX_storage_get_properties(storage);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
+  
+inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_storage_get_content(&self->simcall, storage);
+    if (0) SIMIX_storage_get_content(storage);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_STORAGE_GET_CONTENT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
+  
+inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_asr_get_properties(&self->simcall, name);
+    if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_ASR_GET_PROPERTIES;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-  inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) {
+  
+inline static int simcall_BODY_comm_is_latency_bounded(smx_synchro_t comm) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_comm_is_latency_bounded(&self->simcall, comm);
+    if (0) SIMIX_comm_is_latency_bounded(comm);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
 #endif
 
 #ifdef HAVE_TRACING
-  inline static void simcall_BODY_set_category(smx_action_t action, const char* category) {
+  
+inline static void simcall_BODY_set_category(smx_synchro_t synchro, const char* category) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_set_category(&self->simcall, action, category);
+    if (0) SIMIX_set_category(synchro, category);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_SET_CATEGORY;
     memset(&self->simcall.result, 0, sizeof(self->simcall.result));
     memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) action;
+    self->simcall.args[0].dp = (void*) synchro;
     self->simcall.args[1].cc = (const char*) category;
     if (self != simix_global->maestro_process) {
       XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     
   }
 #endif
 
 #ifdef HAVE_MC
-  inline static void* simcall_BODY_mc_snapshot() {
+  
+inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mc_snapshot(&self->simcall);
+    if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MC_SNAPSHOT;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.dp;
   }
-  inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) {
+  
+inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mc_compare_snapshots(&self->simcall, s1, s2);
+    if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
-  inline static int simcall_BODY_mc_random(int min, int max) {
+  
+inline static int simcall_BODY_mc_random(int min, int max) {
     smx_process_t self = SIMIX_process_self();
 
     /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_mc_random(&self->simcall, min, max);
+    if (0) simcall_HANDLER_mc_random(&self->simcall, min, max);
     /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
 
     self->simcall.call = SIMCALL_MC_RANDOM;
                 SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
       SIMIX_process_yield(self);
     } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
+      SIMIX_simcall_handle(&self->simcall, 0);
     }    
     return self->simcall.result.i;
   }
diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h
new file mode 100644 (file)
index 0000000..46a84a1
--- /dev/null
@@ -0,0 +1,153 @@
+/**********************************************************************/
+/* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
+
+/*
+ * Note that the name comes from http://en.wikipedia.org/wiki/Popping
+ * Indeed, the control flow is doing a strange dance in there.
+ *
+ * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
+ */
+
+/**
+ * @brief All possible simcalls.
+ */
+typedef enum {
+  SIMCALL_NONE,
+  SIMCALL_HOST_GET_BY_NAME,
+  SIMCALL_HOST_GET_NAME,
+  SIMCALL_HOST_ON,
+  SIMCALL_HOST_OFF,
+  SIMCALL_HOST_GET_PROPERTIES,
+  SIMCALL_HOST_GET_CORE,
+  SIMCALL_HOST_GET_PROCESS_LIST,
+  SIMCALL_HOST_GET_SPEED,
+  SIMCALL_HOST_GET_AVAILABLE_SPEED,
+  SIMCALL_HOST_GET_STATE,
+  SIMCALL_HOST_GET_CURRENT_POWER_PEAK,
+  SIMCALL_HOST_GET_POWER_PEAK_AT,
+  SIMCALL_HOST_GET_NB_PSTATES,
+  SIMCALL_HOST_SET_POWER_PEAK_AT,
+  SIMCALL_HOST_GET_CONSUMED_ENERGY,
+  SIMCALL_HOST_EXECUTE,
+  SIMCALL_HOST_PARALLEL_EXECUTE,
+  SIMCALL_HOST_EXECUTION_DESTROY,
+  SIMCALL_HOST_EXECUTION_CANCEL,
+  SIMCALL_HOST_EXECUTION_GET_REMAINS,
+  SIMCALL_HOST_EXECUTION_GET_STATE,
+  SIMCALL_HOST_EXECUTION_SET_PRIORITY,
+  SIMCALL_HOST_EXECUTION_SET_BOUND,
+  SIMCALL_HOST_EXECUTION_SET_AFFINITY,
+  SIMCALL_HOST_EXECUTION_WAIT,
+  SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST,
+  SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST,
+  SIMCALL_HOST_GET_PARAMS,
+  SIMCALL_HOST_SET_PARAMS,
+  SIMCALL_VM_CREATE,
+  SIMCALL_VM_START,
+  SIMCALL_VM_GET_STATE,
+  SIMCALL_VM_MIGRATE,
+  SIMCALL_VM_GET_PM,
+  SIMCALL_VM_SET_BOUND,
+  SIMCALL_VM_SET_AFFINITY,
+  SIMCALL_VM_DESTROY,
+  SIMCALL_VM_SUSPEND,
+  SIMCALL_VM_RESUME,
+  SIMCALL_VM_SHUTDOWN,
+  SIMCALL_VM_SAVE,
+  SIMCALL_VM_RESTORE,
+  SIMCALL_PROCESS_CREATE,
+  SIMCALL_PROCESS_KILL,
+  SIMCALL_PROCESS_KILLALL,
+  SIMCALL_PROCESS_CLEANUP,
+  SIMCALL_PROCESS_CHANGE_HOST,
+  SIMCALL_PROCESS_SUSPEND,
+  SIMCALL_PROCESS_RESUME,
+  SIMCALL_PROCESS_COUNT,
+  SIMCALL_PROCESS_GET_PID,
+  SIMCALL_PROCESS_GET_PPID,
+  SIMCALL_PROCESS_GET_DATA,
+  SIMCALL_PROCESS_SET_DATA,
+  SIMCALL_PROCESS_GET_HOST,
+  SIMCALL_PROCESS_GET_NAME,
+  SIMCALL_PROCESS_IS_SUSPENDED,
+  SIMCALL_PROCESS_GET_PROPERTIES,
+  SIMCALL_PROCESS_JOIN,
+  SIMCALL_PROCESS_SLEEP,
+  SIMCALL_PROCESS_ON_EXIT,
+  SIMCALL_PROCESS_AUTO_RESTART_SET,
+  SIMCALL_PROCESS_RESTART,
+  SIMCALL_RDV_CREATE,
+  SIMCALL_RDV_DESTROY,
+  SIMCALL_RDV_COMM_COUNT_BY_HOST,
+  SIMCALL_RDV_GET_HEAD,
+  SIMCALL_RDV_SET_RECEIVER,
+  SIMCALL_RDV_GET_RECEIVER,
+  SIMCALL_COMM_IPROBE,
+  SIMCALL_COMM_SEND,
+  SIMCALL_COMM_ISEND,
+  SIMCALL_COMM_RECV,
+  SIMCALL_COMM_IRECV,
+  SIMCALL_COMM_CANCEL,
+  SIMCALL_COMM_WAITANY,
+  SIMCALL_COMM_WAIT,
+  SIMCALL_COMM_TEST,
+  SIMCALL_COMM_TESTANY,
+  SIMCALL_COMM_GET_REMAINS,
+  SIMCALL_COMM_GET_STATE,
+  SIMCALL_COMM_GET_SRC_DATA,
+  SIMCALL_COMM_GET_DST_DATA,
+  SIMCALL_COMM_GET_SRC_PROC,
+  SIMCALL_COMM_GET_DST_PROC,
+  SIMCALL_MUTEX_INIT,
+  SIMCALL_MUTEX_DESTROY,
+  SIMCALL_MUTEX_LOCK,
+  SIMCALL_MUTEX_TRYLOCK,
+  SIMCALL_MUTEX_UNLOCK,
+  SIMCALL_COND_INIT,
+  SIMCALL_COND_DESTROY,
+  SIMCALL_COND_SIGNAL,
+  SIMCALL_COND_WAIT,
+  SIMCALL_COND_WAIT_TIMEOUT,
+  SIMCALL_COND_BROADCAST,
+  SIMCALL_SEM_INIT,
+  SIMCALL_SEM_DESTROY,
+  SIMCALL_SEM_RELEASE,
+  SIMCALL_SEM_WOULD_BLOCK,
+  SIMCALL_SEM_ACQUIRE,
+  SIMCALL_SEM_ACQUIRE_TIMEOUT,
+  SIMCALL_SEM_GET_CAPACITY,
+  SIMCALL_FILE_READ,
+  SIMCALL_FILE_WRITE,
+  SIMCALL_FILE_OPEN,
+  SIMCALL_FILE_CLOSE,
+  SIMCALL_FILE_UNLINK,
+  SIMCALL_FILE_GET_SIZE,
+  SIMCALL_FILE_TELL,
+  SIMCALL_FILE_SEEK,
+  SIMCALL_FILE_GET_INFO,
+  SIMCALL_FILE_MOVE,
+  SIMCALL_STORAGE_GET_FREE_SIZE,
+  SIMCALL_STORAGE_GET_USED_SIZE,
+  SIMCALL_STORAGE_GET_PROPERTIES,
+  SIMCALL_STORAGE_GET_CONTENT,
+  SIMCALL_ASR_GET_PROPERTIES,
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+  SIMCALL_COMM_IS_LATENCY_BOUNDED,
+#endif
+
+#ifdef HAVE_TRACING
+  SIMCALL_SET_CATEGORY,
+#endif
+
+#ifdef HAVE_MC
+  SIMCALL_MC_SNAPSHOT,
+  SIMCALL_MC_COMPARE_SNAPSHOTS,
+  SIMCALL_MC_RANDOM,
+#endif
+  NUM_SIMCALLS
+} e_smx_simcall_t;
diff --git a/src/simix/popping_generated.c b/src/simix/popping_generated.c
new file mode 100644 (file)
index 0000000..e4cc8a5
--- /dev/null
@@ -0,0 +1,784 @@
+/**********************************************************************/
+/* File generated by src/simix/simcalls.py from src/simix/simcalls.in */
+/*                                                                    */
+/*                    DO NOT EVER CHANGE THIS FILE                    */
+/*                                                                    */
+/* change simcalls specification in src/simix/simcalls.in             */
+/**********************************************************************/
+
+/*
+ * Note that the name comes from http://en.wikipedia.org/wiki/Popping
+ * Indeed, the control flow is doing a strange dance in there.
+ *
+ * That's not about http://en.wikipedia.org/wiki/Poop, despite the odor :)
+ */
+
+#include "smx_private.h"
+#ifdef HAVE_MC
+#include "mc/mc_private.h"
+#endif
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
+
+/** @brief Simcalls' names (generated from src/simix/simcalls.in) */
+const char* simcall_names[] = {
+  [SIMCALL_HOST_GET_BY_NAME] = "SIMCALL_HOST_GET_BY_NAME",
+  [SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
+  [SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
+  [SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
+  [SIMCALL_HOST_GET_PROPERTIES] = "SIMCALL_HOST_GET_PROPERTIES",
+  [SIMCALL_HOST_GET_CORE] = "SIMCALL_HOST_GET_CORE",
+  [SIMCALL_HOST_GET_PROCESS_LIST] = "SIMCALL_HOST_GET_PROCESS_LIST",
+  [SIMCALL_HOST_GET_SPEED] = "SIMCALL_HOST_GET_SPEED",
+  [SIMCALL_HOST_GET_AVAILABLE_SPEED] = "SIMCALL_HOST_GET_AVAILABLE_SPEED",
+  [SIMCALL_HOST_GET_STATE] = "SIMCALL_HOST_GET_STATE",
+  [SIMCALL_HOST_GET_CURRENT_POWER_PEAK] = "SIMCALL_HOST_GET_CURRENT_POWER_PEAK",
+  [SIMCALL_HOST_GET_POWER_PEAK_AT] = "SIMCALL_HOST_GET_POWER_PEAK_AT",
+  [SIMCALL_HOST_GET_NB_PSTATES] = "SIMCALL_HOST_GET_NB_PSTATES",
+  [SIMCALL_HOST_SET_POWER_PEAK_AT] = "SIMCALL_HOST_SET_POWER_PEAK_AT",
+  [SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
+  [SIMCALL_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE",
+  [SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE",
+  [SIMCALL_HOST_EXECUTION_DESTROY] = "SIMCALL_HOST_EXECUTION_DESTROY",
+  [SIMCALL_HOST_EXECUTION_CANCEL] = "SIMCALL_HOST_EXECUTION_CANCEL",
+  [SIMCALL_HOST_EXECUTION_GET_REMAINS] = "SIMCALL_HOST_EXECUTION_GET_REMAINS",
+  [SIMCALL_HOST_EXECUTION_GET_STATE] = "SIMCALL_HOST_EXECUTION_GET_STATE",
+  [SIMCALL_HOST_EXECUTION_SET_PRIORITY] = "SIMCALL_HOST_EXECUTION_SET_PRIORITY",
+  [SIMCALL_HOST_EXECUTION_SET_BOUND] = "SIMCALL_HOST_EXECUTION_SET_BOUND",
+  [SIMCALL_HOST_EXECUTION_SET_AFFINITY] = "SIMCALL_HOST_EXECUTION_SET_AFFINITY",
+  [SIMCALL_HOST_EXECUTION_WAIT] = "SIMCALL_HOST_EXECUTION_WAIT",
+  [SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST] = "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST",
+  [SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST] = "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST",
+  [SIMCALL_HOST_GET_PARAMS] = "SIMCALL_HOST_GET_PARAMS",
+  [SIMCALL_HOST_SET_PARAMS] = "SIMCALL_HOST_SET_PARAMS",
+  [SIMCALL_VM_CREATE] = "SIMCALL_VM_CREATE",
+  [SIMCALL_VM_START] = "SIMCALL_VM_START",
+  [SIMCALL_VM_GET_STATE] = "SIMCALL_VM_GET_STATE",
+  [SIMCALL_VM_MIGRATE] = "SIMCALL_VM_MIGRATE",
+  [SIMCALL_VM_GET_PM] = "SIMCALL_VM_GET_PM",
+  [SIMCALL_VM_SET_BOUND] = "SIMCALL_VM_SET_BOUND",
+  [SIMCALL_VM_SET_AFFINITY] = "SIMCALL_VM_SET_AFFINITY",
+  [SIMCALL_VM_DESTROY] = "SIMCALL_VM_DESTROY",
+  [SIMCALL_VM_SUSPEND] = "SIMCALL_VM_SUSPEND",
+  [SIMCALL_VM_RESUME] = "SIMCALL_VM_RESUME",
+  [SIMCALL_VM_SHUTDOWN] = "SIMCALL_VM_SHUTDOWN",
+  [SIMCALL_VM_SAVE] = "SIMCALL_VM_SAVE",
+  [SIMCALL_VM_RESTORE] = "SIMCALL_VM_RESTORE",
+  [SIMCALL_PROCESS_CREATE] = "SIMCALL_PROCESS_CREATE",
+  [SIMCALL_PROCESS_KILL] = "SIMCALL_PROCESS_KILL",
+  [SIMCALL_PROCESS_KILLALL] = "SIMCALL_PROCESS_KILLALL",
+  [SIMCALL_PROCESS_CLEANUP] = "SIMCALL_PROCESS_CLEANUP",
+  [SIMCALL_PROCESS_CHANGE_HOST] = "SIMCALL_PROCESS_CHANGE_HOST",
+  [SIMCALL_PROCESS_SUSPEND] = "SIMCALL_PROCESS_SUSPEND",
+  [SIMCALL_PROCESS_RESUME] = "SIMCALL_PROCESS_RESUME",
+  [SIMCALL_PROCESS_COUNT] = "SIMCALL_PROCESS_COUNT",
+  [SIMCALL_PROCESS_GET_PID] = "SIMCALL_PROCESS_GET_PID",
+  [SIMCALL_PROCESS_GET_PPID] = "SIMCALL_PROCESS_GET_PPID",
+  [SIMCALL_PROCESS_GET_DATA] = "SIMCALL_PROCESS_GET_DATA",
+  [SIMCALL_PROCESS_SET_DATA] = "SIMCALL_PROCESS_SET_DATA",
+  [SIMCALL_PROCESS_GET_HOST] = "SIMCALL_PROCESS_GET_HOST",
+  [SIMCALL_PROCESS_GET_NAME] = "SIMCALL_PROCESS_GET_NAME",
+  [SIMCALL_PROCESS_IS_SUSPENDED] = "SIMCALL_PROCESS_IS_SUSPENDED",
+  [SIMCALL_PROCESS_GET_PROPERTIES] = "SIMCALL_PROCESS_GET_PROPERTIES",
+  [SIMCALL_PROCESS_JOIN] = "SIMCALL_PROCESS_JOIN",
+  [SIMCALL_PROCESS_SLEEP] = "SIMCALL_PROCESS_SLEEP",
+  [SIMCALL_PROCESS_ON_EXIT] = "SIMCALL_PROCESS_ON_EXIT",
+  [SIMCALL_PROCESS_AUTO_RESTART_SET] = "SIMCALL_PROCESS_AUTO_RESTART_SET",
+  [SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
+  [SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
+  [SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
+  [SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
+  [SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
+  [SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
+  [SIMCALL_RDV_GET_RECEIVER] = "SIMCALL_RDV_GET_RECEIVER",
+  [SIMCALL_COMM_IPROBE] = "SIMCALL_COMM_IPROBE",
+  [SIMCALL_COMM_SEND] = "SIMCALL_COMM_SEND",
+  [SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
+  [SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
+  [SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
+  [SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
+  [SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
+  [SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
+  [SIMCALL_COMM_TEST] = "SIMCALL_COMM_TEST",
+  [SIMCALL_COMM_TESTANY] = "SIMCALL_COMM_TESTANY",
+  [SIMCALL_COMM_GET_REMAINS] = "SIMCALL_COMM_GET_REMAINS",
+  [SIMCALL_COMM_GET_STATE] = "SIMCALL_COMM_GET_STATE",
+  [SIMCALL_COMM_GET_SRC_DATA] = "SIMCALL_COMM_GET_SRC_DATA",
+  [SIMCALL_COMM_GET_DST_DATA] = "SIMCALL_COMM_GET_DST_DATA",
+  [SIMCALL_COMM_GET_SRC_PROC] = "SIMCALL_COMM_GET_SRC_PROC",
+  [SIMCALL_COMM_GET_DST_PROC] = "SIMCALL_COMM_GET_DST_PROC",
+  [SIMCALL_MUTEX_INIT] = "SIMCALL_MUTEX_INIT",
+  [SIMCALL_MUTEX_DESTROY] = "SIMCALL_MUTEX_DESTROY",
+  [SIMCALL_MUTEX_LOCK] = "SIMCALL_MUTEX_LOCK",
+  [SIMCALL_MUTEX_TRYLOCK] = "SIMCALL_MUTEX_TRYLOCK",
+  [SIMCALL_MUTEX_UNLOCK] = "SIMCALL_MUTEX_UNLOCK",
+  [SIMCALL_COND_INIT] = "SIMCALL_COND_INIT",
+  [SIMCALL_COND_DESTROY] = "SIMCALL_COND_DESTROY",
+  [SIMCALL_COND_SIGNAL] = "SIMCALL_COND_SIGNAL",
+  [SIMCALL_COND_WAIT] = "SIMCALL_COND_WAIT",
+  [SIMCALL_COND_WAIT_TIMEOUT] = "SIMCALL_COND_WAIT_TIMEOUT",
+  [SIMCALL_COND_BROADCAST] = "SIMCALL_COND_BROADCAST",
+  [SIMCALL_SEM_INIT] = "SIMCALL_SEM_INIT",
+  [SIMCALL_SEM_DESTROY] = "SIMCALL_SEM_DESTROY",
+  [SIMCALL_SEM_RELEASE] = "SIMCALL_SEM_RELEASE",
+  [SIMCALL_SEM_WOULD_BLOCK] = "SIMCALL_SEM_WOULD_BLOCK",
+  [SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
+  [SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
+  [SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
+  [SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
+  [SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
+  [SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
+  [SIMCALL_FILE_CLOSE] = "SIMCALL_FILE_CLOSE",
+  [SIMCALL_FILE_UNLINK] = "SIMCALL_FILE_UNLINK",
+  [SIMCALL_FILE_GET_SIZE] = "SIMCALL_FILE_GET_SIZE",
+  [SIMCALL_FILE_TELL] = "SIMCALL_FILE_TELL",
+  [SIMCALL_FILE_SEEK] = "SIMCALL_FILE_SEEK",
+  [SIMCALL_FILE_GET_INFO] = "SIMCALL_FILE_GET_INFO",
+  [SIMCALL_FILE_MOVE] = "SIMCALL_FILE_MOVE",
+  [SIMCALL_STORAGE_GET_FREE_SIZE] = "SIMCALL_STORAGE_GET_FREE_SIZE",
+  [SIMCALL_STORAGE_GET_USED_SIZE] = "SIMCALL_STORAGE_GET_USED_SIZE",
+  [SIMCALL_STORAGE_GET_PROPERTIES] = "SIMCALL_STORAGE_GET_PROPERTIES",
+  [SIMCALL_STORAGE_GET_CONTENT] = "SIMCALL_STORAGE_GET_CONTENT",
+  [SIMCALL_ASR_GET_PROPERTIES] = "SIMCALL_ASR_GET_PROPERTIES",
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+  [SIMCALL_COMM_IS_LATENCY_BOUNDED] = "SIMCALL_COMM_IS_LATENCY_BOUNDED",
+#endif
+
+#ifdef HAVE_TRACING
+  [SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
+#endif
+
+#ifdef HAVE_MC
+  [SIMCALL_MC_SNAPSHOT] = "SIMCALL_MC_SNAPSHOT",
+  [SIMCALL_MC_COMPARE_SNAPSHOTS] = "SIMCALL_MC_COMPARE_SNAPSHOTS",
+  [SIMCALL_MC_RANDOM] = "SIMCALL_MC_RANDOM",
+#endif
+[SIMCALL_NONE] = "NONE"
+};
+
+/**
+ * @brief (in kernel mode) unpack the simcall and activate the handler
+ * 
+ * This function is generated from src/simix/simcalls.in
+ */
+void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {
+  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
+  SIMCALL_SET_MC_VALUE(simcall, value);
+  if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
+    return;
+  switch (simcall->call) {
+case SIMCALL_HOST_GET_BY_NAME:
+      simcall->result.dp = SIMIX_host_get_by_name( simcall->args[0].cc);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_NAME:
+      simcall->result.cc = SIMIX_host_get_name((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_ON:
+       SIMIX_host_on((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_OFF:
+       simcall_HANDLER_host_off(simcall , (smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_PROPERTIES:
+      simcall->result.dp = SIMIX_host_get_properties((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_CORE:
+      simcall->result.i = SIMIX_host_get_core((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_PROCESS_LIST:
+      simcall->result.dp = SIMIX_host_get_process_list((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_SPEED:
+      simcall->result.d = SIMIX_host_get_speed((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_AVAILABLE_SPEED:
+      simcall->result.d = SIMIX_host_get_available_speed((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_STATE:
+      simcall->result.i = SIMIX_host_get_state((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_CURRENT_POWER_PEAK:
+      simcall->result.d = SIMIX_host_get_current_power_peak((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_POWER_PEAK_AT:
+      simcall->result.d = SIMIX_host_get_power_peak_at((smx_host_t) simcall->args[0].dp, simcall->args[1].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_NB_PSTATES:
+      simcall->result.i = SIMIX_host_get_nb_pstates((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_SET_POWER_PEAK_AT:
+       SIMIX_host_set_power_peak_at((smx_host_t) simcall->args[0].dp, simcall->args[1].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_CONSUMED_ENERGY:
+      simcall->result.d = SIMIX_host_get_consumed_energy((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTE:
+      simcall->result.dp = SIMIX_host_execute( simcall->args[0].cc,(smx_host_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].d, simcall->args[5].ul);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_PARALLEL_EXECUTE:
+      simcall->result.dp = SIMIX_host_parallel_execute( simcall->args[0].cc, simcall->args[1].i,(smx_host_t*) simcall->args[2].dp,(double*) simcall->args[3].dp,(double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_DESTROY:
+       SIMIX_host_execution_destroy((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_CANCEL:
+       SIMIX_host_execution_cancel((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_GET_REMAINS:
+      simcall->result.d = SIMIX_host_execution_get_remains((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_GET_STATE:
+      simcall->result.i = SIMIX_host_execution_get_state((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_SET_PRIORITY:
+       SIMIX_host_execution_set_priority((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_SET_BOUND:
+       SIMIX_host_execution_set_bound((smx_synchro_t) simcall->args[0].dp, simcall->args[1].d);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_SET_AFFINITY:
+       SIMIX_host_execution_set_affinity((smx_synchro_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp, simcall->args[2].ul);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_EXECUTION_WAIT:
+       simcall_HANDLER_host_execution_wait(simcall , (smx_synchro_t) simcall->args[0].dp);
+       break;  
+
+case SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST:
+      simcall->result.dp = SIMIX_host_get_mounted_storage_list((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST:
+      simcall->result.dp = SIMIX_host_get_attached_storage_list((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_GET_PARAMS:
+       SIMIX_host_get_params((smx_host_t) simcall->args[0].dp,(ws_params_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_HOST_SET_PARAMS:
+       SIMIX_host_set_params((smx_host_t) simcall->args[0].dp,(ws_params_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_CREATE:
+      simcall->result.dp = SIMIX_vm_create( simcall->args[0].cc,(smx_host_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_START:
+       SIMIX_vm_start((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_GET_STATE:
+      simcall->result.i = SIMIX_vm_get_state((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_MIGRATE:
+       SIMIX_vm_migrate((smx_host_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_GET_PM:
+      simcall->result.dp = SIMIX_vm_get_pm((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_SET_BOUND:
+       SIMIX_vm_set_bound((smx_host_t) simcall->args[0].dp, simcall->args[1].d);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_SET_AFFINITY:
+       SIMIX_vm_set_affinity((smx_host_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp, simcall->args[2].ul);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_DESTROY:
+       SIMIX_vm_destroy((smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_SUSPEND:
+       simcall_HANDLER_vm_suspend(simcall , (smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_RESUME:
+       simcall_HANDLER_vm_resume(simcall , (smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_SHUTDOWN:
+       simcall_HANDLER_vm_shutdown(simcall , (smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_SAVE:
+       simcall_HANDLER_vm_save(simcall , (smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_VM_RESTORE:
+       simcall_HANDLER_vm_restore(simcall , (smx_host_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_CREATE:
+       simcall_HANDLER_process_create(simcall , (smx_process_t*) simcall->args[0].dp,  simcall->args[1].cc, (xbt_main_func_t) simcall->args[2].fp,  simcall->args[3].dp,  simcall->args[4].cc,  simcall->args[5].d,  simcall->args[6].i, (char**) simcall->args[7].dp, (xbt_dict_t) simcall->args[8].dp,  simcall->args[9].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_KILL:
+       simcall_HANDLER_process_kill(simcall , (smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_KILLALL:
+       simcall_HANDLER_process_killall(simcall ,  simcall->args[0].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_CLEANUP:
+       SIMIX_process_cleanup((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_CHANGE_HOST:
+       simcall_HANDLER_process_change_host(simcall , (smx_process_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_SUSPEND:
+       simcall_HANDLER_process_suspend(simcall , (smx_process_t) simcall->args[0].dp);
+       break;  
+
+case SIMCALL_PROCESS_RESUME:
+       simcall_HANDLER_process_resume(simcall , (smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_COUNT:
+      simcall->result.i = SIMIX_process_count();
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_GET_PID:
+      simcall->result.i = SIMIX_process_get_PID((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_GET_PPID:
+      simcall->result.i = SIMIX_process_get_PPID((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_GET_DATA:
+      simcall->result.dp = SIMIX_process_get_data((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_SET_DATA:
+       SIMIX_process_set_data((smx_process_t) simcall->args[0].dp, simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_GET_HOST:
+      simcall->result.dp = SIMIX_process_get_host((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_GET_NAME:
+      simcall->result.cc = SIMIX_process_get_name((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_IS_SUSPENDED:
+      simcall->result.i = SIMIX_process_is_suspended((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_GET_PROPERTIES:
+      simcall->result.dp = SIMIX_process_get_properties((smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_JOIN:
+       simcall_HANDLER_process_join(simcall , (smx_process_t) simcall->args[0].dp,  simcall->args[1].d);
+       break;  
+
+case SIMCALL_PROCESS_SLEEP:
+       simcall_HANDLER_process_sleep(simcall ,  simcall->args[0].d);
+       break;  
+
+case SIMCALL_PROCESS_ON_EXIT:
+       SIMIX_process_on_exit((smx_process_t) simcall->args[0].dp,(int_f_pvoid_pvoid_t) simcall->args[1].fp, simcall->args[2].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_AUTO_RESTART_SET:
+       SIMIX_process_auto_restart_set((smx_process_t) simcall->args[0].dp, simcall->args[1].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_PROCESS_RESTART:
+      simcall->result.dp = simcall_HANDLER_process_restart(simcall , (smx_process_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_RDV_CREATE:
+      simcall->result.dp = SIMIX_rdv_create( simcall->args[0].cc);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_RDV_DESTROY:
+       SIMIX_rdv_destroy((smx_rdv_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_RDV_COMM_COUNT_BY_HOST:
+      simcall->result.ui = SIMIX_rdv_comm_count_by_host((smx_rdv_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_RDV_GET_HEAD:
+      simcall->result.dp = SIMIX_rdv_get_head((smx_rdv_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_RDV_SET_RECEIVER:
+       SIMIX_rdv_set_receiver((smx_rdv_t) simcall->args[0].dp,(smx_process_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_RDV_GET_RECEIVER:
+      simcall->result.dp = SIMIX_rdv_get_receiver((smx_rdv_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_IPROBE:
+      simcall->result.dp = simcall_HANDLER_comm_iprobe(simcall , (smx_rdv_t) simcall->args[0].dp,  simcall->args[1].i,  simcall->args[2].i,  simcall->args[3].i, (simix_match_func_t) simcall->args[4].fp,  simcall->args[5].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_SEND:
+       simcall_HANDLER_comm_send(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].dp,  simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_copy_data_func_t) simcall->args[7].fp,  simcall->args[8].dp,  simcall->args[9].d);
+       break;  
+
+case SIMCALL_COMM_ISEND:
+      simcall->result.dp = simcall_HANDLER_comm_isend(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].dp,  simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_clean_func_t) simcall->args[7].fp, (simix_copy_data_func_t) simcall->args[8].fp,  simcall->args[9].dp,  simcall->args[10].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_RECV:
+       simcall_HANDLER_comm_recv(simcall , (smx_rdv_t) simcall->args[0].dp,  simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp,  simcall->args[5].dp,  simcall->args[6].d,  simcall->args[7].d);
+       break;  
+
+case SIMCALL_COMM_IRECV:
+      simcall->result.dp = simcall_HANDLER_comm_irecv(simcall , (smx_rdv_t) simcall->args[0].dp,  simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp,  simcall->args[5].dp,  simcall->args[6].d);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_CANCEL:
+       SIMIX_comm_cancel((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_WAITANY:
+       simcall_HANDLER_comm_waitany(simcall , (xbt_dynar_t) simcall->args[0].dp);
+       break;  
+
+case SIMCALL_COMM_WAIT:
+       simcall_HANDLER_comm_wait(simcall , (smx_synchro_t) simcall->args[0].dp,  simcall->args[1].d);
+       break;  
+
+case SIMCALL_COMM_TEST:
+       simcall_HANDLER_comm_test(simcall , (smx_synchro_t) simcall->args[0].dp);
+       break;  
+
+case SIMCALL_COMM_TESTANY:
+       simcall_HANDLER_comm_testany(simcall , (xbt_dynar_t) simcall->args[0].dp);
+       break;  
+
+case SIMCALL_COMM_GET_REMAINS:
+      simcall->result.d = SIMIX_comm_get_remains((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_GET_STATE:
+      simcall->result.i = SIMIX_comm_get_state((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_GET_SRC_DATA:
+      simcall->result.dp = SIMIX_comm_get_src_data((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_GET_DST_DATA:
+      simcall->result.dp = SIMIX_comm_get_dst_data((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_GET_SRC_PROC:
+      simcall->result.dp = SIMIX_comm_get_src_proc((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COMM_GET_DST_PROC:
+      simcall->result.dp = SIMIX_comm_get_dst_proc((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_MUTEX_INIT:
+      simcall->result.dp = simcall_HANDLER_mutex_init(simcall );
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_MUTEX_DESTROY:
+       SIMIX_mutex_destroy((smx_mutex_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_MUTEX_LOCK:
+       simcall_HANDLER_mutex_lock(simcall , (smx_mutex_t) simcall->args[0].dp);
+       break;  
+
+case SIMCALL_MUTEX_TRYLOCK:
+      simcall->result.i = simcall_HANDLER_mutex_trylock(simcall , (smx_mutex_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_MUTEX_UNLOCK:
+       simcall_HANDLER_mutex_unlock(simcall , (smx_mutex_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COND_INIT:
+      simcall->result.dp = SIMIX_cond_init();
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COND_DESTROY:
+       SIMIX_cond_destroy((smx_cond_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COND_SIGNAL:
+       SIMIX_cond_signal((smx_cond_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_COND_WAIT:
+       simcall_HANDLER_cond_wait(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp);
+       break;  
+
+case SIMCALL_COND_WAIT_TIMEOUT:
+       simcall_HANDLER_cond_wait_timeout(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp,  simcall->args[2].d);
+       break;  
+
+case SIMCALL_COND_BROADCAST:
+       SIMIX_cond_broadcast((smx_cond_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_SEM_INIT:
+      simcall->result.dp = SIMIX_sem_init( simcall->args[0].ui);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_SEM_DESTROY:
+       SIMIX_sem_destroy((smx_sem_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_SEM_RELEASE:
+       simcall_HANDLER_sem_release(simcall , (smx_sem_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_SEM_WOULD_BLOCK:
+      simcall->result.i = simcall_HANDLER_sem_would_block(simcall , (smx_sem_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_SEM_ACQUIRE:
+       simcall_HANDLER_sem_acquire(simcall , (smx_sem_t) simcall->args[0].dp);
+       break;  
+
+case SIMCALL_SEM_ACQUIRE_TIMEOUT:
+       simcall_HANDLER_sem_acquire_timeout(simcall , (smx_sem_t) simcall->args[0].dp,  simcall->args[1].d);
+       break;  
+
+case SIMCALL_SEM_GET_CAPACITY:
+      simcall->result.i = simcall_HANDLER_sem_get_capacity(simcall , (smx_sem_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_FILE_READ:
+       simcall_HANDLER_file_read(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp);
+       break;  
+
+case SIMCALL_FILE_WRITE:
+       simcall_HANDLER_file_write(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp);
+       break;  
+
+case SIMCALL_FILE_OPEN:
+       simcall_HANDLER_file_open(simcall ,  simcall->args[0].cc, (smx_host_t) simcall->args[1].dp);
+       break;  
+
+case SIMCALL_FILE_CLOSE:
+       simcall_HANDLER_file_close(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
+       break;  
+
+case SIMCALL_FILE_UNLINK:
+      simcall->result.i = SIMIX_file_unlink((smx_file_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_FILE_GET_SIZE:
+      simcall->result.sgsz = simcall_HANDLER_file_get_size(simcall , (smx_file_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_FILE_TELL:
+      simcall->result.sgsz = simcall_HANDLER_file_tell(simcall , (smx_file_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_FILE_SEEK:
+      simcall->result.i = simcall_HANDLER_file_seek(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgoff,  simcall->args[2].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_FILE_GET_INFO:
+      simcall->result.dp = simcall_HANDLER_file_get_info(simcall , (smx_file_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_FILE_MOVE:
+      simcall->result.i = simcall_HANDLER_file_move(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].cc);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_STORAGE_GET_FREE_SIZE:
+      simcall->result.sgsz = simcall_HANDLER_storage_get_free_size(simcall , (smx_storage_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_STORAGE_GET_USED_SIZE:
+      simcall->result.sgsz = simcall_HANDLER_storage_get_used_size(simcall , (smx_storage_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_STORAGE_GET_PROPERTIES:
+      simcall->result.dp = SIMIX_storage_get_properties((smx_storage_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_STORAGE_GET_CONTENT:
+      simcall->result.dp = SIMIX_storage_get_content((smx_storage_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_ASR_GET_PROPERTIES:
+      simcall->result.dp = simcall_HANDLER_asr_get_properties(simcall ,  simcall->args[0].cc);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+#ifdef HAVE_LATENCY_BOUND_TRACKING
+case SIMCALL_COMM_IS_LATENCY_BOUNDED:
+      simcall->result.i = SIMIX_comm_is_latency_bounded((smx_synchro_t) simcall->args[0].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+#endif
+
+#ifdef HAVE_TRACING
+case SIMCALL_SET_CATEGORY:
+       SIMIX_set_category((smx_synchro_t) simcall->args[0].dp, simcall->args[1].cc);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+#endif
+
+#ifdef HAVE_MC
+case SIMCALL_MC_SNAPSHOT:
+      simcall->result.dp = simcall_HANDLER_mc_snapshot(simcall );
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_MC_COMPARE_SNAPSHOTS:
+      simcall->result.i = simcall_HANDLER_mc_compare_snapshots(simcall , (mc_snapshot_t) simcall->args[0].dp, (mc_snapshot_t) simcall->args[1].dp);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+case SIMCALL_MC_RANDOM:
+      simcall->result.i = simcall_HANDLER_mc_random(simcall ,  simcall->args[0].i,  simcall->args[1].i);
+      SIMIX_simcall_answer(simcall);
+      break;  
+
+#endif
+    case NUM_SIMCALLS:
+      break;
+    case SIMCALL_NONE:
+      THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
+          SIMIX_process_get_name(simcall->issuer),
+          SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))
+          );
+      break;
+
+  }
+}
similarity index 56%
rename from src/simix/smx_smurf_private.h
rename to src/simix/popping_private.h
index bc10372..52c0b71 100644 (file)
@@ -4,24 +4,19 @@
 /* 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 _SIMIX_SMURF_PRIVATE_H
-#define _SIMIX_SMURF_PRIVATE_H
+#ifndef _POPPING_PRIVATE_H
+#define _POPPING_PRIVATE_H
 
 SG_BEGIN_DECL()
 
 /********************************* Simcalls *********************************/
+XBT_PUBLIC(const char*) simcall_names[]; /* Name of each simcall */
 
-/* we want to build the e_smx_simcall_t enumeration, the table of the
- * corresponding simcalls string names, and the simcall handlers table
- * automatically, using macros.
- * To add a new simcall follow the following syntax:
- *
- * */
+#include "popping_enum.h" /* Definition of e_smx_simcall_t, with one value per simcall */
+#include "mc/mc_interface.h" /* Definition of mc_snapshot_t, used by one simcall */
 
-#include "simcalls_generated_enum.h" /* All possible simcalls (generated) */
-
-typedef int (*simix_match_func_t)(void *, void *, smx_action_t);
-typedef void (*simix_copy_data_func_t)(smx_action_t, void*, size_t);
+typedef int (*simix_match_func_t)(void *, void *, smx_synchro_t);
+typedef void (*simix_copy_data_func_t)(smx_synchro_t, void*, size_t);
 typedef void (*simix_clean_func_t)(void *);
 typedef void (*FPtr)(void); // Hide the ugliness
 
@@ -57,15 +52,6 @@ typedef struct s_smx_simcall {
 #endif
   union u_smx_scalar args[11];
   union u_smx_scalar result;
-  //FIXME: union u_smx_scalar retval;
-  union {
-    struct {
-      const char* param1;
-      double param2;
-      int result;
-    } new_api;
-
-  };
 } s_smx_simcall_t, *smx_simcall_t;
 
 #if HAVE_MC
@@ -76,26 +62,14 @@ typedef struct s_smx_simcall {
 #define SIMCALL_GET_MC_VALUE(simcall) 0
 #endif
 
-#include "simcalls_generated_res_getter_setter.h"
-#include "simcalls_generated_args_getter_setter.h"
+#include "popping_accessors.h"
 
 /******************************** General *************************************/
 
-void SIMIX_simcall_push(smx_process_t self);
 void SIMIX_simcall_answer(smx_simcall_t);
-void SIMIX_simcall_enter(smx_simcall_t, int);
-void SIMIX_simcall_exit(smx_action_t);
-smx_simcall_t SIMIX_simcall_mine(void);
+void SIMIX_simcall_handle(smx_simcall_t, int);
+void SIMIX_simcall_exit(smx_synchro_t);
 const char *SIMIX_simcall_name(e_smx_simcall_t kind);
-//TOFIX put it in a better place
-xbt_dict_t SIMIX_pre_asr_get_properties(smx_simcall_t simcall, const char *name);
-
-/*************************** New simcall interface ****************************/
-
-typedef smx_action_t (*simcall_handler_t)(u_smx_scalar_t *);
-
-extern const char *simcall_types[];
-extern simcall_handler_t simcall_table[];
 
 SG_END_DECL()
 
index cdd02a8..d3f47c7 100644 (file)
-# Copyright (c) 2014. The SimGrid Team.
-# All rights reserved.
+# Copyright (c) 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.
 
-# name has_answer (restype,rescast) (arg0name,arg0type,arg0cast) (arg1name,arg1type,arg1cast)
-host_get_by_name True (void*, smx_host_t) (name, const char*)
-host_get_name True (const char*) (host, void*, smx_host_t)
-host_on True (void) (host, void*, smx_host_t)
-host_off True (void) (host, void*, smx_host_t)
-host_get_properties True (void*, xbt_dict_t) (host, void*, smx_host_t)
-host_get_core True (int) (host, void*, smx_host_t)
-host_get_process_list True (void*, xbt_swag_t) (host, void*, smx_host_t)
-host_get_speed True (double) (host, void*, smx_host_t)
-host_get_available_speed True (double) (host, void*, smx_host_t)
-host_get_state True (int) (host, void*, smx_host_t)
-host_get_current_power_peak True (double) (host, void*, smx_host_t)
-host_get_power_peak_at True (double) (host, void*, smx_host_t) (pstate_index, int)
-host_get_nb_pstates True (int) (host, void*, smx_host_t)
-host_set_power_peak_at True (void) (host, void*, smx_host_t) (pstate_index, int)
-host_get_consumed_energy True (double) (host, void*, smx_host_t)
-host_execute True (void*, smx_action_t) (name, const char*) (host, void*, smx_host_t) (computation_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
-host_parallel_execute True (void*, smx_action_t) (name, const char*) (host_nb, int) (host_list, void*, smx_host_t*) (computation_amount, void*, double*) (communication_amount, void*, double*) (amount, double) (rate, double)
-host_execution_destroy True (void) (execution, void*, smx_action_t)
-host_execution_cancel True (void) (execution, void*, smx_action_t)
-host_execution_get_remains True (double) (execution, void*, smx_action_t)
-host_execution_get_state True (int) (execution, void*, smx_action_t)
-host_execution_set_priority True (void) (execution, void*, smx_action_t) (priority, double)
-host_execution_set_bound True (void) (execution, void*, smx_action_t) (bound, double)
-host_execution_set_affinity True (void) (execution, void*, smx_action_t) (ws, void*, smx_host_t) (mask, unsigned long)
-host_execution_wait False (int) (execution, void*, smx_action_t)
-host_get_mounted_storage_list True (void*, xbt_dict_t) (host, void*, smx_host_t)
-host_get_attached_storage_list True (void*, xbt_dynar_t) (host, void*, smx_host_t)
-host_get_params True (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t)
-host_set_params True (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t)
-vm_create True (void*) (name, const char*) (ind_pm, void*, smx_host_t)
-vm_start True (void) (ind_vm, void*, smx_host_t)
-vm_get_state True (int) (ind_vm, void*, smx_host_t)
-vm_migrate True (void) (ind_vm, void*, smx_host_t) (ind_dst_pm, void*, smx_host_t)
-vm_get_pm True (void*) (ind_vm, void*, smx_host_t)
-vm_set_bound True (void) (ind_vm, void*, smx_host_t) (bound, double)
-vm_set_affinity True (void) (ind_vm, void*, smx_host_t) (ind_pm, void*, smx_host_t) (mask, unsigned long)
-vm_destroy True (void) (ind_vm, void*, smx_host_t)
-vm_suspend True (void) (ind_vm, void*, smx_host_t)
-vm_resume True (void) (ind_vm, void*, smx_host_t)
-vm_shutdown True (void) (ind_vm, void*, smx_host_t)
-vm_save True (void) (ind_vm, void*, smx_host_t)
-vm_restore True (void) (ind_vm, void*, smx_host_t)
-process_create True (void) (process, void*, smx_process_t*) (name, const char*) (code, FPtr, xbt_main_func_t) (data, void*) (hostname, const char*) (kill_time, double) (argc, int) (argv, void*, char**) (properties, void*, xbt_dict_t) (auto_restart, int)
-process_kill True (void) (process, void*, smx_process_t)
-process_killall True (void) (reset_pid, int)
-process_cleanup True (void) (process, void*, smx_process_t)
-process_change_host True (void) (process, void*, smx_process_t) (dest, void*, smx_host_t)
-process_suspend False (void) (process, void*, smx_process_t)
-process_resume True (void) (process, void*, smx_process_t)
-process_count True (int)
-process_get_PID True (int) (process, void*, smx_process_t)
-process_get_PPID True (int) (process, void*, smx_process_t)
-process_get_data True (void*) (process, void*, smx_process_t)
-process_set_data True (void) (process, void*, smx_process_t) (data, void*)
-process_get_host True (void*, smx_host_t) (process, void*, smx_process_t)
-process_get_name True (const char*) (process, void*, smx_process_t)
-process_is_suspended True (int) (process, void*, smx_process_t)
-process_get_properties True (void*, xbt_dict_t) (process, void*, smx_process_t)
-process_join False (int) (process, void*, smx_process_t) (timeout, double)
-process_sleep False (int) (duration, double)
-process_on_exit True (void) (process, void*, smx_process_t) (fun, FPtr, int_f_pvoid_pvoid_t) (data, void*)
-process_auto_restart_set True (void) (process, void*, smx_process_t) (auto_restart, int)
-process_restart True (void*, smx_process_t) (process, void*, smx_process_t)
-rdv_create True (void*, smx_rdv_t) (name, const char*)
-rdv_destroy True (void) (rdv, void*, smx_rdv_t)
-#rdv_get_by_name True (void*, smx_host_t) (name, const char*)
-rdv_comm_count_by_host True (unsigned int) (rdv, void*, smx_rdv_t) (host, void*, smx_host_t)
-rdv_get_head True (void*, smx_action_t) (rdv, void*, smx_rdv_t)
-rdv_set_receiver True (void) (rdv, void*, smx_rdv_t) (receiver, void*, smx_process_t)
-rdv_get_receiver True (void*, smx_process_t) (rdv, void*, smx_rdv_t)
-comm_iprobe True (void*, smx_action_t) (rdv, void*, smx_rdv_t) (type, int) (src, int) (tag, int) (match_fun, FPtr, simix_match_func_t) (data, void*)
-comm_send False (void) (src, void*, smx_process_t) (rdv, void*, smx_rdv_t)  (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double)
-comm_isend True (void*, smx_action_t) (src, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (clean_fun, FPtr, simix_clean_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (detached, int)
-comm_recv False (void) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double) (rate, double)
-comm_irecv True (void*, smx_action_t) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (rate, double)
-comm_cancel True (void) (comm, void*, smx_action_t)
-comm_waitany False (int) (comms, void*, xbt_dynar_t)
-comm_wait False (void) (comm, void*, smx_action_t) (timeout, double)
-comm_test False (int) (comm, void*, smx_action_t)
-comm_testany False (int) (comms, void*, xbt_dynar_t)
-comm_get_remains True (double) (comm, void*, smx_action_t)
-comm_get_state True (int) (comm, void*, smx_action_t)
-comm_get_src_data True (void*) (comm, void*, smx_action_t)
-comm_get_dst_data True (void*) (comm, void*, smx_action_t)
-comm_get_src_proc True (void*, smx_process_t) (comm, void*, smx_action_t)
-comm_get_dst_proc True (void*, smx_process_t) (comm, void*, smx_action_t)
-mutex_init True (void*, smx_mutex_t)
-mutex_destroy True (void) (mutex, void*, smx_mutex_t)
-mutex_lock False (void) (mutex, void*, smx_mutex_t)
-mutex_trylock True (int) (mutex, void*, smx_mutex_t)
-mutex_unlock True (void) (mutex, void*, smx_mutex_t)
-cond_init True (void*, smx_cond_t)
-cond_destroy True (void) (cond, void*, smx_cond_t)
-cond_signal True (void) (cond, void*, smx_cond_t)
-cond_wait False (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t)
-cond_wait_timeout False (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t) (timeout, double)
-cond_broadcast True (void) (cond, void*, smx_cond_t)
-sem_init True (void*, smx_sem_t) (capacity, int)
-sem_destroy True (void) (sem, void*, smx_sem_t)
-sem_release True (void) (sem, void*, smx_sem_t)
-sem_would_block True (int) (sem, void*, smx_sem_t)
-sem_acquire False (void) (sem, void*, smx_sem_t)
-sem_acquire_timeout False (void) (sem, void*, smx_sem_t) (timeout, double)
-sem_get_capacity True (int) (sem, void*, smx_sem_t)
-file_read False (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t) (host, void*, smx_host_t)
-file_write False (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t) (host, void*, smx_host_t)
-file_open False (void*, smx_file_t) (fullpath, const char*) (host, void*, smx_host_t)
-file_close False (int) (fd, void*, smx_file_t) (host, void*, smx_host_t)
-file_unlink True (int) (fd, void*, smx_file_t) (host, void*, smx_host_t)
-file_get_size True (sg_size_t) (fd, void*, smx_file_t)
-file_tell True (sg_size_t) (fd, void*, smx_file_t)
-file_seek True (int) (fd, void*, smx_file_t) (offset, sg_offset_t) (origin, int)
-file_get_info True (void*, xbt_dynar_t) (fd, void*, smx_file_t)
-file_move True (int) (fd, void*, smx_file_t) (fullpath, const char*)
-storage_get_free_size True (sg_size_t) (storage, void*, smx_storage_t)
-storage_get_used_size True (sg_size_t) (name, void*, smx_storage_t)
-storage_get_properties True (void*, xbt_dict_t) (storage, void*, smx_storage_t)
-storage_get_content True (void*, xbt_dict_t) (storage, void*, smx_storage_t)
-asr_get_properties True (void*, xbt_dict_t) (name, const char*)
+# CallType handler? name (resulttype,resultcast) (arg0name,arg0type,arg0cast) (arg1name,arg1type,arg1cast)
+
+# CallType must be one of the three:
+#  - Func: returning a value immediately
+#  - Blck: Blocking call that does not return in the same scheduling round
+#  - Proc: not returning any value (but doing so immediately) 
+
+# Handler? is either "H" if we need to generate a handler or "-" if we should go without handlers
+
+Func - host_get_by_name (void*, smx_host_t) (name, const char*)
+Func - host_get_name (const char*) (host, void*, smx_host_t)
+Proc - host_on (void) (host, void*, smx_host_t)
+Proc H host_off (void) (host, void*, smx_host_t)
+Func - host_get_properties (void*, xbt_dict_t) (host, void*, smx_host_t)
+Func - host_get_core (int) (host, void*, smx_host_t)
+Func - host_get_process_list (void*, xbt_swag_t) (host, void*, smx_host_t)
+Func - host_get_speed (double) (host, void*, smx_host_t)
+Func - host_get_available_speed (double) (host, void*, smx_host_t)
+Func - host_get_state (int) (host, void*, smx_host_t)
+Func - host_get_current_power_peak (double) (host, void*, smx_host_t)
+Func - host_get_power_peak_at (double) (host, void*, smx_host_t) (pstate_index, int)
+Func - host_get_nb_pstates (int) (host, void*, smx_host_t)
+Proc - host_set_power_peak_at (void) (host, void*, smx_host_t) (pstate_index, int)
+Func - host_get_consumed_energy (double) (host, void*, smx_host_t)
+
+Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, smx_host_t) (computation_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long)
+Func - host_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, smx_host_t*) (computation_amount, void*, double*) (communication_amount, void*, double*) (amount, double) (rate, double)
+Proc - host_execution_destroy (void) (execution, void*, smx_synchro_t)
+Proc - host_execution_cancel (void) (execution, void*, smx_synchro_t)
+Func - host_execution_get_remains (double) (execution, void*, smx_synchro_t)
+Func - host_execution_get_state (int, e_smx_state_t) (execution, void*, smx_synchro_t)
+Proc - host_execution_set_priority (void) (execution, void*, smx_synchro_t) (priority, double)
+Proc - host_execution_set_bound (void) (execution, void*, smx_synchro_t) (bound, double)
+Proc - host_execution_set_affinity (void) (execution, void*, smx_synchro_t) (ws, void*, smx_host_t) (mask, unsigned long)
+Blck H host_execution_wait (int) (execution, void*, smx_synchro_t)
+Func - host_get_mounted_storage_list (void*, xbt_dict_t) (host, void*, smx_host_t)
+Func - host_get_attached_storage_list (void*, xbt_dynar_t) (host, void*, smx_host_t)
+Proc - host_get_params (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t)
+Proc - host_set_params (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t)
+Func - vm_create (void*, smx_host_t) (name, const char*) (ind_pm, void*, smx_host_t)
+Proc - vm_start (void) (ind_vm, void*, smx_host_t)
+Func - vm_get_state (int) (ind_vm, void*, smx_host_t)
+Proc - vm_migrate (void) (ind_vm, void*, smx_host_t) (ind_dst_pm, void*, smx_host_t)
+Func - vm_get_pm (void*) (ind_vm, void*, smx_host_t)
+Proc - vm_set_bound (void) (ind_vm, void*, smx_host_t) (bound, double)
+Proc - vm_set_affinity (void) (ind_vm, void*, smx_host_t) (ind_pm, void*, smx_host_t) (mask, unsigned long)
+Proc - vm_destroy (void) (ind_vm, void*, smx_host_t)
+Proc H vm_suspend (void) (ind_vm, void*, smx_host_t)
+Proc H vm_resume (void) (ind_vm, void*, smx_host_t)
+Proc H vm_shutdown (void) (ind_vm, void*, smx_host_t)
+Proc H vm_save (void) (ind_vm, void*, smx_host_t)
+Proc H vm_restore (void) (ind_vm, void*, smx_host_t)
+Proc H process_create (void) (process, void*, smx_process_t*) (name, const char*) (code, FPtr, xbt_main_func_t) (data, void*) (hostname, const char*) (kill_time, double) (argc, int) (argv, void*, char**) (properties, void*, xbt_dict_t) (auto_restart, int)
+Proc H process_kill (void) (process, void*, smx_process_t)
+Proc H process_killall (void) (reset_pid, int)
+Proc - process_cleanup (void) (process, void*, smx_process_t)
+Proc H process_change_host (void) (process, void*, smx_process_t) (dest, void*, smx_host_t)
+Blck H process_suspend (void) (process, void*, smx_process_t)
+Proc H process_resume (void) (process, void*, smx_process_t)
+Func - process_count (int)
+Func - process_get_PID (int) (process, void*, smx_process_t)
+Func - process_get_PPID (int) (process, void*, smx_process_t)
+Func - process_get_data (void*) (process, void*, smx_process_t)
+Proc - process_set_data (void) (process, void*, smx_process_t) (data, void*)
+Func - process_get_host (void*, smx_host_t) (process, void*, smx_process_t)
+Func - process_get_name (const char*) (process, void*, smx_process_t)
+Func - process_is_suspended (int) (process, void*, smx_process_t)
+Func - process_get_properties (void*, xbt_dict_t) (process, void*, smx_process_t)
+Blck H process_join (int) (process, void*, smx_process_t) (timeout, double)
+Blck H process_sleep (int) (duration, double)
+Proc - process_on_exit (void) (process, void*, smx_process_t) (fun, FPtr, int_f_pvoid_pvoid_t) (data, void*)
+Proc - process_auto_restart_set (void) (process, void*, smx_process_t) (auto_restart, int)
+Func H process_restart (void*, smx_process_t) (process, void*, smx_process_t)
+
+Func - rdv_create (void*, smx_rdv_t) (name, const char*)
+Proc - rdv_destroy (void) (rdv, void*, smx_rdv_t)
+Func - rdv_comm_count_by_host (unsigned int) (rdv, void*, smx_rdv_t) (host, void*, smx_host_t)
+Func - rdv_get_head (void*, smx_synchro_t) (rdv, void*, smx_rdv_t)
+Proc - rdv_set_receiver (void) (rdv, void*, smx_rdv_t) (receiver, void*, smx_process_t)
+Func - rdv_get_receiver (void*, smx_process_t) (rdv, void*, smx_rdv_t)
+Func H comm_iprobe (void*, smx_synchro_t) (rdv, void*, smx_rdv_t) (type, int) (src, int) (tag, int) (match_fun, FPtr, simix_match_func_t) (data, void*)
+Blck H comm_send (void) (src, void*, smx_process_t) (rdv, void*, smx_rdv_t)  (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double)
+Func H comm_isend (void*, smx_synchro_t) (src, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (clean_fun, FPtr, simix_clean_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (detached, int)
+Blck H comm_recv (void) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double) (rate, double)
+Func H comm_irecv (void*, smx_synchro_t) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (rate, double)
+Proc - comm_cancel (void) (comm, void*, smx_synchro_t)
+Blck H comm_waitany (int) (comms, void*, xbt_dynar_t)
+Blck H comm_wait (void) (comm, void*, smx_synchro_t) (timeout, double)
+Blck H comm_test (int) (comm, void*, smx_synchro_t)
+Blck H comm_testany (int) (comms, void*, xbt_dynar_t)
+Func - comm_get_remains (double) (comm, void*, smx_synchro_t)
+Func - comm_get_state (int, e_smx_state_t) (comm, void*, smx_synchro_t)
+Func - comm_get_src_data (void*) (comm, void*, smx_synchro_t)
+Func - comm_get_dst_data (void*) (comm, void*, smx_synchro_t)
+Func - comm_get_src_proc (void*, smx_process_t) (comm, void*, smx_synchro_t)
+Func - comm_get_dst_proc (void*, smx_process_t) (comm, void*, smx_synchro_t)
+Func H mutex_init (void*, smx_mutex_t)
+Proc - mutex_destroy (void) (mutex, void*, smx_mutex_t)
+Blck H mutex_lock (void) (mutex, void*, smx_mutex_t)
+Func H mutex_trylock (int) (mutex, void*, smx_mutex_t)
+Proc H mutex_unlock (void) (mutex, void*, smx_mutex_t)
+Func - cond_init (void*, smx_cond_t)
+Proc - cond_destroy (void) (cond, void*, smx_cond_t)
+Proc - cond_signal (void) (cond, void*, smx_cond_t)
+Blck H cond_wait (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t)
+Blck H cond_wait_timeout (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t) (timeout, double)
+Proc - cond_broadcast (void) (cond, void*, smx_cond_t)
+Func - sem_init (void*, smx_sem_t) (capacity, unsigned int)
+Proc - sem_destroy (void) (sem, void*, smx_sem_t)
+Proc H sem_release (void) (sem, void*, smx_sem_t)
+Func H sem_would_block (int) (sem, void*, smx_sem_t)
+Blck H sem_acquire (void) (sem, void*, smx_sem_t)
+Blck H sem_acquire_timeout (void) (sem, void*, smx_sem_t) (timeout, double)
+Func H sem_get_capacity (int) (sem, void*, smx_sem_t)
+Blck H file_read (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t) (host, void*, smx_host_t)
+Blck H file_write (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t) (host, void*, smx_host_t)
+Blck H file_open (void*, smx_file_t) (fullpath, const char*) (host, void*, smx_host_t)
+Blck H file_close (int) (fd, void*, smx_file_t) (host, void*, smx_host_t)
+Func - file_unlink (int) (fd, void*, smx_file_t) (host, void*, smx_host_t)
+Func H file_get_size (sg_size_t) (fd, void*, smx_file_t)
+Func H file_tell (sg_size_t) (fd, void*, smx_file_t)
+Func H file_seek (int) (fd, void*, smx_file_t) (offset, sg_offset_t) (origin, int)
+Func H file_get_info (void*, xbt_dynar_t) (fd, void*, smx_file_t)
+Func H file_move (int) (fd, void*, smx_file_t) (fullpath, const char*)
+Func H storage_get_free_size (sg_size_t) (storage, void*, smx_storage_t)
+Func H storage_get_used_size (sg_size_t) (name, void*, smx_storage_t)
+Func - storage_get_properties (void*, xbt_dict_t) (storage, void*, smx_storage_t)
+Func - storage_get_content (void*, xbt_dict_t) (storage, void*, smx_storage_t)
+Func H asr_get_properties (void*, xbt_dict_t) (name, const char*)
 ## HAVE_LATENCY_BOUND_TRACKING
-comm_is_latency_bounded True (int) (comm, void*, smx_action_t)
+Func - comm_is_latency_bounded (int) (comm, void*, smx_synchro_t)
 ## HAVE_TRACING
-set_category True (void) (action, void*, smx_action_t) (category, const char*)
+Proc - set_category (void) (synchro, void*, smx_synchro_t) (category, const char*)
 ## HAVE_MC
-mc_snapshot True (void*)
-mc_compare_snapshots True (int) (s1, void*) (s2, void*)
-mc_random True (int) (min, int) (max, int)
+Func H mc_snapshot (void*, mc_snapshot_t)
+Func H mc_compare_snapshots (int) (s1, void*, mc_snapshot_t) (s2, void*, mc_snapshot_t)
+Func H mc_random (int) (min, int) (max, int)
index 0b12f49..99a968a 100755 (executable)
@@ -1,8 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-# Copyright (c) 2014. The SimGrid Team.
-# All rights reserved.
+# Copyright (c) 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.
@@ -40,7 +39,7 @@ class Arg(object):
   def field(self):
     return self.simcall_types[self.type]
 
-  def ret(self):
+  def rettype(self):
     return '%s'%self.casted if self.casted else self.type
 
   def cast(self):
@@ -49,175 +48,192 @@ class Arg(object):
 class Simcall(object):
   simcalls_BODY = None
   simcalls_PRE = None
-  def __init__(self, name, res, args, has_answer=True):
+  def __init__(self, name, handler, res, args, call_kind):
     self.name = name
     self.res = res
     self.args = args
-    self.has_answer = has_answer
+    self.need_handler = handler
+    self.call_kind = call_kind
 
   def check(self):
-    # smx_user.c  simcall_BODY_
-    # smx_*.c void SIMIX_pre_host_on(smx_simcall_t simcall, smx_host_t h)
-    self.check_body()
-    self.check_pre()
-
-  def check_body(self):
-    if self.simcalls_BODY is None:
-      f = open('smx_user.c')
-      self.simcalls_BODY = set(re.findall('simcall_BODY_(.*?)\(', f.read()))
-      f.close()
-    if self.name not in self.simcalls_BODY:
-      print '# ERROR: No function calling simcall_BODY_%s'%self.name
-      print '# Add something like this to smx_user.c:'
-      print '''%s simcall_%s(%s)
-{
-  return simcall_BODY_%s(%s);
-}\n'''%(self.res.ret()
-     ,self.name
-     ,', '.join('%s %s'%(arg.ret(), arg.name)
-                  for arg in self.args)
-     ,self.name
-     ,', '.join(arg.name for arg in self.args))
-      return False
-    return True
-
-  def check_pre(self):
-    if self.simcalls_PRE is None:
-      self.simcalls_PRE = set()
-      for fn in glob.glob('smx_*') + glob.glob('../mc/*'):
-        f = open(fn)
-        self.simcalls_PRE |= set(re.findall('SIMIX_pre_(.*?)\(', f.read()))
-        f.close()
-    if self.name not in self.simcalls_PRE:
-      print '# ERROR: No function called SIMIX_pre_%s'%self.name
-      print '# Add something like this to smx_.*.c:'
-      print '''%s SIMIX_pre_%s(smx_simcall_t simcall%s)
-{
-  // Your code handling the simcall
-}\n'''%(self.res.ret()
-       ,self.name
-       ,''.join(', %s %s'%(arg.ret(), arg.name)
-                  for arg in self.args))
-      return False
-    return True
+      # libsmx.c  simcall_BODY_
+      if self.simcalls_BODY is None:
+          f = open('libsmx.c')
+          self.simcalls_BODY = set(re.findall('simcall_BODY_(.*?)\(', f.read()))
+          f.close()
+      if self.name not in self.simcalls_BODY:
+          print '# ERROR: No function calling simcall_BODY_%s'%self.name
+          print '# Add something like this to libsmx.c:'
+          print '%s simcall_%s(%s) {'%(self.res.rettype() ,self.name ,', '.join('%s %s'%(arg.rettype(), arg.name) for arg in self.args))
+          print '  return simcall_BODY_%s(%s);'%(self.name)
+          print '}'
+          return False
+      
+      # smx_*.c void simcall_HANDLER_host_on(smx_simcall_t simcall, smx_host_t h)
+      if self.simcalls_PRE is None:
+        self.simcalls_PRE = set()
+        for fn in glob.glob('smx_*') + glob.glob('../mc/*'):
+            f = open(fn)
+            self.simcalls_PRE |= set(re.findall('simcall_HANDLER_(.*?)\(', f.read()))
+            f.close()
+      if self.need_handler:
+          if (self.name not in self.simcalls_PRE):
+              print '# ERROR: No function called simcall_HANDLER_%s'%self.name
+              print '# Add something like this to the relevant C file (like smx_io.c if it\'s an IO call):'
+              print '%s simcall_HANDLER_%s(smx_simcall_t simcall%s) {'%(self.res.rettype()
+                                                                        ,self.name                                               
+                                                                        ,''.join(', %s %s'%(arg.rettype(), arg.name)
+                                                                             for arg in self.args))
+              print '  // Your code handling the simcall'
+              print '}'
+              return False
+      else:
+          if (self.name in self.simcalls_PRE):
+              print '# ERROR: You have a function called simcall_HANDLER_%s, but that simcall is not using any handler'%self.name
+              print '# Either change your simcall definition, or kill that function'
+              return False
+      return True
 
   def enum(self):
-    return 'SIMCALL_%s,'%(self.name.upper())
+    return '  SIMCALL_%s,'%(self.name.upper())
 
   def string(self):
-    return '[SIMCALL_%s] = "SIMCALL_%s",'%(self.name.upper(), self.name.upper())       
-  
-  def result_getter_setter(self):
-    return '%s\n%s'%(self.result_getter(), self.result_setter())
-  
-  def result_getter(self):
-    return '' if self.res.type == 'void' else '''static inline %s simcall_%s__get__result(smx_simcall_t simcall){
-  return %s simcall->result.%s;
-}'''%(self.res.ret(), self.name, self.res.cast(), self.res.field())
+    return '  [SIMCALL_%s] = "SIMCALL_%s",'%(self.name.upper(), self.name.upper())     
 
-  def result_setter(self):
-    return '' if self.res.type == 'void' else '''static inline void simcall_%s__set__result(smx_simcall_t simcall, %s result){
-    simcall->result.%s = result;
-}'''%(self.name, self.res.type, self.res.field())
-
-  def args_getter_setter(self):
+  def accessors(self):
     res = []
+    res.append('')
+    # Arguments getter/setters
     for i in range(len(self.args)):
-      res.append(self.arg_getter(i))
-      res.append(self.arg_setter(i))
+        arg = self.args[i]
+        res.append('static inline %s simcall_%s__get__%s(smx_simcall_t simcall) {'%(arg.rettype(), self.name, arg.name))
+        res.append('  return %s simcall->args[%i].%s;'%(arg.cast(), i, arg.field()))
+        res.append('}')
+        res.append('static inline void simcall_%s__set__%s(smx_simcall_t simcall, %s arg) {'%(self.name, arg.name, arg.type))
+        res.append('    simcall->args[%i].%s = arg;'%(i, arg.field()))
+        res.append('}')
+      
+    # Return value getter/setters
+    if self.res.type != 'void':
+        res.append('static inline %s simcall_%s__get__result(smx_simcall_t simcall){'%(self.res.rettype(), self.name))
+        res.append('    return %s simcall->result.%s;'%(self.res.cast(), self.res.field()))
+        res.append('}')
+        res.append('static inline void simcall_%s__set__result(smx_simcall_t simcall, %s result){'%(self.name, self.res.type,))
+        res.append('    simcall->result.%s = result;'%(self.res.field()))
+        res.append('}')
     return '\n'.join(res)
 
-  def arg_getter(self, i):
-    arg = self.args[i]
-    return '''static inline %s simcall_%s__get__%s(smx_simcall_t simcall){
-  return %s simcall->args[%i].%s;
-}'''%(arg.ret(), self.name, arg.name, arg.cast(), i, arg.field())
-
-  def arg_setter(self, i):
-    arg = self.args[i]
-    return '''static inline void simcall_%s__set__%s(smx_simcall_t simcall, %s arg){
-    simcall->args[%i].%s = arg;
-}'''%(self.name, arg.name, arg.type, i, arg.field())
-
   def case(self):
-    return '''case SIMCALL_%s:
-      %sSIMIX_pre_%s(simcall %s);
-      %sbreak;  
-'''%(self.name.upper(), 
-     'simcall->result.%s = '%self.res.field() if self.res.type != 'void' and self.has_answer else ' ',
-     self.name,
-     ''.join(', %s simcall->args[%d].%s'%(arg.cast(), i, arg.field()) 
-             for i, arg in enumerate(self.args)),
-     'SIMIX_simcall_answer(simcall);\n      ' if self.has_answer else ' ')
+      res = []
+      res.append('case SIMCALL_%s:'%(self.name.upper()))
+      if self.need_handler:
+          res.append('      %ssimcall_HANDLER_%s(simcall %s);'%('simcall->result.%s = '%self.res.field() if self.call_kind == 'Func' else ' ',
+                                                                self.name,
+                                                                ''.join(', %s simcall->args[%d].%s'%(arg.cast(), i, arg.field()) 
+                                                                        for i, arg in enumerate(self.args))))
+      else:
+          res.append('      %sSIMIX_%s(%s);'%('simcall->result.%s = '%self.res.field() if self.call_kind == 'Func' else ' ',
+                                                self.name,  
+                                                ','.join('%s simcall->args[%d].%s'%(arg.cast(), i, arg.field()) 
+                                                         for i, arg in enumerate(self.args))))
+      res.append('      %sbreak;  \n'%('SIMIX_simcall_answer(simcall);\n      ' if self.call_kind != 'Blck' else ' '))  
+      return '\n'.join(res)
 
   def body(self):
-    return '''  inline static %s simcall_BODY_%s(%s) {
-    smx_process_t self = SIMIX_process_self();
-
-    /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_pre_%s(%s);
-    /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
+      res = ['  ']
+      res.append('inline static %s simcall_BODY_%s(%s) {'%(self.res.rettype(),
+                                                           self.name,
+                                                           ', '.join('%s %s'%(arg.rettype(), arg.name) for arg in self.args)))
+      res.append('    smx_process_t self = SIMIX_process_self();')
+      res.append('')
+      res.append('    /* Go to that function to follow the code flow through the simcall barrier */')
+      if self.need_handler:
+          res.append('    if (0) simcall_HANDLER_%s(%s);'%(self.name,
+                                                           ', '.join(["&self->simcall"]+ [arg.name for arg in self.args])))
+      else:
+          res.append('    if (0) SIMIX_%s(%s);'%(self.name,
+                                                   ', '.join(arg.name for arg in self.args)))
+      res.append('    /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */')
+      res.append('')
+      res.append('    self->simcall.call = SIMCALL_%s;'%(self.name.upper()))
+      res.append('    memset(&self->simcall.result, 0, sizeof(self->simcall.result));')
+      res.append('    memset(self->simcall.args, 0, sizeof(self->simcall.args));')
+      res.append('\n'.join('    self->simcall.args[%d].%s = (%s) %s;'%(i, arg.field(), arg.type, arg.name)
+                  for i, arg in enumerate(self.args)))
+      res.append('    if (self != simix_global->maestro_process) {')
+      res.append('      XBT_DEBUG("Yield process \'%s\' on simcall %s (%d)", self->name,')
+      res.append('                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);')
+      res.append('      SIMIX_process_yield(self);')
+      res.append('    } else {')
+      res.append('      SIMIX_simcall_handle(&self->simcall, 0);')
+      res.append('    }    ')   
+      if self.res.type != 'void':
+          res.append('    return self->simcall.result.%s;'%self.res.field())
+      else:
+          res.append('    ')
+      res.append('  }')
+      return '\n'.join(res)
 
-    self->simcall.call = SIMCALL_%s;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-%s
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%%s' on simcall %%s (%%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_enter(&self->simcall, 0);
-    }    
-    %s
-  }'''%(self.res.ret()
-       ,self.name
-       ,', '.join('%s %s'%(arg.ret(), arg.name)
-                  for arg in self.args)
-       ,self.name
-       ,', '.join(["&self->simcall"]+ [arg.name for arg in self.args])
-       ,self.name.upper()
-       ,'\n'.join('    self->simcall.args[%d].%s = (%s) %s;'%(i, arg.field(), arg.type, arg.name)
-                  for i, arg in enumerate(self.args))
-       ,'' if self.res.type == 'void' else 'return self->simcall.result.%s;'%self.res.field())
+      
+  def handler_prototype(self):
+      if self.need_handler:
+          return "%s simcall_HANDLER_%s(smx_simcall_t simcall%s);"%(self.res.rettype() if self.call_kind == 'Func' else 'void', 
+                                                                    self.name, 
+                                                                    ''.join(', %s %s'%(arg.rettype(), arg.name) 
+                    for i, arg in enumerate(self.args)))
+      else:
+          return ""
 
 def parse(fn):
-  res = []
+  simcalls = []
   resdi = None
-  resd = {}
+  simcalls_guarded = {}
   for line in open(fn).read().split('\n'):
     if line.startswith('##'):
       resdi = []
-      resd[re.search(r'## *(.*)', line).group(1)] = resdi
+      simcalls_guarded[re.search(r'## *(.*)', line).group(1)] = resdi
     if line.startswith('#') or not line:
       continue
-    match = re.match(r'(\S*?) *(\S*?) *\((.*?)(?:, *(.*?))?\) *(.*)', line)
+    match = re.match(r'(\S*?) *(\S*?) *(\S*?) *\((.*?)(?:, *(.*?))?\) *(.*)', line)
     assert match, line
-    name, ans, rest, resc, args = match.groups()
+    ans, handler, name, rest, resc, args = match.groups()
+    assert (ans == 'Proc' or ans == 'Func' or ans == 'Blck'),"Invalid call type: '%s'. Faulty line:\n%s\n"%(ans,line)
+    assert (handler == 'H' or handler == '-'),"Invalid need_handler indication: '%s'. Faulty line:\n%s\n"%(handler,line)
     sargs = []
     for n,t,c in re.findall(r'\((.*?), *(.*?)(?:, *(.*?))?\)', args):
       sargs.append(Arg(n,t,c))
-    sim = Simcall(name, Arg('result', rest, resc), sargs, ans == 'True')
+    sim = Simcall(name, handler=='H', Arg('result', rest, resc), sargs, ans)
     if resdi is None:
-      res.append(sim)
+      simcalls.append(sim)
     else:
       resdi.append(sim)
-  return res, resd
+  return simcalls, simcalls_guarded
 
-def write(fn, func, scs, scd,pre="",post=""):
-  f = open(fn, 'w')
-  f.write('/*********************************************\n')
-  f.write(' * File Generated by src/simix/simcalls.py   *\n')
-  f.write(' *                from src/simix/simcalls.in *\n')
-  f.write(' * Do not modify this file, add new simcalls *\n')
-  f.write(' * in src/simix/simcalls.in                  *\n')  
-  f.write(' *********************************************/\n\n')
-  f.write(pre)
-  f.write('\n'.join(func(sc) for sc in scs))
-  for k, v in scd.items():
-    f.write('\n#ifdef %s\n%s\n#endif\n'%(k, '\n'.join(func(sc) for sc in v)))
-  f.write(post)
-  f.close()
+def header(name):
+    fd = open(name, 'w')
+    fd.write('/**********************************************************************/\n')
+    fd.write('/* File generated by src/simix/simcalls.py from src/simix/simcalls.in */\n')
+    fd.write('/*                                                                    */\n')
+    fd.write('/*                    DO NOT EVER CHANGE THIS FILE                    */\n')
+    fd.write('/*                                                                    */\n')
+    fd.write('/* change simcalls specification in src/simix/simcalls.in             */\n')  
+    fd.write('/**********************************************************************/\n\n')
+    fd.write('/*\n')
+    fd.write(' * Note that the name comes from http://en.wikipedia.org/wiki/Popping\n') 
+    fd.write(' * Indeed, the control flow is doing a strange dance in there.\n')
+    fd.write(' *\n')
+    fd.write(' * That\'s not about http://en.wikipedia.org/wiki/Poop, despite the odor :)\n')
+    fd.write(' */\n\n')
+    return fd
+
+def handle(fd,func, simcalls, guarded_simcalls):
+    def nonempty(e): return e != ''
+    fd.write('\n'.join( filter(nonempty, (func(simcall) for simcall in simcalls))))
+    
+    for guard, list in guarded_simcalls.items():
+        fd.write('\n#ifdef %s\n'%(guard))
+        fd.write('\n'.join(func(simcall) for simcall in list))
+        fd.write('\n#endif\n')
 
 if __name__=='__main__':
   import sys
@@ -227,64 +243,92 @@ if __name__=='__main__':
   ok &= all(map(Simcall.check, simcalls))
   for k,v in simcalls_dict.items():
     ok &= all(map(Simcall.check, v))
+  # FIXME: we should not hide it
   #if not ok:
+  #  print ("Some checks fail!")
   #  sys.exit(1)
 
-  write('simcalls_generated_enum.h', Simcall.enum, simcalls, simcalls_dict,"""
-/**
- * @brief All possible simcalls.
- */
-typedef enum {
-SIMCALL_NONE,
-  ""","""
-SIMCALL_NEW_API_INIT,
-NUM_SIMCALLS
-} e_smx_simcall_t;
-  """)
+  ###
+  ### smx_popping_accessors.c
+  ###
+  fd = header('popping_accessors.h')
+  handle(fd, Simcall.accessors, simcalls, simcalls_dict)
+  fd.write("\n\n/* The prototype of all simcall handlers, automatically generated for you */\n\n")
+  handle(fd, Simcall.handler_prototype, simcalls, simcalls_dict)
+  fd.close()
+
+  ###
+  ### smx_popping_enum.c
+  ###
+  fd = header("popping_enum.h")
+  fd.write('/**\n')
+  fd.write(' * @brief All possible simcalls.\n')
+  fd.write(' */\n')
+  fd.write('typedef enum {\n')
+  fd.write('  SIMCALL_NONE,\n')
   
-  write('simcalls_generated_string.c', Simcall.string, simcalls, simcalls_dict)
-  write('simcalls_generated_res_getter_setter.h', Simcall.result_getter_setter, simcalls, simcalls_dict)
-  write('simcalls_generated_args_getter_setter.h', Simcall.args_getter_setter, simcalls, simcalls_dict)
+  handle(fd, Simcall.enum, simcalls, simcalls_dict)
+  
+  fd.write('  NUM_SIMCALLS\n')
+  fd.write('} e_smx_simcall_t;\n')
+  fd.close()
+
+  ###
+  ### smx_popping_generated.c
+  ###
   
+  fd = header("popping_generated.c")
   
-  write('smx_simcall_enter.c', Simcall.case, simcalls, simcalls_dict,"""
+  fd.write('#include "smx_private.h"\n');
+  fd.write('#ifdef HAVE_MC\n');
+  fd.write('#include "mc/mc_private.h"\n');
+  fd.write('#endif\n');
+  fd.write('\n');
+  fd.write('XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);\n\n');
+  
+  fd.write('/** @brief Simcalls\' names (generated from src/simix/simcalls.in) */\n')
+  fd.write('const char* simcall_names[] = {\n')
+
+  handle(fd, Simcall.string, simcalls, simcalls_dict)
+
+  fd.write('[SIMCALL_NONE] = "NONE"\n')
+  fd.write('};\n\n')
 
-#include "smx_private.h"
-#ifdef HAVE_MC
-#include "mc/mc_private.h"
-#endif
 
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_smurf);
+  fd.write('/**\n');
+  fd.write(' * @brief (in kernel mode) unpack the simcall and activate the handler\n');
+  fd.write(' * \n')
+  fd.write(' * This function is generated from src/simix/simcalls.in\n')
+  fd.write(' */\n');
+  fd.write('void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {\n');
+  fd.write('  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));\n');
+  fd.write('  SIMCALL_SET_MC_VALUE(simcall, value);\n');
+  fd.write('  if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)\n');
+  fd.write('    return;\n');
+  fd.write('  switch (simcall->call) {\n');
 
-/**
- * @brief unpack the simcall and activate the handler in kernel mode
- */
-void SIMIX_simcall_enter(smx_simcall_t simcall, int value)
-{
-  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
-  SIMCALL_SET_MC_VALUE(simcall, value);
-  if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
-    return;
-  switch (simcall->call) {
-  ""","""
-    case NUM_SIMCALLS:
-      break;
-    case SIMCALL_NONE:
-      THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
-          SIMIX_process_get_name(simcall->issuer),
-          SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))
-          );
-      break;
+  handle(fd, Simcall.case, simcalls, simcalls_dict)
 
-    /* ****************************************************************************************** */
-    /* TUTORIAL: New API                                                                        */
-    /* ****************************************************************************************** */
-    case SIMCALL_NEW_API_INIT:
-      SIMIX_pre_new_api_fct(simcall);
-      break;
-  }
-}
-  """)
+  fd.write('    case NUM_SIMCALLS:\n');
+  fd.write('      break;\n');
+  fd.write('    case SIMCALL_NONE:\n');
+  fd.write('      THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",\n');
+  fd.write('          SIMIX_process_get_name(simcall->issuer),\n');
+  fd.write('          SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))\n');
+  fd.write('          );\n');
+  fd.write('      break;\n');
+  fd.write('\n');
+  fd.write('  }\n');
+  fd.write('}\n');
   
+  fd.close()
   
-  write('simcalls_generated_body.c', Simcall.body, simcalls, simcalls_dict)
+  ###
+  ### smx_popping_bodies.c
+  ###
+  fd = header('popping_bodies.c')
+  fd.write('#include "smx_private.h"\n')
+  fd.write('#include "mc/mc_interface.h"\n')
+  fd.write('#include "xbt/ex.h"\n')
+  handle(fd, Simcall.body, simcalls, simcalls_dict)
+  fd.close()
diff --git a/src/simix/simcalls_generated_enum.h b/src/simix/simcalls_generated_enum.h
deleted file mode 100644 (file)
index 597a621..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
-
-
-/**
- * @brief All possible simcalls.
- */
-typedef enum {
-SIMCALL_NONE,
-  SIMCALL_HOST_GET_BY_NAME,
-SIMCALL_HOST_GET_NAME,
-SIMCALL_HOST_ON,
-SIMCALL_HOST_OFF,
-SIMCALL_HOST_GET_PROPERTIES,
-SIMCALL_HOST_GET_CORE,
-SIMCALL_HOST_GET_PROCESS_LIST,
-SIMCALL_HOST_GET_SPEED,
-SIMCALL_HOST_GET_AVAILABLE_SPEED,
-SIMCALL_HOST_GET_STATE,
-SIMCALL_HOST_GET_CURRENT_POWER_PEAK,
-SIMCALL_HOST_GET_POWER_PEAK_AT,
-SIMCALL_HOST_GET_NB_PSTATES,
-SIMCALL_HOST_SET_POWER_PEAK_AT,
-SIMCALL_HOST_GET_CONSUMED_ENERGY,
-SIMCALL_HOST_EXECUTE,
-SIMCALL_HOST_PARALLEL_EXECUTE,
-SIMCALL_HOST_EXECUTION_DESTROY,
-SIMCALL_HOST_EXECUTION_CANCEL,
-SIMCALL_HOST_EXECUTION_GET_REMAINS,
-SIMCALL_HOST_EXECUTION_GET_STATE,
-SIMCALL_HOST_EXECUTION_SET_PRIORITY,
-SIMCALL_HOST_EXECUTION_SET_BOUND,
-SIMCALL_HOST_EXECUTION_SET_AFFINITY,
-SIMCALL_HOST_EXECUTION_WAIT,
-SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST,
-SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST,
-SIMCALL_HOST_GET_PARAMS,
-SIMCALL_HOST_SET_PARAMS,
-SIMCALL_VM_CREATE,
-SIMCALL_VM_START,
-SIMCALL_VM_GET_STATE,
-SIMCALL_VM_MIGRATE,
-SIMCALL_VM_GET_PM,
-SIMCALL_VM_SET_BOUND,
-SIMCALL_VM_SET_AFFINITY,
-SIMCALL_VM_DESTROY,
-SIMCALL_VM_SUSPEND,
-SIMCALL_VM_RESUME,
-SIMCALL_VM_SHUTDOWN,
-SIMCALL_VM_SAVE,
-SIMCALL_VM_RESTORE,
-SIMCALL_PROCESS_CREATE,
-SIMCALL_PROCESS_KILL,
-SIMCALL_PROCESS_KILLALL,
-SIMCALL_PROCESS_CLEANUP,
-SIMCALL_PROCESS_CHANGE_HOST,
-SIMCALL_PROCESS_SUSPEND,
-SIMCALL_PROCESS_RESUME,
-SIMCALL_PROCESS_COUNT,
-SIMCALL_PROCESS_GET_PID,
-SIMCALL_PROCESS_GET_PPID,
-SIMCALL_PROCESS_GET_DATA,
-SIMCALL_PROCESS_SET_DATA,
-SIMCALL_PROCESS_GET_HOST,
-SIMCALL_PROCESS_GET_NAME,
-SIMCALL_PROCESS_IS_SUSPENDED,
-SIMCALL_PROCESS_GET_PROPERTIES,
-SIMCALL_PROCESS_JOIN,
-SIMCALL_PROCESS_SLEEP,
-SIMCALL_PROCESS_ON_EXIT,
-SIMCALL_PROCESS_AUTO_RESTART_SET,
-SIMCALL_PROCESS_RESTART,
-SIMCALL_RDV_CREATE,
-SIMCALL_RDV_DESTROY,
-SIMCALL_RDV_COMM_COUNT_BY_HOST,
-SIMCALL_RDV_GET_HEAD,
-SIMCALL_RDV_SET_RECEIVER,
-SIMCALL_RDV_GET_RECEIVER,
-SIMCALL_COMM_IPROBE,
-SIMCALL_COMM_SEND,
-SIMCALL_COMM_ISEND,
-SIMCALL_COMM_RECV,
-SIMCALL_COMM_IRECV,
-SIMCALL_COMM_CANCEL,
-SIMCALL_COMM_WAITANY,
-SIMCALL_COMM_WAIT,
-SIMCALL_COMM_TEST,
-SIMCALL_COMM_TESTANY,
-SIMCALL_COMM_GET_REMAINS,
-SIMCALL_COMM_GET_STATE,
-SIMCALL_COMM_GET_SRC_DATA,
-SIMCALL_COMM_GET_DST_DATA,
-SIMCALL_COMM_GET_SRC_PROC,
-SIMCALL_COMM_GET_DST_PROC,
-SIMCALL_MUTEX_INIT,
-SIMCALL_MUTEX_DESTROY,
-SIMCALL_MUTEX_LOCK,
-SIMCALL_MUTEX_TRYLOCK,
-SIMCALL_MUTEX_UNLOCK,
-SIMCALL_COND_INIT,
-SIMCALL_COND_DESTROY,
-SIMCALL_COND_SIGNAL,
-SIMCALL_COND_WAIT,
-SIMCALL_COND_WAIT_TIMEOUT,
-SIMCALL_COND_BROADCAST,
-SIMCALL_SEM_INIT,
-SIMCALL_SEM_DESTROY,
-SIMCALL_SEM_RELEASE,
-SIMCALL_SEM_WOULD_BLOCK,
-SIMCALL_SEM_ACQUIRE,
-SIMCALL_SEM_ACQUIRE_TIMEOUT,
-SIMCALL_SEM_GET_CAPACITY,
-SIMCALL_FILE_READ,
-SIMCALL_FILE_WRITE,
-SIMCALL_FILE_OPEN,
-SIMCALL_FILE_CLOSE,
-SIMCALL_FILE_UNLINK,
-SIMCALL_FILE_GET_SIZE,
-SIMCALL_FILE_TELL,
-SIMCALL_FILE_SEEK,
-SIMCALL_FILE_GET_INFO,
-SIMCALL_FILE_MOVE,
-SIMCALL_STORAGE_GET_FREE_SIZE,
-SIMCALL_STORAGE_GET_USED_SIZE,
-SIMCALL_STORAGE_GET_PROPERTIES,
-SIMCALL_STORAGE_GET_CONTENT,
-SIMCALL_ASR_GET_PROPERTIES,
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-SIMCALL_COMM_IS_LATENCY_BOUNDED,
-#endif
-
-#ifdef HAVE_TRACING
-SIMCALL_SET_CATEGORY,
-#endif
-
-#ifdef HAVE_MC
-SIMCALL_MC_SNAPSHOT,
-SIMCALL_MC_COMPARE_SNAPSHOTS,
-SIMCALL_MC_RANDOM,
-#endif
-
-SIMCALL_NEW_API_INIT,
-NUM_SIMCALLS
-} e_smx_simcall_t;
-  
\ No newline at end of file
diff --git a/src/simix/simcalls_generated_res_getter_setter.h b/src/simix/simcalls_generated_res_getter_setter.h
deleted file mode 100644 (file)
index 6afe222..0000000
+++ /dev/null
@@ -1,557 +0,0 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
-
-static inline smx_host_t simcall_host_get_by_name__get__result(smx_simcall_t simcall){
-  return (smx_host_t) simcall->result.dp;
-}
-static inline void simcall_host_get_by_name__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline const char* simcall_host_get_name__get__result(smx_simcall_t simcall){
-  return  simcall->result.cc;
-}
-static inline void simcall_host_get_name__set__result(smx_simcall_t simcall, const char* result){
-    simcall->result.cc = result;
-}
-
-
-
-
-static inline xbt_dict_t simcall_host_get_properties__get__result(smx_simcall_t simcall){
-  return (xbt_dict_t) simcall->result.dp;
-}
-static inline void simcall_host_get_properties__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline int simcall_host_get_core__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_host_get_core__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline xbt_swag_t simcall_host_get_process_list__get__result(smx_simcall_t simcall){
-  return (xbt_swag_t) simcall->result.dp;
-}
-static inline void simcall_host_get_process_list__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline double simcall_host_get_speed__get__result(smx_simcall_t simcall){
-  return  simcall->result.d;
-}
-static inline void simcall_host_get_speed__set__result(smx_simcall_t simcall, double result){
-    simcall->result.d = result;
-}
-static inline double simcall_host_get_available_speed__get__result(smx_simcall_t simcall){
-  return  simcall->result.d;
-}
-static inline void simcall_host_get_available_speed__set__result(smx_simcall_t simcall, double result){
-    simcall->result.d = result;
-}
-static inline int simcall_host_get_state__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_host_get_state__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline double simcall_host_get_current_power_peak__get__result(smx_simcall_t simcall){
-  return  simcall->result.d;
-}
-static inline void simcall_host_get_current_power_peak__set__result(smx_simcall_t simcall, double result){
-    simcall->result.d = result;
-}
-static inline double simcall_host_get_power_peak_at__get__result(smx_simcall_t simcall){
-  return  simcall->result.d;
-}
-static inline void simcall_host_get_power_peak_at__set__result(smx_simcall_t simcall, double result){
-    simcall->result.d = result;
-}
-static inline int simcall_host_get_nb_pstates__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_host_get_nb_pstates__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-
-
-static inline double simcall_host_get_consumed_energy__get__result(smx_simcall_t simcall){
-  return  simcall->result.d;
-}
-static inline void simcall_host_get_consumed_energy__set__result(smx_simcall_t simcall, double result){
-    simcall->result.d = result;
-}
-static inline smx_action_t simcall_host_execute__get__result(smx_simcall_t simcall){
-  return (smx_action_t) simcall->result.dp;
-}
-static inline void simcall_host_execute__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline smx_action_t simcall_host_parallel_execute__get__result(smx_simcall_t simcall){
-  return (smx_action_t) simcall->result.dp;
-}
-static inline void simcall_host_parallel_execute__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-
-
-static inline double simcall_host_execution_get_remains__get__result(smx_simcall_t simcall){
-  return  simcall->result.d;
-}
-static inline void simcall_host_execution_get_remains__set__result(smx_simcall_t simcall, double result){
-    simcall->result.d = result;
-}
-static inline int simcall_host_execution_get_state__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_host_execution_get_state__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-
-
-
-
-
-
-static inline int simcall_host_execution_wait__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_host_execution_wait__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline xbt_dict_t simcall_host_get_mounted_storage_list__get__result(smx_simcall_t simcall){
-  return (xbt_dict_t) simcall->result.dp;
-}
-static inline void simcall_host_get_mounted_storage_list__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline xbt_dynar_t simcall_host_get_attached_storage_list__get__result(smx_simcall_t simcall){
-  return (xbt_dynar_t) simcall->result.dp;
-}
-static inline void simcall_host_get_attached_storage_list__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-
-
-static inline void* simcall_vm_create__get__result(smx_simcall_t simcall){
-  return  simcall->result.dp;
-}
-static inline void simcall_vm_create__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-static inline int simcall_vm_get_state__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_vm_get_state__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-
-
-static inline void* simcall_vm_get_pm__get__result(smx_simcall_t simcall){
-  return  simcall->result.dp;
-}
-static inline void simcall_vm_get_pm__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-static inline int simcall_process_count__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_process_count__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline int simcall_process_get_PID__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_process_get_PID__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline int simcall_process_get_PPID__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_process_get_PPID__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline void* simcall_process_get_data__get__result(smx_simcall_t simcall){
-  return  simcall->result.dp;
-}
-static inline void simcall_process_get_data__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-static inline smx_host_t simcall_process_get_host__get__result(smx_simcall_t simcall){
-  return (smx_host_t) simcall->result.dp;
-}
-static inline void simcall_process_get_host__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline const char* simcall_process_get_name__get__result(smx_simcall_t simcall){
-  return  simcall->result.cc;
-}
-static inline void simcall_process_get_name__set__result(smx_simcall_t simcall, const char* result){
-    simcall->result.cc = result;
-}
-static inline int simcall_process_is_suspended__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_process_is_suspended__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline xbt_dict_t simcall_process_get_properties__get__result(smx_simcall_t simcall){
-  return (xbt_dict_t) simcall->result.dp;
-}
-static inline void simcall_process_get_properties__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline int simcall_process_join__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_process_join__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline int simcall_process_sleep__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_process_sleep__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-
-
-
-
-static inline smx_process_t simcall_process_restart__get__result(smx_simcall_t simcall){
-  return (smx_process_t) simcall->result.dp;
-}
-static inline void simcall_process_restart__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline smx_rdv_t simcall_rdv_create__get__result(smx_simcall_t simcall){
-  return (smx_rdv_t) simcall->result.dp;
-}
-static inline void simcall_rdv_create__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-static inline unsigned int simcall_rdv_comm_count_by_host__get__result(smx_simcall_t simcall){
-  return  simcall->result.ui;
-}
-static inline void simcall_rdv_comm_count_by_host__set__result(smx_simcall_t simcall, unsigned int result){
-    simcall->result.ui = result;
-}
-static inline smx_action_t simcall_rdv_get_head__get__result(smx_simcall_t simcall){
-  return (smx_action_t) simcall->result.dp;
-}
-static inline void simcall_rdv_get_head__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-static inline smx_process_t simcall_rdv_get_receiver__get__result(smx_simcall_t simcall){
-  return (smx_process_t) simcall->result.dp;
-}
-static inline void simcall_rdv_get_receiver__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline smx_action_t simcall_comm_iprobe__get__result(smx_simcall_t simcall){
-  return (smx_action_t) simcall->result.dp;
-}
-static inline void simcall_comm_iprobe__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-static inline smx_action_t simcall_comm_isend__get__result(smx_simcall_t simcall){
-  return (smx_action_t) simcall->result.dp;
-}
-static inline void simcall_comm_isend__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-static inline smx_action_t simcall_comm_irecv__get__result(smx_simcall_t simcall){
-  return (smx_action_t) simcall->result.dp;
-}
-static inline void simcall_comm_irecv__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-static inline int simcall_comm_waitany__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_comm_waitany__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-
-
-static inline int simcall_comm_test__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_comm_test__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline int simcall_comm_testany__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_comm_testany__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline double simcall_comm_get_remains__get__result(smx_simcall_t simcall){
-  return  simcall->result.d;
-}
-static inline void simcall_comm_get_remains__set__result(smx_simcall_t simcall, double result){
-    simcall->result.d = result;
-}
-static inline int simcall_comm_get_state__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_comm_get_state__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline void* simcall_comm_get_src_data__get__result(smx_simcall_t simcall){
-  return  simcall->result.dp;
-}
-static inline void simcall_comm_get_src_data__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline void* simcall_comm_get_dst_data__get__result(smx_simcall_t simcall){
-  return  simcall->result.dp;
-}
-static inline void simcall_comm_get_dst_data__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline smx_process_t simcall_comm_get_src_proc__get__result(smx_simcall_t simcall){
-  return (smx_process_t) simcall->result.dp;
-}
-static inline void simcall_comm_get_src_proc__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline smx_process_t simcall_comm_get_dst_proc__get__result(smx_simcall_t simcall){
-  return (smx_process_t) simcall->result.dp;
-}
-static inline void simcall_comm_get_dst_proc__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline smx_mutex_t simcall_mutex_init__get__result(smx_simcall_t simcall){
-  return (smx_mutex_t) simcall->result.dp;
-}
-static inline void simcall_mutex_init__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-
-
-static inline int simcall_mutex_trylock__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_mutex_trylock__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-
-
-static inline smx_cond_t simcall_cond_init__get__result(smx_simcall_t simcall){
-  return (smx_cond_t) simcall->result.dp;
-}
-static inline void simcall_cond_init__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-
-
-
-
-
-
-
-
-static inline smx_sem_t simcall_sem_init__get__result(smx_simcall_t simcall){
-  return (smx_sem_t) simcall->result.dp;
-}
-static inline void simcall_sem_init__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
-
-
-
-static inline int simcall_sem_would_block__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_sem_would_block__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-
-
-
-
-static inline int simcall_sem_get_capacity__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_sem_get_capacity__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline sg_size_t simcall_file_read__get__result(smx_simcall_t simcall){
-  return  simcall->result.sgsz;
-}
-static inline void simcall_file_read__set__result(smx_simcall_t simcall, sg_size_t result){
-    simcall->result.sgsz = result;
-}
-static inline sg_size_t simcall_file_write__get__result(smx_simcall_t simcall){
-  return  simcall->result.sgsz;
-}
-static inline void simcall_file_write__set__result(smx_simcall_t simcall, sg_size_t result){
-    simcall->result.sgsz = result;
-}
-static inline smx_file_t simcall_file_open__get__result(smx_simcall_t simcall){
-  return (smx_file_t) simcall->result.dp;
-}
-static inline void simcall_file_open__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline int simcall_file_close__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_file_close__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline int simcall_file_unlink__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_file_unlink__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline sg_size_t simcall_file_get_size__get__result(smx_simcall_t simcall){
-  return  simcall->result.sgsz;
-}
-static inline void simcall_file_get_size__set__result(smx_simcall_t simcall, sg_size_t result){
-    simcall->result.sgsz = result;
-}
-static inline sg_size_t simcall_file_tell__get__result(smx_simcall_t simcall){
-  return  simcall->result.sgsz;
-}
-static inline void simcall_file_tell__set__result(smx_simcall_t simcall, sg_size_t result){
-    simcall->result.sgsz = result;
-}
-static inline int simcall_file_seek__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_file_seek__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline xbt_dynar_t simcall_file_get_info__get__result(smx_simcall_t simcall){
-  return (xbt_dynar_t) simcall->result.dp;
-}
-static inline void simcall_file_get_info__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline int simcall_file_move__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_file_move__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline sg_size_t simcall_storage_get_free_size__get__result(smx_simcall_t simcall){
-  return  simcall->result.sgsz;
-}
-static inline void simcall_storage_get_free_size__set__result(smx_simcall_t simcall, sg_size_t result){
-    simcall->result.sgsz = result;
-}
-static inline sg_size_t simcall_storage_get_used_size__get__result(smx_simcall_t simcall){
-  return  simcall->result.sgsz;
-}
-static inline void simcall_storage_get_used_size__set__result(smx_simcall_t simcall, sg_size_t result){
-    simcall->result.sgsz = result;
-}
-static inline xbt_dict_t simcall_storage_get_properties__get__result(smx_simcall_t simcall){
-  return (xbt_dict_t) simcall->result.dp;
-}
-static inline void simcall_storage_get_properties__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline xbt_dict_t simcall_storage_get_content__get__result(smx_simcall_t simcall){
-  return (xbt_dict_t) simcall->result.dp;
-}
-static inline void simcall_storage_get_content__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline xbt_dict_t simcall_asr_get_properties__get__result(smx_simcall_t simcall){
-  return (xbt_dict_t) simcall->result.dp;
-}
-static inline void simcall_asr_get_properties__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-static inline int simcall_comm_is_latency_bounded__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_comm_is_latency_bounded__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-#endif
-
-#ifdef HAVE_TRACING
-
-
-#endif
-
-#ifdef HAVE_MC
-static inline void* simcall_mc_snapshot__get__result(smx_simcall_t simcall){
-  return  simcall->result.dp;
-}
-static inline void simcall_mc_snapshot__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-static inline int simcall_mc_compare_snapshots__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_mc_compare_snapshots__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-static inline int simcall_mc_random__get__result(smx_simcall_t simcall){
-  return  simcall->result.i;
-}
-static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int result){
-    simcall->result.i = result;
-}
-#endif
diff --git a/src/simix/simcalls_generated_string.c b/src/simix/simcalls_generated_string.c
deleted file mode 100644 (file)
index 8269d30..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
-
-[SIMCALL_HOST_GET_BY_NAME] = "SIMCALL_HOST_GET_BY_NAME",
-[SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
-[SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
-[SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
-[SIMCALL_HOST_GET_PROPERTIES] = "SIMCALL_HOST_GET_PROPERTIES",
-[SIMCALL_HOST_GET_CORE] = "SIMCALL_HOST_GET_CORE",
-[SIMCALL_HOST_GET_PROCESS_LIST] = "SIMCALL_HOST_GET_PROCESS_LIST",
-[SIMCALL_HOST_GET_SPEED] = "SIMCALL_HOST_GET_SPEED",
-[SIMCALL_HOST_GET_AVAILABLE_SPEED] = "SIMCALL_HOST_GET_AVAILABLE_SPEED",
-[SIMCALL_HOST_GET_STATE] = "SIMCALL_HOST_GET_STATE",
-[SIMCALL_HOST_GET_CURRENT_POWER_PEAK] = "SIMCALL_HOST_GET_CURRENT_POWER_PEAK",
-[SIMCALL_HOST_GET_POWER_PEAK_AT] = "SIMCALL_HOST_GET_POWER_PEAK_AT",
-[SIMCALL_HOST_GET_NB_PSTATES] = "SIMCALL_HOST_GET_NB_PSTATES",
-[SIMCALL_HOST_SET_POWER_PEAK_AT] = "SIMCALL_HOST_SET_POWER_PEAK_AT",
-[SIMCALL_HOST_GET_CONSUMED_ENERGY] = "SIMCALL_HOST_GET_CONSUMED_ENERGY",
-[SIMCALL_HOST_EXECUTE] = "SIMCALL_HOST_EXECUTE",
-[SIMCALL_HOST_PARALLEL_EXECUTE] = "SIMCALL_HOST_PARALLEL_EXECUTE",
-[SIMCALL_HOST_EXECUTION_DESTROY] = "SIMCALL_HOST_EXECUTION_DESTROY",
-[SIMCALL_HOST_EXECUTION_CANCEL] = "SIMCALL_HOST_EXECUTION_CANCEL",
-[SIMCALL_HOST_EXECUTION_GET_REMAINS] = "SIMCALL_HOST_EXECUTION_GET_REMAINS",
-[SIMCALL_HOST_EXECUTION_GET_STATE] = "SIMCALL_HOST_EXECUTION_GET_STATE",
-[SIMCALL_HOST_EXECUTION_SET_PRIORITY] = "SIMCALL_HOST_EXECUTION_SET_PRIORITY",
-[SIMCALL_HOST_EXECUTION_SET_BOUND] = "SIMCALL_HOST_EXECUTION_SET_BOUND",
-[SIMCALL_HOST_EXECUTION_SET_AFFINITY] = "SIMCALL_HOST_EXECUTION_SET_AFFINITY",
-[SIMCALL_HOST_EXECUTION_WAIT] = "SIMCALL_HOST_EXECUTION_WAIT",
-[SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST] = "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST",
-[SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST] = "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST",
-[SIMCALL_HOST_GET_PARAMS] = "SIMCALL_HOST_GET_PARAMS",
-[SIMCALL_HOST_SET_PARAMS] = "SIMCALL_HOST_SET_PARAMS",
-[SIMCALL_VM_CREATE] = "SIMCALL_VM_CREATE",
-[SIMCALL_VM_START] = "SIMCALL_VM_START",
-[SIMCALL_VM_GET_STATE] = "SIMCALL_VM_GET_STATE",
-[SIMCALL_VM_MIGRATE] = "SIMCALL_VM_MIGRATE",
-[SIMCALL_VM_GET_PM] = "SIMCALL_VM_GET_PM",
-[SIMCALL_VM_SET_BOUND] = "SIMCALL_VM_SET_BOUND",
-[SIMCALL_VM_SET_AFFINITY] = "SIMCALL_VM_SET_AFFINITY",
-[SIMCALL_VM_DESTROY] = "SIMCALL_VM_DESTROY",
-[SIMCALL_VM_SUSPEND] = "SIMCALL_VM_SUSPEND",
-[SIMCALL_VM_RESUME] = "SIMCALL_VM_RESUME",
-[SIMCALL_VM_SHUTDOWN] = "SIMCALL_VM_SHUTDOWN",
-[SIMCALL_VM_SAVE] = "SIMCALL_VM_SAVE",
-[SIMCALL_VM_RESTORE] = "SIMCALL_VM_RESTORE",
-[SIMCALL_PROCESS_CREATE] = "SIMCALL_PROCESS_CREATE",
-[SIMCALL_PROCESS_KILL] = "SIMCALL_PROCESS_KILL",
-[SIMCALL_PROCESS_KILLALL] = "SIMCALL_PROCESS_KILLALL",
-[SIMCALL_PROCESS_CLEANUP] = "SIMCALL_PROCESS_CLEANUP",
-[SIMCALL_PROCESS_CHANGE_HOST] = "SIMCALL_PROCESS_CHANGE_HOST",
-[SIMCALL_PROCESS_SUSPEND] = "SIMCALL_PROCESS_SUSPEND",
-[SIMCALL_PROCESS_RESUME] = "SIMCALL_PROCESS_RESUME",
-[SIMCALL_PROCESS_COUNT] = "SIMCALL_PROCESS_COUNT",
-[SIMCALL_PROCESS_GET_PID] = "SIMCALL_PROCESS_GET_PID",
-[SIMCALL_PROCESS_GET_PPID] = "SIMCALL_PROCESS_GET_PPID",
-[SIMCALL_PROCESS_GET_DATA] = "SIMCALL_PROCESS_GET_DATA",
-[SIMCALL_PROCESS_SET_DATA] = "SIMCALL_PROCESS_SET_DATA",
-[SIMCALL_PROCESS_GET_HOST] = "SIMCALL_PROCESS_GET_HOST",
-[SIMCALL_PROCESS_GET_NAME] = "SIMCALL_PROCESS_GET_NAME",
-[SIMCALL_PROCESS_IS_SUSPENDED] = "SIMCALL_PROCESS_IS_SUSPENDED",
-[SIMCALL_PROCESS_GET_PROPERTIES] = "SIMCALL_PROCESS_GET_PROPERTIES",
-[SIMCALL_PROCESS_JOIN] = "SIMCALL_PROCESS_JOIN",
-[SIMCALL_PROCESS_SLEEP] = "SIMCALL_PROCESS_SLEEP",
-[SIMCALL_PROCESS_ON_EXIT] = "SIMCALL_PROCESS_ON_EXIT",
-[SIMCALL_PROCESS_AUTO_RESTART_SET] = "SIMCALL_PROCESS_AUTO_RESTART_SET",
-[SIMCALL_PROCESS_RESTART] = "SIMCALL_PROCESS_RESTART",
-[SIMCALL_RDV_CREATE] = "SIMCALL_RDV_CREATE",
-[SIMCALL_RDV_DESTROY] = "SIMCALL_RDV_DESTROY",
-[SIMCALL_RDV_COMM_COUNT_BY_HOST] = "SIMCALL_RDV_COMM_COUNT_BY_HOST",
-[SIMCALL_RDV_GET_HEAD] = "SIMCALL_RDV_GET_HEAD",
-[SIMCALL_RDV_SET_RECEIVER] = "SIMCALL_RDV_SET_RECEIVER",
-[SIMCALL_RDV_GET_RECEIVER] = "SIMCALL_RDV_GET_RECEIVER",
-[SIMCALL_COMM_IPROBE] = "SIMCALL_COMM_IPROBE",
-[SIMCALL_COMM_SEND] = "SIMCALL_COMM_SEND",
-[SIMCALL_COMM_ISEND] = "SIMCALL_COMM_ISEND",
-[SIMCALL_COMM_RECV] = "SIMCALL_COMM_RECV",
-[SIMCALL_COMM_IRECV] = "SIMCALL_COMM_IRECV",
-[SIMCALL_COMM_CANCEL] = "SIMCALL_COMM_CANCEL",
-[SIMCALL_COMM_WAITANY] = "SIMCALL_COMM_WAITANY",
-[SIMCALL_COMM_WAIT] = "SIMCALL_COMM_WAIT",
-[SIMCALL_COMM_TEST] = "SIMCALL_COMM_TEST",
-[SIMCALL_COMM_TESTANY] = "SIMCALL_COMM_TESTANY",
-[SIMCALL_COMM_GET_REMAINS] = "SIMCALL_COMM_GET_REMAINS",
-[SIMCALL_COMM_GET_STATE] = "SIMCALL_COMM_GET_STATE",
-[SIMCALL_COMM_GET_SRC_DATA] = "SIMCALL_COMM_GET_SRC_DATA",
-[SIMCALL_COMM_GET_DST_DATA] = "SIMCALL_COMM_GET_DST_DATA",
-[SIMCALL_COMM_GET_SRC_PROC] = "SIMCALL_COMM_GET_SRC_PROC",
-[SIMCALL_COMM_GET_DST_PROC] = "SIMCALL_COMM_GET_DST_PROC",
-[SIMCALL_MUTEX_INIT] = "SIMCALL_MUTEX_INIT",
-[SIMCALL_MUTEX_DESTROY] = "SIMCALL_MUTEX_DESTROY",
-[SIMCALL_MUTEX_LOCK] = "SIMCALL_MUTEX_LOCK",
-[SIMCALL_MUTEX_TRYLOCK] = "SIMCALL_MUTEX_TRYLOCK",
-[SIMCALL_MUTEX_UNLOCK] = "SIMCALL_MUTEX_UNLOCK",
-[SIMCALL_COND_INIT] = "SIMCALL_COND_INIT",
-[SIMCALL_COND_DESTROY] = "SIMCALL_COND_DESTROY",
-[SIMCALL_COND_SIGNAL] = "SIMCALL_COND_SIGNAL",
-[SIMCALL_COND_WAIT] = "SIMCALL_COND_WAIT",
-[SIMCALL_COND_WAIT_TIMEOUT] = "SIMCALL_COND_WAIT_TIMEOUT",
-[SIMCALL_COND_BROADCAST] = "SIMCALL_COND_BROADCAST",
-[SIMCALL_SEM_INIT] = "SIMCALL_SEM_INIT",
-[SIMCALL_SEM_DESTROY] = "SIMCALL_SEM_DESTROY",
-[SIMCALL_SEM_RELEASE] = "SIMCALL_SEM_RELEASE",
-[SIMCALL_SEM_WOULD_BLOCK] = "SIMCALL_SEM_WOULD_BLOCK",
-[SIMCALL_SEM_ACQUIRE] = "SIMCALL_SEM_ACQUIRE",
-[SIMCALL_SEM_ACQUIRE_TIMEOUT] = "SIMCALL_SEM_ACQUIRE_TIMEOUT",
-[SIMCALL_SEM_GET_CAPACITY] = "SIMCALL_SEM_GET_CAPACITY",
-[SIMCALL_FILE_READ] = "SIMCALL_FILE_READ",
-[SIMCALL_FILE_WRITE] = "SIMCALL_FILE_WRITE",
-[SIMCALL_FILE_OPEN] = "SIMCALL_FILE_OPEN",
-[SIMCALL_FILE_CLOSE] = "SIMCALL_FILE_CLOSE",
-[SIMCALL_FILE_UNLINK] = "SIMCALL_FILE_UNLINK",
-[SIMCALL_FILE_GET_SIZE] = "SIMCALL_FILE_GET_SIZE",
-[SIMCALL_FILE_TELL] = "SIMCALL_FILE_TELL",
-[SIMCALL_FILE_SEEK] = "SIMCALL_FILE_SEEK",
-[SIMCALL_FILE_GET_INFO] = "SIMCALL_FILE_GET_INFO",
-[SIMCALL_FILE_MOVE] = "SIMCALL_FILE_MOVE",
-[SIMCALL_STORAGE_GET_FREE_SIZE] = "SIMCALL_STORAGE_GET_FREE_SIZE",
-[SIMCALL_STORAGE_GET_USED_SIZE] = "SIMCALL_STORAGE_GET_USED_SIZE",
-[SIMCALL_STORAGE_GET_PROPERTIES] = "SIMCALL_STORAGE_GET_PROPERTIES",
-[SIMCALL_STORAGE_GET_CONTENT] = "SIMCALL_STORAGE_GET_CONTENT",
-[SIMCALL_ASR_GET_PROPERTIES] = "SIMCALL_ASR_GET_PROPERTIES",
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-[SIMCALL_COMM_IS_LATENCY_BOUNDED] = "SIMCALL_COMM_IS_LATENCY_BOUNDED",
-#endif
-
-#ifdef HAVE_TRACING
-[SIMCALL_SET_CATEGORY] = "SIMCALL_SET_CATEGORY",
-#endif
-
-#ifdef HAVE_MC
-[SIMCALL_MC_SNAPSHOT] = "SIMCALL_MC_SNAPSHOT",
-[SIMCALL_MC_COMPARE_SNAPSHOTS] = "SIMCALL_MC_COMPARE_SNAPSHOTS",
-[SIMCALL_MC_RANDOM] = "SIMCALL_MC_RANDOM",
-#endif
index df53bd9..3b0a76b 100644 (file)
@@ -28,8 +28,7 @@ static xbt_parmap_t raw_parmap;
 static smx_ctx_raw_t* raw_workers_context;    /* space to save the worker context in each thread */
 static unsigned long raw_threads_working;     /* number of threads that have started their work */
 static xbt_os_thread_key_t raw_worker_id_key; /* thread-specific storage for the thread id */
-#endif
-
+#endif 
 #ifdef ADAPTIVE_THRESHOLD
 #define SCHED_ROUND_LIMIT 5
 xbt_os_timer_t round_time;
@@ -44,13 +43,12 @@ double delta=0;
 double s_par_proc=0,s_seq_proc=0; /*Standard deviation of number of processes computed in par/seq during the current simulation*/
 double avg_par_proc=0,sd_par_proc=0;
 double avg_seq_proc=0,sd_seq_proc=0;
-double par_window=4294967296,seq_window=0; /*par_window is initially 1<<32*/
+long long par_window=(long long)HUGE_VAL,seq_window=0;
 #endif
 
 static unsigned long raw_process_index = 0;   /* index of the next process to run in the
                                                * list of runnable processes */
 static smx_ctx_raw_t raw_maestro_context;
-
 extern raw_stack_t raw_makecontext(char* malloced_stack, int stack_size,
                                    rawctx_entry_point_t entry_point, void* arg);
 extern void raw_swapcontext(raw_stack_t* old, raw_stack_t new);
@@ -617,7 +615,7 @@ static void smx_ctx_raw_runall(void)
     par_ratio = (par_proc_that_ran != 0) ? (par_time / (double)par_proc_that_ran) : 0;
     seq_ratio = (seq_proc_that_ran != 0) ? (seq_time / (double)seq_proc_that_ran) : 0; 
     if(seq_ratio > par_ratio){
-        if(nb_processes < avg_par_proc) {
+       if(nb_processes < avg_par_proc) {
           threshold = (threshold>2) ? threshold - 1 : threshold ;
           SIMIX_context_set_parallel_threshold(threshold);
         }
@@ -628,25 +626,24 @@ static void smx_ctx_raw_runall(void)
     }
   }
 
-  //XBT_CRITICAL("Thres: %d.", SIMIX_context_get_parallel_threshold());
-
+  //XBT_CRITICAL("Thresh: %d", SIMIX_context_get_parallel_threshold());
   if (nb_processes >= SIMIX_context_get_parallel_threshold()) {
     simix_global->context_factory->suspend = smx_ctx_raw_suspend_parallel;
     if(nb_processes < par_window){ 
       par_sched_round++;
-      xbt_os_cputimer_start(round_time);
+      xbt_os_walltimer_start(round_time);
       smx_ctx_raw_runall_parallel();
-      xbt_os_cputimer_stop(round_time);
+      xbt_os_walltimer_stop(round_time);
       par_time += xbt_os_timer_elapsed(round_time);
 
       prev_avg_par_proc = avg_par_proc;
-      delta = (nb_processes-avg_par_proc);
+      delta = nb_processes - avg_par_proc;
       avg_par_proc = (par_sched_round==1) ? nb_processes : avg_par_proc + delta / (double) par_sched_round;
 
       if(par_sched_round>=2){
-        s_par_proc = sd_par_proc + (nb_processes - prev_avg_par_proc)*delta; 
-        sd_par_proc = sqrt(s_par_proc/(par_sched_round-1));
-        par_window = avg_par_proc + sd_par_proc;
+        s_par_proc = s_par_proc + (nb_processes - prev_avg_par_proc) * delta; 
+        sd_par_proc = sqrt(s_par_proc / (par_sched_round-1));
+        par_window = (int) (avg_par_proc + sd_par_proc);
       }else{
         sd_par_proc = 0;
       }
@@ -659,9 +656,9 @@ static void smx_ctx_raw_runall(void)
     simix_global->context_factory->suspend = smx_ctx_raw_suspend_serial;
     if(nb_processes > seq_window){ 
       seq_sched_round++;
-      xbt_os_cputimer_start(round_time);
+      xbt_os_walltimer_start(round_time);
       smx_ctx_raw_runall_serial();
-      xbt_os_cputimer_stop(round_time);
+      xbt_os_walltimer_stop(round_time);
       seq_time += xbt_os_timer_elapsed(round_time);
 
       prev_avg_seq_proc = avg_seq_proc;
@@ -669,9 +666,9 @@ static void smx_ctx_raw_runall(void)
       avg_seq_proc = (seq_sched_round==1) ? nb_processes : avg_seq_proc + delta / (double) seq_sched_round;
 
       if(seq_sched_round>=2){
-        s_seq_proc = sd_seq_proc + (nb_processes - prev_avg_seq_proc)*delta; 
-        sd_seq_proc = sqrt(s_seq_proc/(seq_sched_round-1));
-        seq_window = avg_seq_proc - sd_seq_proc;
+        s_seq_proc = s_seq_proc + (nb_processes - prev_avg_seq_proc)*delta; 
+        sd_seq_proc = sqrt(s_seq_proc / (seq_sched_round-1));
+        seq_window = (int) (avg_seq_proc - sd_seq_proc);
       } else {
         sd_seq_proc = 0;
       }
@@ -698,13 +695,13 @@ static void smx_ctx_raw_runall(void)
         simix_global->context_factory->suspend = smx_ctx_raw_suspend_parallel;
 
      #ifdef TIME_BENCH_ENTIRE_SRS
-        xbt_os_cputimer_start(timer);
+        xbt_os_walltimer_start(timer);
      #endif
 
         smx_ctx_raw_runall_parallel();
 
      #ifdef TIME_BENCH_ENTIRE_SRS
-        xbt_os_cputimer_stop(timer);
+        xbt_os_walltimer_stop(timer);
         elapsed = xbt_os_timer_elapsed(timer);
      #endif
     } else {
@@ -716,13 +713,13 @@ static void smx_ctx_raw_runall(void)
       #else
 
         #ifdef TIME_BENCH_ENTIRE_SRS
-          xbt_os_cputimer_start(timer);
+          xbt_os_walltimer_start(timer);
         #endif
 
         smx_ctx_raw_runall_serial();
 
         #ifdef TIME_BENCH_ENTIRE_SRS
-          xbt_os_cputimer_stop(timer);
+          xbt_os_walltimer_stop(timer);
           elapsed = xbt_os_timer_elapsed(timer);
         #endif
       #endif
index 7317c36..4754e71 100644 (file)
@@ -33,11 +33,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix,
  */
 void SIMIX_create_environment(const char *file)
 {
-  double start, end;
-
-  start = xbt_os_time();
+  double start = 0, end = 0;
+  if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
+    start = xbt_os_time();
   parse_platform_file(file);
-  end = xbt_os_time();
+  if(XBT_LOG_ISENABLED(simix_environment, xbt_log_priority_debug))
+    end = xbt_os_time();
   XBT_DEBUG("PARSE TIME: %g", (end - start));
 
 }
index 627075a..cbf502f 100644 (file)
@@ -28,9 +28,9 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix,
 smx_global_t simix_global = NULL;
 static xbt_heap_t simix_timers = NULL;
 
-static void* SIMIX_action_mallocator_new_f(void);
-static void SIMIX_action_mallocator_free_f(void* action);
-static void SIMIX_action_mallocator_reset_f(void* action);
+static void* SIMIX_synchro_mallocator_new_f(void);
+static void SIMIX_synchro_mallocator_free_f(void* synchro);
+static void SIMIX_synchro_mallocator_reset_f(void* synchro);
 
 /* FIXME: Yeah, I'll do it in a portable maner one day [Mt] */
 #include <signal.h>
@@ -168,9 +168,9 @@ void SIMIX_global_init(int *argc, char **argv)
     simix_global->create_process_function = SIMIX_process_create;
     simix_global->kill_process_function = SIMIX_process_kill;
     simix_global->cleanup_process_function = SIMIX_process_cleanup;
-    simix_global->action_mallocator = xbt_mallocator_new(65536,
-        SIMIX_action_mallocator_new_f, SIMIX_action_mallocator_free_f,
-        SIMIX_action_mallocator_reset_f);
+    simix_global->synchro_mallocator = xbt_mallocator_new(65536,
+        SIMIX_synchro_mallocator_new_f, SIMIX_synchro_mallocator_free_f,
+        SIMIX_synchro_mallocator_reset_f);
     simix_global->autorestart = SIMIX_host_restart_processes;
 
     surf_init(argc, argv);      /* Initialize SURF structures */
@@ -264,7 +264,7 @@ void SIMIX_clean(void)
   xbt_os_timer_free(simix_global->timer_par);
 #endif
 
-  xbt_mallocator_free(simix_global->action_mallocator);
+  xbt_mallocator_free(simix_global->synchro_mallocator);
   xbt_free(simix_global);
   simix_global = NULL;
 
@@ -367,16 +367,16 @@ void SIMIX_run(void)
        *            - because the communication failed or were canceled after startup. In this case, it's called from the function
        *              we are in, by the chunk:
        *                       set = model->states.failed_action_set;
-       *                       while ((action = xbt_swag_extract(set)))
-       *                          SIMIX_simcall_post((smx_action_t) action->data);
+       *                       while ((synchro = xbt_swag_extract(set)))
+       *                          SIMIX_simcall_post((smx_synchro_t) synchro->data);
        *              This order is also fixed because it depends of the order in which the surf actions were
        *              added to the system, and only maestro can add stuff this way, through simcalls.
-       *              We thus use the inductive hypothesis once again to conclude that the order in which actions are
+       *              We thus use the inductive hypothesis once again to conclude that the order in which synchros are
        *              poped out of the swag does not depend on the user code's execution order.
-       *            - because the communication terminated. In this case, actions are served in the order given by
+       *            - because the communication terminated. In this case, synchros are served in the order given by
        *                       set = model->states.done_action_set;
-       *                       while ((action = xbt_swag_extract(set)))
-       *                          SIMIX_simcall_post((smx_action_t) action->data);
+       *                       while ((synchro = xbt_swag_extract(set)))
+       *                          SIMIX_simcall_post((smx_synchro_t) synchro->data);
        *              and the argument is very similar to the previous one.
        *            So, in any case, the orders of calls to SIMIX_comm_finish() do not depend on the order in which user processes are executed.
        *          So, in any cases, the orders of processes within process_to_run do not depend on the order in which user processes were executed previously.
@@ -394,7 +394,7 @@ void SIMIX_run(void)
 
       xbt_dynar_foreach(simix_global->process_that_ran, iter, process) {
         if (process->simcall.call != SIMCALL_NONE) {
-          SIMIX_simcall_enter(&process->simcall, 0);
+          SIMIX_simcall_handle(&process->simcall, 0);
         }
       }
     }
@@ -420,13 +420,13 @@ void SIMIX_run(void)
     /* Wake up all processes waiting for a Surf action to finish */
     xbt_dynar_foreach(model_list, iter, model) {
       while ((action = surf_model_extract_failed_action_set(model)))
-        SIMIX_simcall_exit((smx_action_t) surf_action_get_data(action));
+        SIMIX_simcall_exit((smx_synchro_t) surf_action_get_data(action));
 
       while ((action = surf_model_extract_done_action_set(model)))
         if (surf_action_get_data(action) == NULL)
           XBT_DEBUG("probably vcpu's action %p, skip", action);
         else
-          SIMIX_simcall_exit((smx_action_t) surf_action_get_data(action));
+          SIMIX_simcall_exit((smx_synchro_t) surf_action_get_data(action));
     }
 
     /* Autorestart all process */
@@ -444,8 +444,6 @@ void SIMIX_run(void)
 
 
     XBT_DEBUG("### time %f, empty %d", time, xbt_dynar_is_empty(simix_global->process_to_run));
-    // !(time == -1.0 && xbt_dynar_is_empty())
-
 
   } while (time != -1.0 || !xbt_dynar_is_empty(simix_global->process_to_run));
 
@@ -538,50 +536,43 @@ void SIMIX_display_process_status(void)
     ("Legend of the following listing: \"Process <pid> (<name>@<host>): <status>\"");
   xbt_swag_foreach(process, simix_global->process_list) {
 
-    if (process->waiting_action) {
-
-      const char* action_description = "unknown";
-      switch (process->waiting_action->type) {
+    if (process->waiting_synchro) {
 
-      case SIMIX_ACTION_EXECUTE:
-        action_description = "execution";
-        break;
+      const char* synchro_description = "unknown";
+      switch (process->waiting_synchro->type) {
 
-      case SIMIX_ACTION_PARALLEL_EXECUTE:
-        action_description = "parallel execution";
+      case SIMIX_SYNC_EXECUTE:
+        synchro_description = "execution";
         break;
 
-      case SIMIX_ACTION_COMMUNICATE:
-        action_description = "communication";
+      case SIMIX_SYNC_PARALLEL_EXECUTE:
+        synchro_description = "parallel execution";
         break;
 
-      case SIMIX_ACTION_SLEEP:
-        action_description = "sleeping";
+      case SIMIX_SYNC_COMMUNICATE:
+        synchro_description = "communication";
         break;
 
-      case SIMIX_ACTION_JOIN:
-        action_description = "joining";
+      case SIMIX_SYNC_SLEEP:
+        synchro_description = "sleeping";
         break;
 
-      case SIMIX_ACTION_SYNCHRO:
-        action_description = "synchronization";
+      case SIMIX_SYNC_JOIN:
+        synchro_description = "joining";
         break;
 
-      case SIMIX_ACTION_IO:
-        action_description = "I/O";
+      case SIMIX_SYNC_SYNCHRO:
+        synchro_description = "synchronization";
         break;
-      /* **************************************/
-      /* TUTORIAL: New API                    */
-      case SIMIX_ACTION_NEW_API:
-        action_description = "NEW API";
-      /* **************************************/
 
+      case SIMIX_SYNC_IO:
+        synchro_description = "I/O";
         break;
       }
-      XBT_INFO("Process %lu (%s@%s): waiting for %s action %p (%s) in state %d to finish",
+      XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish",
           process->pid, process->name, sg_host_name(process->smx_host),
-          action_description, process->waiting_action,
-          process->waiting_action->name, (int)process->waiting_action->state);
+          synchro_description, process->waiting_synchro,
+          process->waiting_synchro->name, (int)process->waiting_synchro->state);
     }
     else {
       XBT_INFO("Process %lu (%s@%s)", process->pid, process->name, sg_host_name(process->smx_host));
@@ -589,27 +580,27 @@ void SIMIX_display_process_status(void)
   }
 }
 
-static void* SIMIX_action_mallocator_new_f(void) {
-  smx_action_t action = xbt_new(s_smx_action_t, 1);
-  action->simcalls = xbt_fifo_new();
-  return action;
+static void* SIMIX_synchro_mallocator_new_f(void) {
+  smx_synchro_t synchro = xbt_new(s_smx_synchro_t, 1);
+  synchro->simcalls = xbt_fifo_new();
+  return synchro;
 }
 
-static void SIMIX_action_mallocator_free_f(void* action) {
-  xbt_fifo_free(((smx_action_t) action)->simcalls);
-  xbt_free(action);
+static void SIMIX_synchro_mallocator_free_f(void* synchro) {
+  xbt_fifo_free(((smx_synchro_t) synchro)->simcalls);
+  xbt_free(synchro);
 }
 
-static void SIMIX_action_mallocator_reset_f(void* action) {
+static void SIMIX_synchro_mallocator_reset_f(void* synchro) {
 
   // we also recycle the simcall list
-  xbt_fifo_t fifo = ((smx_action_t) action)->simcalls;
+  xbt_fifo_t fifo = ((smx_synchro_t) synchro)->simcalls;
   xbt_fifo_reset(fifo);
-  memset(action, 0, sizeof(s_smx_action_t));
-  ((smx_action_t) action)->simcalls = fifo;
+  memset(synchro, 0, sizeof(s_smx_synchro_t));
+  ((smx_synchro_t) synchro)->simcalls = fifo;
 }
 
-xbt_dict_t SIMIX_pre_asr_get_properties(smx_simcall_t simcall, const char *name){
+xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char *name){
   return SIMIX_asr_get_properties(name);
 }
 xbt_dict_t SIMIX_asr_get_properties(const char *name)
index 534e331..30043b0 100644 (file)
@@ -11,9 +11,9 @@
 #include "mc/mc.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix,
-                                "Logging specific to SIMIX (hosts)");
+                                "SIMIX hosts");
 
-static void SIMIX_execution_finish(smx_action_t action);
+static void SIMIX_execution_finish(smx_synchro_t synchro);
 
 /**
  * \brief Internal function to create a SIMIX host.
@@ -37,11 +37,6 @@ smx_host_t SIMIX_host_create(const char *name,
   return xbt_lib_get_elm_or_null(host_lib, name);
 }
 
-void SIMIX_pre_host_on(smx_simcall_t simcall, smx_host_t h)
-{
-  SIMIX_host_on(h);
-}
-
 /**
  * \brief Start the host if it is off
  *
@@ -93,9 +88,9 @@ void SIMIX_host_on(smx_host_t h)
   }
 }
 
-void SIMIX_pre_host_off(smx_simcall_t simcall, smx_host_t h)
+void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t h)
 {
 SIMIX_host_off(h, simcall->issuer);
+ SIMIX_host_off(h, simcall->issuer);
 }
 
 /**
@@ -116,18 +111,10 @@ void SIMIX_host_off(smx_host_t h, smx_process_t issuer)
       smx_process_t process = NULL;
       xbt_swag_foreach(process, host->process_list) {
         SIMIX_process_kill(process, issuer);
-       XBT_DEBUG("Killing %s on %s by %s", process->name,  sg_host_name(process->smx_host), issuer->name);
+        XBT_DEBUG("Killing %s on %s by %s", process->name,  sg_host_name(process->smx_host), issuer->name);
       }
     }
   }
-  /*xbt_dynar_t vms = surf_workstation_get_vms(h);
-  unsigned int cpt;
-  smx_host_t vm;
-  xbt_dynar_foreach(vms, cpt, vm) {
-    SIMIX_vm_shutdown(vm, issuer);
-    SIMIX_vm_destroy(vm);
-  }
-  xbt_dynar_free(&vms);*/
 }
 
 /**
@@ -164,27 +151,6 @@ void SIMIX_host_destroy(void *h)
   return;
 }
 
-///**
-// * \brief Returns a dict of all hosts.
-// *
-// * \return List of all hosts (as a #xbt_dict_t)
-// */
-//xbt_dict_t SIMIX_host_get_dict(void)
-//{
-//  xbt_dict_t host_dict = xbt_dict_new_homogeneous(NULL);
-//  xbt_lib_cursor_t cursor = NULL;
-//  char *name = NULL;
-//  void **host = NULL;
-//
-//  xbt_lib_foreach(host_lib, cursor, name, host){
-//    if(host[SIMIX_HOST_LEVEL])
-//            xbt_dict_set(host_dict,name,host[SIMIX_HOST_LEVEL], NULL);
-//  }
-//  return host_dict;
-//}
-smx_host_t SIMIX_pre_host_get_by_name(smx_simcall_t simcall, const char *name){
-   return SIMIX_host_get_by_name(name);
-}
 smx_host_t SIMIX_host_get_by_name(const char *name){
   xbt_assert(((simix_global != NULL)
                && (host_lib != NULL)),
@@ -199,9 +165,6 @@ smx_host_t SIMIX_host_self(void)
   return (process == NULL) ? NULL : SIMIX_process_get_host(process);
 }
 
-const char* SIMIX_pre_host_self_get_name(smx_simcall_t simcall){
-   return SIMIX_host_self_get_name();
-}
 /* needs to be public and without simcall because it is called
    by exceptions and logging events */
 const char* SIMIX_host_self_get_name(void)
@@ -213,45 +176,29 @@ const char* SIMIX_host_self_get_name(void)
   return SIMIX_host_get_name(host);
 }
 
-const char* SIMIX_pre_host_get_name(smx_simcall_t simcall, smx_host_t host){
-   return SIMIX_host_get_name(host);
-}
 const char* SIMIX_host_get_name(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters");
 
   return sg_host_name(host);
 }
 
-xbt_dict_t SIMIX_pre_host_get_properties(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_properties(host);
-}
 xbt_dict_t SIMIX_host_get_properties(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_resource_get_properties(surf_workstation_resource_priv(host));
 }
 
-double SIMIX_pre_host_get_speed(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_speed(host);
-}
 double SIMIX_host_get_speed(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
   return surf_workstation_get_speed(host, 1.0);
 }
 
-int SIMIX_pre_host_get_core(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_core(host);
-}
 int SIMIX_host_get_core(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_get_core(host);
 }
 
-xbt_swag_t SIMIX_pre_host_get_process_list(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_process_list(host);
-}
-
 xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
   smx_host_priv_t host_priv = SIMIX_host_priv(host);
@@ -260,35 +207,23 @@ xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){
 }
 
 
-double SIMIX_pre_host_get_available_speed(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_available_speed(host);
-}
 double SIMIX_host_get_available_speed(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_get_available_speed(host);
 }
 
-double SIMIX_pre_host_get_current_power_peak(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_current_power_peak(host);
-}
 double SIMIX_host_get_current_power_peak(smx_host_t host) {
          xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
          return surf_workstation_get_current_power_peak(host);
 }
 
-double SIMIX_pre_host_get_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){
-  return SIMIX_host_get_power_peak_at(host, pstate_index);
-}
 double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index) {
          xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
          return surf_workstation_get_power_peak_at(host, pstate_index);
 }
 
-int SIMIX_pre_host_get_nb_pstates(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_nb_pstates(host);
-}
 int SIMIX_host_get_nb_pstates(smx_host_t host) {
          xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
@@ -296,26 +231,17 @@ int SIMIX_host_get_nb_pstates(smx_host_t host) {
 }
 
 
-void SIMIX_pre_host_set_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){
-  SIMIX_host_set_power_peak_at(host, pstate_index);
-}
 void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index) {
          xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
          surf_workstation_set_power_peak_at(host, pstate_index);
 }
 
-double SIMIX_pre_host_get_consumed_energy(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_consumed_energy(host);
-}
 double SIMIX_host_get_consumed_energy(smx_host_t host) {
          xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
          return surf_workstation_get_consumed_energy(host);
 }
 
-int SIMIX_pre_host_get_state(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_state(host);
-}
 int SIMIX_host_get_state(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
@@ -436,59 +362,48 @@ void SIMIX_host_autorestart(smx_host_t host)
     xbt_die("No function for simix_global->autorestart");
 }
 
-smx_action_t SIMIX_pre_host_execute(smx_simcall_t simcall,const char *name,
-    smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
-  return SIMIX_host_execute(name, host, computation_amount, priority, bound, affinity_mask);
-}
-smx_action_t SIMIX_host_execute(const char *name,
+smx_synchro_t SIMIX_host_execute(const char *name,
     smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){
 
   /* alloc structures and initialize */
-  smx_action_t action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_EXECUTE;
-  action->name = xbt_strdup(name);
-  action->state = SIMIX_RUNNING;
-  action->execution.host = host;
+  smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
+  synchro->type = SIMIX_SYNC_EXECUTE;
+  synchro->name = xbt_strdup(name);
+  synchro->state = SIMIX_RUNNING;
+  synchro->execution.host = host;
 
 #ifdef HAVE_TRACING
-  action->category = NULL;
+  synchro->category = NULL;
 #endif
 
   /* set surf's action */
   if (!MC_is_active()) {
 
-    action->execution.surf_exec = surf_workstation_execute(host, computation_amount);
-    surf_action_set_data(action->execution.surf_exec, action);
-    surf_action_set_priority(action->execution.surf_exec, priority);
+    synchro->execution.surf_exec = surf_workstation_execute(host, computation_amount);
+    surf_action_set_data(synchro->execution.surf_exec, synchro);
+    surf_action_set_priority(synchro->execution.surf_exec, priority);
 
     /* Note (hypervisor): for multicore, the bound value being passed to the
      * surf layer should not be zero (i.e., unlimited). It should be the
      * capacity of a CPU core. */
     if (bound == 0)
-      surf_cpu_action_set_bound(action->execution.surf_exec, SIMIX_host_get_speed(host));
+      surf_cpu_action_set_bound(synchro->execution.surf_exec, SIMIX_host_get_speed(host));
     else
-      surf_cpu_action_set_bound(action->execution.surf_exec, bound);
+      surf_cpu_action_set_bound(synchro->execution.surf_exec, bound);
 
     if (affinity_mask != 0) {
       /* just a double check to confirm that this host is the host where this task is running. */
-      xbt_assert(action->execution.host == host);
-      surf_cpu_action_set_affinity(action->execution.surf_exec, host, affinity_mask);
+      xbt_assert(synchro->execution.host == host);
+      surf_cpu_action_set_affinity(synchro->execution.surf_exec, host, affinity_mask);
     }
   }
 
-  XBT_DEBUG("Create execute action %p: %s", action, action->name);
+  XBT_DEBUG("Create execute synchro %p: %s", synchro, synchro->name);
 
-  return action;
+  return synchro;
 }
 
-smx_action_t SIMIX_pre_host_parallel_execute(smx_simcall_t simcall, const char *name,
-    int host_nb, smx_host_t *host_list,
-    double *computation_amount, double *communication_amount,
-    double amount, double rate){
-  return SIMIX_host_parallel_execute(name, host_nb, host_list, computation_amount,
-                                    communication_amount, amount, rate);
-}
-smx_action_t SIMIX_host_parallel_execute(const char *name,
+smx_synchro_t SIMIX_host_parallel_execute(const char *name,
     int host_nb, smx_host_t *host_list,
     double *computation_amount, double *communication_amount,
     double amount, double rate){
@@ -497,17 +412,17 @@ smx_action_t SIMIX_host_parallel_execute(const char *name,
   int i;
 
   /* alloc structures and initialize */
-  smx_action_t action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_PARALLEL_EXECUTE;
-  action->name = xbt_strdup(name);
-  action->state = SIMIX_RUNNING;
-  action->execution.host = NULL; /* FIXME: do we need the list of hosts? */
+  smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
+  synchro->type = SIMIX_SYNC_PARALLEL_EXECUTE;
+  synchro->name = xbt_strdup(name);
+  synchro->state = SIMIX_RUNNING;
+  synchro->execution.host = NULL; /* FIXME: do we need the list of hosts? */
 
 #ifdef HAVE_TRACING
-  action->category = NULL;
+  synchro->category = NULL;
 #endif
 
-  /* set surf's action */
+  /* set surf's synchro */
   workstation_list = xbt_new0(void *, host_nb);
   for (i = 0; i < host_nb; i++)
     workstation_list[i] = surf_workstation_resource_priv(host_list[i]);
@@ -525,140 +440,116 @@ smx_action_t SIMIX_host_parallel_execute(const char *name,
     }
   }
 
-  /* set surf's action */
+  /* set surf's synchro */
   if (!MC_is_active()) {
-    action->execution.surf_exec =
+    synchro->execution.surf_exec =
       surf_workstation_model_execute_parallel_task((surf_workstation_model_t)surf_workstation_model,
                  host_nb, workstation_list, computation_amount, communication_amount, rate);
 
-    surf_action_set_data(action->execution.surf_exec, action);
+    surf_action_set_data(synchro->execution.surf_exec, synchro);
   }
-  XBT_DEBUG("Create parallel execute action %p", action);
+  XBT_DEBUG("Create parallel execute synchro %p", synchro);
 
-  return action;
+  return synchro;
 }
 
-void SIMIX_pre_host_execution_destroy(smx_simcall_t simcall, smx_action_t action){
-  SIMIX_host_execution_destroy(action);
-}
-void SIMIX_host_execution_destroy(smx_action_t action){
-  XBT_DEBUG("Destroy action %p", action);
+void SIMIX_host_execution_destroy(smx_synchro_t synchro){
+  XBT_DEBUG("Destroy synchro %p", synchro);
 
-  if (action->execution.surf_exec) {
-    surf_action_unref(action->execution.surf_exec);
-    action->execution.surf_exec = NULL;
+  if (synchro->execution.surf_exec) {
+    surf_action_unref(synchro->execution.surf_exec);
+    synchro->execution.surf_exec = NULL;
   }
-  xbt_free(action->name);
-  xbt_mallocator_release(simix_global->action_mallocator, action);
+  xbt_free(synchro->name);
+  xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
 }
 
-void SIMIX_pre_host_execution_cancel(smx_simcall_t simcall, smx_action_t action){
-  SIMIX_host_execution_cancel(action);
-}
-void SIMIX_host_execution_cancel(smx_action_t action){
-  XBT_DEBUG("Cancel action %p", action);
+void SIMIX_host_execution_cancel(smx_synchro_t synchro){
+  XBT_DEBUG("Cancel synchro %p", synchro);
 
-  if (action->execution.surf_exec)
-    surf_action_cancel(action->execution.surf_exec);
+  if (synchro->execution.surf_exec)
+    surf_action_cancel(synchro->execution.surf_exec);
 }
 
-double SIMIX_pre_host_execution_get_remains(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_host_execution_get_remains(action);
-}
-double SIMIX_host_execution_get_remains(smx_action_t action){
+double SIMIX_host_execution_get_remains(smx_synchro_t synchro){
   double result = 0.0;
 
-  if (action->state == SIMIX_RUNNING)
-    result = surf_action_get_remains(action->execution.surf_exec);
+  if (synchro->state == SIMIX_RUNNING)
+    result = surf_action_get_remains(synchro->execution.surf_exec);
 
   return result;
 }
 
-e_smx_state_t SIMIX_pre_host_execution_get_state(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_host_execution_get_state(action);
-}
-e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action){
-  return action->state;
+e_smx_state_t SIMIX_host_execution_get_state(smx_synchro_t synchro){
+  return synchro->state;
 }
 
-void SIMIX_pre_host_execution_set_priority(smx_simcall_t simcall, smx_action_t action,
-                                       double priority){
-  SIMIX_host_execution_set_priority(action, priority);
-}
-void SIMIX_host_execution_set_priority(smx_action_t action, double priority){
+void SIMIX_host_execution_set_priority(smx_synchro_t synchro, double priority){
 
-  if(action->execution.surf_exec)
-       surf_action_set_priority(action->execution.surf_exec, priority);
+  if(synchro->execution.surf_exec)
+       surf_action_set_priority(synchro->execution.surf_exec, priority);
 }
 
-void SIMIX_pre_host_execution_set_bound(smx_simcall_t simcall, smx_action_t action,
-                                       double bound){
-  SIMIX_host_execution_set_bound(action, bound);
-}
-void SIMIX_host_execution_set_bound(smx_action_t action, double bound){
+void SIMIX_host_execution_set_bound(smx_synchro_t synchro, double bound){
 
-  if(action->execution.surf_exec)
-       surf_cpu_action_set_bound(action->execution.surf_exec, bound);
+  if(synchro->execution.surf_exec)
+       surf_cpu_action_set_bound(synchro->execution.surf_exec, bound);
 }
 
-void SIMIX_pre_host_execution_set_affinity(smx_simcall_t simcall,
-    smx_action_t action, smx_host_t host, unsigned long mask){
-  SIMIX_host_execution_set_affinity(action, host, mask);
-}
-void SIMIX_host_execution_set_affinity(smx_action_t action, smx_host_t host, unsigned long mask){
-  xbt_assert(action->type == SIMIX_ACTION_EXECUTE);
+void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, smx_host_t host, unsigned long mask){
+  xbt_assert(synchro->type == SIMIX_SYNC_EXECUTE);
 
-  if (action->execution.surf_exec) {
+  if (synchro->execution.surf_exec) {
     /* just a double check to confirm that this host is the host where this task is running. */
-    xbt_assert(action->execution.host == host);
-    surf_cpu_action_set_affinity(action->execution.surf_exec, host, mask);
+    xbt_assert(synchro->execution.host == host);
+    surf_cpu_action_set_affinity(synchro->execution.surf_exec, host, mask);
   }
 }
 
-void SIMIX_pre_host_execution_wait(smx_simcall_t simcall, smx_action_t action){
+void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro){
 
-  XBT_DEBUG("Wait for execution of action %p, state %d", action, (int)action->state);
+  XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state);
 
-  /* Associate this simcall to the action */
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  /* Associate this simcall to the synchro */
+  xbt_fifo_push(synchro->simcalls, simcall);
+  simcall->issuer->waiting_synchro = synchro;
 
-  /* set surf's action */
+  /* set surf's synchro */
   if (MC_is_active()) {
-    action->state = SIMIX_DONE;
-    SIMIX_execution_finish(action);
+    synchro->state = SIMIX_DONE;
+    SIMIX_execution_finish(synchro);
     return;
   }
 
-  /* If the action is already finished then perform the error handling */
-  if (action->state != SIMIX_RUNNING)
-    SIMIX_execution_finish(action);
+  /* If the synchro is already finished then perform the error handling */
+  if (synchro->state != SIMIX_RUNNING)
+    SIMIX_execution_finish(synchro);
 }
 
-void SIMIX_host_execution_suspend(smx_action_t action)
+void SIMIX_host_execution_suspend(smx_synchro_t synchro)
 {
-  if(action->execution.surf_exec)
-    surf_action_suspend(action->execution.surf_exec);
+  if(synchro->execution.surf_exec)
+    surf_action_suspend(synchro->execution.surf_exec);
 }
 
-void SIMIX_host_execution_resume(smx_action_t action)
+void SIMIX_host_execution_resume(smx_synchro_t synchro)
 {
-  if(action->execution.surf_exec)
-    surf_action_resume(action->execution.surf_exec);
+  if(synchro->execution.surf_exec)
+    surf_action_resume(synchro->execution.surf_exec);
 }
 
-void SIMIX_execution_finish(smx_action_t action)
+void SIMIX_execution_finish(smx_synchro_t synchro)
 {
   xbt_fifo_item_t item;
   smx_simcall_t simcall;
 
-  xbt_fifo_foreach(action->simcalls, item, simcall, smx_simcall_t) {
+  xbt_fifo_foreach(synchro->simcalls, item, simcall, smx_simcall_t) {
 
-    switch (action->state) {
+    switch (synchro->state) {
 
       case SIMIX_DONE:
-        /* do nothing, action done */
-  XBT_DEBUG("SIMIX_execution_finished: execution successful");
+        /* do nothing, synchro done */
+        XBT_DEBUG("SIMIX_execution_finished: execution successful");
         break;
 
       case SIMIX_FAILED:
@@ -673,64 +564,60 @@ void SIMIX_execution_finish(smx_action_t action)
         break;
 
       default:
-        xbt_die("Internal error in SIMIX_execution_finish: unexpected action state %d",
-            (int)action->state);
+        xbt_die("Internal error in SIMIX_execution_finish: unexpected synchro state %d",
+            (int)synchro->state);
     }
     /* check if the host is down */
     if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
       simcall->issuer->context->iwannadie = 1;
     }
 
-    simcall->issuer->waiting_action =    NULL;
-    simcall_host_execution_wait__set__result(simcall, action->state);
+    simcall->issuer->waiting_synchro =    NULL;
+    simcall_host_execution_wait__set__result(simcall, synchro->state);
     SIMIX_simcall_answer(simcall);
   }
 
   /* We no longer need it */
-  SIMIX_host_execution_destroy(action);
+  SIMIX_host_execution_destroy(synchro);
 }
 
 
-void SIMIX_post_host_execute(smx_action_t action)
+void SIMIX_post_host_execute(smx_synchro_t synchro)
 {
-  if (action->type == SIMIX_ACTION_EXECUTE && /* FIMXE: handle resource failure
+  if (synchro->type == SIMIX_SYNC_EXECUTE && /* FIMXE: handle resource failure
                                                * for parallel tasks too */
-      surf_resource_get_state(surf_workstation_resource_priv(action->execution.host)) == SURF_RESOURCE_OFF) {
-    /* If the host running the action failed, notice it so that the asking
+      surf_resource_get_state(surf_workstation_resource_priv(synchro->execution.host)) == SURF_RESOURCE_OFF) {
+    /* If the host running the synchro failed, notice it so that the asking
      * process can be killed if it runs on that host itself */
-    action->state = SIMIX_FAILED;
-  } else if (surf_action_get_state(action->execution.surf_exec) == SURF_ACTION_FAILED) {
-    /* If the host running the action didn't fail, then the action was
+    synchro->state = SIMIX_FAILED;
+  } else if (surf_action_get_state(synchro->execution.surf_exec) == SURF_ACTION_FAILED) {
+    /* If the host running the synchro didn't fail, then the synchro was
      * canceled */
-    action->state = SIMIX_CANCELED;
+    synchro->state = SIMIX_CANCELED;
   } else {
-    action->state = SIMIX_DONE;
+    synchro->state = SIMIX_DONE;
   }
 
-  if (action->execution.surf_exec) {
-    surf_action_unref(action->execution.surf_exec);
-    action->execution.surf_exec = NULL;
+  if (synchro->execution.surf_exec) {
+    surf_action_unref(synchro->execution.surf_exec);
+    synchro->execution.surf_exec = NULL;
   }
 
-  /* If there are simcalls associated with the action, then answer them */
-  if (xbt_fifo_size(action->simcalls)) {
-    SIMIX_execution_finish(action);
+  /* If there are simcalls associated with the synchro, then answer them */
+  if (xbt_fifo_size(synchro->simcalls)) {
+    SIMIX_execution_finish(synchro);
   }
 }
 
 
 #ifdef HAVE_TRACING
-void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action,
-                           const char *category){
-  SIMIX_set_category(action, category);
-}
-void SIMIX_set_category(smx_action_t action, const char *category)
+void SIMIX_set_category(smx_synchro_t synchro, const char *category)
 {
-  if (action->state != SIMIX_RUNNING) return;
-  if (action->type == SIMIX_ACTION_EXECUTE){
-    surf_action_set_category(action->execution.surf_exec, category);
-  }else if (action->type == SIMIX_ACTION_COMMUNICATE){
-    surf_action_set_category(action->comm.surf_comm, category);
+  if (synchro->state != SIMIX_RUNNING) return;
+  if (synchro->type == SIMIX_SYNC_EXECUTE){
+    surf_action_set_category(synchro->execution.surf_exec, category);
+  }else if (synchro->type == SIMIX_SYNC_COMMUNICATE){
+    surf_action_set_category(synchro->comm.surf_comm, category);
   }
 }
 #endif
@@ -747,36 +634,18 @@ void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params)
   surf_workstation_get_params(ind_vm, params);
 }
 
-void SIMIX_pre_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params)
-{
-  SIMIX_host_get_params(ind_vm, params);
-}
-
 void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params)
 {
   /* jump to ws_set_params(). */
   surf_workstation_set_params(ind_vm, params);
 }
 
-void SIMIX_pre_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params)
-{
-  SIMIX_host_set_params(ind_vm, params);
-}
-
-xbt_dict_t SIMIX_pre_host_get_mounted_storage_list(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_mounted_storage_list(host);
-}
-
 xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
   return surf_workstation_get_mounted_storage_list(host);
 }
 
-xbt_dynar_t SIMIX_pre_host_get_attached_storage_list(smx_simcall_t simcall, smx_host_t host){
-  return SIMIX_host_get_attached_storage_list(host);
-}
-
 xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host){
   xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)");
 
index 2e17bcf..33316bd 100644 (file)
@@ -8,7 +8,7 @@
 #define _SIMIX_HOST_PRIVATE_H
 
 #include "simgrid/simix.h"
-#include "smx_smurf_private.h"
+#include "popping_private.h"
 
 SG_BEGIN_DECL()
 
@@ -52,108 +52,60 @@ double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index);
 int SIMIX_host_get_nb_pstates(smx_host_t host);
 double SIMIX_host_get_consumed_energy(smx_host_t host);
 void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index);
-smx_action_t SIMIX_host_execute(const char *name,
+smx_synchro_t SIMIX_host_execute(const char *name,
     smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask);
-smx_action_t SIMIX_host_parallel_execute(const char *name,
+smx_synchro_t SIMIX_host_parallel_execute(const char *name,
     int host_nb, smx_host_t *host_list,
     double *computation_amount, double *communication_amount,
     double amount, double rate);
-void SIMIX_host_execution_destroy(smx_action_t action);
-void SIMIX_host_execution_cancel(smx_action_t action);
-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_host_execution_set_bound(smx_action_t action, double bound);
-void SIMIX_host_execution_set_affinity(smx_action_t action, smx_host_t host, unsigned long mask);
-void SIMIX_pre_host_execution_wait(smx_simcall_t simcall, smx_action_t action);
+void SIMIX_host_execution_destroy(smx_synchro_t synchro);
+void SIMIX_host_execution_cancel(smx_synchro_t synchro);
+double SIMIX_host_execution_get_remains(smx_synchro_t synchro);
+e_smx_state_t SIMIX_host_execution_get_state(smx_synchro_t synchro);
+void SIMIX_host_execution_set_priority(smx_synchro_t synchro, double priority);
+void SIMIX_host_execution_set_bound(smx_synchro_t synchro, double bound);
+void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, smx_host_t host, unsigned long mask);
 xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host);
 xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host);
-// pre prototypes
-smx_host_t SIMIX_pre_host_get_by_name(smx_simcall_t, const char*);
-const char* SIMIX_pre_host_self_get_name(smx_simcall_t);
-const char* SIMIX_pre_host_get_name(smx_simcall_t, smx_host_t);
-void SIMIX_pre_host_on(smx_simcall_t, smx_host_t host);
-void SIMIX_pre_host_off(smx_simcall_t, smx_host_t host);
-xbt_dict_t SIMIX_pre_host_get_properties(smx_simcall_t, smx_host_t);
-int SIMIX_pre_host_get_core(smx_simcall_t, smx_host_t);
-xbt_swag_t SIMIX_pre_host_get_process_list(smx_simcall_t, smx_host_t host);
-double SIMIX_pre_host_get_speed(smx_simcall_t, smx_host_t);
-double SIMIX_pre_host_get_available_speed(smx_simcall_t, smx_host_t);
-int SIMIX_pre_host_get_state(smx_simcall_t, smx_host_t);
-double SIMIX_pre_host_get_current_power_peak(smx_simcall_t, smx_host_t);
-double SIMIX_pre_host_get_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index);
-int SIMIX_pre_host_get_nb_pstates(smx_simcall_t, smx_host_t host);
-void SIMIX_pre_host_set_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index);
-double SIMIX_pre_host_get_consumed_energy(smx_simcall_t, smx_host_t);
-void* SIMIX_pre_host_self_get_data(smx_simcall_t);
-smx_action_t SIMIX_pre_host_execute(smx_simcall_t, const char*, smx_host_t, double, double, double, unsigned long);
-smx_action_t SIMIX_pre_host_parallel_execute(smx_simcall_t, const char*, int, smx_host_t*,
-                                             double*, double*, double, double);
-void SIMIX_pre_host_execution_destroy(smx_simcall_t, smx_action_t);
-void SIMIX_pre_host_execution_cancel(smx_simcall_t, smx_action_t);
-double SIMIX_pre_host_execution_get_remains(smx_simcall_t, smx_action_t);
-e_smx_state_t SIMIX_pre_host_execution_get_state(smx_simcall_t, smx_action_t);
-void SIMIX_pre_host_execution_set_priority(smx_simcall_t, smx_action_t, double);
-void SIMIX_pre_host_execution_set_bound(smx_simcall_t simcall, smx_action_t action, double bound);
-void SIMIX_pre_host_execution_set_affinity(smx_simcall_t simcall, smx_action_t action, smx_host_t host, unsigned long mask);
-
-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_dict_t SIMIX_pre_host_get_mounted_storage_list(smx_simcall_t, smx_host_t);
-xbt_dynar_t SIMIX_pre_host_get_attached_storage_list(smx_simcall_t, smx_host_t);
+
+void SIMIX_host_execution_suspend(smx_synchro_t synchro);
+void SIMIX_host_execution_resume(smx_synchro_t synchro);
+
+void SIMIX_post_host_execute(smx_synchro_t synchro);
 #ifdef HAVE_TRACING
-void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action,
-                           const char *category);
-void SIMIX_set_category(smx_action_t action, const char *category);
+void SIMIX_set_category(smx_synchro_t synchro, const char *category);
 #endif
 /* vm related stuff */
 smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host);
-smx_host_t SIMIX_pre_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host);
 
 void SIMIX_vm_destroy(smx_host_t ind_vm);
-void SIMIX_pre_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer);
-void SIMIX_pre_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer);
-void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer);
-void SIMIX_pre_vm_save(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer);
-void SIMIX_pre_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_start(smx_host_t ind_vm);
-void SIMIX_pre_vm_start(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer);
-void SIMIX_pre_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 
 int SIMIX_vm_get_state(smx_host_t ind_vm);
-int SIMIX_pre_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm);
 // --
 void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm);
-void SIMIX_pre_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm);
 
 void *SIMIX_vm_get_pm(smx_host_t ind_vm);
-void *SIMIX_pre_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm);
 
 void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound);
-void SIMIX_pre_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound);
 
 void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask);
-void SIMIX_pre_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask);
 
 void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params);
-void SIMIX_pre_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
 
 void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params);
-void SIMIX_pre_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params);
 
 SG_END_DECL()
 
index 97b1fc4..be6a653 100644 (file)
@@ -50,16 +50,16 @@ void SIMIX_storage_destroy(void *s)
 }
 
 //SIMIX FILE READ
-void SIMIX_pre_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
+void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
 {
-  smx_action_t action = SIMIX_file_read(simcall->issuer, fd, size, host);
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  smx_synchro_t synchro = SIMIX_file_read(fd, size, host);
+  xbt_fifo_push(synchro->simcalls, simcall);
+  simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_action_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host)
+smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
 
   /* check if the host is active */
   if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
@@ -67,33 +67,33 @@ smx_action_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t siz
            sg_host_name(host));
   }
 
-  action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_IO;
-  action->name = NULL;
+  synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
+  synchro->type = SIMIX_SYNC_IO;
+  synchro->name = NULL;
 #ifdef HAVE_TRACING
-  action->category = NULL;
+  synchro->category = NULL;
 #endif
 
-  action->io.host = host;
-  action->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
+  synchro->io.host = host;
+  synchro->io.surf_io = surf_workstation_read(host, fd->surf_file, size);
 
-  surf_action_set_data(action->io.surf_io, action);
-  XBT_DEBUG("Create io action %p", action);
+  surf_action_set_data(synchro->io.surf_io, synchro);
+  XBT_DEBUG("Create io synchro %p", synchro);
 
-  return action;
+  return synchro;
 }
 
 //SIMIX FILE WRITE
-void SIMIX_pre_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
+void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host)
 {
-  smx_action_t action = SIMIX_file_write(simcall->issuer, fd,  size, host);
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  smx_synchro_t synchro = SIMIX_file_write(fd,  size, host);
+  xbt_fifo_push(synchro->simcalls, simcall);
+  simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_action_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host)
+smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
 
   /* check if the host is active */
   if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
@@ -101,33 +101,33 @@ smx_action_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t si
            sg_host_name(host));
   }
 
-  action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_IO;
-  action->name = NULL;
+  synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
+  synchro->type = SIMIX_SYNC_IO;
+  synchro->name = NULL;
 #ifdef HAVE_TRACING
-  action->category = NULL;
+  synchro->category = NULL;
 #endif
 
-  action->io.host = host;
-  action->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
+  synchro->io.host = host;
+  synchro->io.surf_io = surf_workstation_write(host, fd->surf_file, size);
 
-  surf_action_set_data(action->io.surf_io, action);
-  XBT_DEBUG("Create io action %p", action);
+  surf_action_set_data(synchro->io.surf_io, synchro);
+  XBT_DEBUG("Create io synchro %p", synchro);
 
-  return action;
+  return synchro;
 }
 
 //SIMIX FILE OPEN
-void SIMIX_pre_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host)
+void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host)
 {
-  smx_action_t action = SIMIX_file_open(simcall->issuer, fullpath, host);
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  smx_synchro_t synchro = SIMIX_file_open(fullpath, host);
+  xbt_fifo_push(synchro->simcalls, simcall);
+  simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_action_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_host_t host)
+smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
 
   /* check if the host is active */
   if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
@@ -135,33 +135,33 @@ smx_action_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_ho
            sg_host_name(host));
   }
 
-  action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_IO;
-  action->name = NULL;
+  synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
+  synchro->type = SIMIX_SYNC_IO;
+  synchro->name = NULL;
 #ifdef HAVE_TRACING
-  action->category = NULL;
+  synchro->category = NULL;
 #endif
 
-  action->io.host = host;
-  action->io.surf_io = surf_workstation_open(host, fullpath);
+  synchro->io.host = host;
+  synchro->io.surf_io = surf_workstation_open(host, fullpath);
 
-  surf_action_set_data(action->io.surf_io, action);
-  XBT_DEBUG("Create io action %p", action);
+  surf_action_set_data(synchro->io.surf_io, synchro);
+  XBT_DEBUG("Create io synchro %p", synchro);
 
-  return action;
+  return synchro;
 }
 
 //SIMIX FILE CLOSE
-void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host)
+void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host)
 {
-  smx_action_t action = SIMIX_file_close(simcall->issuer, fd, host);
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  smx_synchro_t synchro = SIMIX_file_close(fd, host);
+  xbt_fifo_push(synchro->simcalls, simcall);
+  simcall->issuer->waiting_synchro = synchro;
 }
 
-smx_action_t SIMIX_file_close(smx_process_t process, smx_file_t fd, smx_host_t host)
+smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
 
   /* check if the host is active */
   if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
@@ -169,30 +169,25 @@ smx_action_t SIMIX_file_close(smx_process_t process, smx_file_t fd, smx_host_t h
            sg_host_name(host));
   }
 
-  action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_IO;
-  action->name = NULL;
+  synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
+  synchro->type = SIMIX_SYNC_IO;
+  synchro->name = NULL;
 #ifdef HAVE_TRACING
-  action->category = NULL;
+  synchro->category = NULL;
 #endif
 
-  action->io.host = host;
-  action->io.surf_io = surf_workstation_close(host, fd->surf_file);
+  synchro->io.host = host;
+  synchro->io.surf_io = surf_workstation_close(host, fd->surf_file);
 
-  surf_action_set_data(action->io.surf_io, action);
-  XBT_DEBUG("Create io action %p", action);
+  surf_action_set_data(synchro->io.surf_io, synchro);
+  XBT_DEBUG("Create io synchro %p", synchro);
 
-  return action;
+  return synchro;
 }
 
 
 //SIMIX FILE UNLINK
-int SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host)
-{
-  return SIMIX_file_unlink(simcall->issuer, fd, host);
-}
-
-int SIMIX_file_unlink(smx_process_t process, smx_file_t fd, smx_host_t host)
+int SIMIX_file_unlink(smx_file_t fd, smx_host_t host)
 {
   /* check if the host is active */
   if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
@@ -205,7 +200,7 @@ int SIMIX_file_unlink(smx_process_t process, smx_file_t fd, smx_host_t host)
   return !!res;
 }
 
-sg_size_t SIMIX_pre_file_get_size(smx_simcall_t simcall, smx_file_t fd)
+sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd)
 {
   return SIMIX_file_get_size(simcall->issuer, fd);
 }
@@ -216,7 +211,7 @@ sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd)
   return  surf_workstation_get_size(host, fd->surf_file);
 }
 
-sg_size_t SIMIX_pre_file_tell(smx_simcall_t simcall, smx_file_t fd)
+sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd)
 {
   return SIMIX_file_tell(simcall->issuer, fd);
 }
@@ -228,7 +223,7 @@ sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd)
 }
 
 
-xbt_dynar_t SIMIX_pre_file_get_info(smx_simcall_t simcall, smx_file_t fd)
+xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd)
 {
   return SIMIX_file_get_info(simcall->issuer, fd);
 }
@@ -239,7 +234,7 @@ xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd)
   return  surf_workstation_get_info(host, fd->surf_file);
 }
 
-int SIMIX_pre_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin)
+int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin)
 {
   return SIMIX_file_seek(simcall->issuer, fd, offset, origin);
 }
@@ -250,7 +245,7 @@ int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, in
   return  surf_workstation_file_seek(host, fd->surf_file, offset, origin);
 }
 
-int SIMIX_pre_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath)
+int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath)
 {
   return SIMIX_file_move(simcall->issuer, file, fullpath);
 }
@@ -266,7 +261,7 @@ sg_size_t SIMIX_storage_get_size(smx_storage_t storage){
   return surf_storage_get_size(storage);
 }
 
-sg_size_t SIMIX_pre_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage)
+sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage)
 {
   return SIMIX_storage_get_free_size(simcall->issuer, storage);
 }
@@ -276,7 +271,7 @@ sg_size_t SIMIX_storage_get_free_size(smx_process_t process, smx_storage_t stora
   return  surf_storage_get_free_size(storage);
 }
 
-sg_size_t SIMIX_pre_storage_get_used_size(smx_simcall_t simcall, smx_storage_t storage)
+sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t storage)
 {
   return SIMIX_storage_get_used_size(simcall->issuer, storage);
 }
@@ -286,51 +281,36 @@ sg_size_t SIMIX_storage_get_used_size(smx_process_t process, smx_storage_t stora
   return  surf_storage_get_used_size(storage);
 }
 
-xbt_dict_t SIMIX_pre_storage_get_properties(smx_simcall_t simcall, smx_storage_t storage){
-  return SIMIX_storage_get_properties(storage);
-}
 xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){
   xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
   return surf_resource_get_properties(surf_storage_resource_priv(storage));
 }
 
-const char* SIMIX_pre_storage_get_name(smx_simcall_t simcall, smx_storage_t storage){
-   return SIMIX_storage_get_name(storage);
-}
-
 const char* SIMIX_storage_get_name(smx_storage_t storage){
   xbt_assert((storage != NULL), "Invalid parameters");
   return sg_storage_name(storage);
 }
 
-xbt_dict_t SIMIX_pre_storage_get_content(smx_simcall_t simcall, smx_storage_t storage){
-  return SIMIX_storage_get_content(storage);
-}
-
 xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage){
   xbt_assert((storage != NULL), "Invalid parameters (simix storage is NULL)");
   return surf_storage_get_content(storage);
 }
 
-const char* SIMIX_pre_storage_get_host(smx_simcall_t simcall, smx_storage_t storage){
-   return SIMIX_storage_get_host(storage);
-}
-
 const char* SIMIX_storage_get_host(smx_storage_t storage){
   xbt_assert((storage != NULL), "Invalid parameters");
   return surf_storage_get_host(storage);
 }
 
-void SIMIX_post_io(smx_action_t action)
+void SIMIX_post_io(smx_synchro_t synchro)
 {
   xbt_fifo_item_t i;
   smx_simcall_t simcall;
 
-  xbt_fifo_foreach(action->simcalls,i,simcall,smx_simcall_t) {
+  xbt_fifo_foreach(synchro->simcalls,i,simcall,smx_simcall_t) {
     switch (simcall->call) {
     case SIMCALL_FILE_OPEN: {
       smx_file_t tmp = xbt_new(s_smx_file_t,1);
-      tmp->surf_file = surf_storage_action_get_file(action->io.surf_io);
+      tmp->surf_file = surf_storage_action_get_file(synchro->io.surf_io);
       simcall_file_open__set__result(simcall, tmp);
       break;
     }
@@ -339,11 +319,11 @@ void SIMIX_post_io(smx_action_t action)
       simcall_file_close__set__result(simcall, 0);
       break;
     case SIMCALL_FILE_WRITE:
-      simcall_file_write__set__result(simcall, surf_action_get_cost(action->io.surf_io));
+      simcall_file_write__set__result(simcall, surf_action_get_cost(synchro->io.surf_io));
       break;
 
     case SIMCALL_FILE_READ:
-      simcall_file_read__set__result(simcall, surf_action_get_cost(action->io.surf_io));
+      simcall_file_read__set__result(simcall, surf_action_get_cost(synchro->io.surf_io));
       break;
 
     default:
@@ -351,14 +331,14 @@ void SIMIX_post_io(smx_action_t action)
     }
   }
 
-  switch (surf_action_get_state(action->io.surf_io)) {
+  switch (surf_action_get_state(synchro->io.surf_io)) {
 
     case SURF_ACTION_FAILED:
-      action->state = SIMIX_FAILED;
+      synchro->state = SIMIX_FAILED;
       break;
 
     case SURF_ACTION_DONE:
-      action->state = SIMIX_DONE;
+      synchro->state = SIMIX_DONE;
       break;
 
     default:
@@ -366,28 +346,28 @@ void SIMIX_post_io(smx_action_t action)
       break;
   }
 
-  SIMIX_io_finish(action);
+  SIMIX_io_finish(synchro);
 }
 
-void SIMIX_io_destroy(smx_action_t action)
+void SIMIX_io_destroy(smx_synchro_t synchro)
 {
-  XBT_DEBUG("Destroy action %p", action);
-  if (action->io.surf_io)
-    surf_action_unref(action->io.surf_io);
-  xbt_mallocator_release(simix_global->action_mallocator, action);
+  XBT_DEBUG("Destroy synchro %p", synchro);
+  if (synchro->io.surf_io)
+    surf_action_unref(synchro->io.surf_io);
+  xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
 }
 
-void SIMIX_io_finish(smx_action_t action)
+void SIMIX_io_finish(smx_synchro_t synchro)
 {
   xbt_fifo_item_t item;
   smx_simcall_t simcall;
 
-  xbt_fifo_foreach(action->simcalls, item, simcall, smx_simcall_t) {
+  xbt_fifo_foreach(synchro->simcalls, item, simcall, smx_simcall_t) {
 
-    switch (action->state) {
+    switch (synchro->state) {
 
       case SIMIX_DONE:
-        /* do nothing, action done */
+        /* do nothing, synchro done */
         break;
 
       case SIMIX_FAILED:
@@ -399,18 +379,18 @@ void SIMIX_io_finish(smx_action_t action)
         break;
 
       default:
-        xbt_die("Internal error in SIMIX_io_finish: unexpected action state %d",
-            (int)action->state);
+        xbt_die("Internal error in SIMIX_io_finish: unexpected synchro state %d",
+            (int)synchro->state);
     }
 
     if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
       simcall->issuer->context->iwannadie = 1;
     }
 
-    simcall->issuer->waiting_action = NULL;
+    simcall->issuer->waiting_synchro = NULL;
     SIMIX_simcall_answer(simcall);
   }
 
   /* We no longer need it */
-  SIMIX_io_destroy(action);
+  SIMIX_io_destroy(synchro);
 }
index 9750c40..1cc843d 100644 (file)
@@ -8,7 +8,7 @@
 #define _SIMIX_IO_PRIVATE_H
 
 #include "simgrid/simix.h"
-#include "smx_smurf_private.h"
+#include "popping_private.h"
 
 /** @brief Storage datatype */
 typedef struct s_smx_storage_priv {
@@ -22,45 +22,26 @@ static inline smx_storage_priv_t SIMIX_storage_priv(smx_storage_t storage){
 
 smx_storage_t SIMIX_storage_create(const char *name, void *storage, void *data);
 void SIMIX_storage_destroy(void *s);
-void SIMIX_pre_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host);
-void SIMIX_pre_file_write(smx_simcall_t simcall,smx_file_t fd, sg_size_t size, smx_host_t host);
-void SIMIX_pre_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host);
-void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host);
-int SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host);
-sg_size_t SIMIX_pre_file_get_size(smx_simcall_t simcall, smx_file_t fd);
-sg_size_t SIMIX_pre_file_tell(smx_simcall_t simcall, smx_file_t fd);
-xbt_dynar_t SIMIX_pre_file_get_info(smx_simcall_t simcall, smx_file_t fd);
-int SIMIX_pre_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin);
-int SIMIX_pre_file_move(smx_simcall_t simcall, smx_file_t fd, const char* fullpath);
-smx_action_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host);
-smx_action_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host);
-smx_action_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_host_t host);
-smx_action_t SIMIX_file_close(smx_process_t process, smx_file_t fd, smx_host_t host);
-int SIMIX_file_unlink(smx_process_t process, smx_file_t fd, smx_host_t host);
+smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host);
+smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host);
+smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host);
+smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host);
+int SIMIX_file_unlink(smx_file_t fd, smx_host_t host);
 sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd);
 sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd);
 xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd);
 int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, int origin);
 int SIMIX_file_move(smx_process_t process, smx_file_t fd, const char* fullpath);
 
-sg_size_t SIMIX_pre_storage_get_free_size(smx_simcall_t simcall,smx_storage_t storage);
-sg_size_t SIMIX_storage_get_free_size(smx_process_t process,smx_storage_t storage);
-
-sg_size_t SIMIX_pre_storage_get_used_size(smx_simcall_t simcall,smx_storage_t storage);
-sg_size_t SIMIX_storage_get_used_size(smx_process_t process,smx_storage_t storage);
+sg_size_t SIMIX_storage_get_free_size(smx_process_t process, smx_storage_t storage);
+sg_size_t SIMIX_storage_get_used_size(smx_process_t process, smx_storage_t storage);
 
 xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage);
-xbt_dict_t SIMIX_pre_storage_get_properties(smx_simcall_t, smx_storage_t);
 
-xbt_dict_t SIMIX_pre_storage_get_content(smx_simcall_t simcall, smx_storage_t storage);
 xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage);
 
-const char* SIMIX_pre_storage_get_name(smx_simcall_t simcall, smx_storage_t storage);
-const char* SIMIX_pre_storage_get_host(smx_simcall_t simcall, smx_storage_t storage);
-void SIMIX_post_io(smx_action_t action);
-void SIMIX_io_destroy(smx_action_t action);
-void SIMIX_io_finish(smx_action_t action);
-
-// pre prototypes
+void SIMIX_post_io(smx_synchro_t synchro);
+void SIMIX_io_destroy(smx_synchro_t synchro);
+void SIMIX_io_finish(smx_synchro_t synchro);
 
 #endif
index de52181..089c68e 100644 (file)
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_network, simix,
-                                "Logging specific to SIMIX (network)");
+                                "SIMIX network-related synchronization");
 
 static xbt_dict_t rdv_points = NULL;
 XBT_EXPORT_NO_IMPORT(unsigned long int) smx_total_comms = 0;
 
 static void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall);
-static void SIMIX_comm_copy_data(smx_action_t comm);
-static smx_action_t SIMIX_comm_new(e_smx_comm_type_t type);
-static XBT_INLINE void SIMIX_rdv_push(smx_rdv_t rdv, smx_action_t comm);
-static smx_action_t SIMIX_fifo_probe_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
-                                        int (*match_fun)(void *, void *,smx_action_t),
-                                        void *user_data, smx_action_t my_action);
-static smx_action_t SIMIX_fifo_get_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
-                                        int (*match_fun)(void *, void *,smx_action_t),
-                                        void *user_data, smx_action_t my_action);
+static void SIMIX_comm_copy_data(smx_synchro_t comm);
+static smx_synchro_t SIMIX_comm_new(e_smx_comm_type_t type);
+static XBT_INLINE void SIMIX_rdv_push(smx_rdv_t rdv, smx_synchro_t comm);
+static smx_synchro_t SIMIX_fifo_probe_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
+                                        int (*match_fun)(void *, void *,smx_synchro_t),
+                                        void *user_data, smx_synchro_t my_synchro);
+static smx_synchro_t SIMIX_fifo_get_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
+                                        int (*match_fun)(void *, void *,smx_synchro_t),
+                                        void *user_data, smx_synchro_t my_synchro);
 static void SIMIX_rdv_free(void *data);
-static void SIMIX_comm_start(smx_action_t action);
+static void SIMIX_comm_start(smx_synchro_t synchro);
 
 void SIMIX_network_init(void)
 {
@@ -44,9 +44,6 @@ void SIMIX_network_exit(void)
 /*                           Rendez-Vous Points                               */
 /******************************************************************************/
 
-smx_rdv_t SIMIX_pre_rdv_create(smx_simcall_t simcall, const char *name){
-  return SIMIX_rdv_create(name);
-}
 smx_rdv_t SIMIX_rdv_create(const char *name)
 {
   /* two processes may have pushed the same rdv_create simcall at the same time */
@@ -67,9 +64,6 @@ smx_rdv_t SIMIX_rdv_create(const char *name)
   return rdv;
 }
 
-void SIMIX_pre_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv){
-  return SIMIX_rdv_destroy(rdv);
-}
 void SIMIX_rdv_destroy(smx_rdv_t rdv)
 {
   if (rdv->name)
@@ -92,24 +86,18 @@ xbt_dict_t SIMIX_get_rdv_points()
   return rdv_points;
 }
 
-smx_rdv_t SIMIX_pre_rdv_get_by_name(smx_simcall_t simcall, const char *name){
-  return SIMIX_rdv_get_by_name(name);
-}
 smx_rdv_t SIMIX_rdv_get_by_name(const char *name)
 {
   return xbt_dict_get_or_null(rdv_points, name);
 }
 
-int SIMIX_pre_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host){
-  return SIMIX_rdv_comm_count_by_host(rdv, host);
-}
 int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
 {
-  smx_action_t comm = NULL;
+  smx_synchro_t comm = NULL;
   xbt_fifo_item_t item = NULL;
   int count = 0;
 
-  xbt_fifo_foreach(rdv->comm_fifo, item, comm, smx_action_t) {
+  xbt_fifo_foreach(rdv->comm_fifo, item, comm, smx_synchro_t) {
     if (comm->comm.src_proc->smx_host == host)
       count++;
   }
@@ -117,17 +105,11 @@ int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host)
   return count;
 }
 
-smx_action_t SIMIX_pre_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv){
-  return SIMIX_rdv_get_head(rdv);
-}
-smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv)
+smx_synchro_t SIMIX_rdv_get_head(smx_rdv_t rdv)
 {
   return xbt_fifo_get_item_content(xbt_fifo_get_first_item(rdv->comm_fifo));
 }
 
-smx_process_t SIMIX_pre_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv){
-  return SIMIX_rdv_get_receiver(rdv);
-}
 /**
  *  \brief get the receiver (process associated to the mailbox)
  *  \param rdv The rendez-vous point
@@ -138,10 +120,6 @@ smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv)
   return rdv->permanent_receiver;
 }
 
-void SIMIX_pre_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv,
-                           smx_process_t process){
-  SIMIX_rdv_set_receiver(rdv, process);
-}
 /**
  *  \brief set the receiver of the rendez vous point to allow eager sends
  *  \param rdv The rendez-vous point
@@ -153,339 +131,339 @@ void SIMIX_rdv_set_receiver(smx_rdv_t rdv, smx_process_t process)
 }
 
 /**
- *  \brief Pushes a communication action into a rendez-vous point
+ *  \brief Pushes a communication synchro into a rendez-vous point
  *  \param rdv The rendez-vous point
- *  \param comm The communication action
+ *  \param comm The communication synchro
  */
-static XBT_INLINE void SIMIX_rdv_push(smx_rdv_t rdv, smx_action_t comm)
+static XBT_INLINE void SIMIX_rdv_push(smx_rdv_t rdv, smx_synchro_t comm)
 {
   xbt_fifo_push(rdv->comm_fifo, comm);
   comm->comm.rdv = rdv;
 }
 
 /**
- *  \brief Removes a communication action from a rendez-vous point
+ *  \brief Removes a communication synchro from a rendez-vous point
  *  \param rdv The rendez-vous point
- *  \param comm The communication action
+ *  \param comm The communication synchro
  */
-XBT_INLINE void SIMIX_rdv_remove(smx_rdv_t rdv, smx_action_t comm)
+XBT_INLINE void SIMIX_rdv_remove(smx_rdv_t rdv, smx_synchro_t comm)
 {
   xbt_fifo_remove(rdv->comm_fifo, comm);
   comm->comm.rdv = NULL;
 }
 
 /**
- *  \brief Checks if there is a communication action queued in a fifo matching our needs
+ *  \brief Checks if there is a communication synchro queued in a fifo matching our needs
  *  \param type The type of communication we are looking for (comm_send, comm_recv)
- *  \return The communication action if found, NULL otherwise
+ *  \return The communication synchro if found, NULL otherwise
  */
-smx_action_t SIMIX_fifo_get_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
-                                 int (*match_fun)(void *, void *,smx_action_t),
-                                 void *this_user_data, smx_action_t my_action)
+smx_synchro_t SIMIX_fifo_get_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
+                                 int (*match_fun)(void *, void *,smx_synchro_t),
+                                 void *this_user_data, smx_synchro_t my_synchro)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
   xbt_fifo_item_t item;
   void* other_user_data = NULL;
 
-  xbt_fifo_foreach(fifo, item, action, smx_action_t) {
-    if (action->comm.type == SIMIX_COMM_SEND) {
-      other_user_data = action->comm.src_data;
-    } else if (action->comm.type == SIMIX_COMM_RECEIVE) {
-      other_user_data = action->comm.dst_data;
+  xbt_fifo_foreach(fifo, item, synchro, smx_synchro_t) {
+    if (synchro->comm.type == SIMIX_COMM_SEND) {
+      other_user_data = synchro->comm.src_data;
+    } else if (synchro->comm.type == SIMIX_COMM_RECEIVE) {
+      other_user_data = synchro->comm.dst_data;
     }
-    if (action->comm.type == type &&
-        (!match_fun              ||              match_fun(this_user_data,  other_user_data, action)) &&
-        (!action->comm.match_fun || action->comm.match_fun(other_user_data, this_user_data,  my_action))) {
-      XBT_DEBUG("Found a matching communication action %p", action);
+    if (synchro->comm.type == type &&
+        (!match_fun              ||              match_fun(this_user_data,  other_user_data, synchro)) &&
+        (!synchro->comm.match_fun || synchro->comm.match_fun(other_user_data, this_user_data,  my_synchro))) {
+      XBT_DEBUG("Found a matching communication synchro %p", synchro);
       xbt_fifo_remove_item(fifo, item);
       xbt_fifo_free_item(item);
-      action->comm.refcount++;
+      synchro->comm.refcount++;
 #ifdef HAVE_MC
-      action->comm.rdv_cpy = action->comm.rdv;
+      synchro->comm.rdv_cpy = synchro->comm.rdv;
 #endif
-      action->comm.rdv = NULL;
-      return action;
+      synchro->comm.rdv = NULL;
+      return synchro;
     }
-    XBT_DEBUG("Sorry, communication action %p does not match our needs:"
+    XBT_DEBUG("Sorry, communication synchro %p does not match our needs:"
               " its type is %d but we are looking for a comm of type %d (or maybe the filtering didn't match)",
-              action, (int)action->comm.type, (int)type);
+              synchro, (int)synchro->comm.type, (int)type);
   }
-  XBT_DEBUG("No matching communication action found");
+  XBT_DEBUG("No matching communication synchro found");
   return NULL;
 }
 
 
 /**
- *  \brief Checks if there is a communication action queued in a fifo matching our needs, but leave it there
+ *  \brief Checks if there is a communication synchro queued in a fifo matching our needs, but leave it there
  *  \param type The type of communication we are looking for (comm_send, comm_recv)
- *  \return The communication action if found, NULL otherwise
+ *  \return The communication synchro if found, NULL otherwise
  */
-smx_action_t SIMIX_fifo_probe_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
-                                 int (*match_fun)(void *, void *,smx_action_t),
-                                 void *this_user_data, smx_action_t my_action)
+smx_synchro_t SIMIX_fifo_probe_comm(xbt_fifo_t fifo, e_smx_comm_type_t type,
+                                 int (*match_fun)(void *, void *,smx_synchro_t),
+                                 void *this_user_data, smx_synchro_t my_synchro)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
   xbt_fifo_item_t item;
   void* other_user_data = NULL;
 
-  xbt_fifo_foreach(fifo, item, action, smx_action_t) {
-    if (action->comm.type == SIMIX_COMM_SEND) {
-      other_user_data = action->comm.src_data;
-    } else if (action->comm.type == SIMIX_COMM_RECEIVE) {
-      other_user_data = action->comm.dst_data;
+  xbt_fifo_foreach(fifo, item, synchro, smx_synchro_t) {
+    if (synchro->comm.type == SIMIX_COMM_SEND) {
+      other_user_data = synchro->comm.src_data;
+    } else if (synchro->comm.type == SIMIX_COMM_RECEIVE) {
+      other_user_data = synchro->comm.dst_data;
     }
-    if (action->comm.type == type &&
-        (!match_fun              ||              match_fun(this_user_data,  other_user_data, action)) &&
-        (!action->comm.match_fun || action->comm.match_fun(other_user_data, this_user_data,  my_action))) {
-      XBT_DEBUG("Found a matching communication action %p", action);
-      action->comm.refcount++;
+    if (synchro->comm.type == type &&
+        (!match_fun              ||              match_fun(this_user_data,  other_user_data, synchro)) &&
+        (!synchro->comm.match_fun || synchro->comm.match_fun(other_user_data, this_user_data,  my_synchro))) {
+      XBT_DEBUG("Found a matching communication synchro %p", synchro);
+      synchro->comm.refcount++;
 
-      return action;
+      return synchro;
     }
-    XBT_DEBUG("Sorry, communication action %p does not match our needs:"
+    XBT_DEBUG("Sorry, communication synchro %p does not match our needs:"
               " its type is %d but we are looking for a comm of type %d (or maybe the filtering didn't match)",
-              action, (int)action->comm.type, (int)type);
+              synchro, (int)synchro->comm.type, (int)type);
   }
-  XBT_DEBUG("No matching communication action found");
+  XBT_DEBUG("No matching communication synchro found");
   return NULL;
 }
 /******************************************************************************/
-/*                            Communication Actions                            */
+/*                          Communication synchros                            */
 /******************************************************************************/
 
 /**
- *  \brief Creates a new communicate action
+ *  \brief Creates a new communicate synchro
  *  \param type The direction of communication (comm_send, comm_recv)
- *  \return The new communicate action
+ *  \return The new communicate synchro
  */
-smx_action_t SIMIX_comm_new(e_smx_comm_type_t type)
+smx_synchro_t SIMIX_comm_new(e_smx_comm_type_t type)
 {
-  smx_action_t act;
+  smx_synchro_t synchro;
 
   /* alloc structures */
-  act = xbt_mallocator_get(simix_global->action_mallocator);
+  synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
 
-  act->type = SIMIX_ACTION_COMMUNICATE;
-  act->state = SIMIX_WAITING;
+  synchro->type = SIMIX_SYNC_COMMUNICATE;
+  synchro->state = SIMIX_WAITING;
 
   /* set communication */
-  act->comm.type = type;
-  act->comm.refcount = 1;
-  act->comm.src_data=NULL;
-  act->comm.dst_data=NULL;
+  synchro->comm.type = type;
+  synchro->comm.refcount = 1;
+  synchro->comm.src_data=NULL;
+  synchro->comm.dst_data=NULL;
 
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
   //initialize with unknown value
-  act->latency_limited = -1;
+  synchro->latency_limited = -1;
 #endif
 
 #ifdef HAVE_TRACING
-  act->category = NULL;
+  synchro->category = NULL;
 #endif
 
-  XBT_DEBUG("Create communicate action %p", act);
+  XBT_DEBUG("Create communicate synchro %p", synchro);
   ++smx_total_comms;
 
-  return act;
+  return synchro;
 }
 
 /**
- *  \brief Destroy a communicate action
- *  \param action The communicate action to be destroyed
+ *  \brief Destroy a communicate synchro
+ *  \param synchro The communicate synchro to be destroyed
  */
-void SIMIX_comm_destroy(smx_action_t action)
+void SIMIX_comm_destroy(smx_synchro_t synchro)
 {
-  XBT_DEBUG("Destroy action %p (refcount: %d), state: %d",
-            action, action->comm.refcount, (int)action->state);
+  XBT_DEBUG("Destroy synchro %p (refcount: %d), state: %d",
+            synchro, synchro->comm.refcount, (int)synchro->state);
 
-  if (action->comm.refcount <= 0) {
+  if (synchro->comm.refcount <= 0) {
     xbt_backtrace_display_current();
     xbt_die("The refcount of comm %p is already 0 before decreasing it. "
-            "That's a bug! If you didn't test and/or wait the same communication twice in your code, then the bug is SimGrid's...", action);
+            "That's a bug! If you didn't test and/or wait the same communication twice in your code, then the bug is SimGrid's...", synchro);
   }
-  action->comm.refcount--;
-  if (action->comm.refcount > 0)
+  synchro->comm.refcount--;
+  if (synchro->comm.refcount > 0)
       return;
-  XBT_DEBUG("Really free communication %p; refcount is now %d", action,
-            action->comm.refcount);
+  XBT_DEBUG("Really free communication %p; refcount is now %d", synchro,
+      synchro->comm.refcount);
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-  action->latency_limited = SIMIX_comm_is_latency_bounded( action ) ;
+  synchro->latency_limited = SIMIX_comm_is_latency_bounded( synchro ) ;
 #endif
 
-  xbt_free(action->name);
-  SIMIX_comm_destroy_internal_actions(action);
+  xbt_free(synchro->name);
+  SIMIX_comm_destroy_internal_actions(synchro);
 
-  if (action->comm.detached && action->state != SIMIX_DONE) {
+  if (synchro->comm.detached && synchro->state != SIMIX_DONE) {
     /* the communication has failed and was detached:
      * we have to free the buffer */
-    if (action->comm.clean_fun) {
-      action->comm.clean_fun(action->comm.src_buff);
+    if (synchro->comm.clean_fun) {
+      synchro->comm.clean_fun(synchro->comm.src_buff);
     }
-    action->comm.src_buff = NULL;
+    synchro->comm.src_buff = NULL;
   }
 
-  if(action->comm.rdv)
-    SIMIX_rdv_remove(action->comm.rdv, action);
+  if(synchro->comm.rdv)
+    SIMIX_rdv_remove(synchro->comm.rdv, synchro);
 
-  xbt_mallocator_release(simix_global->action_mallocator, action);
+  xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
 }
 
-void SIMIX_comm_destroy_internal_actions(smx_action_t action)
+void SIMIX_comm_destroy_internal_actions(smx_synchro_t synchro)
 {
-  if (action->comm.surf_comm){
+  if (synchro->comm.surf_comm){
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-    action->latency_limited = SIMIX_comm_is_latency_bounded(action);
+    synchro->latency_limited = SIMIX_comm_is_latency_bounded(synchro);
 #endif
-    surf_action_unref(action->comm.surf_comm);
-    action->comm.surf_comm = NULL;
+    surf_action_unref(synchro->comm.surf_comm);
+    synchro->comm.surf_comm = NULL;
   }
 
-  if (action->comm.src_timeout){
-    surf_action_unref(action->comm.src_timeout);
-    action->comm.src_timeout = NULL;
+  if (synchro->comm.src_timeout){
+    surf_action_unref(synchro->comm.src_timeout);
+    synchro->comm.src_timeout = NULL;
   }
 
-  if (action->comm.dst_timeout){
-    surf_action_unref(action->comm.dst_timeout);
-    action->comm.dst_timeout = NULL;
+  if (synchro->comm.dst_timeout){
+    surf_action_unref(synchro->comm.dst_timeout);
+    synchro->comm.dst_timeout = NULL;
   }
 }
 
-void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
+void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
                                   double task_size, double rate,
                                   void *src_buff, size_t src_buff_size,
-                                  int (*match_fun)(void *, void *,smx_action_t),
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
+                                  int (*match_fun)(void *, void *,smx_synchro_t),
+                                  void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                  void *data, double timeout){
-  smx_action_t comm = SIMIX_comm_isend(src, rdv, task_size, rate,
+  smx_synchro_t comm = SIMIX_comm_isend(src, rdv, task_size, rate,
                                       src_buff, src_buff_size, match_fun, NULL, copy_data_fun,
                                       data, 0);
   SIMCALL_SET_MC_VALUE(simcall, 0);
-  SIMIX_pre_comm_wait(simcall, comm, timeout);
+  simcall_HANDLER_comm_wait(simcall, comm, timeout);
 }
-smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
+smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
                                   double task_size, double rate,
                                   void *src_buff, size_t src_buff_size,
-                                  int (*match_fun)(void *, void *,smx_action_t),
+                                  int (*match_fun)(void *, void *,smx_synchro_t),
                                   void (*clean_fun)(void *),
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
+                                  void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                  void *data, int detached){
   return SIMIX_comm_isend(src, rdv, task_size, rate, src_buff,
                          src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
 
 }
-smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
+smx_synchro_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
                               double task_size, double rate,
                               void *src_buff, size_t src_buff_size,
-                              int (*match_fun)(void *, void *,smx_action_t),
-                              void (*clean_fun)(void *), // used to free the action in case of problem after a detached send
-                              void (*copy_data_fun)(smx_action_t, void*, size_t), // used to copy data if not default one
+                              int (*match_fun)(void *, void *,smx_synchro_t),
+                              void (*clean_fun)(void *), // used to free the synchro in case of problem after a detached send
+                              void (*copy_data_fun)(smx_synchro_t, void*, size_t), // used to copy data if not default one
                               void *data,
                               int detached)
 {
   XBT_DEBUG("send from %p", rdv);
 
-  /* Prepare an action describing us, so that it gets passed to the user-provided filter of other side */
-  smx_action_t this_action = SIMIX_comm_new(SIMIX_COMM_SEND);
+  /* Prepare a synchro describing us, so that it gets passed to the user-provided filter of other side */
+  smx_synchro_t this_synchro = SIMIX_comm_new(SIMIX_COMM_SEND);
 
-  /* Look for communication action matching our needs. We also provide a description of
+  /* Look for communication synchro matching our needs. We also provide a description of
    * ourself so that the other side also gets a chance of choosing if it wants to match with us.
    *
    * If it is not found then push our communication into the rendez-vous point */
-  smx_action_t other_action = SIMIX_fifo_get_comm(rdv->comm_fifo, SIMIX_COMM_RECEIVE, match_fun, data, this_action);
+  smx_synchro_t other_synchro = SIMIX_fifo_get_comm(rdv->comm_fifo, SIMIX_COMM_RECEIVE, match_fun, data, this_synchro);
 
-  if (!other_action) {
-    other_action = this_action;
+  if (!other_synchro) {
+    other_synchro = this_synchro;
 
     if (rdv->permanent_receiver!=NULL){
       //this mailbox is for small messages, which have to be sent right now
-      other_action->state = SIMIX_READY;
-      other_action->comm.dst_proc=rdv->permanent_receiver;
-      other_action->comm.refcount++;
-      xbt_fifo_push(rdv->done_comm_fifo,other_action);
-      other_action->comm.rdv=rdv;
-      XBT_DEBUG("pushing a message into the permanent receive fifo %p, comm %p", rdv, &(other_action->comm));
+      other_synchro->state = SIMIX_READY;
+      other_synchro->comm.dst_proc=rdv->permanent_receiver;
+      other_synchro->comm.refcount++;
+      xbt_fifo_push(rdv->done_comm_fifo,other_synchro);
+      other_synchro->comm.rdv=rdv;
+      XBT_DEBUG("pushing a message into the permanent receive fifo %p, comm %p", rdv, &(other_synchro->comm));
 
     }else{
-      SIMIX_rdv_push(rdv, this_action);
+      SIMIX_rdv_push(rdv, this_synchro);
     }
   } else {
     XBT_DEBUG("Receive already pushed");
 
-    SIMIX_comm_destroy(this_action);
+    SIMIX_comm_destroy(this_synchro);
     --smx_total_comms; // this creation was a pure waste
 
-    other_action->state = SIMIX_READY;
-    other_action->comm.type = SIMIX_COMM_READY;
+    other_synchro->state = SIMIX_READY;
+    other_synchro->comm.type = SIMIX_COMM_READY;
 
   }
-  xbt_fifo_push(src_proc->comms, other_action);
+  xbt_fifo_push(src_proc->comms, other_synchro);
 
-  /* if the communication action is detached then decrease the refcount
+  /* if the communication synchro is detached then decrease the refcount
    * by one, so it will be eliminated by the receiver's destroy call */
   if (detached) {
-    other_action->comm.detached = 1;
-    other_action->comm.refcount--;
-    other_action->comm.clean_fun = clean_fun;
+    other_synchro->comm.detached = 1;
+    other_synchro->comm.refcount--;
+    other_synchro->comm.clean_fun = clean_fun;
   } else {
-    other_action->comm.clean_fun = NULL;
+    other_synchro->comm.clean_fun = NULL;
   }
 
-  /* Setup the communication action */
-  other_action->comm.src_proc = src_proc;
-  other_action->comm.task_size = task_size;
-  other_action->comm.rate = rate;
-  other_action->comm.src_buff = src_buff;
-  other_action->comm.src_buff_size = src_buff_size;
-  other_action->comm.src_data = data;
+  /* Setup the communication synchro */
+  other_synchro->comm.src_proc = src_proc;
+  other_synchro->comm.task_size = task_size;
+  other_synchro->comm.rate = rate;
+  other_synchro->comm.src_buff = src_buff;
+  other_synchro->comm.src_buff_size = src_buff_size;
+  other_synchro->comm.src_data = data;
 
-  other_action->comm.match_fun = match_fun;
-  other_action->comm.copy_data_fun = copy_data_fun;
+  other_synchro->comm.match_fun = match_fun;
+  other_synchro->comm.copy_data_fun = copy_data_fun;
 
 
   if (MC_is_active()) {
-    other_action->state = SIMIX_RUNNING;
-    return (detached ? NULL : other_action);
+    other_synchro->state = SIMIX_RUNNING;
+    return (detached ? NULL : other_synchro);
   }
 
-  SIMIX_comm_start(other_action);
-  return (detached ? NULL : other_action);
+  SIMIX_comm_start(other_synchro);
+  return (detached ? NULL : other_synchro);
 }
 
-void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv,
+void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv,
                          void *dst_buff, size_t *dst_buff_size,
-                         int (*match_fun)(void *, void *, smx_action_t),
-                         void (*copy_data_fun)(smx_action_t, void*, size_t),
+                         int (*match_fun)(void *, void *, smx_synchro_t),
+                         void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                          void *data, double timeout, double rate)
 {
-  smx_action_t comm = SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff,
+  smx_synchro_t comm = SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff,
                                       dst_buff_size, match_fun, copy_data_fun, data, rate);
   SIMCALL_SET_MC_VALUE(simcall, 0);
-  SIMIX_pre_comm_wait(simcall, comm, timeout);
+  simcall_HANDLER_comm_wait(simcall, comm, timeout);
 }
 
-smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
+smx_synchro_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
                                   void *dst_buff, size_t *dst_buff_size,
-                                  int (*match_fun)(void *, void *, smx_action_t),
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
+                                  int (*match_fun)(void *, void *, smx_synchro_t),
+                                  void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                                  void *data, double rate)
 {
   return SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff, dst_buff_size,
                          match_fun, copy_data_fun, data, rate);
 }
 
-smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
+smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
                               void *dst_buff, size_t *dst_buff_size,
-                              int (*match_fun)(void *, void *, smx_action_t),
-                              void (*copy_data_fun)(smx_action_t, void*, size_t), // used to copy data if not default one
+                              int (*match_fun)(void *, void *, smx_synchro_t),
+                              void (*copy_data_fun)(smx_synchro_t, void*, size_t), // used to copy data if not default one
                               void *data, double rate)
 {
   XBT_DEBUG("recv from %p %p", rdv, rdv->comm_fifo);
-  smx_action_t this_action = SIMIX_comm_new(SIMIX_COMM_RECEIVE);
+  smx_synchro_t this_synchro = SIMIX_comm_new(SIMIX_COMM_RECEIVE);
 
-  smx_action_t other_action;
+  smx_synchro_t other_synchro;
   //communication already done, get it inside the fifo of completed comms
   //permanent receive v1
   //int already_received=0;
@@ -493,190 +471,190 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
 
     XBT_DEBUG("We have a comm that has probably already been received, trying to match it, to skip the communication");
     //find a match in the already received fifo
-    other_action = SIMIX_fifo_get_comm(rdv->done_comm_fifo, SIMIX_COMM_SEND, match_fun, data, this_action);
+    other_synchro = SIMIX_fifo_get_comm(rdv->done_comm_fifo, SIMIX_COMM_SEND, match_fun, data, this_synchro);
     //if not found, assume the receiver came first, register it to the mailbox in the classical way
-    if (!other_action)  {
+    if (!other_synchro)  {
       XBT_DEBUG("We have messages in the permanent receive list, but not the one we are looking for, pushing request into fifo");
-      other_action = this_action;
-      SIMIX_rdv_push(rdv, this_action);
+      other_synchro = this_synchro;
+      SIMIX_rdv_push(rdv, this_synchro);
     }else{
-      if(other_action->comm.surf_comm &&       SIMIX_comm_get_remains(other_action)==0.0)
+      if(other_synchro->comm.surf_comm &&      SIMIX_comm_get_remains(other_synchro)==0.0)
       {
-        XBT_DEBUG("comm %p has been already sent, and is finished, destroy it",&(other_action->comm));
-        other_action->state = SIMIX_DONE;
-        other_action->comm.type = SIMIX_COMM_DONE;
-        other_action->comm.rdv = NULL;
+        XBT_DEBUG("comm %p has been already sent, and is finished, destroy it",&(other_synchro->comm));
+        other_synchro->state = SIMIX_DONE;
+        other_synchro->comm.type = SIMIX_COMM_DONE;
+        other_synchro->comm.rdv = NULL;
       }/*else{
          XBT_DEBUG("Not yet finished, we have to wait %d", xbt_fifo_size(rdv->comm_fifo));
          }*/
-      other_action->comm.refcount--;
-      SIMIX_comm_destroy(this_action);
+      other_synchro->comm.refcount--;
+      SIMIX_comm_destroy(this_synchro);
       --smx_total_comms; // this creation was a pure waste
     }
   }else{
-    /* Prepare an action describing us, so that it gets passed to the user-provided filter of other side */
+    /* Prepare a synchro describing us, so that it gets passed to the user-provided filter of other side */
 
-    /* Look for communication action matching our needs. We also provide a description of
+    /* Look for communication synchro matching our needs. We also provide a description of
      * ourself so that the other side also gets a chance of choosing if it wants to match with us.
      *
      * If it is not found then push our communication into the rendez-vous point */
-    other_action = SIMIX_fifo_get_comm(rdv->comm_fifo, SIMIX_COMM_SEND, match_fun, data, this_action);
+    other_synchro = SIMIX_fifo_get_comm(rdv->comm_fifo, SIMIX_COMM_SEND, match_fun, data, this_synchro);
 
-    if (!other_action) {
+    if (!other_synchro) {
       XBT_DEBUG("Receive pushed first %d", xbt_fifo_size(rdv->comm_fifo));
-      other_action = this_action;
-      SIMIX_rdv_push(rdv, this_action);
+      other_synchro = this_synchro;
+      SIMIX_rdv_push(rdv, this_synchro);
     } else {
-      SIMIX_comm_destroy(this_action);
+      SIMIX_comm_destroy(this_synchro);
       --smx_total_comms; // this creation was a pure waste
-      other_action->state = SIMIX_READY;
-      other_action->comm.type = SIMIX_COMM_READY;
-      //other_action->comm.refcount--;
+      other_synchro->state = SIMIX_READY;
+      other_synchro->comm.type = SIMIX_COMM_READY;
+      //other_synchro->comm.refcount--;
     }
-    xbt_fifo_push(dst_proc->comms, other_action);
+    xbt_fifo_push(dst_proc->comms, other_synchro);
   }
 
-  /* Setup communication action */
-  other_action->comm.dst_proc = dst_proc;
-  other_action->comm.dst_buff = dst_buff;
-  other_action->comm.dst_buff_size = dst_buff_size;
-  other_action->comm.dst_data = data;
+  /* Setup communication synchro */
+  other_synchro->comm.dst_proc = dst_proc;
+  other_synchro->comm.dst_buff = dst_buff;
+  other_synchro->comm.dst_buff_size = dst_buff_size;
+  other_synchro->comm.dst_data = data;
 
   if (rate != -1.0 &&
-      (other_action->comm.rate == -1.0 || rate < other_action->comm.rate))
-    other_action->comm.rate = rate;
+      (other_synchro->comm.rate == -1.0 || rate < other_synchro->comm.rate))
+    other_synchro->comm.rate = rate;
 
-  other_action->comm.match_fun = match_fun;
-  other_action->comm.copy_data_fun = copy_data_fun;
+  other_synchro->comm.match_fun = match_fun;
+  other_synchro->comm.copy_data_fun = copy_data_fun;
 
 
   /*if(already_received)//do the actual copy, because the first one after the comm didn't have all the info
-    SIMIX_comm_copy_data(other_action);*/
+    SIMIX_comm_copy_data(other_synchro);*/
 
 
   if (MC_is_active()) {
-    other_action->state = SIMIX_RUNNING;
-    return other_action;
+    other_synchro->state = SIMIX_RUNNING;
+    return other_synchro;
   }
 
-  SIMIX_comm_start(other_action);
+  SIMIX_comm_start(other_synchro);
   // }
-  return other_action;
+  return other_synchro;
 }
 
-smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv,
+smx_synchro_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv,
                                    int type, int src, int tag,
-                                   int (*match_fun)(void *, void *, smx_action_t),
+                                   int (*match_fun)(void *, void *, smx_synchro_t),
                                    void *data){
   return SIMIX_comm_iprobe(simcall->issuer, rdv, type, src, tag, match_fun, data);
 }
 
-smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src,
-                              int tag, int (*match_fun)(void *, void *, smx_action_t), void *data)
+smx_synchro_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src,
+                              int tag, int (*match_fun)(void *, void *, smx_synchro_t), void *data)
 {
   XBT_DEBUG("iprobe from %p %p", rdv, rdv->comm_fifo);
-  smx_action_t this_action;
+  smx_synchro_t this_synchro;
   int smx_type;
   if(type == 1){
-    this_action=SIMIX_comm_new(SIMIX_COMM_SEND);
+    this_synchro=SIMIX_comm_new(SIMIX_COMM_SEND);
     smx_type = SIMIX_COMM_RECEIVE;
   } else{
-    this_action=SIMIX_comm_new(SIMIX_COMM_RECEIVE);
+    this_synchro=SIMIX_comm_new(SIMIX_COMM_RECEIVE);
     smx_type = SIMIX_COMM_SEND;
   } 
-  smx_action_t other_action=NULL;
+  smx_synchro_t other_synchro=NULL;
   if(rdv->permanent_receiver && xbt_fifo_size(rdv->done_comm_fifo)!=0){
     //find a match in the already received fifo
       XBT_DEBUG("first try in the perm recv mailbox");
 
-    other_action = SIMIX_fifo_probe_comm(rdv->done_comm_fifo, smx_type, match_fun, data, this_action);
+    other_synchro = SIMIX_fifo_probe_comm(rdv->done_comm_fifo, smx_type, match_fun, data, this_synchro);
   }
  // }else{
-    if(!other_action){
+    if(!other_synchro){
         XBT_DEBUG("try in the normal mailbox");
-        other_action = SIMIX_fifo_probe_comm(rdv->comm_fifo, smx_type, match_fun, data, this_action);
+        other_synchro = SIMIX_fifo_probe_comm(rdv->comm_fifo, smx_type, match_fun, data, this_synchro);
     }
 //  }
-  if(other_action)other_action->comm.refcount--;
+  if(other_synchro)other_synchro->comm.refcount--;
 
-  SIMIX_comm_destroy(this_action);
+  SIMIX_comm_destroy(this_synchro);
   --smx_total_comms;
-  return other_action;
+  return other_synchro;
 }
 
-void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout)
+void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t synchro, double timeout)
 {
   /* the simcall may be a wait, a send or a recv */
   surf_action_t sleep;
 
-  /* Associate this simcall to the wait action */
-  XBT_DEBUG("SIMIX_pre_comm_wait, %p", action);
+  /* Associate this simcall to the wait synchro */
+  XBT_DEBUG("simcall_HANDLER_comm_wait, %p", synchro);
 
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  xbt_fifo_push(synchro->simcalls, simcall);
+  simcall->issuer->waiting_synchro = synchro;
 
   if (MC_is_active()) {
     int idx = SIMCALL_GET_MC_VALUE(simcall);
     if (idx == 0) {
-      action->state = SIMIX_DONE;
+      synchro->state = SIMIX_DONE;
     } else {
       /* If we reached this point, the wait simcall must have a timeout */
       /* Otherwise it shouldn't be enabled and executed by the MC */
       if (timeout == -1)
         THROW_IMPOSSIBLE;
 
-      if (action->comm.src_proc == simcall->issuer)
-        action->state = SIMIX_SRC_TIMEOUT;
+      if (synchro->comm.src_proc == simcall->issuer)
+        synchro->state = SIMIX_SRC_TIMEOUT;
       else
-        action->state = SIMIX_DST_TIMEOUT;
+        synchro->state = SIMIX_DST_TIMEOUT;
     }
 
-    SIMIX_comm_finish(action);
+    SIMIX_comm_finish(synchro);
     return;
   }
 
-  /* If the action has already finish perform the error handling, */
-  /* otherwise set up a waiting timeout on the right side         */
-  if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING) {
-    SIMIX_comm_finish(action);
+  /* If the synchro has already finish perform the error handling, */
+  /* otherwise set up a waiting timeout on the right side          */
+  if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
+    SIMIX_comm_finish(synchro);
   } else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
     sleep = surf_workstation_sleep(simcall->issuer->smx_host, timeout);
-    surf_action_set_data(sleep, action);
+    surf_action_set_data(sleep, synchro);
 
-    if (simcall->issuer == action->comm.src_proc)
-      action->comm.src_timeout = sleep;
+    if (simcall->issuer == synchro->comm.src_proc)
+      synchro->comm.src_timeout = sleep;
     else
-      action->comm.dst_timeout = sleep;
+      synchro->comm.dst_timeout = sleep;
   }
 }
 
-void SIMIX_pre_comm_test(smx_simcall_t simcall, smx_action_t action)
+void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_synchro_t synchro)
 {
   if(MC_is_active()){
-    simcall_comm_test__set__result(simcall, action->comm.src_proc && action->comm.dst_proc);
+    simcall_comm_test__set__result(simcall, synchro->comm.src_proc && synchro->comm.dst_proc);
     if(simcall_comm_test__get__result(simcall)){
-      action->state = SIMIX_DONE;
-      xbt_fifo_push(action->simcalls, simcall);
-      SIMIX_comm_finish(action);
+      synchro->state = SIMIX_DONE;
+      xbt_fifo_push(synchro->simcalls, simcall);
+      SIMIX_comm_finish(synchro);
     }else{
       SIMIX_simcall_answer(simcall);
     }
     return;
   }
 
-  simcall_comm_test__set__result(simcall, (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING));
+  simcall_comm_test__set__result(simcall, (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING));
   if (simcall_comm_test__get__result(simcall)) {
-    xbt_fifo_push(action->simcalls, simcall);
-    SIMIX_comm_finish(action);
+    xbt_fifo_push(synchro->simcalls, simcall);
+    SIMIX_comm_finish(synchro);
   } else {
     SIMIX_simcall_answer(simcall);
   }
 }
 
-void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions)
+void simcall_HANDLER_comm_testany(smx_simcall_t simcall, xbt_dynar_t synchros)
 {
   unsigned int cursor;
-  smx_action_t action;
+  smx_synchro_t synchro;
   simcall_comm_testany__set__result(simcall, -1);
 
   if (MC_is_active()){
@@ -684,48 +662,48 @@ void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions)
     if(idx == -1){
       SIMIX_simcall_answer(simcall);
     }else{
-      action = xbt_dynar_get_as(actions, idx, smx_action_t);
+      synchro = xbt_dynar_get_as(synchros, idx, smx_synchro_t);
       simcall_comm_testany__set__result(simcall, idx);
-      xbt_fifo_push(action->simcalls, simcall);
-      action->state = SIMIX_DONE;
-      SIMIX_comm_finish(action);
+      xbt_fifo_push(synchro->simcalls, simcall);
+      synchro->state = SIMIX_DONE;
+      SIMIX_comm_finish(synchro);
     }
     return;
   }
 
-  xbt_dynar_foreach(simcall_comm_testany__get__comms(simcall), cursor,action) {
-    if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING) {
+  xbt_dynar_foreach(simcall_comm_testany__get__comms(simcall), cursor,synchro) {
+    if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
       simcall_comm_testany__set__result(simcall, cursor);
-      xbt_fifo_push(action->simcalls, simcall);
-      SIMIX_comm_finish(action);
+      xbt_fifo_push(synchro->simcalls, simcall);
+      SIMIX_comm_finish(synchro);
       return;
     }
   }
   SIMIX_simcall_answer(simcall);
 }
 
-void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions)
+void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t synchros)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
   unsigned int cursor = 0;
 
   if (MC_is_active()){
     int idx = SIMCALL_GET_MC_VALUE(simcall);
-    action = xbt_dynar_get_as(actions, idx, smx_action_t);
-    xbt_fifo_push(action->simcalls, simcall);
+    synchro = xbt_dynar_get_as(synchros, idx, smx_synchro_t);
+    xbt_fifo_push(synchro->simcalls, simcall);
     simcall_comm_waitany__set__result(simcall, idx);
-    action->state = SIMIX_DONE;
-    SIMIX_comm_finish(action);
+    synchro->state = SIMIX_DONE;
+    SIMIX_comm_finish(synchro);
     return;
   }
 
-  xbt_dynar_foreach(actions, cursor, action){
-    /* associate this simcall to the the action */
-    xbt_fifo_push(action->simcalls, simcall);
+  xbt_dynar_foreach(synchros, cursor, synchro){
+    /* associate this simcall to the the synchro */
+    xbt_fifo_push(synchro->simcalls, simcall);
 
-    /* see if the action is already finished */
-    if (action->state != SIMIX_WAITING && action->state != SIMIX_RUNNING){
-      SIMIX_comm_finish(action);
+    /* see if the synchro is already finished */
+    if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING){
+      SIMIX_comm_finish(synchro);
       break;
     }
   }
@@ -733,80 +711,80 @@ void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions)
 
 void SIMIX_waitany_remove_simcall_from_actions(smx_simcall_t simcall)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
   unsigned int cursor = 0;
-  xbt_dynar_t actions = simcall_comm_waitany__get__comms(simcall);
+  xbt_dynar_t synchros = simcall_comm_waitany__get__comms(simcall);
 
-  xbt_dynar_foreach(actions, cursor, action) {
-    xbt_fifo_remove(action->simcalls, simcall);
+  xbt_dynar_foreach(synchros, cursor, synchro) {
+    xbt_fifo_remove(synchro->simcalls, simcall);
   }
 }
 
 /**
- *  \brief Starts the simulation of a communication action.
- *  \param action the communication action
+ *  \brief Starts the simulation of a communication synchro.
+ *  \param synchro the communication synchro
  */
-static XBT_INLINE void SIMIX_comm_start(smx_action_t action)
+static XBT_INLINE void SIMIX_comm_start(smx_synchro_t synchro)
 {
   /* If both the sender and the receiver are already there, start the communication */
-  if (action->state == SIMIX_READY) {
+  if (synchro->state == SIMIX_READY) {
 
-    smx_host_t sender = action->comm.src_proc->smx_host;
-    smx_host_t receiver = action->comm.dst_proc->smx_host;
+    smx_host_t sender = synchro->comm.src_proc->smx_host;
+    smx_host_t receiver = synchro->comm.dst_proc->smx_host;
 
-    XBT_DEBUG("Starting communication %p from '%s' to '%s'", action,
+    XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro,
               SIMIX_host_get_name(sender), SIMIX_host_get_name(receiver));
 
-    action->comm.surf_comm = surf_workstation_model_communicate(surf_workstation_model,
+    synchro->comm.surf_comm = surf_workstation_model_communicate(surf_workstation_model,
                                                                    sender, receiver,
-                                                                   action->comm.task_size, action->comm.rate);
+                                                                   synchro->comm.task_size, synchro->comm.rate);
 
-    surf_action_set_data(action->comm.surf_comm, action);
+    surf_action_set_data(synchro->comm.surf_comm, synchro);
 
-    action->state = SIMIX_RUNNING;
+    synchro->state = SIMIX_RUNNING;
 
     /* If a link is failed, detect it immediately */
-    if (surf_action_get_state(action->comm.surf_comm) == SURF_ACTION_FAILED) {
+    if (surf_action_get_state(synchro->comm.surf_comm) == SURF_ACTION_FAILED) {
       XBT_DEBUG("Communication from '%s' to '%s' failed to start because of a link failure",
                 SIMIX_host_get_name(sender), SIMIX_host_get_name(receiver));
-      action->state = SIMIX_LINK_FAILURE;
-      SIMIX_comm_destroy_internal_actions(action);
+      synchro->state = SIMIX_LINK_FAILURE;
+      SIMIX_comm_destroy_internal_actions(synchro);
     }
 
-    /* If any of the process is suspend, create the action but stop its execution,
+    /* If any of the process is suspend, create the synchro but stop its execution,
        it will be restarted when the sender process resume */
-    if (SIMIX_process_is_suspended(action->comm.src_proc) ||
-        SIMIX_process_is_suspended(action->comm.dst_proc)) {
-      /* FIXME: check what should happen with the action state */
+    if (SIMIX_process_is_suspended(synchro->comm.src_proc) ||
+        SIMIX_process_is_suspended(synchro->comm.dst_proc)) {
+      /* FIXME: check what should happen with the synchro state */
 
-      if (SIMIX_process_is_suspended(action->comm.src_proc))
+      if (SIMIX_process_is_suspended(synchro->comm.src_proc))
         XBT_DEBUG("The communication is suspended on startup because src (%s:%s) were suspended since it initiated the communication",
-                  SIMIX_host_get_name(action->comm.src_proc->smx_host), action->comm.src_proc->name);
+                  SIMIX_host_get_name(synchro->comm.src_proc->smx_host), synchro->comm.src_proc->name);
       else
         XBT_DEBUG("The communication is suspended on startup because dst (%s:%s) were suspended since it initiated the communication",
-                  SIMIX_host_get_name(action->comm.dst_proc->smx_host), action->comm.dst_proc->name);
+                  SIMIX_host_get_name(synchro->comm.dst_proc->smx_host), synchro->comm.dst_proc->name);
 
-      surf_action_suspend(action->comm.surf_comm);
+      surf_action_suspend(synchro->comm.surf_comm);
 
     }
   }
 }
 
 /**
- * \brief Answers the SIMIX simcalls associated to a communication action.
- * \param action a finished communication action
+ * \brief Answers the SIMIX simcalls associated to a communication synchro.
+ * \param synchro a finished communication synchro
  */
-void SIMIX_comm_finish(smx_action_t action)
+void SIMIX_comm_finish(smx_synchro_t synchro)
 {
   unsigned int destroy_count = 0;
   smx_simcall_t simcall;
 
 
-  while ((simcall = xbt_fifo_shift(action->simcalls))) {
+  while ((simcall = xbt_fifo_shift(synchro->simcalls))) {
 
-    /* If a waitany simcall is waiting for this action to finish, then remove
-       it from the other actions in the waitany list. Afterwards, get the
-       position of the actual action in the waitany dynar and
+    /* If a waitany simcall is waiting for this synchro to finish, then remove
+       it from the other synchros in the waitany list. Afterwards, get the
+       position of the actual synchro in the waitany dynar and
        return it as the result of the simcall */
 
     if (simcall->call == SIMCALL_NONE) //FIXME: maybe a better way to handle this case
@@ -814,21 +792,21 @@ void SIMIX_comm_finish(smx_action_t action)
     if (simcall->call == SIMCALL_COMM_WAITANY) {
       SIMIX_waitany_remove_simcall_from_actions(simcall);
       if (!MC_is_active())
-        simcall_comm_waitany__set__result(simcall, xbt_dynar_search(simcall_comm_waitany__get__comms(simcall), &action));
+        simcall_comm_waitany__set__result(simcall, xbt_dynar_search(simcall_comm_waitany__get__comms(simcall), &synchro));
     }
 
-    /* If the action is still in a rendez-vous point then remove from it */
-    if (action->comm.rdv)
-      SIMIX_rdv_remove(action->comm.rdv, action);
+    /* If the synchro is still in a rendez-vous point then remove from it */
+    if (synchro->comm.rdv)
+      SIMIX_rdv_remove(synchro->comm.rdv, synchro);
 
-    XBT_DEBUG("SIMIX_comm_finish: action state = %d", (int)action->state);
+    XBT_DEBUG("SIMIX_comm_finish: synchro state = %d", (int)synchro->state);
 
     /* Check out for errors */
-    switch (action->state) {
+    switch (synchro->state) {
 
     case SIMIX_DONE:
-      XBT_DEBUG("Communication %p complete!", action);
-      SIMIX_comm_copy_data(action);
+      XBT_DEBUG("Communication %p complete!", synchro);
+      SIMIX_comm_copy_data(synchro);
       break;
 
     case SIMIX_SRC_TIMEOUT:
@@ -842,7 +820,7 @@ void SIMIX_comm_finish(smx_action_t action)
       break;
 
     case SIMIX_SRC_HOST_FAILURE:
-      if (simcall->issuer == action->comm.src_proc)
+      if (simcall->issuer == synchro->comm.src_proc)
         simcall->issuer->context->iwannadie = 1;
 //          SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
       else
@@ -850,7 +828,7 @@ void SIMIX_comm_finish(smx_action_t action)
       break;
 
     case SIMIX_DST_HOST_FAILURE:
-      if (simcall->issuer == action->comm.dst_proc)
+      if (simcall->issuer == synchro->comm.dst_proc)
         simcall->issuer->context->iwannadie = 1;
 //          SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
       else
@@ -858,14 +836,14 @@ void SIMIX_comm_finish(smx_action_t action)
       break;
 
     case SIMIX_LINK_FAILURE:
-      XBT_DEBUG("Link failure in action %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
-                action,
-                action->comm.src_proc ? sg_host_name(action->comm.src_proc->smx_host) : NULL,
-                action->comm.dst_proc ? sg_host_name(action->comm.dst_proc->smx_host) : NULL,
-                simcall->issuer->name, simcall->issuer, action->comm.detached);
-      if (action->comm.src_proc == simcall->issuer) {
+      XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d",
+                synchro,
+                synchro->comm.src_proc ? sg_host_name(synchro->comm.src_proc->smx_host) : NULL,
+                synchro->comm.dst_proc ? sg_host_name(synchro->comm.dst_proc->smx_host) : NULL,
+                simcall->issuer->name, simcall->issuer, synchro->comm.detached);
+      if (synchro->comm.src_proc == simcall->issuer) {
         XBT_DEBUG("I'm source");
-      } else if (action->comm.dst_proc == simcall->issuer) {
+      } else if (synchro->comm.dst_proc == simcall->issuer) {
         XBT_DEBUG("I'm dest");
       } else {
         XBT_DEBUG("I'm neither source nor dest");
@@ -874,7 +852,7 @@ void SIMIX_comm_finish(smx_action_t action)
       break;
 
     case SIMIX_CANCELED:
-      if (simcall->issuer == action->comm.dst_proc)
+      if (simcall->issuer == synchro->comm.dst_proc)
         SMX_EXCEPTION(simcall->issuer, cancel_error, 0,
                       "Communication canceled by the sender");
       else
@@ -883,16 +861,16 @@ void SIMIX_comm_finish(smx_action_t action)
       break;
 
     default:
-      xbt_die("Unexpected action state in SIMIX_comm_finish: %d", (int)action->state);
+      xbt_die("Unexpected synchro state in SIMIX_comm_finish: %d", (int)synchro->state);
     }
 
     /* if there is an exception during a waitany or a testany, indicate the position of the failed communication */
     if (simcall->issuer->doexception) {
       if (simcall->call == SIMCALL_COMM_WAITANY) {
-        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall_comm_waitany__get__comms(simcall), &action);
+        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall_comm_waitany__get__comms(simcall), &synchro);
       }
       else if (simcall->call == SIMCALL_COMM_TESTANY) {
-        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall_comm_testany__get__comms(simcall), &action);
+        simcall->issuer->running_ctx->exception.value = xbt_dynar_search(simcall_comm_testany__get__comms(simcall), &synchro);
       }
     }
 
@@ -900,16 +878,16 @@ void SIMIX_comm_finish(smx_action_t action)
       simcall->issuer->context->iwannadie = 1;
     }
 
-    simcall->issuer->waiting_action = NULL;
-    xbt_fifo_remove(simcall->issuer->comms, action);
-    if(action->comm.detached){
-      if(simcall->issuer == action->comm.src_proc){
-        if(action->comm.dst_proc)
-          xbt_fifo_remove(action->comm.dst_proc->comms, action);
+    simcall->issuer->waiting_synchro = NULL;
+    xbt_fifo_remove(simcall->issuer->comms, synchro);
+    if(synchro->comm.detached){
+      if(simcall->issuer == synchro->comm.src_proc){
+        if(synchro->comm.dst_proc)
+          xbt_fifo_remove(synchro->comm.dst_proc->comms, synchro);
       }
-      if(simcall->issuer == action->comm.dst_proc){
-        if(action->comm.src_proc)
-          xbt_fifo_remove(action->comm.src_proc->comms, action);
+      if(simcall->issuer == synchro->comm.dst_proc){
+        if(synchro->comm.src_proc)
+          xbt_fifo_remove(synchro->comm.src_proc->comms, synchro);
       }
     }
     SIMIX_simcall_answer(simcall);
@@ -917,103 +895,97 @@ void SIMIX_comm_finish(smx_action_t action)
   }
 
   while (destroy_count-- > 0)
-    SIMIX_comm_destroy(action);
+    SIMIX_comm_destroy(synchro);
 }
 
 /**
- * \brief This function is called when a Surf communication action is finished.
- * \param action the corresponding Simix communication
+ * \brief This function is called when a Surf communication synchro is finished.
+ * \param synchro the corresponding Simix communication
  */
-void SIMIX_post_comm(smx_action_t action)
+void SIMIX_post_comm(smx_synchro_t synchro)
 {
-  /* Update action state */
-  if (action->comm.src_timeout &&
-      surf_action_get_state(action->comm.src_timeout) == SURF_ACTION_DONE)
-    action->state = SIMIX_SRC_TIMEOUT;
-  else if (action->comm.dst_timeout &&
-         surf_action_get_state(action->comm.dst_timeout) == SURF_ACTION_DONE)
-    action->state = SIMIX_DST_TIMEOUT;
-  else if (action->comm.src_timeout &&
-         surf_action_get_state(action->comm.src_timeout) == SURF_ACTION_FAILED)
-    action->state = SIMIX_SRC_HOST_FAILURE;
-  else if (action->comm.dst_timeout &&
-      surf_action_get_state(action->comm.dst_timeout) == SURF_ACTION_FAILED)
-    action->state = SIMIX_DST_HOST_FAILURE;
-  else if (action->comm.surf_comm &&
-         surf_action_get_state(action->comm.surf_comm) == SURF_ACTION_FAILED) {
+  /* Update synchro state */
+  if (synchro->comm.src_timeout &&
+      surf_action_get_state(synchro->comm.src_timeout) == SURF_ACTION_DONE)
+    synchro->state = SIMIX_SRC_TIMEOUT;
+  else if (synchro->comm.dst_timeout &&
+         surf_action_get_state(synchro->comm.dst_timeout) == SURF_ACTION_DONE)
+    synchro->state = SIMIX_DST_TIMEOUT;
+  else if (synchro->comm.src_timeout &&
+         surf_action_get_state(synchro->comm.src_timeout) == SURF_ACTION_FAILED)
+    synchro->state = SIMIX_SRC_HOST_FAILURE;
+  else if (synchro->comm.dst_timeout &&
+      surf_action_get_state(synchro->comm.dst_timeout) == SURF_ACTION_FAILED)
+    synchro->state = SIMIX_DST_HOST_FAILURE;
+  else if (synchro->comm.surf_comm &&
+         surf_action_get_state(synchro->comm.surf_comm) == SURF_ACTION_FAILED) {
     XBT_DEBUG("Puta madre. Surf says that the link broke");
-    action->state = SIMIX_LINK_FAILURE;
+    synchro->state = SIMIX_LINK_FAILURE;
   } else
-    action->state = SIMIX_DONE;
+    synchro->state = SIMIX_DONE;
 
   XBT_DEBUG("SIMIX_post_comm: comm %p, state %d, src_proc %p, dst_proc %p, detached: %d",
-            action, (int)action->state, action->comm.src_proc, action->comm.dst_proc, action->comm.detached);
+            synchro, (int)synchro->state, synchro->comm.src_proc, synchro->comm.dst_proc, synchro->comm.detached);
 
   /* destroy the surf actions associated with the Simix communication */
-  SIMIX_comm_destroy_internal_actions(action);
+  SIMIX_comm_destroy_internal_actions(synchro);
 
-  /* if there are simcalls associated with the action, then answer them */
-  if (xbt_fifo_size(action->simcalls)) {
-    SIMIX_comm_finish(action);
+  /* if there are simcalls associated with the synchro, then answer them */
+  if (xbt_fifo_size(synchro->simcalls)) {
+    SIMIX_comm_finish(synchro);
   }
 }
 
-void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action){
-  SIMIX_comm_cancel(action);
-}
-void SIMIX_comm_cancel(smx_action_t action)
+void SIMIX_comm_cancel(smx_synchro_t synchro)
 {
-  /* if the action is a waiting state means that it is still in a rdv */
+  /* if the synchro is a waiting state means that it is still in a rdv */
   /* so remove from it and delete it */
-  if (action->state == SIMIX_WAITING) {
-    SIMIX_rdv_remove(action->comm.rdv, action);
-    action->state = SIMIX_CANCELED;
+  if (synchro->state == SIMIX_WAITING) {
+    SIMIX_rdv_remove(synchro->comm.rdv, synchro);
+    synchro->state = SIMIX_CANCELED;
   }
   else if (!MC_is_active() /* when running the MC there are no surf actions */
-           && (action->state == SIMIX_READY || action->state == SIMIX_RUNNING)) {
+           && (synchro->state == SIMIX_READY || synchro->state == SIMIX_RUNNING)) {
 
-    surf_action_cancel(action->comm.surf_comm);
+    surf_action_cancel(synchro->comm.surf_comm);
   }
 }
 
-void SIMIX_comm_suspend(smx_action_t action)
+void SIMIX_comm_suspend(smx_synchro_t synchro)
 {
-  /*FIXME: shall we suspend also the timeout actions? */
-  if (action->comm.surf_comm)
-    surf_action_suspend(action->comm.surf_comm);
+  /*FIXME: shall we suspend also the timeout synchro? */
+  if (synchro->comm.surf_comm)
+    surf_action_suspend(synchro->comm.surf_comm);
   /* in the other case, the action will be suspended on creation, in SIMIX_comm_start() */
 }
 
-void SIMIX_comm_resume(smx_action_t action)
+void SIMIX_comm_resume(smx_synchro_t synchro)
 {
   /*FIXME: check what happen with the timeouts */
-  if (action->comm.surf_comm)
-    surf_action_resume(action->comm.surf_comm);
-  /* in the other case, the action were not really suspended yet, see SIMIX_comm_suspend() and SIMIX_comm_start() */
+  if (synchro->comm.surf_comm)
+    surf_action_resume(synchro->comm.surf_comm);
+  /* in the other case, the synchro were not really suspended yet, see SIMIX_comm_suspend() and SIMIX_comm_start() */
 }
 
 
-/************* Action Getters **************/
+/************* synchro Getters **************/
 
-double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_comm_get_remains(action);
-}
 /**
  *  \brief get the amount remaining from the communication
- *  \param action The communication
+ *  \param synchro The communication
  */
-double SIMIX_comm_get_remains(smx_action_t action)
+double SIMIX_comm_get_remains(smx_synchro_t synchro)
 {
   double remains;
 
-  if(!action){
+  if(!synchro){
     return 0;
   }
 
-  switch (action->state) {
+  switch (synchro->state) {
 
   case SIMIX_RUNNING:
-    remains = surf_action_get_remains(action->comm.surf_comm);
+    remains = surf_action_get_remains(synchro->comm.surf_comm);
     break;
 
   case SIMIX_WAITING:
@@ -1028,100 +1000,80 @@ double SIMIX_comm_get_remains(smx_action_t action)
   return remains;
 }
 
-e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_comm_get_state(action);
-}
-e_smx_state_t SIMIX_comm_get_state(smx_action_t action)
+e_smx_state_t SIMIX_comm_get_state(smx_synchro_t synchro)
 {
-  return action->state;
+  return synchro->state;
 }
 
-void* SIMIX_pre_comm_get_src_data(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_comm_get_src_data(action);
-}
 /**
  *  \brief Return the user data associated to the sender of the communication
- *  \param action The communication
+ *  \param synchro The communication
  *  \return the user data
  */
-void* SIMIX_comm_get_src_data(smx_action_t action)
+void* SIMIX_comm_get_src_data(smx_synchro_t synchro)
 {
-  return action->comm.src_data;
+  return synchro->comm.src_data;
 }
 
-void* SIMIX_pre_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_comm_get_dst_data(action);
-}
 /**
  *  \brief Return the user data associated to the receiver of the communication
- *  \param action The communication
+ *  \param synchro The communication
  *  \return the user data
  */
-void* SIMIX_comm_get_dst_data(smx_action_t action)
+void* SIMIX_comm_get_dst_data(smx_synchro_t synchro)
 {
-  return action->comm.dst_data;
+  return synchro->comm.dst_data;
 }
 
-smx_process_t SIMIX_pre_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_comm_get_src_proc(action);
-}
-smx_process_t SIMIX_comm_get_src_proc(smx_action_t action)
+smx_process_t SIMIX_comm_get_src_proc(smx_synchro_t synchro)
 {
-  return action->comm.src_proc;
+  return synchro->comm.src_proc;
 }
 
-smx_process_t SIMIX_pre_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action){
-  return SIMIX_comm_get_dst_proc(action);
-}
-smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action)
+smx_process_t SIMIX_comm_get_dst_proc(smx_synchro_t synchro)
 {
-  return action->comm.dst_proc;
+  return synchro->comm.dst_proc;
 }
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-int SIMIX_pre_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action)
-{
-  return SIMIX_comm_is_latency_bounded(action);
-}
-
 /**
  *  \brief verify if communication is latency bounded
  *  \param comm The communication
  */
-int SIMIX_comm_is_latency_bounded(smx_action_t action)
+int SIMIX_comm_is_latency_bounded(smx_synchro_t synchro)
 {
-  if(!action){
+  if(!synchro){
     return 0;
   }
-  if (action->comm.surf_comm){
-    XBT_DEBUG("Getting latency limited for surf_action (%p)", action->comm.surf_comm);
-    action->latency_limited = surf_network_action_get_latency_limited(action->comm.surf_comm);
-    XBT_DEBUG("Action limited is %d", action->latency_limited);
+  if (synchro->comm.surf_comm){
+    XBT_DEBUG("Getting latency limited for surf_action (%p)", synchro->comm.surf_comm);
+    synchro->latency_limited = surf_network_action_get_latency_limited(synchro->comm.surf_comm);
+    XBT_DEBUG("synchro limited is %d", synchro->latency_limited);
   }
-  return action->latency_limited;
+  return synchro->latency_limited;
 }
 #endif
 
 /******************************************************************************/
 /*                    SIMIX_comm_copy_data callbacks                       */
 /******************************************************************************/
-static void (*SIMIX_comm_copy_data_callback) (smx_action_t, void*, size_t) =
+static void (*SIMIX_comm_copy_data_callback) (smx_synchro_t, void*, size_t) =
   &SIMIX_comm_copy_pointer_callback;
 
 void
-SIMIX_comm_set_copy_data_callback(void (*callback) (smx_action_t, void*, size_t))
+SIMIX_comm_set_copy_data_callback(void (*callback) (smx_synchro_t, void*, size_t))
 {
   SIMIX_comm_copy_data_callback = callback;
 }
 
-void SIMIX_comm_copy_pointer_callback(smx_action_t comm, void* buff, size_t buff_size)
+void SIMIX_comm_copy_pointer_callback(smx_synchro_t comm, void* buff, size_t buff_size)
 {
   xbt_assert((buff_size == sizeof(void *)),
              "Cannot copy %zu bytes: must be sizeof(void*)", buff_size);
   *(void **) (comm->comm.dst_buff) = buff;
 }
 
-void SIMIX_comm_copy_buffer_callback(smx_action_t comm, void* buff, size_t buff_size)
+void SIMIX_comm_copy_buffer_callback(smx_synchro_t comm, void* buff, size_t buff_size)
 {
   XBT_DEBUG("Copy the data over");
   memcpy(comm->comm.dst_buff, buff, buff_size);
@@ -1136,7 +1088,7 @@ void SIMIX_comm_copy_buffer_callback(smx_action_t comm, void* buff, size_t buff_
  *  \brief Copy the communication data from the sender's buffer to the receiver's one
  *  \param comm The communication
  */
-void SIMIX_comm_copy_data(smx_action_t comm)
+void SIMIX_comm_copy_data(smx_synchro_t comm)
 {
   size_t buff_size = comm->comm.src_buff_size;
   /* If there is no data to be copy then return */
index ea3095a..6ea862d 100644 (file)
@@ -8,7 +8,7 @@
 #define _SIMIX_NETWORK_PRIVATE_H
 
 #include "simgrid/simix.h"
-#include "smx_smurf_private.h"
+#include "popping_private.h"
 
 /** @brief Rendez-vous point datatype */
 typedef struct s_smx_rvpoint {
@@ -23,92 +23,42 @@ void SIMIX_network_init(void);
 void SIMIX_network_exit(void);
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm);
+XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_synchro_t comm);
 #endif
 
 smx_rdv_t SIMIX_rdv_create(const char *name);
 void SIMIX_rdv_destroy(smx_rdv_t rdv);
 smx_rdv_t SIMIX_rdv_get_by_name(const char *name);
-void SIMIX_rdv_remove(smx_rdv_t rdv, smx_action_t comm);
+void SIMIX_rdv_remove(smx_rdv_t rdv, smx_synchro_t comm);
 int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host);
-smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv);
+smx_synchro_t SIMIX_rdv_get_head(smx_rdv_t rdv);
 void SIMIX_rdv_set_receiver(smx_rdv_t rdv, smx_process_t proc);
 smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv);
-smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
+smx_synchro_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
                               double task_size, double rate,
                               void *src_buff, size_t src_buff_size,
-                              int (*match_fun)(void *, void *, smx_action_t),
-                              void (*clean_fun)(void *), // used to free the action in case of problem after a detached send
-                              void (*copy_data_fun)(smx_action_t, void*, size_t),
+                              int (*match_fun)(void *, void *, smx_synchro_t),
+                              void (*clean_fun)(void *), // used to free the synchro in case of problem after a detached send
+                              void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                               void *data,
                               int detached);
-smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
+smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
                               void *dst_buff, size_t *dst_buff_size,
-                              int (*)(void *, void *, smx_action_t),
-                              void (*copy_data_fun)(smx_action_t, void*, size_t),
+                              int (*)(void *, void *, smx_synchro_t),
+                              void (*copy_data_fun)(smx_synchro_t, void*, size_t),
                               void *data, double rate);
-void SIMIX_comm_destroy(smx_action_t action);
-void SIMIX_comm_destroy_internal_actions(smx_action_t action);
-smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src,
-                              int tag, int (*match_fun)(void *, void *, smx_action_t), void *data);
-void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout);
-void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions);
-void SIMIX_post_comm(smx_action_t action);
-void SIMIX_pre_comm_test(smx_simcall_t simcall, smx_action_t action);
-void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions);
-void SIMIX_comm_cancel(smx_action_t action);
-double SIMIX_comm_get_remains(smx_action_t action);
-e_smx_state_t SIMIX_comm_get_state(smx_action_t action);
-void SIMIX_comm_suspend(smx_action_t action);
-void SIMIX_comm_resume(smx_action_t action);
-smx_process_t SIMIX_comm_get_src_proc(smx_action_t action);
-smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action);
+void SIMIX_comm_destroy(smx_synchro_t synchro);
+void SIMIX_comm_destroy_internal_actions(smx_synchro_t synchro);
+smx_synchro_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src,
+                              int tag, int (*match_fun)(void *, void *, smx_synchro_t), void *data);
+void SIMIX_post_comm(smx_synchro_t synchro);
+void SIMIX_comm_cancel(smx_synchro_t synchro);
+double SIMIX_comm_get_remains(smx_synchro_t synchro);
+e_smx_state_t SIMIX_comm_get_state(smx_synchro_t synchro);
+void SIMIX_comm_suspend(smx_synchro_t synchro);
+void SIMIX_comm_resume(smx_synchro_t synchro);
+smx_process_t SIMIX_comm_get_src_proc(smx_synchro_t synchro);
+smx_process_t SIMIX_comm_get_dst_proc(smx_synchro_t synchro);
 
-// pre prototypes
-smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, 
-                                   int type,int src, int tag,
-                                   int (*match_fun)(void *, void *, smx_action_t),
-                                   void *data);
-smx_rdv_t SIMIX_pre_rdv_create(smx_simcall_t simcall, const char *name);
-void SIMIX_pre_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv);
-smx_rdv_t SIMIX_pre_rdv_get_by_name(smx_simcall_t simcall, const char *name);
-int SIMIX_pre_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host);
-smx_action_t SIMIX_pre_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv);
-smx_process_t SIMIX_pre_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv);
-void SIMIX_pre_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv,
-                           smx_process_t process);
-void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
-                                  double task_size, double rate,
-                                  void *src_buff, size_t src_buff_size,
-                                  int (*match_fun)(void *, void *,smx_action_t),
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
-                                 void *data, double timeout);
-smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv,
-                                  double task_size, double rate,
-                                  void *src_buff, size_t src_buff_size,
-                                  int (*match_fun)(void *, void *,smx_action_t),
-                                  void (*clean_fun)(void *), 
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
-                                 void *data, int detached);
-void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv,
-                         void *dst_buff, size_t *dst_buff_size,
-                         int (*match_fun)(void *, void *, smx_action_t),
-                         void (*copy_data_fun)(smx_action_t, void*, size_t),
-                         void *data, double timeout, double rate);
-smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
-                                  void *dst_buff, size_t *dst_buff_size,
-                                  int (*match_fun)(void *, void *, smx_action_t),
-                                  void (*copy_data_fun)(smx_action_t, void*, size_t),
-                                 void *data, double rate);
-void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action);
-double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action);
-e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action);
-void* SIMIX_pre_comm_get_src_data(smx_simcall_t simcall, smx_action_t action);
-void* SIMIX_pre_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action);
-smx_process_t SIMIX_pre_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action);
-smx_process_t SIMIX_pre_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action);
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-int SIMIX_pre_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action);
-#endif
 #endif
 
diff --git a/src/simix/smx_new_api.c b/src/simix/smx_new_api.c
deleted file mode 100644 (file)
index f419842..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Copyright (c) 2007-2010, 2012-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. */
-
-/* ****************************************************************************************** */
-/* TUTORIAL: New API                                                                        */
-/* ****************************************************************************************** */
-#include "smx_private.h"
-#include "xbt/sysdep.h"
-#include "xbt/log.h"
-#include "xbt/dict.h"
-#include "mc/mc.h"
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_new_api, simix,
-                                "Logging specific to SIMIX (new_api)");
-
-
-//SIMIX NEW MODEL INIT
-void SIMIX_pre_new_api_fct(smx_simcall_t simcall)
-{
-  smx_action_t action = SIMIX_new_api_fct(simcall->issuer,
-      simcall->new_api.param1,
-      simcall->new_api.param2);
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
-}
-
-void SIMIX_post_new_api(smx_action_t action)
-{
-  xbt_fifo_item_t i;
-  smx_simcall_t simcall;
-
-  xbt_fifo_foreach(action->simcalls,i,simcall,smx_simcall_t) {
-    switch (simcall->call) {
-    case SIMCALL_NEW_API_INIT:
-      simcall->new_api.result = 0;
-      break;
-
-    default:
-      break;
-    }
-  }
-
-  switch (surf_action_get_state(action->new_api.surf_new_api)) {
-
-    case SURF_ACTION_FAILED:
-      action->state = SIMIX_FAILED;
-      break;
-
-    case SURF_ACTION_DONE:
-      action->state = SIMIX_DONE;
-      break;
-
-    default:
-      THROW_IMPOSSIBLE;
-      break;
-  }
-
-  SIMIX_new_api_finish(action);
-}
-
-smx_action_t SIMIX_new_api_fct(smx_process_t process, const char* param1, double param2)
-{
-  smx_action_t action;
-  smx_host_t host = process->smx_host;
-
-  /* check if the host is active */
-  if (surf_resource_get_state(surf_workstation_resource_priv(host)) != SURF_RESOURCE_ON) {
-    THROWF(host_error, 0, "Host %s failed, you cannot call this function",
-           sg_host_name(host));
-  }
-
-  action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_NEW_API;
-  action->name = NULL;
-#ifdef HAVE_TRACING
-  action->category = NULL;
-#endif
-
-  // Called the function from the new model
-  //FIXME:CHECK WHAT TO DO action->new_api.surf_new_api = surf_workstation_model->extension.new_model.fct();
-
-  surf_action_set_data(action->new_api.surf_new_api, action);
-  XBT_DEBUG("Create NEW MODEL action %p", action);
-
-  return action;
-}
-
-void SIMIX_new_api_destroy(smx_action_t action)
-{
-  XBT_DEBUG("Destroy action %p", action);
-  if (action->new_api.surf_new_api)
-    surf_action_unref(action->new_api.surf_new_api);
-  xbt_mallocator_release(simix_global->action_mallocator, action);
-}
-
-void SIMIX_new_api_finish(smx_action_t action)
-{
-  xbt_fifo_item_t item;
-  smx_simcall_t simcall;
-
-  xbt_fifo_foreach(action->simcalls, item, simcall, smx_simcall_t) {
-
-    switch (action->state) {
-
-      case SIMIX_DONE:
-        /* do nothing, action done */
-        break;
-
-      case SIMIX_FAILED:
-        SMX_EXCEPTION(simcall->issuer, io_error, 0, "IO failed");
-        break;
-
-      case SIMIX_CANCELED:
-        SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Canceled");
-        break;
-
-      default:
-        xbt_die("Internal error in SIMIX_NEW_MODEL_finish: unexpected action state %d",
-            (int)action->state);
-    }
-
-    if (surf_resource_get_state(surf_workstation_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) {
-      simcall->issuer->context->iwannadie = 1;
-    }
-
-    simcall->issuer->waiting_action = NULL;
-    SIMIX_simcall_answer(simcall);
-  }
-
-  /* We no longer need it */
-  SIMIX_new_api_destroy(action);
-}
diff --git a/src/simix/smx_new_api_private.h b/src/simix/smx_new_api_private.h
deleted file mode 100644 (file)
index 2c1f78f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (c) 2007-2010, 2012-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. */
-
-/* ****************************************************************************************** */
-/* TUTORIAL: New API                                                                        */
-/* ****************************************************************************************** */
-#ifndef _SIMIX_NEW_API_PRIVATE_H
-#define _SIMIX_NEW_API_PRIVATE_H
-
-#include "simgrid/simix.h"
-#include "smx_smurf_private.h"
-
-void SIMIX_pre_new_api_fct(smx_simcall_t simcall);
-smx_action_t SIMIX_new_api_fct(smx_process_t process, const char* param1, double param2);
-
-void SIMIX_post_new_api(smx_action_t action);
-void SIMIX_new_api_destroy(smx_action_t action);
-void SIMIX_new_api_finish(smx_action_t action);
-
-#endif
index b061c5d..e196011 100644 (file)
 #include "smx_host_private.h"
 #include "smx_io_private.h"
 #include "smx_network_private.h"
-#include "smx_smurf_private.h"
+#include "popping_private.h"
 #include "smx_synchro_private.h"
-/* ****************************************************************************************** */
-/* TUTORIAL: New API                                                                        */
-/* ****************************************************************************************** */
-#include "smx_new_api_private.h"
 
 /* Define only for SimGrid benchmarking purposes */
 //#define TIME_BENCH_PER_SR     /* this aims at measuring the time spent in each scheduling round per each thread. The code is thus run in sequential to bench separately each SSR */
@@ -50,7 +46,7 @@ typedef struct s_smx_global {
   smx_creation_func_t create_process_function;
   void_pfn_smxprocess_t_smxprocess_t kill_process_function;
   void_pfn_smxprocess_t cleanup_process_function;
-  xbt_mallocator_t action_mallocator;
+  xbt_mallocator_t synchro_mallocator;
   void_pfn_smxhost_t autorestart;
 
 #ifdef TIME_BENCH_AMDAHL
@@ -98,21 +94,17 @@ typedef struct s_smx_timer {
   void* args;
 } s_smx_timer_t;
 
-/********************************* Action *************************************/
+/********************************* synchro *************************************/
 
 typedef enum {
-  SIMIX_ACTION_EXECUTE,
-  SIMIX_ACTION_PARALLEL_EXECUTE,
-  SIMIX_ACTION_COMMUNICATE,
-  SIMIX_ACTION_JOIN,
-  SIMIX_ACTION_SLEEP,
-  SIMIX_ACTION_SYNCHRO,
-  SIMIX_ACTION_IO,
-  /* ****************************************************************************************** */
-  /* TUTORIAL: New API                                                                        */
-  /* ****************************************************************************************** */
-  SIMIX_ACTION_NEW_API
-} e_smx_action_type_t;
+  SIMIX_SYNC_EXECUTE,
+  SIMIX_SYNC_PARALLEL_EXECUTE,
+  SIMIX_SYNC_COMMUNICATE,
+  SIMIX_SYNC_JOIN,
+  SIMIX_SYNC_SLEEP,
+  SIMIX_SYNC_SYNCHRO,
+  SIMIX_SYNC_IO,
+} e_smx_synchro_type_t;
 
 typedef enum {
   SIMIX_COMM_SEND,
@@ -128,15 +120,15 @@ typedef enum {
   SIMIX_IO_STAT
 } e_smx_io_type_t;
 
-/** @brief Action datatype */
-typedef struct s_smx_action {
+/** @brief synchro datatype */
+typedef struct s_smx_synchro {
 
-  e_smx_action_type_t type;          /* Type of SIMIX action*/
-  e_smx_state_t state;               /* State of the action */
-  char *name;                        /* Action name if any */
-  xbt_fifo_t simcalls;               /* List of simcalls waiting for this action */
+  e_smx_synchro_type_t type;          /* Type of SIMIX synchro */
+  e_smx_state_t state;               /* State of the synchro */
+  char *name;                        /* synchro name if any */
+  xbt_fifo_t simcalls;               /* List of simcalls waiting for this synchro */
 
-  /* Data specific to each action type */
+  /* Data specific to each synchro type */
   union {
 
     struct {
@@ -157,10 +149,10 @@ typedef struct s_smx_action {
       int detached;                   /* If detached or not */
 
       void (*clean_fun)(void*);       /* Function to clean the detached src_buf if something goes wrong */
-      int (*match_fun)(void*,void*,smx_action_t);  /* Filter function used by the other side. It is used when
+      int (*match_fun)(void*,void*,smx_synchro_t);  /* Filter function used by the other side. It is used when
                                          looking if a given communication matches my needs. For that, myself must match the
                                          expectations of the other side, too. See  */
-      void (*copy_data_fun) (smx_action_t, void*, size_t);
+      void (*copy_data_fun) (smx_synchro_t, void*, size_t);
 
       /* Surf action data */
       surf_action_t surf_comm;        /* The Surf communication action encapsulated */
@@ -195,13 +187,6 @@ typedef struct s_smx_action {
       smx_host_t host;
       surf_action_t surf_io;
     } io;
-
-    /* ****************************************************************************************** */
-    /* TUTORIAL: New API                                                                        */
-    /* ****************************************************************************************** */
-    struct {
-      surf_action_t surf_new_api;
-    } new_api;
   };
 
 #ifdef HAVE_LATENCY_BOUND_TRACKING
@@ -211,7 +196,7 @@ typedef struct s_smx_action {
 #ifdef HAVE_TRACING
   char *category;                     /* simix action category for instrumentation */
 #endif
-} s_smx_action_t;
+} s_smx_synchro_t;
 
 void SIMIX_context_mod_init(void);
 void SIMIX_context_mod_exit(void);
index adf8d9d..a0bcac1 100644 (file)
@@ -38,54 +38,51 @@ int SIMIX_process_has_pending_comms(smx_process_t process) {
   return xbt_fifo_size(process->comms) > 0;
 }
 
-void SIMIX_pre_process_cleanup(smx_simcall_t simcall, smx_process_t process) {
-  SIMIX_process_cleanup(process);
-}
 /**
  * \brief Moves a process to the list of processes to destroy.
  */
 void SIMIX_process_cleanup(smx_process_t process)
 {
-  XBT_DEBUG("Cleanup process %s (%p), waiting action %p",
-      process->name, process, process->waiting_action);
+  XBT_DEBUG("Cleanup process %s (%p), waiting synchro %p",
+      process->name, process, process->waiting_synchro);
 
   SIMIX_process_on_exit_runall(process);
 
   /* cancel non-blocking communications */
-  smx_action_t action;
-  while ((action = xbt_fifo_pop(process->comms))) {
+  smx_synchro_t synchro;
+  while ((synchro = xbt_fifo_pop(process->comms))) {
 
     /* make sure no one will finish the comm after this process is destroyed,
      * because src_proc or dst_proc would be an invalid pointer */
-    SIMIX_comm_cancel(action);
+    SIMIX_comm_cancel(synchro);
 
-    if (action->comm.src_proc == process) {
+    if (synchro->comm.src_proc == process) {
       XBT_DEBUG("Found an unfinished send comm %p (detached = %d), state %d, src = %p, dst = %p",
-          action, action->comm.detached, (int)action->state, action->comm.src_proc, action->comm.dst_proc);
-      action->comm.src_proc = NULL;
+          synchro, synchro->comm.detached, (int)synchro->state, synchro->comm.src_proc, synchro->comm.dst_proc);
+      synchro->comm.src_proc = NULL;
 
       /* I'm not supposed to destroy a detached comm from the sender side, */
-      if (!action->comm.detached)
-        SIMIX_comm_destroy(action);
+      if (!synchro->comm.detached)
+        SIMIX_comm_destroy(synchro);
       else
         XBT_DEBUG("Don't destroy it since it's a detached comm");
 
     }
-    else if (action->comm.dst_proc == process){
+    else if (synchro->comm.dst_proc == process){
       XBT_DEBUG("Found an unfinished recv comm %p, state %d, src = %p, dst = %p",
-          action, (int)action->state, action->comm.src_proc, action->comm.dst_proc);
-      action->comm.dst_proc = NULL;
+          synchro, (int)synchro->state, synchro->comm.src_proc, synchro->comm.dst_proc);
+      synchro->comm.dst_proc = NULL;
 
-      if (action->comm.detached && action->comm.refcount == 1
-          && action->comm.src_proc != NULL) {
+      if (synchro->comm.detached && synchro->comm.refcount == 1
+          && synchro->comm.src_proc != NULL) {
         /* the comm will be freed right now, remove it from the sender */
-        xbt_fifo_remove(action->comm.src_proc->comms, action);
+        xbt_fifo_remove(synchro->comm.src_proc->comms, synchro);
       }
-      SIMIX_comm_destroy(action);
+      SIMIX_comm_destroy(synchro);
     }
     else {
-      xbt_die("Communication action %p is in my list but I'm not the sender "
-          "or the receiver", action);
+      xbt_die("Communication synchro %p is in my list but I'm not the sender "
+          "or the receiver", synchro);
     }
   }
 
@@ -189,7 +186,7 @@ smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args) {
 }
 
 
-void SIMIX_pre_process_create(smx_simcall_t simcall,
+void simcall_HANDLER_process_create(smx_simcall_t simcall,
                          smx_process_t *process,
                           const char *name,
                           xbt_main_func_t code,
@@ -313,7 +310,7 @@ void SIMIX_process_runall(void)
   xbt_dynar_reset(simix_global->process_to_run);
 }
 
-void SIMIX_pre_process_kill(smx_simcall_t simcall, smx_process_t process) {
+void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process) {
   SIMIX_process_kill(process, simcall->issuer);
 }
 /**
@@ -334,45 +331,38 @@ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) {
   process->suspended = 0;
   process->doexception = 0;
 
-  /* destroy the blocking action if any */
-  if (process->waiting_action) {
+  /* destroy the blocking synchro if any */
+  if (process->waiting_synchro) {
 
-    switch (process->waiting_action->type) {
+    switch (process->waiting_synchro->type) {
 
-    case SIMIX_ACTION_EXECUTE:
-    case SIMIX_ACTION_PARALLEL_EXECUTE:
-      SIMIX_host_execution_destroy(process->waiting_action);
+    case SIMIX_SYNC_EXECUTE:
+    case SIMIX_SYNC_PARALLEL_EXECUTE:
+      SIMIX_host_execution_destroy(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_COMMUNICATE:
-      xbt_fifo_remove(process->comms, process->waiting_action);
-      SIMIX_comm_cancel(process->waiting_action);
-      SIMIX_comm_destroy(process->waiting_action);
+    case SIMIX_SYNC_COMMUNICATE:
+      xbt_fifo_remove(process->comms, process->waiting_synchro);
+      SIMIX_comm_cancel(process->waiting_synchro);
+      SIMIX_comm_destroy(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_SLEEP:
-      SIMIX_process_sleep_destroy(process->waiting_action);
+    case SIMIX_SYNC_SLEEP:
+      SIMIX_process_sleep_destroy(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_JOIN:
-      SIMIX_process_sleep_destroy(process->waiting_action);
+    case SIMIX_SYNC_JOIN:
+      SIMIX_process_sleep_destroy(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_SYNCHRO:
+    case SIMIX_SYNC_SYNCHRO:
       SIMIX_synchro_stop_waiting(process, &process->simcall);
-      SIMIX_synchro_destroy(process->waiting_action);
-      break;
-
-    case SIMIX_ACTION_IO:
-      SIMIX_io_destroy(process->waiting_action);
+      SIMIX_synchro_destroy(process->waiting_synchro);
       break;
 
-      /* **************************************/
-      /* TUTORIAL: New API                    */
-    case SIMIX_ACTION_NEW_API:
-      SIMIX_new_api_destroy(process->waiting_action);
+    case SIMIX_SYNC_IO:
+      SIMIX_io_destroy(process->waiting_synchro);
       break;
-      /* **************************************/
 
     }
   }
@@ -394,53 +384,46 @@ void SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, int value, con
   if (process->suspended)
     SIMIX_process_resume(process,SIMIX_process_self());
 
-  /* cancel the blocking action if any */
-  if (process->waiting_action) {
+  /* cancel the blocking synchro if any */
+  if (process->waiting_synchro) {
 
-    switch (process->waiting_action->type) {
+    switch (process->waiting_synchro->type) {
 
-    case SIMIX_ACTION_EXECUTE:
-    case SIMIX_ACTION_PARALLEL_EXECUTE:
-      SIMIX_host_execution_cancel(process->waiting_action);
+    case SIMIX_SYNC_EXECUTE:
+    case SIMIX_SYNC_PARALLEL_EXECUTE:
+      SIMIX_host_execution_cancel(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_COMMUNICATE:
-      xbt_fifo_remove(process->comms, process->waiting_action);
-      SIMIX_comm_cancel(process->waiting_action);
+    case SIMIX_SYNC_COMMUNICATE:
+      xbt_fifo_remove(process->comms, process->waiting_synchro);
+      SIMIX_comm_cancel(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_SLEEP:
-      SIMIX_process_sleep_destroy(process->waiting_action);
+    case SIMIX_SYNC_SLEEP:
+      SIMIX_process_sleep_destroy(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_JOIN:
-      SIMIX_process_sleep_destroy(process->waiting_action);
+    case SIMIX_SYNC_JOIN:
+      SIMIX_process_sleep_destroy(process->waiting_synchro);
       break;
 
-    case SIMIX_ACTION_SYNCHRO:
+    case SIMIX_SYNC_SYNCHRO:
       SIMIX_synchro_stop_waiting(process, &process->simcall);
       break;
 
-    case SIMIX_ACTION_IO:
-      SIMIX_io_destroy(process->waiting_action);
+    case SIMIX_SYNC_IO:
+      SIMIX_io_destroy(process->waiting_synchro);
       break;
 
-      /* **************************************/
-      /* TUTORIAL: New API                    */
-    case SIMIX_ACTION_NEW_API:
-      SIMIX_new_api_destroy(process->waiting_action);
-      break;
-      /* **************************************/
-
     }
   }
-  process->waiting_action = NULL;
+  process->waiting_synchro = NULL;
 
   if (!xbt_dynar_member(simix_global->process_to_run, &(process)) && process != SIMIX_process_self())
     xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, process);
 }
 
-void SIMIX_pre_process_killall(smx_simcall_t simcall, int reset_pid) {
+void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid) {
   SIMIX_process_killall(simcall->issuer, reset_pid);
 }
 /**
@@ -465,7 +448,7 @@ void SIMIX_process_killall(smx_process_t issuer, int reset_pid)
   SIMIX_process_empty_trash();
 }
 
-void SIMIX_pre_process_change_host(smx_simcall_t simcall, smx_process_t process,
+void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process,
                                   smx_host_t dest)
 {
   process->new_host = dest;
@@ -480,22 +463,22 @@ void SIMIX_process_change_host(smx_process_t process,
 }
 
 
-void SIMIX_pre_process_suspend(smx_simcall_t simcall, smx_process_t process)
+void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process)
 {
-  smx_action_t action_suspend =
+  smx_synchro_t sync_suspend =
       SIMIX_process_suspend(process, simcall->issuer);
 
   if (process != simcall->issuer) {
     SIMIX_simcall_answer(simcall);
   } else {
-    xbt_fifo_push(action_suspend->simcalls, simcall);
-    process->waiting_action = action_suspend;
-    SIMIX_host_execution_suspend(process->waiting_action);
+    xbt_fifo_push(sync_suspend->simcalls, simcall);
+    process->waiting_synchro = sync_suspend;
+    SIMIX_host_execution_suspend(process->waiting_synchro);
   }
   /* If we are suspending ourselves, then just do not finish the simcall now */
 }
 
-smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
+smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
 {
   xbt_assert((process != NULL), "Invalid parameters");
 
@@ -506,34 +489,34 @@ smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
 
   process->suspended = 1;
 
-  /* If we are suspending another process, and it is waiting on an action,
-     suspend its action. */
+  /* If we are suspending another process, and it is waiting on a sync,
+     suspend its synchronization. */
   if (process != issuer) {
 
-    if (process->waiting_action) {
+    if (process->waiting_synchro) {
 
-      switch (process->waiting_action->type) {
+      switch (process->waiting_synchro->type) {
 
-        case SIMIX_ACTION_EXECUTE:
-        case SIMIX_ACTION_PARALLEL_EXECUTE:
-          SIMIX_host_execution_suspend(process->waiting_action);
+        case SIMIX_SYNC_EXECUTE:
+        case SIMIX_SYNC_PARALLEL_EXECUTE:
+          SIMIX_host_execution_suspend(process->waiting_synchro);
           break;
 
-        case SIMIX_ACTION_COMMUNICATE:
-          SIMIX_comm_suspend(process->waiting_action);
+        case SIMIX_SYNC_COMMUNICATE:
+          SIMIX_comm_suspend(process->waiting_synchro);
           break;
 
-        case SIMIX_ACTION_SLEEP:
-          SIMIX_process_sleep_suspend(process->waiting_action);
+        case SIMIX_SYNC_SLEEP:
+          SIMIX_process_sleep_suspend(process->waiting_synchro);
           break;
 
-        case SIMIX_ACTION_SYNCHRO:
+        case SIMIX_SYNC_SYNCHRO:
           /* Suspension is delayed to when the process is rescheduled. */
           break;
 
         default:
-          xbt_die("Internal error in SIMIX_process_suspend: unexpected action type %d",
-              (int)process->waiting_action->type);
+          xbt_die("Internal error in SIMIX_process_suspend: unexpected synchronization type %d",
+              (int)process->waiting_synchro->type);
       }
       return NULL;
     } else {
@@ -546,7 +529,7 @@ smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer)
   }
 }
 
-void SIMIX_pre_process_resume(smx_simcall_t simcall, smx_process_t process){
+void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process){
   SIMIX_process_resume(process, simcall->issuer);
 }
 
@@ -562,35 +545,35 @@ void SIMIX_process_resume(smx_process_t process, smx_process_t issuer)
   if(!process->suspended) return;
   process->suspended = 0;
 
-  /* If we are resuming another process, resume the action it was waiting for
+  /* If we are resuming another process, resume the synchronization it was waiting for
      if any. Otherwise add it to the list of process to run in the next round. */
   if (process != issuer) {
 
-    if (process->waiting_action) {
+    if (process->waiting_synchro) {
 
-      switch (process->waiting_action->type) {
+      switch (process->waiting_synchro->type) {
 
-        case SIMIX_ACTION_EXECUTE:
-        case SIMIX_ACTION_PARALLEL_EXECUTE:
-          SIMIX_host_execution_resume(process->waiting_action);
+        case SIMIX_SYNC_EXECUTE:
+        case SIMIX_SYNC_PARALLEL_EXECUTE:
+          SIMIX_host_execution_resume(process->waiting_synchro);
           break;
 
-        case SIMIX_ACTION_COMMUNICATE:
-          SIMIX_comm_resume(process->waiting_action);
+        case SIMIX_SYNC_COMMUNICATE:
+          SIMIX_comm_resume(process->waiting_synchro);
           break;
 
-        case SIMIX_ACTION_SLEEP:
-          SIMIX_process_sleep_resume(process->waiting_action);
+        case SIMIX_SYNC_SLEEP:
+          SIMIX_process_sleep_resume(process->waiting_synchro);
           break;
 
-        case SIMIX_ACTION_SYNCHRO:
+        case SIMIX_SYNC_SYNCHRO:
           /* I cannot resume it now. This is delayed to when the process is rescheduled at
            * the end of the synchro. */
           break;
 
         default:
-          xbt_die("Internal error in SIMIX_process_resume: unexpected action type %d",
-              (int)process->waiting_action->type);
+          xbt_die("Internal error in SIMIX_process_resume: unexpected synchronization type %d",
+              (int)process->waiting_synchro->type);
       }
     }
   } else XBT_WARN("Strange. Process %p is trying to resume himself.", issuer);
@@ -602,18 +585,11 @@ int SIMIX_process_get_maxpid(void) {
   return simix_process_maxpid;
 }
 
-int SIMIX_pre_process_count(smx_simcall_t simcall){
-  return SIMIX_process_count();
-}
 int SIMIX_process_count(void)
 {
   return xbt_swag_size(simix_global->process_list);
 }
 
-int SIMIX_pre_process_get_PID(smx_simcall_t simcall, smx_process_t self){
-   return SIMIX_process_get_PID(self);
-}
-
 int SIMIX_process_get_PID(smx_process_t self){
   if (self == NULL)
     return 0;
@@ -621,10 +597,6 @@ int SIMIX_process_get_PID(smx_process_t self){
     return self->pid;
 }
 
-int SIMIX_pre_process_get_PPID(smx_simcall_t simcall, smx_process_t self){
-  return SIMIX_process_get_PPID(self);
-}
-
 int SIMIX_process_get_PPID(smx_process_t self){
   if (self == NULL)
     return 0;
@@ -632,10 +604,6 @@ int SIMIX_process_get_PPID(smx_process_t self){
     return self->ppid;
 }
 
-void* SIMIX_pre_process_self_get_data(smx_simcall_t simcall, smx_process_t self){
-  return SIMIX_process_self_get_data(self);
-}
-
 void* SIMIX_process_self_get_data(smx_process_t self)
 {
   xbt_assert(self == SIMIX_process_self(), "This is not the current process");
@@ -646,10 +614,6 @@ void* SIMIX_process_self_get_data(smx_process_t self)
   return SIMIX_process_get_data(self);
 }
 
-void SIMIX_pre_process_set_data(smx_simcall_t simcall, smx_process_t process,
-                                void *data){
-  SIMIX_process_set_data(process, data);
-}
 void SIMIX_process_self_set_data(smx_process_t self, void *data)
 {
   xbt_assert(self == SIMIX_process_self(), "This is not the current process");
@@ -657,9 +621,6 @@ void SIMIX_process_self_set_data(smx_process_t self, void *data)
   SIMIX_process_set_data(self, data);
 }
 
-void* SIMIX_pre_process_get_data(smx_simcall_t simcall, smx_process_t process){
-  return SIMIX_process_get_data(process);
-}
 void* SIMIX_process_get_data(smx_process_t process)
 {
   return process->data;
@@ -670,9 +631,6 @@ void SIMIX_process_set_data(smx_process_t process, void *data)
   process->data = data;
 }
 
-smx_host_t SIMIX_pre_process_get_host(smx_simcall_t simcall, smx_process_t process){
-  return SIMIX_process_get_host(process);
-}
 smx_host_t SIMIX_process_get_host(smx_process_t process)
 {
   return process->smx_host;
@@ -689,9 +647,6 @@ const char* SIMIX_process_self_get_name(void) {
   return SIMIX_process_get_name(process);
 }
 
-const char* SIMIX_pre_process_get_name(smx_simcall_t simcall, smx_process_t process) {
-  return SIMIX_process_get_name(process);
-}
 const char* SIMIX_process_get_name(smx_process_t process)
 {
   return process->name;
@@ -709,61 +664,55 @@ smx_process_t SIMIX_process_get_by_name(const char* name)
   return NULL;
 }
 
-int SIMIX_pre_process_is_suspended(smx_simcall_t simcall, smx_process_t process){
-  return SIMIX_process_is_suspended(process);
-}
 int SIMIX_process_is_suspended(smx_process_t process)
 {
   return process->suspended;
 }
 
-xbt_dict_t SIMIX_pre_process_get_properties(smx_simcall_t simcall, smx_process_t process){
-  return SIMIX_process_get_properties(process);
-}
 xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
 {
   return process->properties;
 }
 
-void SIMIX_pre_process_join(smx_simcall_t simcall, smx_process_t process, double timeout)
+void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout)
 {
-  smx_action_t action = SIMIX_process_join(simcall->issuer, process, timeout);
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  smx_synchro_t sync = SIMIX_process_join(simcall->issuer, process, timeout);
+  xbt_fifo_push(sync->simcalls, simcall);
+  simcall->issuer->waiting_synchro = sync;
 }
 
-static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_action_t action){
-  if (action->sleep.surf_sleep) {
-    surf_action_cancel(action->sleep.surf_sleep);
+static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_synchro_t sync){
+  if (sync->sleep.surf_sleep) {
+    surf_action_cancel(sync->sleep.surf_sleep);
 
     smx_simcall_t simcall;
-    while ((simcall = xbt_fifo_shift(action->simcalls))) {
+    while ((simcall = xbt_fifo_shift(sync->simcalls))) {
       simcall_process_sleep__set__result(simcall, SIMIX_DONE);
-      simcall->issuer->waiting_action = NULL;
+      simcall->issuer->waiting_synchro = NULL;
       if (simcall->issuer->suspended) {
         XBT_DEBUG("Wait! This process is suspended and can't wake up now.");
         simcall->issuer->suspended = 0;
-        SIMIX_pre_process_suspend(simcall, simcall->issuer);
+        simcall_HANDLER_process_suspend(simcall, simcall->issuer);
       } else {
         SIMIX_simcall_answer(simcall);
       }
     }
-    surf_action_unref(action->sleep.surf_sleep);
-    action->sleep.surf_sleep = NULL;
+    surf_action_unref(sync->sleep.surf_sleep);
+    sync->sleep.surf_sleep = NULL;
   }
-  xbt_mallocator_release(simix_global->action_mallocator, action);
+  xbt_mallocator_release(simix_global->synchro_mallocator, sync);
   return 0;
 }
 
-smx_action_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout)
+smx_synchro_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout)
 {
-  smx_action_t res = SIMIX_process_sleep(issuer, timeout);
-  res->type = SIMIX_ACTION_JOIN;
+  smx_synchro_t res = SIMIX_process_sleep(issuer, timeout);
+  res->type = SIMIX_SYNC_JOIN;
   SIMIX_process_on_exit(process, (int_f_pvoid_pvoid_t)SIMIX_process_join_finish, res);
   return res;
 }
 
-void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration)
+void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration)
 {
   if (MC_is_active()) {
     MC_process_clock_add(simcall->issuer, duration);
@@ -771,14 +720,14 @@ void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration)
     SIMIX_simcall_answer(simcall);
     return;
   }
-  smx_action_t action = SIMIX_process_sleep(simcall->issuer, duration);
-  xbt_fifo_push(action->simcalls, simcall);
-  simcall->issuer->waiting_action = action;
+  smx_synchro_t sync = SIMIX_process_sleep(simcall->issuer, duration);
+  xbt_fifo_push(sync->simcalls, simcall);
+  simcall->issuer->waiting_synchro = sync;
 }
 
-smx_action_t SIMIX_process_sleep(smx_process_t process, double duration)
+smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration)
 {
-  smx_action_t action;
+  smx_synchro_t synchro;
   smx_host_t host = process->smx_host;
 
   /* check if the host is active */
@@ -787,32 +736,32 @@ smx_action_t SIMIX_process_sleep(smx_process_t process, double duration)
            sg_host_name(host));
   }
 
-  action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_SLEEP;
-  action->name = NULL;
+  synchro = xbt_mallocator_get(simix_global->synchro_mallocator);
+  synchro->type = SIMIX_SYNC_SLEEP;
+  synchro->name = NULL;
 #ifdef HAVE_TRACING
-  action->category = NULL;
+  synchro->category = NULL;
 #endif
 
-  action->sleep.host = host;
-  action->sleep.surf_sleep =
+  synchro->sleep.host = host;
+  synchro->sleep.surf_sleep =
       surf_workstation_sleep(host, duration);
 
-  surf_action_set_data(action->sleep.surf_sleep, action);
-  XBT_DEBUG("Create sleep action %p", action);
+  surf_action_set_data(synchro->sleep.surf_sleep, synchro);
+  XBT_DEBUG("Create sleep synchronization %p", synchro);
 
-  return action;
+  return synchro;
 }
 
-void SIMIX_post_process_sleep(smx_action_t action)
+void SIMIX_post_process_sleep(smx_synchro_t synchro)
 {
   smx_simcall_t simcall;
   e_smx_state_t state;
-  xbt_assert(action->type == SIMIX_ACTION_SLEEP || action->type == SIMIX_ACTION_JOIN);
+  xbt_assert(synchro->type == SIMIX_SYNC_SLEEP || synchro->type == SIMIX_SYNC_JOIN);
 
-  while ((simcall = xbt_fifo_shift(action->simcalls))) {
+  while ((simcall = xbt_fifo_shift(synchro->simcalls))) {
 
-    switch(surf_action_get_state(action->sleep.surf_sleep)){
+    switch(surf_action_get_state(synchro->sleep.surf_sleep)){
       case SURF_ACTION_FAILED:
         simcall->issuer->context->iwannadie = 1;
         //SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
@@ -831,43 +780,43 @@ void SIMIX_post_process_sleep(smx_action_t action)
       simcall->issuer->context->iwannadie = 1;
     }
     simcall_process_sleep__set__result(simcall, state);
-    simcall->issuer->waiting_action = NULL;
+    simcall->issuer->waiting_synchro = NULL;
     if (simcall->issuer->suspended) {
       XBT_DEBUG("Wait! This process is suspended and can't wake up now.");
       simcall->issuer->suspended = 0;
-      SIMIX_pre_process_suspend(simcall, simcall->issuer);
+      simcall_HANDLER_process_suspend(simcall, simcall->issuer);
     } else {
       SIMIX_simcall_answer(simcall);
     }
   }
 
-  SIMIX_process_sleep_destroy(action);
+  SIMIX_process_sleep_destroy(synchro);
 }
 
-void SIMIX_process_sleep_destroy(smx_action_t action)
+void SIMIX_process_sleep_destroy(smx_synchro_t synchro)
 {
-  XBT_DEBUG("Destroy action %p", action);
-  xbt_assert(action->type == SIMIX_ACTION_SLEEP || action->type == SIMIX_ACTION_JOIN);
+  XBT_DEBUG("Destroy synchro %p", synchro);
+  xbt_assert(synchro->type == SIMIX_SYNC_SLEEP || synchro->type == SIMIX_SYNC_JOIN);
 
-  if (action->sleep.surf_sleep) {
-    surf_action_unref(action->sleep.surf_sleep);
-    action->sleep.surf_sleep = NULL;
+  if (synchro->sleep.surf_sleep) {
+    surf_action_unref(synchro->sleep.surf_sleep);
+    synchro->sleep.surf_sleep = NULL;
   }
-  if (action->type == SIMIX_ACTION_SLEEP)
-    xbt_mallocator_release(simix_global->action_mallocator, action);
+  if (synchro->type == SIMIX_SYNC_SLEEP)
+    xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
 }
 
-void SIMIX_process_sleep_suspend(smx_action_t action)
+void SIMIX_process_sleep_suspend(smx_synchro_t synchro)
 {
-  xbt_assert(action->type == SIMIX_ACTION_SLEEP);
-  surf_action_suspend(action->sleep.surf_sleep);
+  xbt_assert(synchro->type == SIMIX_SYNC_SLEEP);
+  surf_action_suspend(synchro->sleep.surf_sleep);
 }
 
-void SIMIX_process_sleep_resume(smx_action_t action)
+void SIMIX_process_sleep_resume(smx_synchro_t synchro)
 {
-  XBT_DEBUG("Action state is %d on process_sleep_resume.", action->state);
-  xbt_assert(action->type == SIMIX_ACTION_SLEEP);
-  surf_action_resume(action->sleep.surf_sleep);
+  XBT_DEBUG("Synchro state is %d on process_sleep_resume.", synchro->state);
+  xbt_assert(synchro->type == SIMIX_SYNC_SLEEP);
+  surf_action_resume(synchro->sleep.surf_sleep);
 }
 
 /**
@@ -977,11 +926,6 @@ void SIMIX_process_on_exit_runall(smx_process_t process) {
   }
 }
 
-void SIMIX_pre_process_on_exit(smx_simcall_t simcall, smx_process_t process,
-                              int_f_pvoid_pvoid_t fun, void *data) {
-  SIMIX_process_on_exit(process, fun, data);
-}
-
 void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void *data) {
   xbt_assert(process, "current process not found: are you in maestro context ?");
 
@@ -994,10 +938,6 @@ void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void
   xbt_dynar_push_as(process->on_exit,s_smx_process_exit_fun_t,exit_fun);
 }
 
-void SIMIX_pre_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
-                                       int auto_restart) {
-  SIMIX_process_auto_restart_set(process, auto_restart);
-}
 /**
  * \brief Sets the auto-restart status of the process.
  * If set to 1, the process will be automatically restarted when its host
@@ -1007,7 +947,7 @@ void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart) {
   process->auto_restart = auto_restart;
 }
 
-smx_process_t SIMIX_pre_process_restart(smx_simcall_t simcall, smx_process_t process) {
+smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process) {
   return SIMIX_process_restart(process, simcall->issuer);
 }
 /**
index d49eced..8b4f8ed 100644 (file)
@@ -8,7 +8,7 @@
 #define _SIMIX_PROCESS_PRIVATE_H
 
 #include "simgrid/simix.h"
-#include "smx_smurf_private.h"
+#include "popping_private.h"
 
 SG_BEGIN_DECL()
 
@@ -48,8 +48,8 @@ typedef struct s_smx_process {
   unsigned auto_restart:1;
 
   smx_host_t new_host;          /* if not null, the host on which the process must migrate to */
-  smx_action_t waiting_action;  /* the current blocking action if any */
-  xbt_fifo_t comms;       /* the current non-blocking communication actions */
+  smx_synchro_t waiting_synchro;  /* the current blocking synchro if any */
+  xbt_fifo_t comms;       /* the current non-blocking communication synchros */
   xbt_dict_t properties;
   s_smx_simcall_t simcall;
   void *data;                   /* kept for compatibility, it should be replaced with moddata */
@@ -84,12 +84,9 @@ void SIMIX_process_empty_trash(void);
 void SIMIX_process_yield(smx_process_t self);
 xbt_running_ctx_t *SIMIX_process_get_running_context(void);
 void SIMIX_process_exception_terminate(xbt_ex_t * e);
-void SIMIX_pre_process_change_host(smx_simcall_t, smx_process_t process,
-           smx_host_t dest);
 void SIMIX_process_change_host(smx_process_t process,
              smx_host_t dest);
-void SIMIX_pre_process_suspend(smx_simcall_t simcall, smx_process_t process);
-smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer);
+smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer);
 void SIMIX_process_resume(smx_process_t process, smx_process_t issuer);
 int SIMIX_process_get_PID(smx_process_t self);
 int SIMIX_process_get_PPID(smx_process_t self);
@@ -100,44 +97,16 @@ const char* SIMIX_process_get_name(smx_process_t process);
 smx_process_t SIMIX_process_get_by_name(const char* name);
 int SIMIX_process_is_suspended(smx_process_t process);
 xbt_dict_t SIMIX_process_get_properties(smx_process_t process);
-void SIMIX_pre_process_join(smx_simcall_t simcall, smx_process_t process, double timeout);
-smx_action_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout);
-void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration);
-smx_action_t SIMIX_process_sleep(smx_process_t process, double duration);
-void SIMIX_post_process_sleep(smx_action_t action);
-
-void SIMIX_process_sleep_suspend(smx_action_t action);
-void SIMIX_process_sleep_resume(smx_action_t action);
-void SIMIX_process_sleep_destroy(smx_action_t action);
+smx_synchro_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout);
+smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration);
+void SIMIX_post_process_sleep(smx_synchro_t synchro);
+
+void SIMIX_process_sleep_suspend(smx_synchro_t synchro);
+void SIMIX_process_sleep_resume(smx_synchro_t synchro);
+void SIMIX_process_sleep_destroy(smx_synchro_t synchro);
 void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart);
 smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer);
 
-// pre prototypes
-void SIMIX_pre_process_create(smx_simcall_t simcall, smx_process_t *process,
-                             const char *name, xbt_main_func_t code, void *data,
-                             const char *hostname, double kill_time, int argc,
-                             char **argv, xbt_dict_t properties, int auto_restart);
-void SIMIX_pre_process_kill(smx_simcall_t simcall, smx_process_t process);
-void SIMIX_pre_process_killall(smx_simcall_t simcall, int reset_pid);
-void SIMIX_pre_process_cleanup(smx_simcall_t simcall, smx_process_t process);
-void SIMIX_pre_process_resume(smx_simcall_t simcall, smx_process_t process);
-int SIMIX_pre_process_count(smx_simcall_t simcall);
-void* SIMIX_pre_process_self_get_data(smx_simcall_t simcall, smx_process_t process);
-int SIMIX_pre_process_get_PID(smx_simcall_t simcall, smx_process_t self);
-int SIMIX_pre_process_get_PPID(smx_simcall_t simcall, smx_process_t self);
-void* SIMIX_pre_process_get_data(smx_simcall_t simcall, smx_process_t process);
-void SIMIX_pre_process_set_data(smx_simcall_t simcall, smx_process_t process,
-                                void *data);
-smx_host_t SIMIX_pre_process_get_host(smx_simcall_t simcall, smx_process_t process);
-const char* SIMIX_pre_process_get_name(smx_simcall_t simcall, smx_process_t process);
-int SIMIX_pre_process_is_suspended(smx_simcall_t simcall, smx_process_t process);
-xbt_dict_t SIMIX_pre_process_get_properties(smx_simcall_t simcall, smx_process_t process);
-void SIMIX_pre_process_on_exit(smx_simcall_t simcall, smx_process_t process,
-                              int_f_pvoid_pvoid_t fun, void *data);
-void SIMIX_pre_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
-                                       int auto_restart);
-smx_process_t SIMIX_pre_process_restart(smx_simcall_t simcall, smx_process_t process);
-
 SG_END_DECL()
 
 #endif
diff --git a/src/simix/smx_simcall_enter.c b/src/simix/smx_simcall_enter.c
deleted file mode 100644 (file)
index 71abd91..0000000
+++ /dev/null
@@ -1,649 +0,0 @@
-/*********************************************
- * File Generated by src/simix/simcalls.py   *
- *                from src/simix/simcalls.in *
- * Do not modify this file, add new simcalls *
- * in src/simix/simcalls.in                  *
- *********************************************/
-
-
-
-#include "smx_private.h"
-#ifdef HAVE_MC
-#include "mc/mc_private.h"
-#endif
-
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_smurf);
-
-/**
- * @brief unpack the simcall and activate the handler in kernel mode
- */
-void SIMIX_simcall_enter(smx_simcall_t simcall, int value)
-{
-  XBT_DEBUG("Handling simcall %p: %s", simcall, SIMIX_simcall_name(simcall->call));
-  SIMCALL_SET_MC_VALUE(simcall, value);
-  if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
-    return;
-  switch (simcall->call) {
-  case SIMCALL_HOST_GET_BY_NAME:
-      simcall->result.dp = SIMIX_pre_host_get_by_name(simcall ,  simcall->args[0].cc);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_NAME:
-      simcall->result.cc = SIMIX_pre_host_get_name(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_ON:
-       SIMIX_pre_host_on(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_OFF:
-       SIMIX_pre_host_off(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_PROPERTIES:
-      simcall->result.dp = SIMIX_pre_host_get_properties(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_CORE:
-      simcall->result.i = SIMIX_pre_host_get_core(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_PROCESS_LIST:
-      simcall->result.dp = SIMIX_pre_host_get_process_list(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_SPEED:
-      simcall->result.d = SIMIX_pre_host_get_speed(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_AVAILABLE_SPEED:
-      simcall->result.d = SIMIX_pre_host_get_available_speed(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_STATE:
-      simcall->result.i = SIMIX_pre_host_get_state(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_CURRENT_POWER_PEAK:
-      simcall->result.d = SIMIX_pre_host_get_current_power_peak(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_POWER_PEAK_AT:
-      simcall->result.d = SIMIX_pre_host_get_power_peak_at(simcall , (smx_host_t) simcall->args[0].dp,  simcall->args[1].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_NB_PSTATES:
-      simcall->result.i = SIMIX_pre_host_get_nb_pstates(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_SET_POWER_PEAK_AT:
-       SIMIX_pre_host_set_power_peak_at(simcall , (smx_host_t) simcall->args[0].dp,  simcall->args[1].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_CONSUMED_ENERGY:
-      simcall->result.d = SIMIX_pre_host_get_consumed_energy(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTE:
-      simcall->result.dp = SIMIX_pre_host_execute(simcall ,  simcall->args[0].cc, (smx_host_t) simcall->args[1].dp,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].d,  simcall->args[5].ul);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_PARALLEL_EXECUTE:
-      simcall->result.dp = SIMIX_pre_host_parallel_execute(simcall ,  simcall->args[0].cc,  simcall->args[1].i, (smx_host_t*) simcall->args[2].dp, (double*) simcall->args[3].dp, (double*) simcall->args[4].dp,  simcall->args[5].d,  simcall->args[6].d);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_DESTROY:
-       SIMIX_pre_host_execution_destroy(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_CANCEL:
-       SIMIX_pre_host_execution_cancel(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_GET_REMAINS:
-      simcall->result.d = SIMIX_pre_host_execution_get_remains(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_GET_STATE:
-      simcall->result.i = SIMIX_pre_host_execution_get_state(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_SET_PRIORITY:
-       SIMIX_pre_host_execution_set_priority(simcall , (smx_action_t) simcall->args[0].dp,  simcall->args[1].d);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_SET_BOUND:
-       SIMIX_pre_host_execution_set_bound(simcall , (smx_action_t) simcall->args[0].dp,  simcall->args[1].d);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_SET_AFFINITY:
-       SIMIX_pre_host_execution_set_affinity(simcall , (smx_action_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp,  simcall->args[2].ul);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_EXECUTION_WAIT:
-       SIMIX_pre_host_execution_wait(simcall , (smx_action_t) simcall->args[0].dp);
-       break;  
-
-case SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST:
-      simcall->result.dp = SIMIX_pre_host_get_mounted_storage_list(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST:
-      simcall->result.dp = SIMIX_pre_host_get_attached_storage_list(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_GET_PARAMS:
-       SIMIX_pre_host_get_params(simcall , (smx_host_t) simcall->args[0].dp, (ws_params_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_HOST_SET_PARAMS:
-       SIMIX_pre_host_set_params(simcall , (smx_host_t) simcall->args[0].dp, (ws_params_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_CREATE:
-      simcall->result.dp = SIMIX_pre_vm_create(simcall ,  simcall->args[0].cc, (smx_host_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_START:
-       SIMIX_pre_vm_start(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_GET_STATE:
-      simcall->result.i = SIMIX_pre_vm_get_state(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_MIGRATE:
-       SIMIX_pre_vm_migrate(simcall , (smx_host_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_GET_PM:
-      simcall->result.dp = SIMIX_pre_vm_get_pm(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_SET_BOUND:
-       SIMIX_pre_vm_set_bound(simcall , (smx_host_t) simcall->args[0].dp,  simcall->args[1].d);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_SET_AFFINITY:
-       SIMIX_pre_vm_set_affinity(simcall , (smx_host_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp,  simcall->args[2].ul);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_DESTROY:
-       SIMIX_pre_vm_destroy(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_SUSPEND:
-       SIMIX_pre_vm_suspend(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_RESUME:
-       SIMIX_pre_vm_resume(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_SHUTDOWN:
-       SIMIX_pre_vm_shutdown(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_SAVE:
-       SIMIX_pre_vm_save(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_VM_RESTORE:
-       SIMIX_pre_vm_restore(simcall , (smx_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_CREATE:
-       SIMIX_pre_process_create(simcall , (smx_process_t*) simcall->args[0].dp,  simcall->args[1].cc, (xbt_main_func_t) simcall->args[2].fp,  simcall->args[3].dp,  simcall->args[4].cc,  simcall->args[5].d,  simcall->args[6].i, (char**) simcall->args[7].dp, (xbt_dict_t) simcall->args[8].dp,  simcall->args[9].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_KILL:
-       SIMIX_pre_process_kill(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_KILLALL:
-       SIMIX_pre_process_killall(simcall ,  simcall->args[0].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_CLEANUP:
-       SIMIX_pre_process_cleanup(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_CHANGE_HOST:
-       SIMIX_pre_process_change_host(simcall , (smx_process_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_SUSPEND:
-       SIMIX_pre_process_suspend(simcall , (smx_process_t) simcall->args[0].dp);
-       break;  
-
-case SIMCALL_PROCESS_RESUME:
-       SIMIX_pre_process_resume(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_COUNT:
-      simcall->result.i = SIMIX_pre_process_count(simcall );
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_GET_PID:
-      simcall->result.i = SIMIX_pre_process_get_PID(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_GET_PPID:
-      simcall->result.i = SIMIX_pre_process_get_PPID(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_GET_DATA:
-      simcall->result.dp = SIMIX_pre_process_get_data(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_SET_DATA:
-       SIMIX_pre_process_set_data(simcall , (smx_process_t) simcall->args[0].dp,  simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_GET_HOST:
-      simcall->result.dp = SIMIX_pre_process_get_host(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_GET_NAME:
-      simcall->result.cc = SIMIX_pre_process_get_name(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_IS_SUSPENDED:
-      simcall->result.i = SIMIX_pre_process_is_suspended(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_GET_PROPERTIES:
-      simcall->result.dp = SIMIX_pre_process_get_properties(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_JOIN:
-       SIMIX_pre_process_join(simcall , (smx_process_t) simcall->args[0].dp,  simcall->args[1].d);
-       break;  
-
-case SIMCALL_PROCESS_SLEEP:
-       SIMIX_pre_process_sleep(simcall ,  simcall->args[0].d);
-       break;  
-
-case SIMCALL_PROCESS_ON_EXIT:
-       SIMIX_pre_process_on_exit(simcall , (smx_process_t) simcall->args[0].dp, (int_f_pvoid_pvoid_t) simcall->args[1].fp,  simcall->args[2].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_AUTO_RESTART_SET:
-       SIMIX_pre_process_auto_restart_set(simcall , (smx_process_t) simcall->args[0].dp,  simcall->args[1].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_PROCESS_RESTART:
-      simcall->result.dp = SIMIX_pre_process_restart(simcall , (smx_process_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_RDV_CREATE:
-      simcall->result.dp = SIMIX_pre_rdv_create(simcall ,  simcall->args[0].cc);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_RDV_DESTROY:
-       SIMIX_pre_rdv_destroy(simcall , (smx_rdv_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_RDV_COMM_COUNT_BY_HOST:
-      simcall->result.ui = SIMIX_pre_rdv_comm_count_by_host(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_RDV_GET_HEAD:
-      simcall->result.dp = SIMIX_pre_rdv_get_head(simcall , (smx_rdv_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_RDV_SET_RECEIVER:
-       SIMIX_pre_rdv_set_receiver(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_process_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_RDV_GET_RECEIVER:
-      simcall->result.dp = SIMIX_pre_rdv_get_receiver(simcall , (smx_rdv_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_IPROBE:
-      simcall->result.dp = SIMIX_pre_comm_iprobe(simcall , (smx_rdv_t) simcall->args[0].dp,  simcall->args[1].i,  simcall->args[2].i,  simcall->args[3].i, (simix_match_func_t) simcall->args[4].fp,  simcall->args[5].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_SEND:
-       SIMIX_pre_comm_send(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].dp,  simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_copy_data_func_t) simcall->args[7].fp,  simcall->args[8].dp,  simcall->args[9].d);
-       break;  
-
-case SIMCALL_COMM_ISEND:
-      simcall->result.dp = SIMIX_pre_comm_isend(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp,  simcall->args[2].d,  simcall->args[3].d,  simcall->args[4].dp,  simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_clean_func_t) simcall->args[7].fp, (simix_copy_data_func_t) simcall->args[8].fp,  simcall->args[9].dp,  simcall->args[10].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_RECV:
-       SIMIX_pre_comm_recv(simcall , (smx_rdv_t) simcall->args[0].dp,  simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp,  simcall->args[5].dp,  simcall->args[6].d,  simcall->args[7].d);
-       break;  
-
-case SIMCALL_COMM_IRECV:
-      simcall->result.dp = SIMIX_pre_comm_irecv(simcall , (smx_rdv_t) simcall->args[0].dp,  simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp,  simcall->args[5].dp,  simcall->args[6].d);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_CANCEL:
-       SIMIX_pre_comm_cancel(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_WAITANY:
-       SIMIX_pre_comm_waitany(simcall , (xbt_dynar_t) simcall->args[0].dp);
-       break;  
-
-case SIMCALL_COMM_WAIT:
-       SIMIX_pre_comm_wait(simcall , (smx_action_t) simcall->args[0].dp,  simcall->args[1].d);
-       break;  
-
-case SIMCALL_COMM_TEST:
-       SIMIX_pre_comm_test(simcall , (smx_action_t) simcall->args[0].dp);
-       break;  
-
-case SIMCALL_COMM_TESTANY:
-       SIMIX_pre_comm_testany(simcall , (xbt_dynar_t) simcall->args[0].dp);
-       break;  
-
-case SIMCALL_COMM_GET_REMAINS:
-      simcall->result.d = SIMIX_pre_comm_get_remains(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_GET_STATE:
-      simcall->result.i = SIMIX_pre_comm_get_state(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_GET_SRC_DATA:
-      simcall->result.dp = SIMIX_pre_comm_get_src_data(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_GET_DST_DATA:
-      simcall->result.dp = SIMIX_pre_comm_get_dst_data(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_GET_SRC_PROC:
-      simcall->result.dp = SIMIX_pre_comm_get_src_proc(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COMM_GET_DST_PROC:
-      simcall->result.dp = SIMIX_pre_comm_get_dst_proc(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_MUTEX_INIT:
-      simcall->result.dp = SIMIX_pre_mutex_init(simcall );
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_MUTEX_DESTROY:
-       SIMIX_pre_mutex_destroy(simcall , (smx_mutex_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_MUTEX_LOCK:
-       SIMIX_pre_mutex_lock(simcall , (smx_mutex_t) simcall->args[0].dp);
-       break;  
-
-case SIMCALL_MUTEX_TRYLOCK:
-      simcall->result.i = SIMIX_pre_mutex_trylock(simcall , (smx_mutex_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_MUTEX_UNLOCK:
-       SIMIX_pre_mutex_unlock(simcall , (smx_mutex_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COND_INIT:
-      simcall->result.dp = SIMIX_pre_cond_init(simcall );
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COND_DESTROY:
-       SIMIX_pre_cond_destroy(simcall , (smx_cond_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COND_SIGNAL:
-       SIMIX_pre_cond_signal(simcall , (smx_cond_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_COND_WAIT:
-       SIMIX_pre_cond_wait(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp);
-       break;  
-
-case SIMCALL_COND_WAIT_TIMEOUT:
-       SIMIX_pre_cond_wait_timeout(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp,  simcall->args[2].d);
-       break;  
-
-case SIMCALL_COND_BROADCAST:
-       SIMIX_pre_cond_broadcast(simcall , (smx_cond_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_SEM_INIT:
-      simcall->result.dp = SIMIX_pre_sem_init(simcall ,  simcall->args[0].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_SEM_DESTROY:
-       SIMIX_pre_sem_destroy(simcall , (smx_sem_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_SEM_RELEASE:
-       SIMIX_pre_sem_release(simcall , (smx_sem_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_SEM_WOULD_BLOCK:
-      simcall->result.i = SIMIX_pre_sem_would_block(simcall , (smx_sem_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_SEM_ACQUIRE:
-       SIMIX_pre_sem_acquire(simcall , (smx_sem_t) simcall->args[0].dp);
-       break;  
-
-case SIMCALL_SEM_ACQUIRE_TIMEOUT:
-       SIMIX_pre_sem_acquire_timeout(simcall , (smx_sem_t) simcall->args[0].dp,  simcall->args[1].d);
-       break;  
-
-case SIMCALL_SEM_GET_CAPACITY:
-      simcall->result.i = SIMIX_pre_sem_get_capacity(simcall , (smx_sem_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_FILE_READ:
-       SIMIX_pre_file_read(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp);
-       break;  
-
-case SIMCALL_FILE_WRITE:
-       SIMIX_pre_file_write(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp);
-       break;  
-
-case SIMCALL_FILE_OPEN:
-       SIMIX_pre_file_open(simcall ,  simcall->args[0].cc, (smx_host_t) simcall->args[1].dp);
-       break;  
-
-case SIMCALL_FILE_CLOSE:
-       SIMIX_pre_file_close(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
-       break;  
-
-case SIMCALL_FILE_UNLINK:
-      simcall->result.i = SIMIX_pre_file_unlink(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_FILE_GET_SIZE:
-      simcall->result.sgsz = SIMIX_pre_file_get_size(simcall , (smx_file_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_FILE_TELL:
-      simcall->result.sgsz = SIMIX_pre_file_tell(simcall , (smx_file_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_FILE_SEEK:
-      simcall->result.i = SIMIX_pre_file_seek(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].sgoff,  simcall->args[2].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_FILE_GET_INFO:
-      simcall->result.dp = SIMIX_pre_file_get_info(simcall , (smx_file_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_FILE_MOVE:
-      simcall->result.i = SIMIX_pre_file_move(simcall , (smx_file_t) simcall->args[0].dp,  simcall->args[1].cc);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_STORAGE_GET_FREE_SIZE:
-      simcall->result.sgsz = SIMIX_pre_storage_get_free_size(simcall , (smx_storage_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_STORAGE_GET_USED_SIZE:
-      simcall->result.sgsz = SIMIX_pre_storage_get_used_size(simcall , (smx_storage_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_STORAGE_GET_PROPERTIES:
-      simcall->result.dp = SIMIX_pre_storage_get_properties(simcall , (smx_storage_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_STORAGE_GET_CONTENT:
-      simcall->result.dp = SIMIX_pre_storage_get_content(simcall , (smx_storage_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_ASR_GET_PROPERTIES:
-      simcall->result.dp = SIMIX_pre_asr_get_properties(simcall ,  simcall->args[0].cc);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-case SIMCALL_COMM_IS_LATENCY_BOUNDED:
-      simcall->result.i = SIMIX_pre_comm_is_latency_bounded(simcall , (smx_action_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-#endif
-
-#ifdef HAVE_TRACING
-case SIMCALL_SET_CATEGORY:
-       SIMIX_pre_set_category(simcall , (smx_action_t) simcall->args[0].dp,  simcall->args[1].cc);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-#endif
-
-#ifdef HAVE_MC
-case SIMCALL_MC_SNAPSHOT:
-      simcall->result.dp = SIMIX_pre_mc_snapshot(simcall );
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_MC_COMPARE_SNAPSHOTS:
-      simcall->result.i = SIMIX_pre_mc_compare_snapshots(simcall ,  simcall->args[0].dp,  simcall->args[1].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-case SIMCALL_MC_RANDOM:
-      simcall->result.i = SIMIX_pre_mc_random(simcall ,  simcall->args[0].i,  simcall->args[1].i);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
-#endif
-
-    case NUM_SIMCALLS:
-      break;
-    case SIMCALL_NONE:
-      THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s",
-          SIMIX_process_get_name(simcall->issuer),
-          SIMIX_host_get_name(SIMIX_process_get_host(simcall->issuer))
-          );
-      break;
-
-    /* ****************************************************************************************** */
-    /* TUTORIAL: New API                                                                        */
-    /* ****************************************************************************************** */
-    case SIMCALL_NEW_API_INIT:
-      SIMIX_pre_new_api_fct(simcall);
-      break;
-  }
-}
-  
\ No newline at end of file
diff --git a/src/simix/smx_smurf.c b/src/simix/smx_smurf.c
deleted file mode 100644 (file)
index 2b65704..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/* 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. */
-
-#include "smx_private.h"
-#include "xbt/fifo.h"
-#include "xbt/xbt_os_thread.h"
-#ifdef HAVE_MC
-#include "mc/mc_private.h"
-#endif
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_smurf, simix,
-                                "Logging specific to SIMIX (SMURF)");
-
-XBT_INLINE smx_simcall_t SIMIX_simcall_mine()
-{
-  smx_process_t issuer = SIMIX_process_self();
-  return &issuer->simcall;
-}
-
-/**
- * \brief Makes the current process do a simcall to the kernel and yields
- * until completion. If the current thread is maestro, we don't yield and
- * execute the simcall directly.
- * \param self the current process
- */
-void SIMIX_simcall_push(smx_process_t self)
-{
-  if (self != simix_global->maestro_process) {
-    XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-              SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-    SIMIX_process_yield(self);
-  } else {
-    XBT_DEBUG("I'm the maestro, execute the simcall directly");
-    SIMIX_simcall_enter(&self->simcall, 0);
-  }
-}
-
-void SIMIX_simcall_answer(smx_simcall_t simcall)
-{
-  if (simcall->issuer != simix_global->maestro_process){
-    XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call,
-        simcall->issuer->name, simcall->issuer);
-    simcall->issuer->simcall.call = SIMCALL_NONE;
-/*    This check should be useless and slows everyone. Reactivate if you see something
- *    weird in process scheduling.
- */
-/*    if(!xbt_dynar_member(simix_global->process_to_run, &(simcall->issuer))) */
-    xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, simcall->issuer);
-/*    else DIE_IMPOSSIBLE; */
-  }
-}
-
-void SIMIX_simcall_exit(smx_action_t action)
-{
-  switch (action->type) {
-
-    case SIMIX_ACTION_EXECUTE:
-    case SIMIX_ACTION_PARALLEL_EXECUTE:
-      SIMIX_post_host_execute(action);
-      break;
-
-    case SIMIX_ACTION_COMMUNICATE:
-      SIMIX_post_comm(action);
-      break;
-
-    case SIMIX_ACTION_SLEEP:
-      SIMIX_post_process_sleep(action);
-      break;
-
-    case SIMIX_ACTION_JOIN:
-      SIMIX_post_process_sleep(action);
-      break;
-
-    case SIMIX_ACTION_SYNCHRO:
-      SIMIX_post_synchro(action);
-      break;
-
-    case SIMIX_ACTION_IO:
-      SIMIX_post_io(action);
-      break;
-
-    /* ****************************************************************************************** */
-    /* TUTORIAL: New API                                                                        */
-    /* ****************************************************************************************** */
-    case SIMIX_ACTION_NEW_API:
-      SIMIX_post_new_api(action);
-      break;
-  }
-}
-
-/* New Simcal interface */
-
-/* FIXME: add types for every simcall */
-//const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p" };
-/* FIXME find a way to make this work
-simcall_handler_t simcall_table[NUM_SIMCALLS] = {
-#undef SIMCALL_ENUM_ELEMENT
-#define SIMCALL_ENUM_ELEMENT(x,y) &y // generate strings from the enumeration values
-SIMCALL_LIST
-#undef SIMCALL_ENUM_ELEMENT
-};*/
-
-/* New Simcal interface */
-
-/* FIXME: add types for every simcall */
-//const char *simcall_types[NUM_SIMCALLS] = { [SIMCALL_HOST_EXECUTE] = "%s%p%f%f%p", [SIMCALL_HOST_EXECUTION_WAIT] = "%p%p" };
-
-
-/*TOFIX find a way to make this work
-simcall_handler_t simcall_table[NUM_SIMCALLS] = {
-#undef SIMCALL_ENUM_ELEMENT
-#define SIMCALL_ENUM_ELEMENT(x,y) &y // generate strings from the enumeration values
-SIMCALL_LIST
-#undef SIMCALL_ENUM_ELEMENT
-};*/
-
index 22e7180..3f25efe 100644 (file)
@@ -9,31 +9,31 @@
 
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix,
-                                "Logging specific to SIMIX (synchronization)");
+                                "SIMIX Synchronization (mutex, semaphores and conditions)");
 
-static smx_action_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout);
-static void SIMIX_synchro_finish(smx_action_t action);
+static smx_synchro_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout);
+static void SIMIX_synchro_finish(smx_synchro_t synchro);
 static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
                              smx_process_t issuer, smx_simcall_t simcall);
 static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
                             smx_simcall_t simcall);
 
-/***************************** Synchro action *********************************/
+/***************************** Raw synchronization *********************************/
 
-static smx_action_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout)
+static smx_synchro_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout)
 {
   XBT_IN("(%p, %f)",smx_host,timeout);
 
-  smx_action_t action;
-  action = xbt_mallocator_get(simix_global->action_mallocator);
-  action->type = SIMIX_ACTION_SYNCHRO;
-  action->name = xbt_strdup("synchro");
-  action->synchro.sleep = 
+  smx_synchro_t sync;
+  sync = xbt_mallocator_get(simix_global->synchro_mallocator);
+  sync->type = SIMIX_SYNC_SYNCHRO;
+  sync->name = xbt_strdup("synchro");
+  sync->synchro.sleep = 
     surf_workstation_sleep(smx_host, timeout);
 
-  surf_action_set_data(action->synchro.sleep, action);
+  surf_action_set_data(sync->synchro.sleep, sync);
   XBT_OUT();
-  return action;
+  return sync;
 }
 
 void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall)
@@ -67,36 +67,36 @@ void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall)
   XBT_OUT();
 }
 
-void SIMIX_synchro_destroy(smx_action_t action)
+void SIMIX_synchro_destroy(smx_synchro_t synchro)
 {
-  XBT_IN("(%p)",action);
-  XBT_DEBUG("Destroying synchro %p", action);
-  xbt_assert(action->type == SIMIX_ACTION_SYNCHRO);
-  surf_action_unref(action->synchro.sleep);
-  xbt_free(action->name);
-  xbt_mallocator_release(simix_global->action_mallocator, action);
+  XBT_IN("(%p)",synchro);
+  XBT_DEBUG("Destroying synchro %p", synchro);
+  xbt_assert(synchro->type == SIMIX_SYNC_SYNCHRO);
+  surf_action_unref(synchro->synchro.sleep);
+  xbt_free(synchro->name);
+  xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
   XBT_OUT();
 }
 
-void SIMIX_post_synchro(smx_action_t action)
+void SIMIX_post_synchro(smx_synchro_t synchro)
 {
-  XBT_IN("(%p)",action);
-  xbt_assert(action->type == SIMIX_ACTION_SYNCHRO);
-  if (surf_action_get_state(action->synchro.sleep) == SURF_ACTION_FAILED)
-    action->state = SIMIX_FAILED;
-  else if(surf_action_get_state(action->synchro.sleep) == SURF_ACTION_DONE)
-    action->state = SIMIX_SRC_TIMEOUT;
-
-  SIMIX_synchro_finish(action);  
+  XBT_IN("(%p)",synchro);
+  xbt_assert(synchro->type == SIMIX_SYNC_SYNCHRO);
+  if (surf_action_get_state(synchro->synchro.sleep) == SURF_ACTION_FAILED)
+    synchro->state = SIMIX_FAILED;
+  else if(surf_action_get_state(synchro->synchro.sleep) == SURF_ACTION_DONE)
+    synchro->state = SIMIX_SRC_TIMEOUT;
+
+  SIMIX_synchro_finish(synchro);  
   XBT_OUT();
 }
 
-static void SIMIX_synchro_finish(smx_action_t action)
+static void SIMIX_synchro_finish(smx_synchro_t synchro)
 {
-  XBT_IN("(%p)",action);
-  smx_simcall_t simcall = xbt_fifo_shift(action->simcalls);
+  XBT_IN("(%p)",synchro);
+  smx_simcall_t simcall = xbt_fifo_shift(synchro->simcalls);
 
-  switch (action->state) {
+  switch (synchro->state) {
 
     case SIMIX_SRC_TIMEOUT:
       SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Synchro's wait timeout");
@@ -113,14 +113,14 @@ static void SIMIX_synchro_finish(smx_action_t action)
   }
 
   SIMIX_synchro_stop_waiting(simcall->issuer, simcall);
-  simcall->issuer->waiting_action = NULL;
-  SIMIX_synchro_destroy(action);
+  simcall->issuer->waiting_synchro = NULL;
+  SIMIX_synchro_destroy(synchro);
   SIMIX_simcall_answer(simcall);
   XBT_OUT();
 }
 /*********************************** Mutex ************************************/
 
-smx_mutex_t SIMIX_pre_mutex_init(smx_simcall_t simcall){
+smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall){
   return SIMIX_mutex_init();
 }
 /**
@@ -145,19 +145,19 @@ smx_mutex_t SIMIX_mutex_init(void)
  * \brief Handles a mutex lock simcall.
  * \param simcall the simcall
  */
-void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)
+void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)
 {
   XBT_IN("(%p)",simcall);
   /* FIXME: check where to validate the arguments */
-  smx_action_t sync_act = NULL;
+  smx_synchro_t synchro = NULL;
   smx_process_t process = simcall->issuer;
 
   if (mutex->locked) {
     /* FIXME: check if the host is active ? */
-    /* Somebody using the mutex, use a synchro action to get host failures */
-    sync_act = SIMIX_synchro_wait(process->smx_host, -1);
-    xbt_fifo_push(sync_act->simcalls, simcall);
-    simcall->issuer->waiting_action = sync_act;
+    /* Somebody using the mutex, use a synchronization to get host failures */
+    synchro = SIMIX_synchro_wait(process->smx_host, -1);
+    xbt_fifo_push(synchro->simcalls, simcall);
+    simcall->issuer->waiting_synchro = synchro;
     xbt_swag_insert(simcall->issuer, mutex->sleeping);   
   } else {
     /* mutex free */
@@ -168,9 +168,9 @@ void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)
   XBT_OUT();
 }
 
-int SIMIX_pre_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex){
+int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex){
   return SIMIX_mutex_trylock(mutex, simcall->issuer);
-}      
+}
 /**
  * \brief Tries to lock a mutex.
  *
@@ -194,7 +194,7 @@ int SIMIX_mutex_trylock(smx_mutex_t mutex, smx_process_t issuer)
   return 1;
 }
 
-void SIMIX_pre_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex){
+void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex){
    SIMIX_mutex_unlock(mutex, simcall->issuer);
 }
 /**
@@ -219,8 +219,8 @@ void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer)
 
   if (xbt_swag_size(mutex->sleeping) > 0) {
     p = xbt_swag_extract(mutex->sleeping);
-    SIMIX_synchro_destroy(p->waiting_action);
-    p->waiting_action = NULL;
+    SIMIX_synchro_destroy(p->waiting_synchro);
+    p->waiting_synchro = NULL;
     mutex->owner = p;
     SIMIX_simcall_answer(&p->simcall);
   } else {
@@ -231,9 +231,6 @@ void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer)
   XBT_OUT();
 }
 
-void SIMIX_pre_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex){
-  SIMIX_mutex_destroy(mutex);
-}
 /**
  * \brief Destroys a mutex.
  *
@@ -252,9 +249,6 @@ void SIMIX_mutex_destroy(smx_mutex_t mutex)
 
 /********************************* Condition **********************************/
 
-smx_cond_t SIMIX_pre_cond_init(smx_simcall_t simcall){
-  return SIMIX_cond_init();
-}
 /**
  * \brief Initialize a condition.
  *
@@ -277,7 +271,7 @@ smx_cond_t SIMIX_cond_init(void)
  * \brief Handle a condition waiting simcall without timeouts
  * \param simcall the simcall
  */
-void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex)
+void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex)
 {
   XBT_IN("(%p)",simcall);
   smx_process_t issuer = simcall->issuer;
@@ -290,7 +284,7 @@ void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mut
  * \brief Handle a condition waiting simcall with timeouts
  * \param simcall the simcall
  */
-void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond,
+void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond,
                                 smx_mutex_t mutex, double timeout)
 {
   XBT_IN("(%p)",simcall);
@@ -305,7 +299,7 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
                              smx_process_t issuer, smx_simcall_t simcall)
 {
   XBT_IN("(%p, %p, %f, %p,%p)",cond,mutex,timeout,issuer,simcall);
-  smx_action_t sync_act = NULL;
+  smx_synchro_t synchro = NULL;
 
   XBT_DEBUG("Wait condition %p", cond);
 
@@ -316,16 +310,13 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
     SIMIX_mutex_unlock(mutex, issuer);
   }
 
-  sync_act = SIMIX_synchro_wait(issuer->smx_host, timeout);
-  xbt_fifo_unshift(sync_act->simcalls, simcall);
-  issuer->waiting_action = sync_act;
+  synchro = SIMIX_synchro_wait(issuer->smx_host, timeout);
+  xbt_fifo_unshift(synchro->simcalls, simcall);
+  issuer->waiting_synchro = synchro;
   xbt_swag_insert(simcall->issuer, cond->sleeping);   
   XBT_OUT();
 }
 
-void SIMIX_pre_cond_signal(smx_simcall_t simcall, smx_cond_t cond){
-  SIMIX_cond_signal(cond);
-}
 /**
  * \brief Signalizes a condition.
  *
@@ -346,9 +337,9 @@ void SIMIX_cond_signal(smx_cond_t cond)
      to make it acquire the mutex */
   if ((proc = xbt_swag_extract(cond->sleeping))) {
 
-    /* Destroy waiter's synchro action */
-    SIMIX_synchro_destroy(proc->waiting_action);
-    proc->waiting_action = NULL;
+    /* Destroy waiter's synchronization */
+    SIMIX_synchro_destroy(proc->waiting_synchro);
+    proc->waiting_synchro = NULL;
 
     /* Now transform the cond wait simcall into a mutex lock one */
     simcall = &proc->simcall;
@@ -358,14 +349,11 @@ void SIMIX_cond_signal(smx_cond_t cond)
       mutex = simcall_cond_wait_timeout__get__mutex(simcall);
     simcall->call = SIMCALL_MUTEX_LOCK;
 
-    SIMIX_pre_mutex_lock(simcall, mutex);
+    simcall_HANDLER_mutex_lock(simcall, mutex);
   }
   XBT_OUT();
 }
 
-void SIMIX_pre_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond){
-  SIMIX_cond_broadcast(cond);
-}
 /**
  * \brief Broadcasts a condition.
  *
@@ -385,11 +373,8 @@ void SIMIX_cond_broadcast(smx_cond_t cond)
   XBT_OUT();
 }
 
-void SIMIX_pre_cond_destroy(smx_simcall_t simcall, smx_cond_t cond){
-  SIMIX_cond_destroy(cond);
-}
 /**
- * \brief Destroys a contidion.
+ * \brief Destroys a condition.
  *
  * Destroys and frees the condition's memory. 
  * \param cond A condition
@@ -411,9 +396,6 @@ void SIMIX_cond_destroy(smx_cond_t cond)
 
 /******************************** Semaphores **********************************/
 #define SMX_SEM_NOLIMIT 99999
-smx_sem_t SIMIX_pre_sem_init(smx_simcall_t simcall, unsigned int value){
-  return SIMIX_sem_init(value);
-}
 /** @brief Initialize a semaphore */
 smx_sem_t SIMIX_sem_init(unsigned int value)
 {
@@ -427,9 +409,6 @@ smx_sem_t SIMIX_sem_init(unsigned int value)
   return sem;
 }
 
-void SIMIX_pre_sem_destroy(smx_simcall_t simcall, smx_sem_t sem){
-  SIMIX_sem_destroy(sem);
-}
 /** @brief Destroys a semaphore */
 void SIMIX_sem_destroy(smx_sem_t sem)
 {
@@ -444,7 +423,7 @@ void SIMIX_sem_destroy(smx_sem_t sem)
   XBT_OUT();
 }
 
-void SIMIX_pre_sem_release(smx_simcall_t simcall, smx_sem_t sem){
+void simcall_HANDLER_sem_release(smx_simcall_t simcall, smx_sem_t sem){
   SIMIX_sem_release(sem);
 }
 /** @brief release the semaphore
@@ -459,8 +438,8 @@ void SIMIX_sem_release(smx_sem_t sem)
 
   XBT_DEBUG("Sem release semaphore %p", sem);
   if ((proc = xbt_swag_extract(sem->sleeping))) {
-    SIMIX_synchro_destroy(proc->waiting_action);
-    proc->waiting_action = NULL;
+    SIMIX_synchro_destroy(proc->waiting_synchro);
+    proc->waiting_synchro = NULL;
     SIMIX_simcall_answer(&proc->simcall);
   } else if (sem->value < SMX_SEM_NOLIMIT) {
     sem->value++;
@@ -476,7 +455,7 @@ int SIMIX_sem_would_block(smx_sem_t sem)
   return (sem->value <= 0);
 }
 
-int SIMIX_pre_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem){
+int simcall_HANDLER_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem){
   return SIMIX_sem_get_capacity(sem);
 }
 /** @brief Returns the current capacity of the semaphore */
@@ -491,13 +470,13 @@ static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
                             smx_simcall_t simcall)
 {
   XBT_IN("(%p, %f, %p, %p)",sem,timeout,issuer,simcall);
-  smx_action_t sync_act = NULL;
+  smx_synchro_t synchro = NULL;
 
   XBT_DEBUG("Wait semaphore %p (timeout:%f)", sem, timeout);
   if (sem->value <= 0) {
-    sync_act = SIMIX_synchro_wait(issuer->smx_host, timeout);
-    xbt_fifo_unshift(sync_act->simcalls, simcall);
-    issuer->waiting_action = sync_act;
+    synchro = SIMIX_synchro_wait(issuer->smx_host, timeout);
+    xbt_fifo_unshift(synchro->simcalls, simcall);
+    issuer->waiting_synchro = synchro;
     xbt_swag_insert(issuer, sem->sleeping);
   } else {
     sem->value--;
@@ -510,7 +489,7 @@ static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer,
  * \brief Handles a sem acquire simcall without timeout.
  * \param simcall the simcall
  */
-void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem)
+void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem)
 {
   XBT_IN("(%p)",simcall);
   _SIMIX_sem_wait(sem, -1, simcall->issuer, simcall);
@@ -521,9 +500,12 @@ void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem)
  * \brief Handles a sem acquire simcall with timeout.
  * \param simcall the simcall
  */
-void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout)
+void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout)
 {
   XBT_IN("(%p)",simcall);
   _SIMIX_sem_wait(sem, timeout, simcall->issuer, simcall);  
   XBT_OUT();
 }
+int simcall_HANDLER_sem_would_block(smx_simcall_t simcall, smx_sem_t sem) {
+  return SIMIX_sem_would_block(sem);
+}
index ad411fd..9907e41 100644 (file)
@@ -26,48 +26,24 @@ typedef struct s_smx_sem {
   xbt_swag_t sleeping;          /* list of sleeping process */
 } s_smx_sem_t;
 
-void SIMIX_post_synchro(smx_action_t action);
+void SIMIX_post_synchro(smx_synchro_t synchro);
 void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall);
-void SIMIX_synchro_destroy(smx_action_t action);
+void SIMIX_synchro_destroy(smx_synchro_t synchro);
 
 smx_mutex_t SIMIX_mutex_init(void);
 void SIMIX_mutex_destroy(smx_mutex_t mutex);
-void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex);
 int SIMIX_mutex_trylock(smx_mutex_t mutex, smx_process_t issuer);
 void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer);
 
 smx_cond_t SIMIX_cond_init(void);
 void SIMIX_cond_destroy(smx_cond_t cond);
 void SIMIX_cond_signal(smx_cond_t cond);
-void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex);
-void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond,
-                                smx_mutex_t mutex, double timeout);
 void SIMIX_cond_broadcast(smx_cond_t cond);
 
 smx_sem_t SIMIX_sem_init(unsigned int value);
 void SIMIX_sem_destroy(smx_sem_t sem);
 void SIMIX_sem_release(smx_sem_t sem);
 int SIMIX_sem_would_block(smx_sem_t sem);
-void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem);
-void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout);
 int SIMIX_sem_get_capacity(smx_sem_t sem);
 
-// pre prototypes
-smx_mutex_t SIMIX_pre_mutex_init(smx_simcall_t simcall);
-void SIMIX_pre_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex);
-int SIMIX_pre_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex);
-void SIMIX_pre_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex);
-smx_cond_t SIMIX_pre_cond_init(smx_simcall_t simcall);
-void SIMIX_pre_cond_destroy(smx_simcall_t simcall, smx_cond_t cond);
-void SIMIX_pre_cond_signal(smx_simcall_t simcall, smx_cond_t cond);
-void SIMIX_pre_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond);
-smx_sem_t SIMIX_pre_sem_init(smx_simcall_t simcall, unsigned int value);
-void SIMIX_pre_sem_destroy(smx_simcall_t simcall, smx_sem_t sem);
-void SIMIX_pre_sem_release(smx_simcall_t simcall, smx_sem_t sem);
-static XBT_INLINE int SIMIX_pre_sem_would_block(smx_simcall_t simcall,
-                                                smx_sem_t sem)
-{
-  return SIMIX_sem_would_block(sem);
-}
-int SIMIX_pre_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem);
 #endif
index d91b857..d2eab04 100644 (file)
@@ -34,12 +34,6 @@ smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host)
 }
 
 
-smx_host_t SIMIX_pre_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host)
-{
-  return SIMIX_vm_create(name, ind_phys_host);
-}
-
-
 /* works for VMs and PMs */
 static long host_get_ramsize(smx_host_t vm, int *overcommit)
 {
@@ -103,23 +97,11 @@ void SIMIX_vm_start(smx_host_t ind_vm)
 }
 
 
-
-void SIMIX_pre_vm_start(smx_simcall_t simcall, smx_host_t ind_vm)
-{
-  SIMIX_vm_start(ind_vm);
-}
-
 int SIMIX_vm_get_state(smx_host_t ind_vm)
 {
   return surf_resource_get_state(surf_workstation_resource_priv(ind_vm));
 }
 
-int SIMIX_pre_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm)
-{
-  return SIMIX_vm_get_state(ind_vm);
-}
-
-
 /**
  * \brief Function to migrate a SIMIX VM host.
  *
@@ -134,12 +116,6 @@ void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm)
   surf_vm_workstation_migrate(ind_vm, ind_dst_pm);
 }
 
-void SIMIX_pre_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm)
-{
-  SIMIX_vm_migrate(ind_vm, ind_dst_pm);
-}
-
-
 /**
  * \brief Function to get the physical host of the given SIMIX VM host.
  *
@@ -151,12 +127,6 @@ void *SIMIX_vm_get_pm(smx_host_t ind_vm)
   return surf_vm_workstation_get_pm(ind_vm);
 }
 
-void *SIMIX_pre_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm)
-{
-  return SIMIX_vm_get_pm(ind_vm);
-}
-
-
 /**
  * \brief Function to set the CPU bound of the given SIMIX VM host.
  *
@@ -169,12 +139,6 @@ void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound)
   surf_vm_workstation_set_bound(ind_vm, bound);
 }
 
-void SIMIX_pre_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound)
-{
-  SIMIX_vm_set_bound(ind_vm, bound);
-}
-
-
 /**
  * \brief Function to set the CPU affinity of the given SIMIX VM host.
  *
@@ -191,11 +155,6 @@ void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long m
   surf_vm_workstation_set_affinity(ind_vm, ind_pm, mask);
 }
 
-void SIMIX_pre_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask)
-{
-  SIMIX_vm_set_affinity(ind_vm, ind_pm, mask);
-}
-
 
 /**
  * \brief Function to suspend a SIMIX VM host. This function stops the execution of the
@@ -225,7 +184,7 @@ void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer)
   XBT_DEBUG("suspend all processes on the VM done done");
 }
 
-void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm)
+void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   if (simcall->issuer->smx_host == ind_vm) {
     XBT_ERROR("cannot suspend the VM where I run");
@@ -234,7 +193,7 @@ void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm)
 
   SIMIX_vm_suspend(ind_vm, simcall->issuer);
 
-  XBT_DEBUG("SIMIX_pre_vm_suspend done");
+  XBT_DEBUG("simcall_HANDLER_vm_suspend done");
 }
 
 
@@ -263,7 +222,7 @@ void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer)
   }
 }
 
-void SIMIX_pre_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm)
+void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_resume(ind_vm, simcall->issuer);
 }
@@ -296,7 +255,7 @@ void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer)
   }
 }
 
-void SIMIX_pre_vm_save(smx_simcall_t simcall, smx_host_t ind_vm)
+void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_save(ind_vm, simcall->issuer);
 }
@@ -327,7 +286,7 @@ void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer)
   }
 }
 
-void SIMIX_pre_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm)
+void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_restore(ind_vm, simcall->issuer);
 }
@@ -361,7 +320,7 @@ void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer)
                           (int)SURF_VM_STATE_CREATED);
 }
 
-void SIMIX_pre_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm)
+void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm)
 {
   SIMIX_vm_shutdown(ind_vm, simcall->issuer);
 }
@@ -387,8 +346,3 @@ void SIMIX_vm_destroy(smx_host_t ind_vm)
   /* jump to vm_ws_destroy(). The surf level resource will be freed. */
   surf_vm_workstation_destroy(ind_vm);
 }
-
-void SIMIX_pre_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm)
-{
-  SIMIX_vm_destroy(ind_vm);
-}
index d067768..bda2b95 100644 (file)
@@ -49,6 +49,11 @@ static const char *smpi_colors[] ={
 
     "init",       "0 1 0",
     "finalize",     "0 1 0",
+
+    "put",       "0.3 1 0",
+    "get",       "0 1 0.3",
+    "accumulate",       "1 0.3 0",
+    "fence",       "1 0 0.3",
     NULL, NULL,
 };
 
index 659424d..13f2e76 100644 (file)
@@ -102,7 +102,7 @@ typedef struct s_smpi_mpi_request {
   int truncated;
   size_t real_size;
   MPI_Comm comm;
-  smx_action_t action;
+  smx_synchro_t action;
   unsigned flags;
   int detached;
   MPI_Request detached_sender;
@@ -126,6 +126,12 @@ typedef struct s_smpi_mpi_type_key_elem {
 } s_smpi_mpi_type_key_elem_t; 
 typedef struct s_smpi_mpi_type_key_elem *smpi_type_key_elem;
 
+typedef struct s_smpi_mpi_info {
+  xbt_dict_t info_dict;
+  int refcount;
+} s_smpi_mpi_info_t; 
+
+
 void smpi_process_destroy(void);
 void smpi_process_finalize(void);
 int smpi_process_finalized(void);
@@ -185,10 +191,10 @@ int smpi_process_get_replaying(void);
 void smpi_deployment_register_process(const char* instance_id, int rank, int index, MPI_Comm**, xbt_bar_t*);
 void smpi_deployment_cleanup_instances(void);
 
-void smpi_comm_copy_buffer_callback(smx_action_t comm,
+void smpi_comm_copy_buffer_callback(smx_synchro_t comm,
                                            void *buff, size_t buff_size);
 
-void smpi_comm_null_copy_buffer_callback(smx_action_t comm,
+void smpi_comm_null_copy_buffer_callback(smx_synchro_t comm,
                                            void *buff, size_t buff_size);
 
 void print_request(const char *message, MPI_Request request);
@@ -235,6 +241,9 @@ void smpi_datatype_create(MPI_Datatype* new_type, int size,int lb, int ub, int h
 void smpi_datatype_free(MPI_Datatype* type);
 void smpi_datatype_commit(MPI_Datatype* datatype);
 
+int smpi_mpi_unpack(void* inbuf, int insize, int* position, void* outbuf, int outcount, MPI_Datatype type, MPI_Comm comm);
+int smpi_mpi_pack(void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount, int* position, MPI_Comm comm);
+
 void smpi_empty_status(MPI_Status * status);
 MPI_Op smpi_op_new(MPI_User_function * function, int commute);
 int smpi_op_is_commute(MPI_Op op);
@@ -288,6 +297,8 @@ int smpi_op_c2f(MPI_Op op);
 MPI_Op smpi_op_f2c(int op);
 int smpi_win_c2f(MPI_Win win);
 MPI_Win smpi_win_f2c(int win);
+int smpi_info_c2f(MPI_Info info);
+MPI_Info smpi_info_f2c(int info);
 
 MPI_Request smpi_mpi_send_init(void *buf, int count, MPI_Datatype datatype,
                                int dst, int tag, MPI_Comm comm);
@@ -435,7 +446,10 @@ extern char* start_data_exe; //start of the data+bss segment of the executable
 extern int size_data_exe; //size of the data+bss segment of the executable
 
 
-void smpi_switch_data_segment(int);
+void smpi_switch_data_segment(int dest);
+void smpi_really_switch_data_segment(int dest);
+int smpi_is_privatisation_file(char* file);
+
 void smpi_get_executable_global_size(void);
 void smpi_initialize_global_memory_segments(void);
 void smpi_destroy_global_memory_segments(void);
@@ -545,7 +559,7 @@ void mpi_win_create_( int *base, MPI_Aint* size, int* disp_unit, int* info, int*
 void mpi_win_set_name_ (int*  win, char * name, int* ierr, int size);
 void mpi_win_get_name_ (int*  win, char * name, int* len, int* ierr);
 void mpi_info_create_( int *info, int* ierr);
-void mpi_info_set_( int *info, char *key, char *value, int* ierr);
+void mpi_info_set_( int *info, char *key, char *value, int* ierr, unsigned int keylen, unsigned int valuelen);
 void mpi_info_free_(int* info, int* ierr);
 void mpi_get_( int *origin_addr, int* origin_count, int* origin_datatype, int* target_rank,
     MPI_Aint* target_disp, int* target_count, int* target_datatype, int* win, int* ierr);
@@ -681,17 +695,17 @@ void mpi_comm_dup_with_info_ (int* comm, int* info, int* newcomm, int* ierr);
 void mpi_comm_split_type_ (int* comm, int* split_type, int* key, int* info, int*newcomm, int* ierr);
 void mpi_comm_set_info_ (int* comm, int* info, int* ierr);
 void mpi_comm_get_info_ (int* comm, int* info, int* ierr);
-void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, int* ierr);
+void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, int* ierr, unsigned int keylen);
 void mpi_comm_create_errhandler_ ( void *function, void *errhandler, int* ierr);
 void mpi_add_error_class_ ( int *errorclass, int* ierr);
 void mpi_add_error_code_ (  int* errorclass, int *errorcode, int* ierr);
 void mpi_add_error_string_ ( int* errorcode, char *string, int* ierr);
 void mpi_comm_call_errhandler_ (int* comm,int* errorcode, int* ierr);
 void mpi_info_dup_ (int* info, int* newinfo, int* ierr);
-void mpi_info_get_valuelen_ ( int* info, char *key, int *valuelen, int *flag, int* ierr);
-void mpi_info_delete_ (int* info, char *key, int* ierr);
+void mpi_info_get_valuelen_ ( int* info, char *key, int *valuelen, int *flag, int* ierr, unsigned int keylen);
+void mpi_info_delete_ (int* info, char *key, int* ierr, unsigned int keylen);
 void mpi_info_get_nkeys_ ( int* info, int *nkeys, int* ierr);
-void mpi_info_get_nthkey_ ( int* info, int* n, char *key, int* ierr);
+void mpi_info_get_nthkey_ ( int* info, int* n, char *key, int* ierr, unsigned int keylen);
 void mpi_get_version_ (int *version,int *subversion, int* ierr);
 void mpi_get_library_version_ (char *version,int *len, int* ierr);
 void mpi_request_get_status_ ( int* request, int *flag, MPI_Status* status, int* ierr);
@@ -738,7 +752,7 @@ void TRACE_smpi_init(int rank);
 void TRACE_smpi_finalize(int rank);
 #endif
 
-const char* encode_datatype(MPI_Datatype datatype);
+const char* encode_datatype(MPI_Datatype datatype, int* known);
 
 // TODO, make this static and expose it more cleanly
 
index dacdaf0..8b60d82 100644 (file)
@@ -17,7 +17,7 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_base, smpi, "Logging specific to SMPI (base)");
 
 
-static int match_recv(void* a, void* b, smx_action_t ignored) {
+static int match_recv(void* a, void* b, smx_synchro_t ignored) {
    MPI_Request ref = (MPI_Request)a;
    MPI_Request req = (MPI_Request)b;
    XBT_DEBUG("Trying to match a recv of src %d against %d, tag %d against %d",ref->src,req->src, ref->tag, req->tag);
@@ -39,7 +39,7 @@ static int match_recv(void* a, void* b, smx_action_t ignored) {
   }else return 0;
 }
 
-static int match_send(void* a, void* b,smx_action_t ignored) {
+static int match_send(void* a, void* b,smx_synchro_t ignored) {
    MPI_Request ref = (MPI_Request)a;
    MPI_Request req = (MPI_Request)b;
    XBT_DEBUG("Trying to match a send of src %d against %d, tag %d against %d",ref->src,req->src, ref->tag, req->tag);
@@ -349,7 +349,7 @@ void smpi_mpi_start(MPI_Request request)
     //We have to check both mailboxes (because SSEND messages are sent to the large mbox). begin with the more appropriate one : the small one.
       mailbox = smpi_process_mailbox_small();
       XBT_DEBUG("Is there a corresponding send already posted the small mailbox %p (in case of SSEND)?", mailbox);
-      smx_action_t action = simcall_comm_iprobe(mailbox, 0, request->src,request->tag, &match_recv, (void*)request);
+      smx_synchro_t action = simcall_comm_iprobe(mailbox, 0, request->src,request->tag, &match_recv, (void*)request);
     
       if(action ==NULL){
         mailbox = smpi_process_mailbox();
@@ -365,7 +365,7 @@ void smpi_mpi_start(MPI_Request request)
     }else{
       mailbox = smpi_process_mailbox_small();
       XBT_DEBUG("Is there a corresponding send already posted the small mailbox?");
-    smx_action_t action = simcall_comm_iprobe(mailbox, 0, request->src,request->tag, &match_recv, (void*)request);
+    smx_synchro_t action = simcall_comm_iprobe(mailbox, 0, request->src,request->tag, &match_recv, (void*)request);
     
       if(action ==NULL){
         XBT_DEBUG("No, nothing in the permanent receive mailbox");
@@ -422,7 +422,7 @@ void smpi_mpi_start(MPI_Request request)
     if (request->flags & RMA || request->size < sg_cfg_get_int("smpi/async_small_thres")) { // eager mode
       mailbox = smpi_process_remote_mailbox(receiver);
       XBT_DEBUG("Is there a corresponding recv already posted in the large mailbox %p?", mailbox);
-      smx_action_t action = simcall_comm_iprobe(mailbox, 1,request->dst, request->tag, &match_send, (void*)request);
+      smx_synchro_t action = simcall_comm_iprobe(mailbox, 1,request->dst, request->tag, &match_send, (void*)request);
       if(action ==NULL){
        if (! (request->flags & SSEND)){
          mailbox = smpi_process_remote_mailbox_small(receiver);
@@ -776,7 +776,7 @@ int smpi_mpi_testany(int count, MPI_Request requests[], int *index,
 
   *index = MPI_UNDEFINED;
   flag = 0;
-  comms = xbt_dynar_new(sizeof(smx_action_t), NULL);
+  comms = xbt_dynar_new(sizeof(smx_synchro_t), NULL);
   map = xbt_new(int, count);
   size = 0;
   for(i = 0; i < count; i++) {
@@ -927,7 +927,7 @@ int smpi_mpi_waitany(int count, MPI_Request requests[],
   index = MPI_UNDEFINED;
   if(count > 0) {
     // Wait for a request to complete
-    comms = xbt_dynar_new(sizeof(smx_action_t), NULL);
+    comms = xbt_dynar_new(sizeof(smx_synchro_t), NULL);
     map = xbt_new(int, count);
     size = 0;
     XBT_DEBUG("Wait for one of %d", count);
index f7b0c26..55970de 100644 (file)
@@ -153,7 +153,7 @@ void smpi_execute_(double *duration)
 }
 
 void smpi_execute_flops(double flops) {
-  smx_action_t action;
+  smx_synchro_t action;
   smx_host_t host;
   host = SIMIX_host_self();
   XBT_DEBUG("Handle real computation time: %f flops", flops);
@@ -607,23 +607,29 @@ void* smpi_shared_set_call(const char* func, const char* input, void* data) {
 #define TOPAGE(addr) (void *)(((unsigned long)(addr) / xbt_pagesize) * xbt_pagesize)
 
 
-/*
- * - read the executable data+bss section addresses and sizes
- * - for each process create a copy of these sections with mmap
- * - store them in a dynar
- *
+/** Map a given SMPI privatization segment (make a SMPI process active)
  */
+void smpi_switch_data_segment(int dest){
 
+  if (smpi_loaded_page==dest)//no need to switch either
+   return;
 
+  // So the job:
+  smpi_really_switch_data_segment(dest);
+}
 
-void smpi_switch_data_segment(int dest){
+/** Map a given SMPI privatization segment (make a SMPI process active)
+ *  even if SMPI thinks it is already active
+ *
+ *  When doing a state restoration, the state of the restored variables
+ *  might not be consistent with the state of the virtual memory.
+ *  In this case, we to change the data segment.
+ */
+void smpi_really_switch_data_segment(int dest) {
 
   if(size_data_exe == 0)//no need to switch
     return;
 
-  if (smpi_loaded_page==dest)//no need to switch either
-    return;
-
 #ifdef HAVE_MMAP
   int i;
   if(smpi_loaded_page==-1){//initial switch, do the copy from the real page here
@@ -641,6 +647,11 @@ void smpi_switch_data_segment(int dest){
 #endif
 }
 
+int smpi_is_privatisation_file(char* file)
+{
+  return strncmp("/dev/shm/my-buffer-", file, 19) == 0;
+}
+
 void smpi_get_executable_global_size(){
   int size_bss_binary=0;
   int size_data_binary=0;
index 4c02837..c06b16d 100644 (file)
@@ -17,8 +17,6 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_comm, smpi,
                                 "Logging specific to SMPI (comm)");
 
-//number of bytes to hold an int converted in char*
-#define INTSIZEDCHAR (sizeof(int)*CHAR_BIT-1)/3 + 3 
 xbt_dict_t smpi_comm_keyvals = NULL;
 int comm_keyval_id=MPI_TAG_UB+1;//avoid collisions
 
@@ -123,16 +121,16 @@ int smpi_comm_dup(MPI_Comm comm, MPI_Comm* newcomm){
       void* value_in;
       void* value_out;
       xbt_dict_foreach(comm->attributes, cursor, key, value_in){
-        smpi_comm_key_elem elem = xbt_dict_get_or_null(smpi_comm_keyvals, (const char*)key);
+        smpi_comm_key_elem elem = xbt_dict_get_or_null_ext(smpi_comm_keyvals, (const char*)key, sizeof(int));
         if(elem && elem->copy_fn!=MPI_NULL_COPY_FN){
-          ret = elem->copy_fn(comm, atoi((const char*)key), NULL, value_in, &value_out, &flag );
+          ret = elem->copy_fn(comm, *key, NULL, value_in, &value_out, &flag );
           if(ret!=MPI_SUCCESS){
             smpi_comm_destroy(*newcomm);
             *newcomm=MPI_COMM_NULL;
             return ret;
           }
           if(flag)
-            xbt_dict_set((*newcomm)->attributes, (const char*)key,value_out, NULL);
+            xbt_dict_set_ext((*newcomm)->attributes, (const char*)key, sizeof(int),value_out, NULL);
         }
       }
     }
@@ -337,7 +335,7 @@ void smpi_comm_unuse(MPI_Comm comm){
       xbt_dict_foreach(comm->attributes, cursor, key, value){
         smpi_comm_key_elem elem = xbt_dict_get_or_null(smpi_comm_keyvals, (const char*)key);
         if(elem &&  elem->delete_fn)
-          elem->delete_fn(comm, atoi((const char*)key), value, &flag);
+          elem->delete_fn(comm, *key, value, &flag);
       }
     }
     xbt_free(comm);
@@ -388,7 +386,7 @@ void smpi_comm_init_smp(MPI_Comm comm){
 
   int i =0;
   int min_index=INT_MAX;//the minimum index will be the leader
-  msg_process_t process = NULL;
+  smx_process_t process = NULL;
   xbt_swag_foreach(process, process_list) {
     //is_in_comm=0;
     int index = SIMIX_process_get_PID(process) -1;
@@ -536,9 +534,7 @@ void smpi_comm_init_smp(MPI_Comm comm){
 }
 
 int smpi_comm_attr_delete(MPI_Comm comm, int keyval){
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", keyval);
-  smpi_comm_key_elem elem = xbt_dict_get_or_null(smpi_comm_keyvals, (const char*)tmpkey);
+  smpi_comm_key_elem elem = xbt_dict_get_or_null_ext(smpi_comm_keyvals, (const char*)&keyval, sizeof(int));
   if(!elem)
     return MPI_ERR_ARG;
   if(elem->delete_fn!=MPI_NULL_DELETE_FN){
@@ -552,15 +548,12 @@ int smpi_comm_attr_delete(MPI_Comm comm, int keyval){
   if(comm->attributes==NULL)
     return MPI_ERR_ARG;
 
-  xbt_dict_remove(comm->attributes, (const char*)tmpkey);
-  xbt_free(tmpkey);
+  xbt_dict_remove_ext(comm->attributes, (const char*)&keyval, sizeof(int));
   return MPI_SUCCESS;
 }
 
 int smpi_comm_attr_get(MPI_Comm comm, int keyval, void* attr_value, int* flag){
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", keyval);
-  smpi_comm_key_elem elem = xbt_dict_get_or_null(smpi_comm_keyvals, (const char*)tmpkey);
+  smpi_comm_key_elem elem = xbt_dict_get_or_null_ext(smpi_comm_keyvals, (const char*)&keyval, sizeof(int));
   if(!elem)
     return MPI_ERR_ARG;
   xbt_ex_t ex;
@@ -569,23 +562,20 @@ int smpi_comm_attr_get(MPI_Comm comm, int keyval, void* attr_value, int* flag){
     return MPI_SUCCESS;
   }
   TRY {
-    *(void**)attr_value = xbt_dict_get(comm->attributes, (const char*)tmpkey);
+    *(void**)attr_value = xbt_dict_get_ext(comm->attributes,  (const char*)&keyval, sizeof(int));
     *flag=1;
   }
   CATCH(ex) {
     *flag=0;
     xbt_ex_free(ex);
   }
-  xbt_free(tmpkey);
   return MPI_SUCCESS;
 }
 
 int smpi_comm_attr_put(MPI_Comm comm, int keyval, void* attr_value){
   if(!smpi_comm_keyvals)
   smpi_comm_keyvals = xbt_dict_new();
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", keyval);
-  smpi_comm_key_elem elem = xbt_dict_get_or_null(smpi_comm_keyvals, (const char*)tmpkey);
+  smpi_comm_key_elem elem = xbt_dict_get_or_null_ext(smpi_comm_keyvals,  (const char*)&keyval, sizeof(int));
   if(!elem )
     return MPI_ERR_ARG;
   int flag;
@@ -598,8 +588,7 @@ int smpi_comm_attr_put(MPI_Comm comm, int keyval, void* attr_value){
   if(comm->attributes==NULL)
     comm->attributes=xbt_dict_new();
 
-  xbt_dict_set(comm->attributes, (const char*)tmpkey, attr_value, NULL);
-  xbt_free(tmpkey);
+  xbt_dict_set_ext(comm->attributes,  (const char*)&keyval, sizeof(int), attr_value, NULL);
   return MPI_SUCCESS;
 }
 
@@ -614,25 +603,18 @@ int smpi_comm_keyval_create(MPI_Comm_copy_attr_function* copy_fn, MPI_Comm_delet
   value->delete_fn=delete_fn;
   
   *keyval = comm_keyval_id;
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", *keyval);
-  xbt_dict_set(smpi_comm_keyvals,(const char*)tmpkey,(void*)value, NULL);
+  xbt_dict_set_ext(smpi_comm_keyvals, (const char*)keyval, sizeof(int),(void*)value, NULL);
   comm_keyval_id++;
-  xbt_free(tmpkey);
   return MPI_SUCCESS;
 }
 
 int smpi_comm_keyval_free(int* keyval){
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", *keyval);
-  smpi_comm_key_elem elem = xbt_dict_get_or_null(smpi_comm_keyvals, (const char*)tmpkey);
+  smpi_comm_key_elem elem = xbt_dict_get_or_null_ext(smpi_comm_keyvals,  (const char*)keyval, sizeof(int));
   if(!elem){
-    xbt_free(tmpkey);
     return MPI_ERR_ARG;
   }
-  xbt_dict_remove(smpi_comm_keyvals, (const char*)tmpkey);
+  xbt_dict_remove_ext(smpi_comm_keyvals,  (const char*)keyval, sizeof(int));
   xbt_free(elem);
-  xbt_free(tmpkey);
   return MPI_SUCCESS;
 }
 
index a6f528f..a832f33 100644 (file)
@@ -16,6 +16,8 @@ static xbt_dict_t request_lookup = NULL;
 static xbt_dict_t datatype_lookup = NULL;
 static xbt_dict_t op_lookup = NULL;
 static xbt_dict_t win_lookup = NULL;
+static xbt_dict_t info_lookup = NULL;
+
 static int running_processes = 0;
 
 #if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
@@ -191,7 +193,27 @@ static void free_win(int win) {
 }
 
 
-void mpi_init_(int* ierr) {
+int smpi_info_c2f(MPI_Info info) {
+  static int info_id = 0;
+  char key[KEY_SIZE];
+  xbt_dict_set(info_lookup, get_key(key, info_id), info, NULL);
+  info_id++;
+  return info_id-1;
+}
+
+MPI_Info smpi_info_f2c(int info) {
+  char key[KEY_SIZE];
+   return info >= 0
+          ? (MPI_Info)xbt_dict_get_or_null(info_lookup,  get_key(key, info))
+          : MPI_INFO_NULL;
+}
+
+static void free_info(int info) {
+  char key[KEY_SIZE];
+  xbt_dict_remove(info_lookup, get_key(key, info));
+}
+
+static void smpi_init_fortran_types(){
    if(!comm_lookup){
      comm_lookup = xbt_dict_new_homogeneous(NULL);
      smpi_comm_c2f(MPI_COMM_WORLD);
@@ -199,6 +221,7 @@ void mpi_init_(int* ierr) {
      request_lookup = xbt_dict_new_homogeneous(NULL);
      datatype_lookup = xbt_dict_new_homogeneous(NULL);
      win_lookup = xbt_dict_new_homogeneous(NULL);
+     info_lookup = xbt_dict_new_homogeneous(NULL);
      smpi_type_c2f(MPI_BYTE);
      smpi_type_c2f(MPI_CHAR);
      #if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
@@ -250,6 +273,11 @@ void mpi_init_(int* ierr) {
      smpi_op_c2f(MPI_BOR);
      smpi_op_c2f(MPI_BXOR);
    }
+}
+
+
+void mpi_init_(int* ierr) {
+    smpi_init_fortran_types();
    *ierr = MPI_Init(NULL, NULL);
    running_processes++;
 }
@@ -714,13 +742,19 @@ void mpi_win_free_( int* win, int* ierr){
 
 void mpi_win_create_( int *base, MPI_Aint* size, int* disp_unit, int* info, int* comm, int *win, int* ierr){
   MPI_Win tmp;
-  *ierr =  MPI_Win_create( (void*)base, *size, *disp_unit, *(MPI_Info*)info, smpi_comm_f2c(*comm),&tmp);
+  *ierr =  MPI_Win_create( (void*)base, *size, *disp_unit, smpi_info_f2c(*info), smpi_comm_f2c(*comm),&tmp);
  if(*ierr == MPI_SUCCESS) {
    *win = smpi_win_c2f(tmp);
  }
 }
 
 void mpi_win_set_name_ (int*  win, char * name, int* ierr, int size){
+ //handle trailing blanks
+ while(name[size-1]==' ')size--;
+ while(*name==' '){//handle leading blanks
+   size --;
+   name++;
+ }
  char* tname = xbt_malloc((size+1)*sizeof(char));
  strncpy(tname, name, size);
  tname[size]='\0';
@@ -734,15 +768,58 @@ void mpi_win_get_name_ (int*  win, char * name, int* len, int* ierr){
 }
 
 void mpi_info_create_( int *info, int* ierr){
-  *ierr =  MPI_Info_create( (MPI_Info *)info);
+  MPI_Info tmp;
+  *ierr =  MPI_Info_create(&tmp);
+  if(*ierr == MPI_SUCCESS) {
+    *info = smpi_info_c2f(tmp);
+  }
 }
 
-void mpi_info_set_( int *info, char *key, char *value, int* ierr){
-  *ierr =  MPI_Info_set( *(MPI_Info *)info, key, value);
+void mpi_info_set_( int *info, char *key, char *value, int* ierr, unsigned int keylen, unsigned int valuelen){
+ //handle trailing blanks
+ while(key[keylen-1]==' ')keylen--;
+ while(*key==' '){//handle leading blanks
+   keylen --;
+   key++;
+ }
+ char* tkey = xbt_malloc((keylen+1)*sizeof(char));
+ strncpy(tkey, key, keylen);
+ tkey[keylen]='\0';  
+ while(value[valuelen-1]==' ')valuelen--;
+ while(*value==' '){//handle leading blanks
+   valuelen --;
+   value++;
+ }
+ char* tvalue = xbt_malloc((valuelen+1)*sizeof(char));
+ strncpy(tvalue, value, valuelen);
+ tvalue[valuelen]='\0'; 
+ *ierr =  MPI_Info_set( smpi_info_f2c(*info), tkey, tvalue);
+ xbt_free(tkey);
+}
+
+void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, int* ierr, unsigned int keylen ){
+ while(key[keylen-1]==' ')keylen--;
+ while(*key==' '){//handle leading blanks
+   keylen --;
+   key++;
+ }  char* tkey = xbt_malloc((keylen+1)*sizeof(char));
+ strncpy(tkey, key, keylen);
+ tkey[keylen]='\0';
+ *ierr = MPI_Info_get(smpi_info_f2c(*info),tkey,*valuelen, value, flag);
+ xbt_free(tkey);
+ int i = 0;
+ for (i=strlen(value); i<*valuelen; i++)
+ value[i]=' ';
 }
 
 void mpi_info_free_(int* info, int* ierr){
-  *ierr =  MPI_Info_free((MPI_Info *) info);
+  MPI_Info tmp = smpi_info_f2c(*info);
+  *ierr =  MPI_Info_free(&tmp);
+  if(*ierr == MPI_SUCCESS) {
+    free_info(*info);
+  }
 }
 
 void mpi_get_( int *origin_addr, int* origin_count, int* origin_datatype, int *target_rank,
@@ -771,52 +848,9 @@ void mpi_finalized_ (int * flag, int* ierr){
 }
 
 void mpi_init_thread_ (int* required, int *provided, int* ierr){
-  if(!comm_lookup){
-    comm_lookup = xbt_dict_new_homogeneous(NULL);
-    smpi_comm_c2f(MPI_COMM_WORLD);
-    group_lookup = xbt_dict_new_homogeneous(NULL);
-
-    request_lookup = xbt_dict_new_homogeneous(NULL);
-
-    datatype_lookup = xbt_dict_new_homogeneous(NULL);
-    smpi_type_c2f(MPI_BYTE);
-    smpi_type_c2f(MPI_CHAR);
-    smpi_type_c2f(MPI_INT);
-    smpi_type_c2f(MPI_INT);
-    smpi_type_c2f(MPI_INT8_T);
-    smpi_type_c2f(MPI_INT16_T);
-    smpi_type_c2f(MPI_INT32_T);
-    smpi_type_c2f(MPI_INT64_T);
-    smpi_type_c2f(MPI_FLOAT);
-    smpi_type_c2f(MPI_FLOAT);
-    smpi_type_c2f(MPI_DOUBLE);
-    smpi_type_c2f(MPI_DOUBLE);
-    smpi_type_c2f(MPI_C_FLOAT_COMPLEX);
-    smpi_type_c2f(MPI_C_DOUBLE_COMPLEX);
-    smpi_type_c2f(MPI_2INT);
-    smpi_type_c2f(MPI_UINT8_T);
-    smpi_type_c2f(MPI_UINT16_T);
-    smpi_type_c2f(MPI_UINT32_T);
-    smpi_type_c2f(MPI_UINT64_T);
-    smpi_type_c2f(MPI_2FLOAT);
-    smpi_type_c2f(MPI_2DOUBLE);
-
-    op_lookup = xbt_dict_new_homogeneous( NULL);
-    smpi_op_c2f(MPI_MAX);
-    smpi_op_c2f(MPI_MIN);
-    smpi_op_c2f(MPI_MAXLOC);
-    smpi_op_c2f(MPI_MINLOC);
-    smpi_op_c2f(MPI_SUM);
-    smpi_op_c2f(MPI_PROD);
-    smpi_op_c2f(MPI_LAND);
-    smpi_op_c2f(MPI_LOR);
-    smpi_op_c2f(MPI_LXOR);
-    smpi_op_c2f(MPI_BAND);
-    smpi_op_c2f(MPI_BOR);
-    smpi_op_c2f(MPI_BXOR);
-  }
-
- *ierr = MPI_Init_thread(NULL, NULL,*required, provided);
+  smpi_init_fortran_types();
+  *ierr = MPI_Init_thread(NULL, NULL,*required, provided);
+  running_processes++;
 }
 
 void mpi_query_thread_ (int *provided, int* ierr){
@@ -1502,7 +1536,7 @@ void mpi_comm_set_name_ (int* comm, char* name, int* ierr, int size){
 
 void mpi_comm_dup_with_info_ (int* comm, int* info, int* newcomm, int* ierr){
   MPI_Comm tmp;
-  *ierr = MPI_Comm_dup_with_info(smpi_comm_f2c(*comm),*(MPI_Info*)info,&tmp);
+  *ierr = MPI_Comm_dup_with_info(smpi_comm_f2c(*comm),smpi_info_f2c(*info),&tmp);
   if(*ierr == MPI_SUCCESS) {
     *newcomm = smpi_comm_c2f(tmp);
   }
@@ -1510,23 +1544,24 @@ void mpi_comm_dup_with_info_ (int* comm, int* info, int* newcomm, int* ierr){
 
 void mpi_comm_split_type_ (int* comm, int* split_type, int* key, int* info, int* newcomm, int* ierr){
   MPI_Comm tmp;
-  *ierr = MPI_Comm_split_type(smpi_comm_f2c(*comm), *split_type, *key, *(MPI_Info*)info, &tmp);
+  *ierr = MPI_Comm_split_type(smpi_comm_f2c(*comm), *split_type, *key, smpi_info_f2c(*info), &tmp);
   if(*ierr == MPI_SUCCESS) {
     *newcomm = smpi_comm_c2f(tmp);
   }
 }
 
 void mpi_comm_set_info_ (int* comm, int* info, int* ierr){
- *ierr = MPI_Comm_set_info (smpi_comm_f2c(*comm), *(MPI_Info*)info);
+ *ierr = MPI_Comm_set_info (smpi_comm_f2c(*comm), smpi_info_f2c(*info));
 }
 
 void mpi_comm_get_info_ (int* comm, int* info, int* ierr){
- *ierr = MPI_Comm_get_info (smpi_comm_f2c(*comm), (MPI_Info*)info);
+ MPI_Info tmp;
+ *ierr = MPI_Comm_get_info (smpi_comm_f2c(*comm), &tmp);
+ if(*ierr==MPI_SUCCESS){
+   *info = smpi_info_c2f(tmp);
+ }
 }
 
-void mpi_info_get_ (int* info,char *key,int* valuelen, char *value, int *flag, int* ierr){
- *ierr = MPI_Info_get(*(MPI_Info*)info,key,*valuelen, value, flag);
-}
 
 void mpi_comm_create_errhandler_ ( void *function, void *errhandler, int* ierr){
  *ierr = MPI_Comm_create_errhandler( (MPI_Comm_errhandler_fn*) function, (MPI_Errhandler*)errhandler);
@@ -1549,23 +1584,48 @@ void mpi_comm_call_errhandler_ (int* comm,int* errorcode, int* ierr){
 }
 
 void mpi_info_dup_ (int* info, int* newinfo, int* ierr){
*ierr = MPI_Info_dup(*(MPI_Info*)info, (MPI_Info*)newinfo);
-}
-
-void mpi_info_get_valuelen_ ( int* info, char *key, int *valuelen, int *flag, int* ierr){
- *ierr = MPI_Info_get_valuelen( *(MPI_Info*)info, key, valuelen, flag);
MPI_Info tmp;
+ *ierr = MPI_Info_dup(smpi_info_f2c(*info), &tmp);
+ if(*ierr==MPI_SUCCESS){
+   *newinfo= smpi_info_c2f(tmp);
+ }
 }
 
-void mpi_info_delete_ (int* info, char *key, int* ierr){
- *ierr = MPI_Info_delete(*(MPI_Info*)info, key);
+void mpi_info_get_valuelen_ ( int* info, char *key, int *valuelen, int *flag, int* ierr, unsigned int keylen){
+ while(key[keylen-1]==' ')keylen--;
+ while(*key==' '){//handle leading blanks
+   keylen --;
+   key++;
+ }
+ char* tkey = xbt_malloc((keylen+1)*sizeof(char));
+ strncpy(tkey, key, keylen);
+ tkey[keylen]='\0';
+ *ierr = MPI_Info_get_valuelen( smpi_info_f2c(*info), tkey, valuelen, flag);
+ xbt_free(tkey);
+}
+
+void mpi_info_delete_ (int* info, char *key, int* ierr, unsigned int keylen){
+ while(key[keylen-1]==' ')keylen--;
+ while(*key==' '){//handle leading blanks
+   keylen --;
+   key++;
+ }
+ char* tkey = xbt_malloc((keylen+1)*sizeof(char));
+ strncpy(tkey, key, keylen);
+ tkey[keylen]='\0';
+ *ierr = MPI_Info_delete(smpi_info_f2c(*info), tkey);
+ xbt_free(tkey);
 }
 
 void mpi_info_get_nkeys_ ( int* info, int *nkeys, int* ierr){
- *ierr = MPI_Info_get_nkeys(  *(MPI_Info*)info, nkeys);
+ *ierr = MPI_Info_get_nkeys(  smpi_info_f2c(*info), nkeys);
 }
 
-void mpi_info_get_nthkey_ ( int* info, int* n, char *key, int* ierr){
- *ierr = MPI_Info_get_nthkey( *(MPI_Info*)info, *n, key);
+void mpi_info_get_nthkey_ ( int* info, int* n, char *key, int* ierr, unsigned int keylen){
+ *ierr = MPI_Info_get_nthkey( smpi_info_f2c(*info), *n, key);
+ int i = 0;
+ for (i=strlen(key); i<keylen; i++)
+ key[i]=' ';
 }
 
 void mpi_get_version_ (int *version,int *subversion, int* ierr){
index d16e7c2..4f001b6 100644 (file)
@@ -330,7 +330,7 @@ void print_request(const char *message, MPI_Request request)
        request->dst, request->tag, request->flags);
 }
 
-void smpi_comm_copy_buffer_callback(smx_action_t comm,
+void smpi_comm_copy_buffer_callback(smx_synchro_t comm,
                                            void *buff, size_t buff_size)
 {
   XBT_DEBUG("Copy the data over");
@@ -373,7 +373,7 @@ void smpi_comm_copy_buffer_callback(smx_action_t comm,
 }
 
 
-void smpi_comm_null_copy_buffer_callback(smx_action_t comm,
+void smpi_comm_null_copy_buffer_callback(smx_synchro_t comm,
                                            void *buff, size_t buff_size)
 {
   return;
@@ -404,8 +404,10 @@ void smpi_global_init(void)
   char name[MAILBOX_NAME_MAXLEN];
   int smpirun=0;
 
-  global_timer = xbt_os_timer_new();
-  xbt_os_walltimer_start(global_timer);
+  if (!MC_is_active()) {
+    global_timer = xbt_os_timer_new();
+    xbt_os_walltimer_start(global_timer);
+  }
   if (process_count == 0){
     process_count = SIMIX_process_count();
     smpirun=1;
@@ -652,22 +654,24 @@ int smpi_main(int (*realmain) (int argc, char *argv[]), int argc, char *argv[])
   fflush(stdout);
   fflush(stderr);
 
-  if (MC_is_active())
+  if (MC_is_active()) {
     MC_do_the_modelcheck_for_real();
-  else
+  } else {
+  
     SIMIX_run();
-  xbt_os_walltimer_stop(global_timer);
-  if (sg_cfg_get_boolean("smpi/display_timing")){
-    double global_time = xbt_os_timer_elapsed(global_timer);
-    XBT_INFO("Simulated time: %g seconds. \n "
-        "The simulation took %g seconds (after parsing and platform setup)\n"
-        "%g seconds were actual computation of the application"
-        , SIMIX_get_clock(), global_time , smpi_total_benched_time);
-        
-    if (smpi_total_benched_time/global_time>=0.75)
-    XBT_INFO("More than 75%% of the time was spent inside the application code.\n"
-    "You may want to use sampling functions or trace replay to reduce this.");
 
+    xbt_os_walltimer_stop(global_timer);
+    if (sg_cfg_get_boolean("smpi/display_timing")){
+      double global_time = xbt_os_timer_elapsed(global_timer);
+      XBT_INFO("Simulated time: %g seconds. \n "
+          "The simulation took %g seconds (after parsing and platform setup)\n"
+          "%g seconds were actual computation of the application"
+          , SIMIX_get_clock(), global_time , smpi_total_benched_time);
+          
+      if (smpi_total_benched_time/global_time>=0.75)
+      XBT_INFO("More than 75%% of the time was spent inside the application code.\n"
+      "You may want to use sampling functions or trace replay to reduce this.");
+    }
   }
 
   smpi_global_destroy();
index 047cf91..4692a2b 100644 (file)
@@ -20,7 +20,6 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_mpi_dt, smpi,
                                 "Logging specific to SMPI (datatype)");
 
-#define INTSIZEDCHAR (sizeof(int)*CHAR_BIT-1)/3 + 3 
 xbt_dict_t smpi_type_keyvals = NULL;
 int type_keyval_id=0;//avoid collisions
 
@@ -132,6 +131,7 @@ CREATE_MPI_DATATYPE(MPI_2FLOAT, float_float);
 CREATE_MPI_DATATYPE(MPI_2DOUBLE, double_double);
 CREATE_MPI_DATATYPE(MPI_2LONG, long_long);
 
+CREATE_MPI_DATATYPE(MPI_REAL, float);
 CREATE_MPI_DATATYPE(MPI_REAL4, float);
 CREATE_MPI_DATATYPE(MPI_REAL8, float);
 CREATE_MPI_DATATYPE(MPI_REAL16, double);
@@ -148,7 +148,7 @@ CREATE_MPI_DATATYPE(MPI_LONG_DOUBLE_INT, long_double_int);
 
 CREATE_MPI_DATATYPE_NULL(MPI_UB);
 CREATE_MPI_DATATYPE_NULL(MPI_LB);
-CREATE_MPI_DATATYPE_NULL(MPI_PACKED);
+CREATE_MPI_DATATYPE(MPI_PACKED, char);
 // Internal use only
 CREATE_MPI_DATATYPE(MPI_PTR, void*);
 
@@ -194,15 +194,15 @@ int smpi_datatype_dup(MPI_Datatype datatype, MPI_Datatype* new_t)
       void* value_in;
       void* value_out;
       xbt_dict_foreach(datatype->attributes, cursor, key, value_in){
-        smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)key);
+        smpi_type_key_elem elem = xbt_dict_get_or_null_ext(smpi_type_keyvals,  (const char*)key, sizeof(int));
         if(elem && elem->copy_fn!=MPI_NULL_COPY_FN){
-          ret = elem->copy_fn(datatype, atoi((const char*)key), NULL, value_in, &value_out, &flag );
+          ret = elem->copy_fn(datatype, *key, NULL, value_in, &value_out, &flag );
           if(ret!=MPI_SUCCESS){
             *new_t=MPI_DATATYPE_NULL;
             return ret;
           }
           if(flag)
-            xbt_dict_set((*new_t)->attributes, (const char*)key,value_out, NULL);
+            xbt_dict_set_ext((*new_t)->attributes, (const char*)key, sizeof(int),value_out, NULL);
         }
       }
     }
@@ -258,12 +258,12 @@ int smpi_datatype_copy(void *sendbuf, int sendcount, MPI_Datatype sendtype,
     else if (sendtype->has_subtype == 0)
     {
       s_smpi_subtype_t *subtype =  recvtype->substruct;
-      subtype->unserialize( sendbuf, recvbuf,1, subtype, MPI_REPLACE);
+      subtype->unserialize( sendbuf, recvbuf, recvcount/smpi_datatype_size(recvtype), subtype, MPI_REPLACE);
     }
     else if (recvtype->has_subtype == 0)
     {
       s_smpi_subtype_t *subtype =  sendtype->substruct;
-      subtype->serialize(sendbuf, recvbuf,1, subtype);
+      subtype->serialize(sendbuf, recvbuf, sendcount/smpi_datatype_size(sendtype), subtype);
     }else{
       s_smpi_subtype_t *subtype =  sendtype->substruct;
 
@@ -410,9 +410,9 @@ void smpi_datatype_free(MPI_Datatype* type){
       void * value;
       int flag;
       xbt_dict_foreach((*type)->attributes, cursor, key, value){
-        smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)key);
+        smpi_type_key_elem elem = xbt_dict_get_or_null_ext(smpi_type_keyvals, (const char*)key, sizeof(int));
         if(elem &&  elem->delete_fn)
-          elem->delete_fn(*type, atoi((const char*)key), value, &flag);
+          elem->delete_fn(*type,*key, value, &flag);
       }
   }
 
@@ -1670,9 +1670,7 @@ void smpi_op_apply(MPI_Op op, void *invec, void *inoutvec, int *len,
 }
 
 int smpi_type_attr_delete(MPI_Datatype type, int keyval){
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", keyval);
-  smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)tmpkey);
+  smpi_type_key_elem elem = xbt_dict_get_or_null_ext(smpi_type_keyvals, (const char*)&keyval, sizeof(int));
   if(!elem)
     return MPI_ERR_ARG;
   if(elem->delete_fn!=MPI_NULL_DELETE_FN){
@@ -1686,15 +1684,12 @@ int smpi_type_attr_delete(MPI_Datatype type, int keyval){
   if(type->attributes==NULL)
     return MPI_ERR_ARG;
 
-  xbt_dict_remove(type->attributes, (const char*)tmpkey);
-  xbt_free(tmpkey);
+  xbt_dict_remove_ext(type->attributes, (const char*)&keyval, sizeof(int));
   return MPI_SUCCESS;
 }
 
 int smpi_type_attr_get(MPI_Datatype type, int keyval, void* attr_value, int* flag){
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", keyval);
-  smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)tmpkey);
+  smpi_type_key_elem elem = xbt_dict_get_or_null_ext(smpi_type_keyvals, (const char*)&keyval, sizeof(int));
   if(!elem)
     return MPI_ERR_ARG;
   xbt_ex_t ex;
@@ -1703,23 +1698,20 @@ int smpi_type_attr_get(MPI_Datatype type, int keyval, void* attr_value, int* fla
     return MPI_SUCCESS;
   }
   TRY {
-    *(void**)attr_value = xbt_dict_get(type->attributes, (const char*)tmpkey);
+    *(void**)attr_value = xbt_dict_get_ext(type->attributes, (const char*)&keyval, sizeof(int));
     *flag=1;
   }
   CATCH(ex) {
     *flag=0;
     xbt_ex_free(ex);
   }
-  xbt_free(tmpkey);
   return MPI_SUCCESS;
 }
 
 int smpi_type_attr_put(MPI_Datatype type, int keyval, void* attr_value){
   if(!smpi_type_keyvals)
   smpi_type_keyvals = xbt_dict_new();
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", keyval);
-  smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)tmpkey);
+  smpi_type_key_elem elem = xbt_dict_get_or_null_ext(smpi_type_keyvals, (const char*)&keyval, sizeof(int));
   if(!elem )
     return MPI_ERR_ARG;
   int flag;
@@ -1732,8 +1724,7 @@ int smpi_type_attr_put(MPI_Datatype type, int keyval, void* attr_value){
   if(type->attributes==NULL)
     type->attributes=xbt_dict_new();
 
-  xbt_dict_set(type->attributes, (const char*)tmpkey, attr_value, NULL);
-  xbt_free(tmpkey);
+  xbt_dict_set_ext(type->attributes, (const char*)&keyval, sizeof(int), attr_value, NULL);
   return MPI_SUCCESS;
 }
 
@@ -1748,24 +1739,38 @@ int smpi_type_keyval_create(MPI_Type_copy_attr_function* copy_fn, MPI_Type_delet
   value->delete_fn=delete_fn;
   
   *keyval = type_keyval_id;
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", *keyval);
-  xbt_dict_set(smpi_type_keyvals,(const char*)tmpkey,(void*)value, NULL);
+  xbt_dict_set_ext(smpi_type_keyvals,(const char*)keyval, sizeof(int),(void*)value, NULL);
   type_keyval_id++;
-  xbt_free(tmpkey);
   return MPI_SUCCESS;
 }
 
 int smpi_type_keyval_free(int* keyval){
-  char* tmpkey=xbt_malloc(INTSIZEDCHAR);
-  sprintf(tmpkey, "%d", *keyval);
-  smpi_type_key_elem elem = xbt_dict_get_or_null(smpi_type_keyvals, (const char*)tmpkey);
+  smpi_type_key_elem elem = xbt_dict_get_or_null_ext(smpi_type_keyvals, (const char*)keyval, sizeof(int));
   if(!elem){
-    xbt_free(tmpkey);
     return MPI_ERR_ARG;
   }
-  xbt_dict_remove(smpi_type_keyvals, (const char*)tmpkey);
+  xbt_dict_remove_ext(smpi_type_keyvals, (const char*)keyval, sizeof(int));
   xbt_free(elem);
-  xbt_free(tmpkey);
   return MPI_SUCCESS;
 }
+
+int smpi_mpi_pack(void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount, int* position, MPI_Comm comm){
+  size_t size = smpi_datatype_size(type);
+  if (outcount - *position < incount*size)
+    return MPI_ERR_BUFFER;
+  smpi_datatype_copy(inbuf, incount, type,
+                   (char*)outbuf + *position, outcount, MPI_CHAR);
+  *position += incount * size;
+  return MPI_SUCCESS;
+}
+
+int smpi_mpi_unpack(void* inbuf, int insize, int* position, void* outbuf, int outcount, MPI_Datatype type, MPI_Comm comm){
+  size_t size = smpi_datatype_size(type);
+  if (outcount*size> insize)
+    return MPI_ERR_BUFFER;
+  smpi_datatype_copy((char*)inbuf + *position, insize, MPI_CHAR,
+                   outbuf, outcount, type);
+  *position += outcount * size;
+  return MPI_SUCCESS;
+}
+
index 7a8e852..bbd04ba 100644 (file)
@@ -1005,10 +1005,14 @@ int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int src,
 
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
     extra->type = TRACING_IRECV;
-    extra->send_size = count;
     extra->src = src_traced;
     extra->dst = rank;
-    extra->datatype1 = encode_datatype(datatype);
+    int known=0;
+    extra->datatype1 = encode_datatype(datatype, &known);
+    int dt_size_send = 1;
+    if(!known)
+      dt_size_send = smpi_datatype_size(datatype);
+    extra->send_size = count*dt_size_send;
     TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
 #endif
 
@@ -1056,13 +1060,16 @@ int PMPI_Isend(void *buf, int count, MPI_Datatype datatype, int dst,
 #ifdef HAVE_TRACING
     int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
     int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
-
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
     extra->type = TRACING_ISEND;
-    extra->send_size = count;
     extra->src = rank;
     extra->dst = dst_traced;
-    extra->datatype1 = encode_datatype(datatype);
+    int known=0;
+    extra->datatype1 = encode_datatype(datatype, &known);
+    int dt_size_send = 1;
+    if(!known)
+      dt_size_send = smpi_datatype_size(datatype);
+    extra->send_size = count*dt_size_send;
     TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
     TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
 #endif
@@ -1112,10 +1119,14 @@ int PMPI_Issend(void* buf, int count, MPI_Datatype datatype,
     int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
     instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
     extra->type = TRACING_ISSEND;
-    extra->send_size = count;
     extra->src = rank;
     extra->dst = dst_traced;
-    extra->datatype1 = encode_datatype(datatype);
+    int known=0;
+    extra->datatype1 = encode_datatype(datatype, &known);
+    int dt_size_send = 1;
+    if(!known)
+      dt_size_send = smpi_datatype_size(datatype);
+    extra->send_size = count*dt_size_send;
     TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
     TRACE_smpi_send(rank, rank, dst_traced, count*smpi_datatype_size(datatype));
 #endif
@@ -1163,10 +1174,14 @@ int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int src, int tag,
   int src_traced = smpi_group_index(smpi_comm_group(comm), src);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_RECV;
-  extra->send_size = count;
   extra->src = src_traced;
   extra->dst = rank;
-  extra->datatype1 = encode_datatype(datatype);
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
+  extra->send_size = count*dt_size_send;
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
 #endif
 
@@ -1215,10 +1230,14 @@ int PMPI_Send(void *buf, int count, MPI_Datatype datatype, int dst, int tag,
   int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_SEND;
-  extra->send_size = count;
   extra->src = rank;
   extra->dst = dst_traced;
-  extra->datatype1 = encode_datatype(datatype);
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
+  extra->send_size = count*dt_size_send;
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
 #endif
@@ -1263,10 +1282,14 @@ int PMPI_Ssend(void* buf, int count, MPI_Datatype datatype, int dst, int tag, MP
    int dst_traced = smpi_group_index(smpi_comm_group(comm), dst);
    instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
    extra->type = TRACING_SSEND;
-   extra->send_size = count;
    extra->src = rank;
    extra->dst = dst_traced;
-   extra->datatype1 = encode_datatype(datatype);
+   int known=0;
+   extra->datatype1 = encode_datatype(datatype, &known);
+   int dt_size_send = 1;
+   if(!known)
+     dt_size_send = smpi_datatype_size(datatype);
+   extra->send_size = count*dt_size_send;
    TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);   TRACE_smpi_send(rank, rank, dst_traced,count*smpi_datatype_size(datatype));
  #endif
 
@@ -1317,12 +1340,19 @@ int PMPI_Sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   int src_traced = smpi_group_index(smpi_comm_group(comm), src);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_SENDRECV;
-  extra->send_size = sendcount;
-  extra->recv_size = recvcount;
   extra->src = src_traced;
   extra->dst = dst_traced;
-  extra->datatype1 = encode_datatype(sendtype);
-  extra->datatype2 = encode_datatype(recvtype);
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(sendtype);
+  extra->send_size = sendcount*dt_size_send;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  int dt_size_recv = 1;
+  if(!known)
+    dt_size_recv = smpi_datatype_size(recvtype);
+  extra->recv_size = recvcount*dt_size_recv;
 
   TRACE_smpi_ptp_in(rank, src_traced, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced,sendcount*smpi_datatype_size(sendtype));
@@ -1379,7 +1409,7 @@ int PMPI_Test(MPI_Request * request, int *flag, MPI_Status * status)
   } else if (*request == MPI_REQUEST_NULL) {
     *flag= TRUE;
     smpi_empty_status(status);
-    retval = MPI_ERR_REQUEST;
+    retval = MPI_SUCCESS;
   } else {
 #ifdef HAVE_TRACING
     int rank = request && (*request)->comm != MPI_COMM_NULL
@@ -1486,7 +1516,7 @@ int PMPI_Wait(MPI_Request * request, MPI_Status * status)
   if (request == NULL) {
     retval = MPI_ERR_ARG;
   } else if (*request == MPI_REQUEST_NULL) {
-    retval = MPI_ERR_REQUEST;
+    retval = MPI_SUCCESS;
   } else {
 
 #ifdef HAVE_TRACING
@@ -1692,9 +1722,13 @@ int PMPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm c
 
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_BCAST;
-  extra->send_size = count;
   extra->root = root_traced;
-  extra->datatype1 = encode_datatype(datatype);
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
+  extra->send_size = count*dt_size_send;
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
 
 #endif
@@ -1765,11 +1799,18 @@ int PMPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_GATHER;
-  extra->send_size = sendtmpcount;
-  extra->recv_size = recvcount;
   extra->root = root_traced;
-  extra->datatype1 = encode_datatype(sendtmptype);
-  extra->datatype2 = encode_datatype(recvtype);
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtmptype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(sendtmptype);
+  extra->send_size = sendtmpcount*dt_size_send;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  int dt_size_recv = 1;
+  if((smpi_comm_rank(comm)==root) && !known)
+    dt_size_recv = smpi_datatype_size(recvtype);
+  extra->recv_size = recvcount*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
 #endif
@@ -1820,14 +1861,21 @@ int PMPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   int size = smpi_comm_size(comm);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_GATHERV;
-  extra->send_size = sendtmpcount;
-  extra->recvcounts= xbt_malloc(size*sizeof(int));
-  for(i=0; i< size; i++)//copy data to avoid bad free
-    extra->recvcounts[i] = recvcounts[i];
   extra->num_processes = size;
   extra->root = root_traced;
-  extra->datatype1 = encode_datatype(sendtmptype);
-  extra->datatype2 = encode_datatype(recvtype);
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtmptype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(sendtype);
+  extra->send_size = sendtmpcount*dt_size_send;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  int dt_size_recv = 1;
+  if(!known)
+    dt_size_recv = smpi_datatype_size(recvtype);
+  extra->recvcounts= xbt_malloc(size*sizeof(int));
+  for(i=0; i< size; i++)//copy data to avoid bad free
+    extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
 #endif
@@ -1869,10 +1917,17 @@ int PMPI_Allgather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLGATHER;
-  extra->send_size = sendcount;
-  extra->recv_size = recvcount;
-  extra->datatype1 = encode_datatype(sendtype);
-  extra->datatype2 = encode_datatype(recvtype);
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(sendtype);
+  extra->send_size = sendcount*dt_size_send;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  int dt_size_recv = 1;
+  if(!known)
+    dt_size_recv = smpi_datatype_size(recvtype);
+  extra->recv_size = recvcount*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__, extra);
 #endif
@@ -1918,13 +1973,20 @@ int PMPI_Allgatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   int size = smpi_comm_size(comm);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLGATHERV;
-  extra->send_size = sendcount;
+  extra->num_processes = size;
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(sendtype);
+  extra->send_size = sendcount*dt_size_send;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  int dt_size_recv = 1;
+  if(!known)
+    dt_size_recv = smpi_datatype_size(recvtype);
   extra->recvcounts= xbt_malloc(size*sizeof(int));
   for(i=0; i< size; i++)//copy data to avoid bad free
-    extra->recvcounts[i] = recvcounts[i];
-  extra->num_processes = size;
-  extra->datatype1 = encode_datatype(sendtype);
-  extra->datatype2 = encode_datatype(recvtype);
+    extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
@@ -1967,12 +2029,18 @@ int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_SCATTER;
-  extra->send_size = sendcount;
-  extra->recv_size= recvcount;
   extra->root = root_traced;
-  extra->datatype1 = encode_datatype(sendtype);
-  extra->datatype2 = encode_datatype(recvtype);
-
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtype, &known);
+  int dt_size_send = 1;
+  if((smpi_comm_rank(comm)==root) && !known)
+    dt_size_send = smpi_datatype_size(sendtype);
+  extra->send_size = sendcount*dt_size_send;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  int dt_size_recv = 1;
+  if(!known)
+    dt_size_recv = smpi_datatype_size(recvtype);
+  extra->recv_size = recvcount*dt_size_recv;
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
 #endif
     mpi_coll_scatter_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount,
@@ -2014,15 +2082,21 @@ int PMPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
   int size = smpi_comm_size(comm);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_SCATTERV;
-  extra->recv_size = recvcount;
-  extra->sendcounts= xbt_malloc(size*sizeof(int));
-  for(i=0; i< size; i++)//copy data to avoid bad free
-    extra->sendcounts[i] = sendcounts[i];
   extra->num_processes = size;
   extra->root = root_traced;
-  extra->datatype1 = encode_datatype(sendtype);
-  extra->datatype2 = encode_datatype(recvtype);
-
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(sendtype);
+  extra->sendcounts= xbt_malloc(size*sizeof(int));
+  for(i=0; i< size; i++)//copy data to avoid bad free
+    extra->sendcounts[i] = sendcounts[i]*dt_size_send;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  int dt_size_recv = 1;
+  if(!known)
+    dt_size_recv = smpi_datatype_size(recvtype);
+  extra->recv_size = recvcount*dt_size_recv;
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
 
 #endif
@@ -2055,8 +2129,12 @@ int PMPI_Reduce(void *sendbuf, void *recvbuf, int count,
   int root_traced = smpi_group_index(smpi_comm_group(comm), root);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_REDUCE;
-  extra->send_size = count;
-  extra->datatype1 = encode_datatype(datatype);
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
+  extra->send_size = count*dt_size_send;
   extra->root = root_traced;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
@@ -2112,8 +2190,12 @@ int PMPI_Allreduce(void *sendbuf, void *recvbuf, int count,
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLREDUCE;
-  extra->send_size = count;
-  extra->datatype1 = encode_datatype(datatype);
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
+  extra->send_size = count*dt_size_send;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
@@ -2151,8 +2233,12 @@ int PMPI_Scan(void *sendbuf, void *recvbuf, int count,
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_SCAN;
-  extra->send_size = count;
-  extra->datatype1 = encode_datatype(datatype);
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
+  extra->send_size = count*dt_size_send;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
@@ -2184,9 +2270,12 @@ int PMPI_Exscan(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_EXSCAN;
-  extra->send_size = count;
-  extra->datatype1 = encode_datatype(datatype);
-
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
+  extra->send_size = count*dt_size_send;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
     smpi_mpi_exscan(sendbuf, recvbuf, count, datatype, op, comm);
@@ -2221,13 +2310,16 @@ int PMPI_Reduce_scatter(void *sendbuf, void *recvbuf, int *recvcounts,
   int size = smpi_comm_size(comm);
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_REDUCE_SCATTER;
+  extra->num_processes = size;
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
   extra->send_size = 0;
   extra->recvcounts= xbt_malloc(size*sizeof(int));
   for(i=0; i< size; i++)//copy data to avoid bad free
-    extra->recvcounts[i] = recvcounts[i];
-  extra->num_processes = size;
-  extra->datatype1 = encode_datatype(datatype);
-
+    extra->recvcounts[i] = recvcounts[i]*dt_size_send;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
     void* sendtmpbuf=sendbuf;
@@ -2268,12 +2360,16 @@ int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_REDUCE_SCATTER;
+  extra->num_processes = count;
+  int known=0;
+  extra->datatype1 = encode_datatype(datatype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(datatype);
   extra->send_size = 0;
   extra->recvcounts= xbt_malloc(count*sizeof(int));
   for(i=0; i< count; i++)//copy data to avoid bad free
-    extra->recvcounts[i] = recvcount;
-  extra->num_processes = count;
-  extra->datatype1 = encode_datatype(datatype);
+    extra->recvcounts[i] = recvcount*dt_size_send;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
@@ -2310,11 +2406,17 @@ int PMPI_Alltoall(void *sendbuf, int sendcount, MPI_Datatype sendtype,
   int rank = comm != MPI_COMM_NULL ? smpi_process_index() : -1;
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type = TRACING_ALLTOALL;
-  extra->send_size = sendcount;
-  extra->recv_size = recvcount;
-  extra->datatype1 = encode_datatype(sendtype);
-  extra->datatype2 = encode_datatype(recvtype);
-
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtype, &known);
+  if(!known)
+    extra->send_size = sendcount*smpi_datatype_size(sendtype);
+  else
+    extra->send_size = sendcount;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  if(!known)
+    extra->recv_size = recvcount*smpi_datatype_size(recvtype);
+  else
+    extra->recv_size = recvcount;
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
     retval = mpi_coll_alltoall_fun(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm);
@@ -2354,19 +2456,23 @@ int PMPI_Alltoallv(void *sendbuf, int *sendcounts, int *senddisps,
   extra->recv_size = 0;
   extra->recvcounts= xbt_malloc(size*sizeof(int));
   extra->sendcounts= xbt_malloc(size*sizeof(int));
-
+  int known=0;
+  extra->datatype1 = encode_datatype(sendtype, &known);
+  int dt_size_send = 1;
+  if(!known)
+    dt_size_send = smpi_datatype_size(sendtype);
+  int dt_size_recv = 1;
+  extra->datatype2 = encode_datatype(recvtype, &known);
+  if(!known)
+    dt_size_recv = smpi_datatype_size(recvtype);
   for(i=0; i< size; i++){//copy data to avoid bad free
-    extra->send_size += sendcounts[i];
-    extra->recv_size += recvcounts[i];
+    extra->send_size += sendcounts[i]*dt_size_send;
+    extra->recv_size += recvcounts[i]*dt_size_recv;
 
-    extra->sendcounts[i] = sendcounts[i];
-    extra->recvcounts[i] = recvcounts[i];
+    extra->sendcounts[i] = sendcounts[i]*dt_size_send;
+    extra->recvcounts[i] = recvcounts[i]*dt_size_recv;
   }
   extra->num_processes = size;
-
-  extra->datatype1 = encode_datatype(sendtype);
-  extra->datatype2 = encode_datatype(recvtype);
-
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
     retval =
@@ -2772,7 +2878,15 @@ int PMPI_Win_fence( int assert,  MPI_Win win){
   if (win == MPI_WIN_NULL) {
     retval = MPI_ERR_WIN;
   } else {
-    retval = smpi_mpi_win_fence(assert, win);
+#ifdef HAVE_TRACING
+  int rank = smpi_process_index();
+  TRACE_smpi_collective_in(rank, -1, __FUNCTION__, NULL);
+#endif
+  retval = smpi_mpi_win_fence(assert, win);
+#ifdef HAVE_TRACING
+  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+#endif
+
   }
   smpi_bench_begin();
   return retval;
@@ -2798,7 +2912,19 @@ int PMPI_Get( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
             (!is_datatype_valid(target_datatype))) {
     retval = MPI_ERR_TYPE;
   } else {
+#ifdef HAVE_TRACING
+    int rank = smpi_process_index();
+    MPI_Group group;
+    smpi_mpi_win_get_group(win, &group);
+    int src_traced = smpi_group_index(group, target_rank);
+    TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, NULL);
+#endif
+
     retval = smpi_mpi_get( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win);
+
+#ifdef HAVE_TRACING
+    TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
+#endif
   }
   smpi_bench_begin();
   return retval;
@@ -2824,7 +2950,21 @@ int PMPI_Put( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
             (!is_datatype_valid(target_datatype))) {
     retval = MPI_ERR_TYPE;
   } else {
+#ifdef HAVE_TRACING
+    int rank = smpi_process_index();
+    MPI_Group group;
+    smpi_mpi_win_get_group(win, &group);
+    int dst_traced = smpi_group_index(group, target_rank);
+    TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, NULL);
+    TRACE_smpi_send(rank, rank, dst_traced, origin_count*smpi_datatype_size(origin_datatype));
+#endif
+
     retval = smpi_mpi_put( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win);
+
+#ifdef HAVE_TRACING
+    TRACE_smpi_ptp_out(rank, rank, dst_traced, __FUNCTION__);
+#endif
+
   }
   smpi_bench_begin();
   return retval;
@@ -2853,7 +2993,20 @@ int PMPI_Accumulate( void *origin_addr, int origin_count, MPI_Datatype origin_da
   } else if (op == MPI_OP_NULL) {
     retval = MPI_ERR_OP;
   } else {
+#ifdef HAVE_TRACING
+    int rank = smpi_process_index();
+    MPI_Group group;
+    smpi_mpi_win_get_group(win, &group);
+    int src_traced = smpi_group_index(group, target_rank);
+    TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, NULL);
+#endif
+
     retval = smpi_mpi_accumulate( origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, op, win);
+
+#ifdef HAVE_TRACING
+    TRACE_smpi_ptp_out(rank, src_traced, rank, __FUNCTION__);
+#endif
+
   }
   smpi_bench_begin();
   return retval;
@@ -2953,6 +3106,14 @@ MPI_Fint PMPI_Comm_c2f(MPI_Comm comm){
   return smpi_comm_c2f(comm);
 }
 
+MPI_Info PMPI_Info_f2c(MPI_Fint info){
+  return smpi_info_f2c(info);
+}
+
+MPI_Fint PMPI_Info_c2f(MPI_Info info){
+  return smpi_info_c2f(info);
+}
+
 int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_fn, int* keyval, void* extra_state) {
   return smpi_comm_keyval_create(copy_fn, delete_fn, keyval, extra_state);
 }
@@ -3058,41 +3219,168 @@ int PMPI_Type_free_keyval(int* keyval) {
   return smpi_type_keyval_free(keyval);
 }
 
-/* The following calls are not yet implemented and will fail at runtime. */
-/* Once implemented, please move them above this notice. */
+int PMPI_Info_create( MPI_Info *info){
+  if (info == NULL)
+    return MPI_ERR_ARG;
+  *info = xbt_new(s_smpi_mpi_info_t, 1);
+  (*info)->info_dict= xbt_dict_new_homogeneous(NULL);
+  (*info)->refcount=1;
+  return MPI_SUCCESS;
+}
 
-#define NOT_YET_IMPLEMENTED {                                           \
-    XBT_WARN("Not yet implemented : %s. Please contact the Simgrid team if support is needed", __FUNCTION__); \
-    return MPI_SUCCESS;                                                 \
+int PMPI_Info_set( MPI_Info info, char *key, char *value){
+  if (info == NULL || key == NULL || value == NULL)
+    return MPI_ERR_ARG;
+
+  xbt_dict_set(info->info_dict, key, (void*)value, NULL);
+  return MPI_SUCCESS;
+}
+
+int PMPI_Info_free( MPI_Info *info){
+  if (info == NULL || *info==NULL)
+    return MPI_ERR_ARG;
+  (*info)->refcount--;
+  if((*info)->refcount==0){
+    xbt_dict_free(&((*info)->info_dict));
+    xbt_free(*info);
   }
+  *info=MPI_INFO_NULL;
+  return MPI_SUCCESS;
+}
 
+int PMPI_Info_get(MPI_Info info,char *key,int valuelen, char *value, int *flag){
+  if (info == NULL || key == NULL || valuelen <0)
+    return MPI_ERR_ARG;
+  if (value == NULL)
+    return MPI_ERR_INFO_VALUE;
+  *flag=FALSE;    
+  char* tmpvalue=(char*)xbt_dict_get_or_null(info->info_dict, key);
+  if(tmpvalue){
+    memcpy(value,tmpvalue, (strlen(tmpvalue) + 1 < valuelen) ? 
+                         strlen(tmpvalue) + 1 : valuelen);
+    *flag=TRUE;
+  }
+  return MPI_SUCCESS;
+}
 
-MPI_Info PMPI_Info_f2c(MPI_Fint info){
-  NOT_YET_IMPLEMENTED
+int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo){
+  if (info == NULL || newinfo==NULL)
+    return MPI_ERR_ARG;
+  *newinfo = xbt_new(s_smpi_mpi_info_t, 1);
+  (*newinfo)->info_dict= xbt_dict_new_homogeneous(NULL);
+  xbt_dict_cursor_t cursor = NULL;
+  int *key;
+  void* data;
+  xbt_dict_foreach(info->info_dict,cursor,key,data){
+    xbt_dict_set((*newinfo)->info_dict, (char*)key, data, NULL);
+  }
+  return MPI_SUCCESS;
 }
 
-MPI_Fint PMPI_Info_c2f(MPI_Info info){
-  NOT_YET_IMPLEMENTED
+int PMPI_Info_delete(MPI_Info info, char *key){
+  xbt_ex_t e;
+  if (info == NULL || key==NULL)
+    return MPI_ERR_ARG;
+  TRY {
+  xbt_dict_remove(info->info_dict, key);
+  }CATCH(e){
+    xbt_ex_free(e);
+    return MPI_ERR_INFO_NOKEY;
+  }
+  return MPI_SUCCESS;
 }
 
-MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhandler){
-  NOT_YET_IMPLEMENTED
+int PMPI_Info_get_nkeys( MPI_Info info, int *nkeys){
+  if (info == NULL || nkeys==NULL)
+    return MPI_ERR_ARG;
+  *nkeys=xbt_dict_size(info->info_dict);
+  return MPI_SUCCESS;
 }
 
-MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler){
-  NOT_YET_IMPLEMENTED
+int PMPI_Info_get_nthkey( MPI_Info info, int n, char *key){
+  if (info == NULL || key==NULL || n<0 || n> MPI_MAX_INFO_KEY)
+    return MPI_ERR_ARG;
+
+  xbt_dict_cursor_t cursor = NULL;
+  char *keyn;
+  void* data;
+  int num=0;
+  xbt_dict_foreach(info->info_dict,cursor,keyn,data){
+    if(num==n){
+     strcpy(key,keyn);
+      return MPI_SUCCESS;
+    }
+    num++;
+  }
+  return MPI_ERR_ARG;
+}
+
+int PMPI_Info_get_valuelen( MPI_Info info, char *key, int *valuelen, int *flag){
+  if (info == NULL || key == NULL || valuelen <0)
+    return MPI_ERR_ARG;
+  *flag=FALSE;    
+  char* tmpvalue=(char*)xbt_dict_get_or_null(info->info_dict, key);
+  if(tmpvalue){
+    *valuelen=strlen(tmpvalue);
+    *flag=TRUE;
+  }
+  return MPI_SUCCESS;
+}
+
+int PMPI_Unpack(void* inbuf, int incount, int* position, void* outbuf, int outcount, MPI_Datatype type, MPI_Comm comm) {
+  if(incount<0 || outcount < 0 || inbuf==NULL || outbuf==NULL)
+    return MPI_ERR_ARG;
+  if(!is_datatype_valid(type))
+    return MPI_ERR_TYPE;
+  if(comm==MPI_COMM_NULL)
+    return MPI_ERR_COMM;
+  return smpi_mpi_unpack(inbuf, incount, position, outbuf,outcount,type, comm);
+}
+
+int PMPI_Pack(void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount, int* position, MPI_Comm comm) {
+  if(incount<0 || outcount < 0|| inbuf==NULL || outbuf==NULL)
+    return MPI_ERR_ARG;
+  if(!is_datatype_valid(type))
+    return MPI_ERR_TYPE;
+  if(comm==MPI_COMM_NULL)
+    return MPI_ERR_COMM;
+  return smpi_mpi_pack(inbuf, incount, type, outbuf,outcount,position, comm);
 }
 
 int PMPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int* size) {
+  if(incount<0)
+    return MPI_ERR_ARG;
+  if(!is_datatype_valid(datatype))
+    return MPI_ERR_TYPE;
+  if(comm==MPI_COMM_NULL)
+    return MPI_ERR_COMM;
+    
+  *size=incount*smpi_datatype_size(datatype);
+  
+  return MPI_SUCCESS;
+}
+
+
+/* The following calls are not yet implemented and will fail at runtime. */
+/* Once implemented, please move them above this notice. */
+
+#define NOT_YET_IMPLEMENTED {                                           \
+    XBT_WARN("Not yet implemented : %s. Please contact the Simgrid team if support is needed", __FUNCTION__); \
+    return MPI_SUCCESS;                                                 \
+  }
+
+MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhandler){
   NOT_YET_IMPLEMENTED
 }
 
+MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhandler){
+  NOT_YET_IMPLEMENTED
+}
 
 int PMPI_Cart_map(MPI_Comm comm_old, int ndims, int* dims, int* periods, int* newrank) {
   NOT_YET_IMPLEMENTED
 }
 
-
 int PMPI_Graph_create(MPI_Comm comm_old, int nnodes, int* index, int* edges, int reorder, MPI_Comm* comm_graph) {
   NOT_YET_IMPLEMENTED
 }
@@ -3174,9 +3462,6 @@ int PMPI_Pcontrol(const int level )
   NOT_YET_IMPLEMENTED
 }
 
-int PMPI_Unpack(void* inbuf, int insize, int* position, void* outbuf, int outcount, MPI_Datatype type, MPI_Comm comm) {
-  NOT_YET_IMPLEMENTED
-}
 
 int PMPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm* comm_out) {
   NOT_YET_IMPLEMENTED
@@ -3222,9 +3507,7 @@ int PMPI_Test_cancelled(MPI_Status* status, int* flag) {
   NOT_YET_IMPLEMENTED
 }
 
-int PMPI_Pack(void* inbuf, int incount, MPI_Datatype type, void* outbuf, int outcount, int* position, MPI_Comm comm) {
-  NOT_YET_IMPLEMENTED
-}
+
 
 int PMPI_Pack_external_size(char *datarep, int incount, MPI_Datatype datatype, MPI_Aint *size){
   NOT_YET_IMPLEMENTED
@@ -3242,17 +3525,7 @@ int PMPI_Get_elements(MPI_Status* status, MPI_Datatype datatype, int* elements)
   NOT_YET_IMPLEMENTED
 }
 
-int PMPI_Info_create( MPI_Info *info){
-  NOT_YET_IMPLEMENTED
-}
-
-int PMPI_Info_set( MPI_Info info, char *key, char *value){
-  NOT_YET_IMPLEMENTED
-}
 
-int PMPI_Info_free( MPI_Info *info){
-  NOT_YET_IMPLEMENTED
-}
 
 int PMPI_Type_get_envelope( MPI_Datatype datatype, int *num_integers,
                             int *num_addresses, int *num_datatypes, int *combiner){
@@ -3305,10 +3578,6 @@ int PMPI_Comm_get_info (MPI_Comm comm, MPI_Info* info){
   NOT_YET_IMPLEMENTED
 }
 
-int PMPI_Info_get(MPI_Info info,char *key,int valuelen, char *value, int *flag){
-  NOT_YET_IMPLEMENTED
-}
-
 int PMPI_Comm_create_errhandler( MPI_Comm_errhandler_fn *function, MPI_Errhandler *errhandler){
   NOT_YET_IMPLEMENTED
 }
@@ -3329,26 +3598,6 @@ int PMPI_Comm_call_errhandler(MPI_Comm comm,int errorcode){
   NOT_YET_IMPLEMENTED
 }
 
-int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo){
-  NOT_YET_IMPLEMENTED
-}
-
-int PMPI_Info_delete(MPI_Info info, char *key){
-  NOT_YET_IMPLEMENTED
-}
-
-int PMPI_Info_get_nkeys( MPI_Info info, int *nkeys){
-  NOT_YET_IMPLEMENTED
-}
-
-int PMPI_Info_get_nthkey( MPI_Info info, int n, char *key){
-  NOT_YET_IMPLEMENTED
-}
-
-int PMPI_Info_get_valuelen( MPI_Info info, char *key, int *valuelen, int *flag){
-  NOT_YET_IMPLEMENTED
-}
-
 int PMPI_Request_get_status( MPI_Request request, int *flag, MPI_Status *status){
   NOT_YET_IMPLEMENTED
 }
index 2f6bebb..f08faf1 100644 (file)
@@ -103,11 +103,12 @@ static MPI_Datatype decode_datatype(const char *const action)
 }
 
 
-const char* encode_datatype(MPI_Datatype datatype)
+const char* encode_datatype(MPI_Datatype datatype, int* known)
 {
 
   //default type for output is set to MPI_BYTE
   // MPI_DEFAULT_TYPE is not set for output, use directly MPI_BYTE
+  if(known)*known=1;
   if (datatype==MPI_BYTE){
       return "";
   }
@@ -123,17 +124,30 @@ const char* encode_datatype(MPI_Datatype datatype)
     return "4";
   if(datatype==MPI_FLOAT)
       return "5";
-
+  //tell that the datatype is not handled by replay, and that its size should be measured and replayed as size*MPI_BYTE
+  if(known)*known=0;
   // default - not implemented.
   // do not warn here as we pass in this function even for other trace formats
   return "-1";
 }
 
+#define CHECK_ACTION_PARAMS(action, mandatory, optional) {\
+    int i=0;\
+    while(action[i]!=NULL)\
+     i++;\
+    if(i<mandatory+2)                                           \
+    THROWF(arg_error, 0, "%s replay failed.\n" \
+          "%d items were given on the line. First two should be process_id and action.  " \
+          "This action needs after them %d mandatory arguments, and accepts %d optional ones. \n" \
+          "Please contact the Simgrid team if support is needed", __FUNCTION__, i, mandatory, optional);\
+  }
+
+
 static void action_init(const char *const *action)
 {
   int i;
   XBT_DEBUG("Initialize the counters");
-
+  CHECK_ACTION_PARAMS(action, 0, 1);
   if(action[2]) MPI_DEFAULT_TYPE= MPI_DOUBLE; // default MPE dataype 
   else MPI_DEFAULT_TYPE= MPI_BYTE; // default TAU datatype
 
@@ -179,6 +193,7 @@ static void action_comm_dup(const char *const *action)
 
 static void action_compute(const char *const *action)
 {
+  CHECK_ACTION_PARAMS(action, 1, 0);
   double clock = smpi_process_simulated_elapsed();
   double flops= parse_double(action[2]);
 #ifdef HAVE_TRACING
@@ -198,6 +213,7 @@ static void action_compute(const char *const *action)
 
 static void action_send(const char *const *action)
 {
+  CHECK_ACTION_PARAMS(action, 2, 1);
   int to = atoi(action[2]);
   double size=parse_double(action[3]);
   double clock = smpi_process_simulated_elapsed();
@@ -217,7 +233,7 @@ static void action_send(const char *const *action)
   extra->send_size = size;
   extra->src = rank;
   extra->dst = dst_traced;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced, size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
@@ -234,6 +250,7 @@ static void action_send(const char *const *action)
 
 static void action_Isend(const char *const *action)
 {
+  CHECK_ACTION_PARAMS(action, 2, 1);
   int to = atoi(action[2]);
   double size=parse_double(action[3]);
   double clock = smpi_process_simulated_elapsed();
@@ -250,7 +267,7 @@ static void action_Isend(const char *const *action)
   extra->send_size = size;
   extra->src = rank;
   extra->dst = dst_traced;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, rank, dst_traced, __FUNCTION__, extra);
   TRACE_smpi_send(rank, rank, dst_traced, size*smpi_datatype_size(MPI_CURRENT_TYPE));
 #endif
@@ -268,6 +285,7 @@ static void action_Isend(const char *const *action)
 }
 
 static void action_recv(const char *const *action) {
+  CHECK_ACTION_PARAMS(action, 2, 1);
   int from = atoi(action[2]);
   double size=parse_double(action[3]);
   double clock = smpi_process_simulated_elapsed();
@@ -285,7 +303,7 @@ static void action_recv(const char *const *action) {
   extra->send_size = size;
   extra->src = src_traced;
   extra->dst = rank;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
 #endif
 
@@ -307,6 +325,7 @@ static void action_recv(const char *const *action) {
 
 static void action_Irecv(const char *const *action)
 {
+  CHECK_ACTION_PARAMS(action, 2, 1);
   int from = atoi(action[2]);
   double size=parse_double(action[3]);
   double clock = smpi_process_simulated_elapsed();
@@ -323,7 +342,7 @@ static void action_Irecv(const char *const *action)
   extra->send_size = size;
   extra->src = src_traced;
   extra->dst = rank;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_ptp_in(rank, src_traced, rank, __FUNCTION__, extra);
 #endif
   MPI_Status status;
@@ -345,21 +364,26 @@ static void action_Irecv(const char *const *action)
 }
 
 static void action_test(const char *const *action){
+  CHECK_ACTION_PARAMS(action, 0, 0);
   double clock = smpi_process_simulated_elapsed();
   MPI_Request request;
   MPI_Status status;
   int flag = TRUE;
 
   request = xbt_dynar_pop_as(reqq[smpi_process_index()],MPI_Request);
-  xbt_assert(request != NULL, "found null request in reqq");
-
+  //if request is null here, this may mean that a previous test has succeeded 
+  //Different times in traced application and replayed version may lead to this 
+  //In this case, ignore the extra calls.
+  if(request){
 #ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
   extra->type=TRACING_TEST;
   TRACE_smpi_testing_in(rank, extra);
 #endif
-  flag = smpi_mpi_test(&request, &status);
+
+    flag = smpi_mpi_test(&request, &status);
+
   XBT_DEBUG("MPI_Test result: %d", flag);
   /* push back request in dynar to be caught by a subsequent wait. if the test
    * did succeed, the request is now NULL.
@@ -369,11 +393,12 @@ static void action_test(const char *const *action){
 #ifdef HAVE_TRACING
   TRACE_smpi_testing_out(rank);
 #endif
-
+  }
   log_timed_action (action, clock);
 }
 
 static void action_wait(const char *const *action){
+  CHECK_ACTION_PARAMS(action, 0, 0);
   double clock = smpi_process_simulated_elapsed();
   MPI_Request request;
   MPI_Status status;
@@ -415,6 +440,7 @@ static void action_wait(const char *const *action){
 }
 
 static void action_waitall(const char *const *action){
+  CHECK_ACTION_PARAMS(action, 0, 0);
   double clock = smpi_process_simulated_elapsed();
   int count_requests=0;
   unsigned int i=0;
@@ -483,7 +509,9 @@ static void action_waitall(const char *const *action){
    xbt_dynar_free(&recvs);
   #endif
 
-   xbt_dynar_free_container(&(reqq[smpi_process_index()]));
+   int freedrank=smpi_process_index();
+   xbt_dynar_free_container(&(reqq[freedrank]));
+   reqq[freedrank]=xbt_dynar_new(sizeof(MPI_Request),&xbt_free_ref);
   }
   log_timed_action (action, clock);
 }
@@ -507,6 +535,7 @@ static void action_barrier(const char *const *action){
 
 static void action_bcast(const char *const *action)
 {
+  CHECK_ACTION_PARAMS(action, 1, 2);
   double size = parse_double(action[2]);
   double clock = smpi_process_simulated_elapsed();
   int root=0;
@@ -531,7 +560,7 @@ static void action_bcast(const char *const *action)
   extra->type = TRACING_BCAST;
   extra->send_size = size;
   extra->root = root_traced;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__, extra);
 
 #endif
@@ -545,6 +574,7 @@ static void action_bcast(const char *const *action)
 
 static void action_reduce(const char *const *action)
 {
+  CHECK_ACTION_PARAMS(action, 2, 2);
   double comm_size = parse_double(action[2]);
   double comp_size = parse_double(action[3]);
   double clock = smpi_process_simulated_elapsed();
@@ -567,7 +597,7 @@ static void action_reduce(const char *const *action)
   extra->type = TRACING_REDUCE;
   extra->send_size = comm_size;
   extra->comp_size = comp_size;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   extra->root = root_traced;
 
   TRACE_smpi_collective_in(rank, root_traced, __FUNCTION__,extra);
@@ -583,6 +613,7 @@ static void action_reduce(const char *const *action)
 }
 
 static void action_allReduce(const char *const *action) {
+  CHECK_ACTION_PARAMS(action, 2, 1);
   double comm_size = parse_double(action[2]);
   double comp_size = parse_double(action[3]);
 
@@ -596,7 +627,7 @@ static void action_allReduce(const char *const *action) {
   extra->type = TRACING_ALLREDUCE;
   extra->send_size = comm_size;
   extra->comp_size = comp_size;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
@@ -634,8 +665,8 @@ static void action_allToAll(const char *const *action) {
   extra->type = TRACING_ALLTOALL;
   extra->send_size = send_size;
   extra->recv_size = recv_size;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
-  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
+  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
@@ -663,6 +694,7 @@ static void action_gather(const char *const *action) {
   4) 0 is the send datatype id, see decode_datatype()
   5) 0 is the recv datatype id, see decode_datatype()
   */
+  CHECK_ACTION_PARAMS(action, 2, 3);
   double clock = smpi_process_simulated_elapsed();
   int comm_size = smpi_comm_size(MPI_COMM_WORLD);
   int send_size = parse_double(action[2]);
@@ -677,8 +709,9 @@ static void action_gather(const char *const *action) {
   }
   void *send = smpi_get_tmp_sendbuffer(send_size* smpi_datatype_size(MPI_CURRENT_TYPE));
   void *recv = NULL;
-
-  int root=atoi(action[4]);
+  int root=0;
+  if(action[4])
+    root=atoi(action[4]);
   int rank = smpi_comm_rank(MPI_COMM_WORLD);
 
   if(rank==root)
@@ -690,8 +723,8 @@ static void action_gather(const char *const *action) {
   extra->send_size = send_size;
   extra->recv_size = recv_size;
   extra->root = root;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
-  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
+  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(smpi_process_index(), root, __FUNCTION__, extra);
 #endif
@@ -721,8 +754,10 @@ static void action_gatherv(const char *const *action) {
   4) 0 is the send datatype id, see decode_datatype()
   5) 0 is the recv datatype id, see decode_datatype()
   */
+
   double clock = smpi_process_simulated_elapsed();
   int comm_size = smpi_comm_size(MPI_COMM_WORLD);
+  CHECK_ACTION_PARAMS(action, comm_size+1, 2);
   int send_size = parse_double(action[2]);
   int *disps = xbt_new0(int, comm_size);
   int *recvcounts = xbt_new0(int, comm_size);
@@ -759,8 +794,8 @@ static void action_gatherv(const char *const *action) {
     extra->recvcounts[i] = recvcounts[i];
   extra->root = root;
   extra->num_processes = comm_size;
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
-  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
+  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(smpi_process_index(), root, __FUNCTION__, extra);
 #endif
@@ -795,6 +830,7 @@ static void action_reducescatter(const char *const *action) {
 
   double clock = smpi_process_simulated_elapsed();
   int comm_size = smpi_comm_size(MPI_COMM_WORLD);
+  CHECK_ACTION_PARAMS(action, comm_size+1, 1);
   int comp_size = parse_double(action[2+comm_size]);
   int *recvcounts = xbt_new0(int, comm_size);  
   int *disps = xbt_new0(int, comm_size);  
@@ -819,7 +855,7 @@ static void action_reducescatter(const char *const *action) {
   extra->recvcounts= xbt_malloc(comm_size*sizeof(int));
   for(i=0; i< comm_size; i++)//copy data to avoid bad free
     extra->recvcounts[i] = recvcounts[i];
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
   extra->comp_size = comp_size;
   extra->num_processes = comm_size;
 
@@ -841,6 +877,59 @@ static void action_reducescatter(const char *const *action) {
   log_timed_action (action, clock);
 }
 
+static void action_allgather(const char *const *action) {
+  /*
+ The structure of the allgather action for the rank 0 (total 4 processes) 
+ is the following:   
+  0 allGather 275427 275427
+
+  where: 
+  1) 275427 is the sendcount
+  2) 275427 is the recvcount
+  3) No more values mean that the datatype for sent and receive buffer
+  is the default one, see decode_datatype().
+
+   */
+
+  double clock = smpi_process_simulated_elapsed();
+
+  CHECK_ACTION_PARAMS(action, 2, 2);
+  int sendcount=atoi(action[2]); 
+  int recvcount=atoi(action[3]); 
+
+  MPI_Datatype MPI_CURRENT_TYPE2;
+
+  if(action[4]) {
+    MPI_CURRENT_TYPE = decode_datatype(action[3]);
+    MPI_CURRENT_TYPE2 = decode_datatype(action[4]);
+  } else {
+    MPI_CURRENT_TYPE = MPI_DEFAULT_TYPE;
+    MPI_CURRENT_TYPE2 = MPI_DEFAULT_TYPE;    
+  }
+  void *sendbuf = smpi_get_tmp_sendbuffer(sendcount* smpi_datatype_size(MPI_CURRENT_TYPE));
+  void *recvbuf = smpi_get_tmp_recvbuffer(recvcount* smpi_datatype_size(MPI_CURRENT_TYPE2));
+
+#ifdef HAVE_TRACING
+  int rank = smpi_process_index();
+  instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
+  extra->type = TRACING_ALLGATHER;
+  extra->send_size = sendcount;
+  extra->recv_size= recvcount;
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
+  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
+  extra->num_processes = smpi_comm_size(MPI_COMM_WORLD);
+
+  TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
+#endif
+
+  mpi_coll_allgather_fun(sendbuf, sendcount, MPI_CURRENT_TYPE, recvbuf, recvcount, MPI_CURRENT_TYPE2, MPI_COMM_WORLD);
+
+#ifdef HAVE_TRACING
+  TRACE_smpi_collective_out(rank, -1, __FUNCTION__);
+#endif
+
+  log_timed_action (action, clock);
+}
 
 static void action_allgatherv(const char *const *action) {
 
@@ -860,6 +949,7 @@ static void action_allgatherv(const char *const *action) {
   double clock = smpi_process_simulated_elapsed();
 
   int comm_size = smpi_comm_size(MPI_COMM_WORLD);
+  CHECK_ACTION_PARAMS(action, comm_size+1, 2);
   int i=0;
   int sendcount=atoi(action[2]);
   int *recvcounts = xbt_new0(int, comm_size);  
@@ -890,8 +980,8 @@ static void action_allgatherv(const char *const *action) {
   extra->recvcounts= xbt_malloc(comm_size*sizeof(int));
   for(i=0; i< comm_size; i++)//copy data to avoid bad free
     extra->recvcounts[i] = recvcounts[i];
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
-  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
+  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
   extra->num_processes = comm_size;
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
@@ -908,7 +998,6 @@ static void action_allgatherv(const char *const *action) {
   xbt_free(disps);
 }
 
-
 static void action_allToAllv(const char *const *action) {
   /*
  The structure of the allToAllV action for the rank 0 (total 4 processes) 
@@ -927,6 +1016,7 @@ static void action_allToAllv(const char *const *action) {
   double clock = smpi_process_simulated_elapsed();
 
   int comm_size = smpi_comm_size(MPI_COMM_WORLD);
+  CHECK_ACTION_PARAMS(action, 2*comm_size+2, 2);
   int send_buf_size=0,recv_buf_size=0,i=0;
   int *sendcounts = xbt_new0(int, comm_size);  
   int *recvcounts = xbt_new0(int, comm_size);  
@@ -969,8 +1059,8 @@ static void action_allToAllv(const char *const *action) {
     extra->recv_size += recvcounts[i];
     extra->recvcounts[i] = recvcounts[i];
   }
-  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE);
-  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2);
+  extra->datatype1 = encode_datatype(MPI_CURRENT_TYPE, NULL);
+  extra->datatype2 = encode_datatype(MPI_CURRENT_TYPE2, NULL);
 
   TRACE_smpi_collective_in(rank, -1, __FUNCTION__,extra);
 #endif
@@ -1024,6 +1114,7 @@ void smpi_replay_init(int *argc, char***argv){
     xbt_replay_action_register("allToAllV",  action_allToAllv);
     xbt_replay_action_register("gather",  action_gather);
     xbt_replay_action_register("gatherV",  action_gatherv);
+    xbt_replay_action_register("allGather",  action_allgather);
     xbt_replay_action_register("allGatherV",  action_allgatherv);
     xbt_replay_action_register("reduceScatter",  action_reducescatter);
     xbt_replay_action_register("compute",    action_compute);
@@ -1059,12 +1150,16 @@ int smpi_replay_finalize(){
     active_processes--;
   }
 
-  xbt_dynar_free_container(&(reqq[smpi_process_index()]));
-
   if(!active_processes){
     /* Last process alive speaking */
     /* end the simulated timer */
     sim_time = smpi_process_simulated_elapsed();
+  }
+  
+
+  xbt_dynar_free_container(&(reqq[smpi_process_index()]));
+
+  if(!active_processes){
     XBT_INFO("Simulation time %f", sim_time);
     _xbt_replay_action_exit();
     xbt_free(sendbuffer);
@@ -1072,7 +1167,8 @@ int smpi_replay_finalize(){
     xbt_free(reqq);
     reqq = NULL;
   }
-  mpi_coll_barrier_fun(MPI_COMM_WORLD);
+  
+
 #ifdef HAVE_TRACING
   int rank = smpi_process_index();
   instr_extra_data extra = xbt_new0(s_instr_extra_data_t,1);
index 653131a..356ab58 100644 (file)
@@ -18,7 +18,7 @@ typedef struct s_smpi_mpi_win{
   MPI_Aint size;
   int disp_unit;
   MPI_Comm comm;
-  //MPI_Info info
+  MPI_Info info;
   int assert;
   xbt_dynar_t requests;
   xbt_bar_t bar;
@@ -40,7 +40,9 @@ MPI_Win smpi_mpi_win_create( void *base, MPI_Aint size, int disp_unit, MPI_Info
   win->size = size;
   win->disp_unit = disp_unit;
   win->assert = 0;
-  //win->info = info;
+  win->info = info;
+  if(info!=MPI_INFO_NULL)
+    info->refcount++;
   win->comm = comm;
   win->name = NULL;
   win->requests = xbt_dynar_new(sizeof(MPI_Request), NULL);
@@ -79,6 +81,9 @@ int smpi_mpi_win_free( MPI_Win* win){
   if ((*win)->name != NULL){
     xbt_free((*win)->name);
   }
+  if((*win)->info!=MPI_INFO_NULL){
+    MPI_Info_free(&(*win)->info);
+  }
   xbt_free(*win);
   win = MPI_WIN_NULL;
   return MPI_SUCCESS;
index cd74d2a..ba1f601 100644 (file)
@@ -431,6 +431,31 @@ lmm_variable_t lmm_get_var_from_cnst(lmm_system_t /*sys*/,
     return NULL;
 }
 
+//if we modify the swag between calls, normal version may loop forever
+//this safe version ensures that we browse the swag elements only once
+lmm_variable_t lmm_get_var_from_cnst_safe(lmm_system_t /*sys*/,
+                                     lmm_constraint_t cnst,
+                                     lmm_element_t * elem,
+                                     lmm_element_t * nextelem,
+                                     int * numelem)
+{
+  if (!(*elem)){
+    *elem = (lmm_element_t) xbt_swag_getFirst(&(cnst->element_set));
+    *numelem = xbt_swag_size(&(cnst->element_set))-1;
+  }else{
+    *elem = *nextelem;
+    if(*numelem>0){
+     (*numelem) --;
+    }else
+      return NULL;
+  }
+  if (*elem){
+    *nextelem = (lmm_element_t) xbt_swag_getNext(*elem, cnst->element_set.offset);
+    return (*elem)->variable;
+  }else
+    return NULL;
+}
+
 void *lmm_constraint_id(lmm_constraint_t cnst)
 {
   return cnst->id;
index 637a243..fe4d32d 100644 (file)
@@ -614,6 +614,9 @@ void NetworkCm02Link::updateBandwidth(double value, double date){
                  (p_power.peak * p_power.scale);
   lmm_variable_t var = NULL;
   lmm_element_t elem = NULL;
+  lmm_element_t nextelem = NULL;
+  int numelem = 0;
+
   NetworkCm02ActionPtr action = NULL;
 
   p_power.peak = value;
@@ -625,7 +628,7 @@ void NetworkCm02Link::updateBandwidth(double value, double date){
   TRACE_surf_link_set_bandwidth(date, getName(), sg_bandwidth_factor * p_power.peak * p_power.scale);
 #endif
   if (sg_weight_S_parameter > 0) {
-    while ((var = lmm_get_var_from_cnst(getModel()->getMaxminSystem(), getConstraint(), &elem))) {
+    while ((var = lmm_get_var_from_cnst_safe(getModel()->getMaxminSystem(), getConstraint(), &elem, &nextelem, &numelem))) {
       action = (NetworkCm02ActionPtr) lmm_variable_id(var);
       action->m_weight += delta;
       if (!action->isSuspended())
@@ -638,10 +641,12 @@ void NetworkCm02Link::updateLatency(double value, double date){
   double delta = value - m_latCurrent;
   lmm_variable_t var = NULL;
   lmm_element_t elem = NULL;
+  lmm_element_t nextelem = NULL;
+  int numelem = 0;
   NetworkCm02ActionPtr action = NULL;
 
   m_latCurrent = value;
-  while ((var = lmm_get_var_from_cnst(getModel()->getMaxminSystem(), getConstraint(), &elem))) {
+  while ((var = lmm_get_var_from_cnst_safe(getModel()->getMaxminSystem(), getConstraint(), &elem, &nextelem, &numelem))) {
     action = (NetworkCm02ActionPtr) lmm_variable_id(var);
     action->m_latCurrent += delta;
     action->m_weight += delta;
index 29aeb32..de303c9 100644 (file)
@@ -3,3 +3,224 @@
 
 /* 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. */
+
+#include "network_ib.hpp"
+#include "simgrid/sg_config.h"
+#include "maxmin_private.hpp"
+
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
+
+static void IB_create_host_callback(sg_platf_host_cbarg_t t){
+  
+  static int id=0;
+// pour t->id -> rajouter une nouvelle struct dans le dict, pour stocker les comms actives
+  if(((NetworkIBModel*)surf_network_model)->active_nodes==NULL)
+    ((NetworkIBModel*)surf_network_model)->active_nodes=xbt_dict_new();
+  
+  IBNode* act = new IBNode(id);
+
+  id++;
+  xbt_dict_set(((NetworkIBModel*)surf_network_model)->active_nodes, t->id, act, NULL);
+}
+
+static void IB_action_state_changed_callback(NetworkActionPtr action, e_surf_action_state_t statein, e_surf_action_state_t stateout){
+ if(statein!=SURF_ACTION_RUNNING|| stateout!=SURF_ACTION_DONE)
+    return;
+  std::pair<IBNode*,IBNode*> pair = ((NetworkIBModel*)surf_network_model)->active_comms[action];
+  XBT_DEBUG("IB callback - action %p finished", action);
+ ((NetworkIBModel*)surf_network_model)->updateIBfactors(action, pair.first, pair.second, 1);
+
+  ((NetworkIBModel*)surf_network_model)->active_comms.erase(action);
+  
+}
+
+
+static void IB_action_init_callback(NetworkActionPtr action,RoutingEdgePtr src, RoutingEdgePtr dst, double size, double rate){
+  if(((NetworkIBModel*)surf_network_model)->active_nodes==NULL)
+    xbt_die("IB comm added, without any node connected !");
+  
+  IBNode* act_src= (IBNode*) xbt_dict_get_or_null(((NetworkIBModel*)surf_network_model)->active_nodes, src->getName());
+  if(act_src==NULL)
+    xbt_die("could not find src node active comms !");
+  //act_src->rate=rate;
+  
+  IBNode* act_dst= (IBNode*) xbt_dict_get_or_null(((NetworkIBModel*)surf_network_model)->active_nodes, dst->getName());
+  if(act_dst==NULL)
+    xbt_die("could not find dst node active comms !");  
+ // act_dst->rate=rate;
+  
+  ((NetworkIBModel*)surf_network_model)->active_comms[action]=make_pair<IBNode*,IBNode*>(act_src, act_dst);
+  //post the action in the second dist, to retrieve in the other callback
+  XBT_DEBUG("IB callback - action %p init", action);
+
+  ((NetworkIBModel*)surf_network_model)->updateIBfactors(action, act_src, act_dst, 0);
+  
+}
+
+
+
+/*********
+ * Model *
+ *********/
+
+/************************************************************************/
+/* New model based on MPI contention model for Infiniband platforms */
+/************************************************************************/
+/* @Inproceedings{mescal_vienne_phd, */
+/*  author={Jérôme Vienne}, */
+/*  title={prédiction de performances d’applications de calcul haute performance sur réseau Infiniband}, */
+/*  address={Grenoble FRANCE}, */
+/*  month=june, */
+/*  year={2010} */
+/*  } */
+void surf_network_model_init_IB(void)
+{
+
+  if (surf_network_model)
+    return;
+  surf_network_model = new NetworkIBModel();
+  net_define_callbacks();
+  xbt_dynar_push(model_list, &surf_network_model);
+  surf_callback_connect(networkActionStateChangedCallbacks, IB_action_state_changed_callback);
+  surf_callback_connect(networkCommunicateCallbacks, IB_action_init_callback);
+
+  sg_platf_host_add_cb(IB_create_host_callback);
+  xbt_cfg_setdefault_double(_sg_cfg_set, "network/weight_S", 8775);
+  
+}
+
+NetworkIBModel::NetworkIBModel()
+ : NetworkSmpiModel() {
+  m_haveGap=false;
+  active_nodes=NULL;
+    
+  const char* IB_factors_string=sg_cfg_get_string("smpi/IB_penalty_factors");
+  xbt_dynar_t radical_elements = xbt_str_split(IB_factors_string, ";");
+  
+  if(xbt_dynar_length(radical_elements)!=3)
+    surf_parse_error("smpi/IB_penalty_factors should be provided and contain 3 elements, semi-colon separated : for example 0.965;0.925;1.35");
+  
+  Be = atof(xbt_dynar_get_as(radical_elements, 0, char *));
+  Bs = atof(xbt_dynar_get_as(radical_elements, 1, char *));
+  ys = atof(xbt_dynar_get_as(radical_elements, 2, char *));
+
+  xbt_dynar_free(&radical_elements);
+}
+
+NetworkIBModel::~NetworkIBModel()
+{
+  xbt_dict_cursor_t cursor = NULL;
+  IBNode* instance = NULL;
+  char *name = NULL;
+  xbt_dict_foreach(active_nodes, cursor, name, instance)
+    delete instance;
+  xbt_dict_free(&active_nodes);
+}
+
+void NetworkIBModel::computeIBfactors(IBNode *root) {
+  double penalized_bw=0.0;
+  double num_comm_out = (double) root->ActiveCommsUp.size();
+  double max_penalty_out=0.0;
+  //first, compute all outbound penalties to get their max
+  for (std::vector<ActiveComm*>::iterator it= root->ActiveCommsUp.begin(); it != root->ActiveCommsUp.end(); ++it) {
+    double my_penalty_out = 1.0;
+
+    if(num_comm_out!=1){
+      if((*it)->destination->nbActiveCommsDown > 2)//number of comms sent to the receiving node
+       my_penalty_out = num_comm_out * Bs * ys;
+      else
+       my_penalty_out = num_comm_out * Bs;
+    }
+
+    max_penalty_out = max(max_penalty_out,my_penalty_out);
+  }
+
+  for (std::vector<ActiveComm*>::iterator it= root->ActiveCommsUp.begin(); it != root->ActiveCommsUp.end(); ++it) {
+
+    //compute inbound penalty
+    double my_penalty_in = 1.0;
+    int nb_comms = (*it)->destination->nbActiveCommsDown;//total number of incoming comms
+    if(nb_comms!=1)
+      my_penalty_in = ((*it)->destination->ActiveCommsDown)[root] //number of comm sent to dest by root node
+                     * Be 
+                     * (*it)->destination->ActiveCommsDown.size();//number of different nodes sending to dest
+    
+    double penalty=max(my_penalty_in,max_penalty_out);
+    
+    double rate_before_update = (*it)->action->getBound();
+    //save initial rate of the action
+    if((*it)->init_rate==-1) 
+      (*it)->init_rate= rate_before_update;
+    
+    penalized_bw= ! num_comm_out ? (*it)->init_rate : (*it)->init_rate /penalty;
+    
+    if (!double_equals(penalized_bw, rate_before_update, sg_surf_precision)){
+      XBT_DEBUG("%d->%d action %p penalty updated : bw now %f, before %f , initial rate %f", root->id,(*it)->destination->id,(*it)->action,penalized_bw, (*it)->action->getBound(), (*it)->init_rate );
+      lmm_update_variable_bound(p_maxminSystem, (*it)->action->getVariable(), penalized_bw);
+    }else{
+      XBT_DEBUG("%d->%d action %p penalty not updated : bw %f, initial rate %f", root->id,(*it)->destination->id,(*it)->action,penalized_bw, (*it)->init_rate );
+    }
+
+  }
+  XBT_DEBUG("Finished computing IB penalties");
+}
+
+void NetworkIBModel::updateIBfactors_rec(IBNode *root, bool* updatedlist) {
+  if(updatedlist[root->id]==0){
+    XBT_DEBUG("IB - Updating rec %d", root->id);
+    computeIBfactors(root);
+    updatedlist[root->id]=1;
+    for (std::vector<ActiveComm*>::iterator it= root->ActiveCommsUp.begin(); it != root->ActiveCommsUp.end(); ++it) {
+        if(updatedlist[(*it)->destination->id]!=1)
+          updateIBfactors_rec((*it)->destination, updatedlist);
+    }
+    for (std::map<IBNode*, int>::iterator it= root->ActiveCommsDown.begin(); it != root->ActiveCommsDown.end(); ++it) {
+        if(updatedlist[it->first->id]!=1)
+          updateIBfactors_rec(it->first, updatedlist);
+    }
+  }
+}
+
+
+void NetworkIBModel::updateIBfactors(NetworkActionPtr action, IBNode *from, IBNode * to, int remove) {
+  if (from == to)//disregard local comms (should use loopback)
+    return;
+  
+  bool* updated=(bool*)xbt_malloc0(xbt_dict_size(active_nodes)*sizeof(bool));
+  ActiveComm* comm=NULL;
+  if(remove){
+    if(to->ActiveCommsDown[from]==1)
+      to->ActiveCommsDown.erase(from);
+    else
+      to->ActiveCommsDown[from]-=1;
+
+    to->nbActiveCommsDown--;
+    for (std::vector<ActiveComm*>::iterator it= from->ActiveCommsUp.begin(); 
+        it != from->ActiveCommsUp.end(); ++it) {
+      if((*it)->action==action){
+       comm=(*it);
+       from->ActiveCommsUp.erase(it);
+       break;
+      }
+    }
+    action->unref();
+
+  }else{
+    action->ref();
+    ActiveComm* comm=new ActiveComm();
+    comm->action=action;
+    comm->destination=to;
+    from->ActiveCommsUp.push_back(comm);
+
+    to->ActiveCommsDown[from]+=1;
+    to->nbActiveCommsDown++;
+  }
+  XBT_DEBUG("IB - Updating %d", from->id);
+  updateIBfactors_rec(from, updated);
+  XBT_DEBUG("IB - Finished updating %d", from->id);
+  if(comm)
+    delete comm;
+  xbt_free(updated);
+}
index b7d1715..7328b97 100644 (file)
@@ -7,37 +7,50 @@
 #ifndef SURF_NETWORK_IB_HPP_
 #define SURF_NETWORK_IB_HPP_
 
-class NetworkIBModel : public NetworkModel {
-private:
-public:
-  NetworkIBModel();
-  NetworkIBModel(const char *name);
-  ~NetworkModel();
-  virtual ActionPtr communicate(RoutingEdgePtr src, RoutingEdgePtr dst,
-                                double size, double rate);
-  virtual NetworkLinkPtr createNetworkLink(const char *name,
-                                          double bw_initial,
-                                          tmgr_trace_t bw_trace,
-                                          double lat_initial,
-                                          tmgr_trace_t lat_trace,
-                                          e_surf_resource_state_t state_initial,
-                                          tmgr_trace_t state_trace,
-                                          e_surf_link_sharing_policy_t policy,
-                                          xbt_dict_t properties);
+#include "network_smpi.hpp"
+class IBNode;
+
+
+class ActiveComm{
+public :
+  //IBNode* origin;
+  IBNode* destination;
+  NetworkActionPtr action;
+  double init_rate;
+  ActiveComm() : destination(NULL),action(NULL),init_rate(-1){};
+  ~ActiveComm(){};
 };
 
-class NetworkIBLink : public NetworkLink {
+class IBNode{
+public :
+  int id;
+    //store related links, to ease computation of the penalties
+  std::vector<ActiveComm*> ActiveCommsUp;
+  //store the number of comms received from each node
+  std::map<IBNode*, int> ActiveCommsDown;
+  //number of comms the node is receiving
+  int nbActiveCommsDown;
+  IBNode(int id) : id(id),nbActiveCommsDown(0){};
+  ~IBNode(){};
+};
+
+class NetworkIBModel : public NetworkSmpiModel {
 private:
+  void updateIBfactors_rec(IBNode *root, bool* updatedlist);
+  void computeIBfactors(IBNode *root);
 public:
-  NetworkIBLink(NetworkModelPtr model, const char *name, xbt_dict_t props);
-  NetworkIBLink(NetworkModelPtr model, const char *name, xbt_dict_t props,
-                lmm_constraint_t constraint,
-                tmgr_history_t history,
-                tmgr_trace_t state_trace);
-  ~NetworkIBLink();
-  virtual void updateLatency(double value, double date=surf_get_clock());
-  virtual void updateBandwidth(double value, double date=surf_get_clock());
-
+  NetworkIBModel();
+  NetworkIBModel(const char *name);
+  ~NetworkIBModel();
+  void updateIBfactors(NetworkActionPtr action, IBNode *from, IBNode * to, int remove);
+  
+  xbt_dict_t active_nodes;
+  std::map<NetworkActionPtr , std::pair<IBNode*,IBNode*> > active_comms;
+  
+  double Bs;
+  double Be;
+  double ys;
 
 };
+
 #endif
index 3c8122d..f7d9cde 100644 (file)
@@ -4681,366 +4681,366 @@ const char surfxml_flexml_version[] = "1.9.6";
 int surfxml_pcdata_ix;
 extern char *surfxml_bufferstack;
 #define surfxml_pcdata (surfxml_bufferstack + surfxml_pcdata_ix)
-AT_surfxml_random_max AX_surfxml_random_max;
-#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
-short int surfxml_random_max_isset;
-AT_surfxml_cluster_id AX_surfxml_cluster_id;
-#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
-short int surfxml_cluster_id_isset;
-AT_surfxml_cabinet_lat AX_surfxml_cabinet_lat;
-#define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat)
-short int surfxml_cabinet_lat_isset;
-AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical;
-#define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
-short int surfxml_ASroute_symmetrical_isset;
-AT_surfxml_link_latency___file AX_surfxml_link_latency___file;
-#define A_surfxml_link_latency___file (surfxml_bufferstack + AX_surfxml_link_latency___file)
-short int surfxml_link_latency___file_isset;
+AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
+#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
+short int surfxml_cluster_radical_isset;
 AT_surfxml_cluster_bb___lat AX_surfxml_cluster_bb___lat;
 #define A_surfxml_cluster_bb___lat (surfxml_bufferstack + AX_surfxml_cluster_bb___lat)
 short int surfxml_cluster_bb___lat_isset;
-AT_surfxml_host_coordinates AX_surfxml_host_coordinates;
-#define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
-short int surfxml_host_coordinates_isset;
-AT_surfxml_route_dst AX_surfxml_route_dst;
-#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
-short int surfxml_route_dst_isset;
+AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
+#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
+short int surfxml_trace_periodicity_isset;
+AT_surfxml_cluster_core AX_surfxml_cluster_core;
+#define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
+short int surfxml_cluster_core_isset;
+AT_surfxml_config_id AX_surfxml_config_id;
+#define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
+short int surfxml_config_id_isset;
 AT_surfxml_bypassASroute_gw___dst AX_surfxml_bypassASroute_gw___dst;
 #define A_surfxml_bypassASroute_gw___dst (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___dst)
 short int surfxml_bypassASroute_gw___dst_isset;
+AT_surfxml_AS_id AX_surfxml_AS_id;
+#define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
+short int surfxml_AS_id_isset;
+AT_surfxml_trace_file AX_surfxml_trace_file;
+#define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
+short int surfxml_trace_file_isset;
+AT_surfxml_cabinet_bw AX_surfxml_cabinet_bw;
+#define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw)
+short int surfxml_cabinet_bw_isset;
+AT_surfxml_cluster_topo___parameters AX_surfxml_cluster_topo___parameters;
+#define A_surfxml_cluster_topo___parameters (surfxml_bufferstack + AX_surfxml_cluster_topo___parameters)
+short int surfxml_cluster_topo___parameters_isset;
+AT_surfxml_host___link_up AX_surfxml_host___link_up;
+#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up)
+short int surfxml_host___link_up_isset;
+AT_surfxml_storage_attach AX_surfxml_storage_attach;
+#define A_surfxml_storage_attach (surfxml_bufferstack + AX_surfxml_storage_attach)
+short int surfxml_storage_attach_isset;
+AT_surfxml_peer_power AX_surfxml_peer_power;
+#define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
+short int surfxml_peer_power_isset;
+AT_surfxml_storage___type_content___type AX_surfxml_storage___type_content___type;
+#define A_surfxml_storage___type_content___type (surfxml_bufferstack + AX_surfxml_storage___type_content___type)
+short int surfxml_storage___type_content___type_isset;
 AT_surfxml_cluster_prefix AX_surfxml_cluster_prefix;
 #define A_surfxml_cluster_prefix (surfxml_bufferstack + AX_surfxml_cluster_prefix)
 short int surfxml_cluster_prefix_isset;
-AT_surfxml_host_core AX_surfxml_host_core;
-#define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
-short int surfxml_host_core_isset;
-AT_surfxml_link_bandwidth___file AX_surfxml_link_bandwidth___file;
-#define A_surfxml_link_bandwidth___file (surfxml_bufferstack + AX_surfxml_link_bandwidth___file)
-short int surfxml_link_bandwidth___file_isset;
-AT_surfxml_peer_bw___in AX_surfxml_peer_bw___in;
-#define A_surfxml_peer_bw___in (surfxml_bufferstack + AX_surfxml_peer_bw___in)
-short int surfxml_peer_bw___in_isset;
+AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
+#define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
+short int surfxml_ASroute_dst_isset;
+AT_surfxml_ASroute_src AX_surfxml_ASroute_src;
+#define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
+short int surfxml_ASroute_src_isset;
+AT_surfxml_peer_state___file AX_surfxml_peer_state___file;
+#define A_surfxml_peer_state___file (surfxml_bufferstack + AX_surfxml_peer_state___file)
+short int surfxml_peer_state___file_isset;
+AT_surfxml_prop_id AX_surfxml_prop_id;
+#define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
+short int surfxml_prop_id_isset;
+AT_surfxml_cluster_router___id AX_surfxml_cluster_router___id;
+#define A_surfxml_cluster_router___id (surfxml_bufferstack + AX_surfxml_cluster_router___id)
+short int surfxml_cluster_router___id_isset;
+AT_surfxml_host___link_down AX_surfxml_host___link_down;
+#define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down)
+short int surfxml_host___link_down_isset;
+AT_surfxml_random_min AX_surfxml_random_min;
+#define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
+short int surfxml_random_min_isset;
+AT_surfxml_cluster_power AX_surfxml_cluster_power;
+#define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
+short int surfxml_cluster_power_isset;
+AT_surfxml_cluster_availability___file AX_surfxml_cluster_availability___file;
+#define A_surfxml_cluster_availability___file (surfxml_bufferstack + AX_surfxml_cluster_availability___file)
+short int surfxml_cluster_availability___file_isset;
 AT_surfxml_process_start___time AX_surfxml_process_start___time;
 #define A_surfxml_process_start___time (surfxml_bufferstack + AX_surfxml_process_start___time)
 short int surfxml_process_start___time_isset;
-AT_surfxml_platform_version AX_surfxml_platform_version;
-#define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
-short int surfxml_platform_version_isset;
-AT_surfxml_backbone_id AX_surfxml_backbone_id;
-#define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id)
-short int surfxml_backbone_id_isset;
-AT_surfxml_storage_content AX_surfxml_storage_content;
-#define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content)
-short int surfxml_storage_content_isset;
+AT_surfxml_peer_availability___file AX_surfxml_peer_availability___file;
+#define A_surfxml_peer_availability___file (surfxml_bufferstack + AX_surfxml_peer_availability___file)
+short int surfxml_peer_availability___file_isset;
+AT_surfxml_random_generator AX_surfxml_random_generator;
+#define A_surfxml_random_generator AX_surfxml_random_generator
+short int surfxml_random_generator_isset;
 AT_surfxml_host___link_id AX_surfxml_host___link_id;
 #define A_surfxml_host___link_id (surfxml_bufferstack + AX_surfxml_host___link_id)
 short int surfxml_host___link_id_isset;
-AT_surfxml_host_id AX_surfxml_host_id;
-#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
-short int surfxml_host_id_isset;
-AT_surfxml_gpu_name AX_surfxml_gpu_name;
-#define A_surfxml_gpu_name (surfxml_bufferstack + AX_surfxml_gpu_name)
-short int surfxml_gpu_name_isset;
-AT_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy;
-#define A_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy
-short int surfxml_link_sharing___policy_isset;
-AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
-#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
-short int surfxml_cluster_bw_isset;
-AT_surfxml_cabinet_prefix AX_surfxml_cabinet_prefix;
-#define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix)
-short int surfxml_cabinet_prefix_isset;
-AT_surfxml_router_coordinates AX_surfxml_router_coordinates;
-#define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
-short int surfxml_router_coordinates_isset;
-AT_surfxml_storage_attach AX_surfxml_storage_attach;
-#define A_surfxml_storage_attach (surfxml_bufferstack + AX_surfxml_storage_attach)
-short int surfxml_storage_attach_isset;
+AT_surfxml_link_bandwidth___file AX_surfxml_link_bandwidth___file;
+#define A_surfxml_link_bandwidth___file (surfxml_bufferstack + AX_surfxml_link_bandwidth___file)
+short int surfxml_link_bandwidth___file_isset;
+AT_surfxml_storage_id AX_surfxml_storage_id;
+#define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id)
+short int surfxml_storage_id_isset;
+AT_surfxml_AS_routing AX_surfxml_AS_routing;
+#define A_surfxml_AS_routing AX_surfxml_AS_routing
+short int surfxml_AS_routing_isset;
+AT_surfxml_host_availability___file AX_surfxml_host_availability___file;
+#define A_surfxml_host_availability___file (surfxml_bufferstack + AX_surfxml_host_availability___file)
+short int surfxml_host_availability___file_isset;
+AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
+#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
+short int surfxml_cluster_lat_isset;
+AT_surfxml_storage_content AX_surfxml_storage_content;
+#define A_surfxml_storage_content (surfxml_bufferstack + AX_surfxml_storage_content)
+short int surfxml_storage_content_isset;
+AT_surfxml_host_availability AX_surfxml_host_availability;
+#define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
+short int surfxml_host_availability_isset;
+AT_surfxml_link_latency___file AX_surfxml_link_latency___file;
+#define A_surfxml_link_latency___file (surfxml_bufferstack + AX_surfxml_link_latency___file)
+short int surfxml_link_latency___file_isset;
+AT_surfxml_cabinet_power AX_surfxml_cabinet_power;
+#define A_surfxml_cabinet_power (surfxml_bufferstack + AX_surfxml_cabinet_power)
+short int surfxml_cabinet_power_isset;
+AT_surfxml_host_core AX_surfxml_host_core;
+#define A_surfxml_host_core (surfxml_bufferstack + AX_surfxml_host_core)
+short int surfxml_host_core_isset;
 AT_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy;
 #define A_surfxml_cluster_bb___sharing___policy AX_surfxml_cluster_bb___sharing___policy
 short int surfxml_cluster_bb___sharing___policy_isset;
+AT_surfxml_cabinet_lat AX_surfxml_cabinet_lat;
+#define A_surfxml_cabinet_lat (surfxml_bufferstack + AX_surfxml_cabinet_lat)
+short int surfxml_cabinet_lat_isset;
+AT_surfxml_ASroute_gw___src AX_surfxml_ASroute_gw___src;
+#define A_surfxml_ASroute_gw___src (surfxml_bufferstack + AX_surfxml_ASroute_gw___src)
+short int surfxml_ASroute_gw___src_isset;
 AT_surfxml_cabinet_radical AX_surfxml_cabinet_radical;
 #define A_surfxml_cabinet_radical (surfxml_bufferstack + AX_surfxml_cabinet_radical)
 short int surfxml_cabinet_radical_isset;
-AT_surfxml_cabinet_suffix AX_surfxml_cabinet_suffix;
-#define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix)
-short int surfxml_cabinet_suffix_isset;
-AT_surfxml_cluster_state___file AX_surfxml_cluster_state___file;
-#define A_surfxml_cluster_state___file (surfxml_bufferstack + AX_surfxml_cluster_state___file)
-short int surfxml_cluster_state___file_isset;
-AT_surfxml_cluster_lat AX_surfxml_cluster_lat;
-#define A_surfxml_cluster_lat (surfxml_bufferstack + AX_surfxml_cluster_lat)
-short int surfxml_cluster_lat_isset;
-AT_surfxml_cluster_radical AX_surfxml_cluster_radical;
-#define A_surfxml_cluster_radical (surfxml_bufferstack + AX_surfxml_cluster_radical)
-short int surfxml_cluster_radical_isset;
-AT_surfxml_peer_power AX_surfxml_peer_power;
-#define A_surfxml_peer_power (surfxml_bufferstack + AX_surfxml_peer_power)
-short int surfxml_peer_power_isset;
-AT_surfxml_host_state___file AX_surfxml_host_state___file;
-#define A_surfxml_host_state___file (surfxml_bufferstack + AX_surfxml_host_state___file)
-short int surfxml_host_state___file_isset;
-AT_surfxml_peer_state___file AX_surfxml_peer_state___file;
-#define A_surfxml_peer_state___file (surfxml_bufferstack + AX_surfxml_peer_state___file)
-short int surfxml_peer_state___file_isset;
-AT_surfxml_cluster_loopback___lat AX_surfxml_cluster_loopback___lat;
-#define A_surfxml_cluster_loopback___lat (surfxml_bufferstack + AX_surfxml_cluster_loopback___lat)
-short int surfxml_cluster_loopback___lat_isset;
+AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src;
+#define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
+short int surfxml_bypassRoute_src_isset;
+AT_surfxml_host_state AX_surfxml_host_state;
+#define A_surfxml_host_state AX_surfxml_host_state
+short int surfxml_host_state_isset;
+AT_surfxml_cabinet_prefix AX_surfxml_cabinet_prefix;
+#define A_surfxml_cabinet_prefix (surfxml_bufferstack + AX_surfxml_cabinet_prefix)
+short int surfxml_cabinet_prefix_isset;
 AT_surfxml_random_mean AX_surfxml_random_mean;
 #define A_surfxml_random_mean (surfxml_bufferstack + AX_surfxml_random_mean)
 short int surfxml_random_mean_isset;
-AT_surfxml_random_std___deviation AX_surfxml_random_std___deviation;
-#define A_surfxml_random_std___deviation (surfxml_bufferstack + AX_surfxml_random_std___deviation)
-short int surfxml_random_std___deviation_isset;
-AT_surfxml_route_src AX_surfxml_route_src;
-#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
-short int surfxml_route_src_isset;
-AT_surfxml_bypassASroute_src AX_surfxml_bypassASroute_src;
-#define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src)
-short int surfxml_bypassASroute_src_isset;
-AT_surfxml_cluster_topo___parameters AX_surfxml_cluster_topo___parameters;
-#define A_surfxml_cluster_topo___parameters (surfxml_bufferstack + AX_surfxml_cluster_topo___parameters)
-short int surfxml_cluster_topo___parameters_isset;
-AT_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy;
-#define A_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy
-short int surfxml_cluster_sharing___policy_isset;
-AT_surfxml_trace_periodicity AX_surfxml_trace_periodicity;
-#define A_surfxml_trace_periodicity (surfxml_bufferstack + AX_surfxml_trace_periodicity)
-short int surfxml_trace_periodicity_isset;
-AT_surfxml_peer_lat AX_surfxml_peer_lat;
-#define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat)
-short int surfxml_peer_lat_isset;
-AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
-#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
-short int surfxml_cluster_suffix_isset;
-AT_surfxml_cluster_router___id AX_surfxml_cluster_router___id;
-#define A_surfxml_cluster_router___id (surfxml_bufferstack + AX_surfxml_cluster_router___id)
-short int surfxml_cluster_router___id_isset;
 AT_surfxml_backbone_latency AX_surfxml_backbone_latency;
 #define A_surfxml_backbone_latency (surfxml_bufferstack + AX_surfxml_backbone_latency)
 short int surfxml_backbone_latency_isset;
-AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical;
-#define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
-short int surfxml_route_symmetrical_isset;
-AT_surfxml_cabinet_bw AX_surfxml_cabinet_bw;
-#define A_surfxml_cabinet_bw (surfxml_bufferstack + AX_surfxml_cabinet_bw)
-short int surfxml_cabinet_bw_isset;
-AT_surfxml_prop_value AX_surfxml_prop_value;
-#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
-short int surfxml_prop_value_isset;
-AT_surfxml_storage___type_id AX_surfxml_storage___type_id;
-#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id)
-short int surfxml_storage___type_id_isset;
-AT_surfxml_storage___type_model AX_surfxml_storage___type_model;
-#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model)
-short int surfxml_storage___type_model_isset;
-AT_surfxml_random_radical AX_surfxml_random_radical;
-#define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
-short int surfxml_random_radical_isset;
-AT_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction;
-#define A_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction
-short int surfxml_link___ctn_direction_isset;
-AT_surfxml_model___prop_id AX_surfxml_model___prop_id;
-#define A_surfxml_model___prop_id (surfxml_bufferstack + AX_surfxml_model___prop_id)
-short int surfxml_model___prop_id_isset;
-AT_surfxml_include_file AX_surfxml_include_file;
-#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
-short int surfxml_include_file_isset;
-AT_surfxml_ASroute_src AX_surfxml_ASroute_src;
-#define A_surfxml_ASroute_src (surfxml_bufferstack + AX_surfxml_ASroute_src)
-short int surfxml_ASroute_src_isset;
-AT_surfxml_storage___type_size AX_surfxml_storage___type_size;
-#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size)
-short int surfxml_storage___type_size_isset;
-AT_surfxml_host___link_up AX_surfxml_host___link_up;
-#define A_surfxml_host___link_up (surfxml_bufferstack + AX_surfxml_host___link_up)
-short int surfxml_host___link_up_isset;
-AT_surfxml_cabinet_id AX_surfxml_cabinet_id;
-#define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id)
-short int surfxml_cabinet_id_isset;
 AT_surfxml_peer_bw___out AX_surfxml_peer_bw___out;
 #define A_surfxml_peer_bw___out (surfxml_bufferstack + AX_surfxml_peer_bw___out)
 short int surfxml_peer_bw___out_isset;
-AT_surfxml_host_availability___file AX_surfxml_host_availability___file;
-#define A_surfxml_host_availability___file (surfxml_bufferstack + AX_surfxml_host_availability___file)
-short int surfxml_host_availability___file_isset;
-AT_surfxml_trace_file AX_surfxml_trace_file;
-#define A_surfxml_trace_file (surfxml_bufferstack + AX_surfxml_trace_file)
-short int surfxml_trace_file_isset;
-AT_surfxml_cluster_bb___bw AX_surfxml_cluster_bb___bw;
-#define A_surfxml_cluster_bb___bw (surfxml_bufferstack + AX_surfxml_cluster_bb___bw)
-short int surfxml_cluster_bb___bw_isset;
-AT_surfxml_storage_id AX_surfxml_storage_id;
-#define A_surfxml_storage_id (surfxml_bufferstack + AX_surfxml_storage_id)
-short int surfxml_storage_id_isset;
-AT_surfxml_ASroute_gw___src AX_surfxml_ASroute_gw___src;
-#define A_surfxml_ASroute_gw___src (surfxml_bufferstack + AX_surfxml_ASroute_gw___src)
-short int surfxml_ASroute_gw___src_isset;
-AT_surfxml_storage___type_content AX_surfxml_storage___type_content;
-#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content)
-short int surfxml_storage___type_content_isset;
-AT_surfxml_link_id AX_surfxml_link_id;
-#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
-short int surfxml_link_id_isset;
-AT_surfxml_peer_availability___file AX_surfxml_peer_availability___file;
-#define A_surfxml_peer_availability___file (surfxml_bufferstack + AX_surfxml_peer_availability___file)
-short int surfxml_peer_availability___file_isset;
-AT_surfxml_cluster_core AX_surfxml_cluster_core;
-#define A_surfxml_cluster_core (surfxml_bufferstack + AX_surfxml_cluster_core)
-short int surfxml_cluster_core_isset;
-AT_surfxml_link_state___file AX_surfxml_link_state___file;
-#define A_surfxml_link_state___file (surfxml_bufferstack + AX_surfxml_link_state___file)
-short int surfxml_link_state___file_isset;
-AT_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind;
-#define A_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind
-short int surfxml_trace___connect_kind_isset;
-AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates;
-#define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
-short int surfxml_peer_coordinates_isset;
-AT_surfxml_prop_id AX_surfxml_prop_id;
-#define A_surfxml_prop_id (surfxml_bufferstack + AX_surfxml_prop_id)
-short int surfxml_prop_id_isset;
-AT_surfxml_mstorage_name AX_surfxml_mstorage_name;
-#define A_surfxml_mstorage_name (surfxml_bufferstack + AX_surfxml_mstorage_name)
-short int surfxml_mstorage_name_isset;
-AT_surfxml_trace___connect_element AX_surfxml_trace___connect_element;
-#define A_surfxml_trace___connect_element (surfxml_bufferstack + AX_surfxml_trace___connect_element)
-short int surfxml_trace___connect_element_isset;
-AT_surfxml_host_power AX_surfxml_host_power;
-#define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
-short int surfxml_host_power_isset;
 AT_surfxml_argument_value AX_surfxml_argument_value;
 #define A_surfxml_argument_value (surfxml_bufferstack + AX_surfxml_argument_value)
 short int surfxml_argument_value_isset;
-AT_surfxml_ASroute_gw___dst AX_surfxml_ASroute_gw___dst;
-#define A_surfxml_ASroute_gw___dst (surfxml_bufferstack + AX_surfxml_ASroute_gw___dst)
-short int surfxml_ASroute_gw___dst_isset;
-AT_surfxml_model___prop_value AX_surfxml_model___prop_value;
-#define A_surfxml_model___prop_value (surfxml_bufferstack + AX_surfxml_model___prop_value)
-short int surfxml_model___prop_value_isset;
-AT_surfxml_router_id AX_surfxml_router_id;
-#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
-short int surfxml_router_id_isset;
-AT_surfxml_cluster_availability___file AX_surfxml_cluster_availability___file;
-#define A_surfxml_cluster_availability___file (surfxml_bufferstack + AX_surfxml_cluster_availability___file)
-short int surfxml_cluster_availability___file_isset;
-AT_surfxml_cluster_loopback___bw AX_surfxml_cluster_loopback___bw;
-#define A_surfxml_cluster_loopback___bw (surfxml_bufferstack + AX_surfxml_cluster_loopback___bw)
-short int surfxml_cluster_loopback___bw_isset;
-AT_surfxml_host_pstate AX_surfxml_host_pstate;
-#define A_surfxml_host_pstate (surfxml_bufferstack + AX_surfxml_host_pstate)
-short int surfxml_host_pstate_isset;
-AT_surfxml_cabinet_power AX_surfxml_cabinet_power;
-#define A_surfxml_cabinet_power (surfxml_bufferstack + AX_surfxml_cabinet_power)
-short int surfxml_cabinet_power_isset;
-AT_surfxml_process_kill___time AX_surfxml_process_kill___time;
-#define A_surfxml_process_kill___time (surfxml_bufferstack + AX_surfxml_process_kill___time)
-short int surfxml_process_kill___time_isset;
-AT_surfxml_process_function AX_surfxml_process_function;
-#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
-short int surfxml_process_function_isset;
-AT_surfxml_storage___type_content___type AX_surfxml_storage___type_content___type;
-#define A_surfxml_storage___type_content___type (surfxml_bufferstack + AX_surfxml_storage___type_content___type)
-short int surfxml_storage___type_content___type_isset;
-AT_surfxml_mount_storageId AX_surfxml_mount_storageId;
-#define A_surfxml_mount_storageId (surfxml_bufferstack + AX_surfxml_mount_storageId)
-short int surfxml_mount_storageId_isset;
-AT_surfxml_random_seed AX_surfxml_random_seed;
-#define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
-short int surfxml_random_seed_isset;
-AT_surfxml_backbone_bandwidth AX_surfxml_backbone_bandwidth;
-#define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth)
-short int surfxml_backbone_bandwidth_isset;
-AT_surfxml_bypassRoute_src AX_surfxml_bypassRoute_src;
-#define A_surfxml_bypassRoute_src (surfxml_bufferstack + AX_surfxml_bypassRoute_src)
-short int surfxml_bypassRoute_src_isset;
-AT_surfxml_random_id AX_surfxml_random_id;
-#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
-short int surfxml_random_id_isset;
-AT_surfxml_host_availability AX_surfxml_host_availability;
-#define A_surfxml_host_availability (surfxml_bufferstack + AX_surfxml_host_availability)
-short int surfxml_host_availability_isset;
+AT_surfxml_process_on___failure AX_surfxml_process_on___failure;
+#define A_surfxml_process_on___failure AX_surfxml_process_on___failure
+short int surfxml_process_on___failure_isset;
+AT_surfxml_route_dst AX_surfxml_route_dst;
+#define A_surfxml_route_dst (surfxml_bufferstack + AX_surfxml_route_dst)
+short int surfxml_route_dst_isset;
+AT_surfxml_cluster_suffix AX_surfxml_cluster_suffix;
+#define A_surfxml_cluster_suffix (surfxml_bufferstack + AX_surfxml_cluster_suffix)
+short int surfxml_cluster_suffix_isset;
+AT_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind;
+#define A_surfxml_trace___connect_kind AX_surfxml_trace___connect_kind
+short int surfxml_trace___connect_kind_isset;
+AT_surfxml_cabinet_id AX_surfxml_cabinet_id;
+#define A_surfxml_cabinet_id (surfxml_bufferstack + AX_surfxml_cabinet_id)
+short int surfxml_cabinet_id_isset;
+AT_surfxml_cluster_limiter___link AX_surfxml_cluster_limiter___link;
+#define A_surfxml_cluster_limiter___link (surfxml_bufferstack + AX_surfxml_cluster_limiter___link)
+short int surfxml_cluster_limiter___link_isset;
 AT_surfxml_mount_name AX_surfxml_mount_name;
 #define A_surfxml_mount_name (surfxml_bufferstack + AX_surfxml_mount_name)
 short int surfxml_mount_name_isset;
-AT_surfxml_bypassASroute_dst AX_surfxml_bypassASroute_dst;
-#define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst)
-short int surfxml_bypassASroute_dst_isset;
-AT_surfxml_random_min AX_surfxml_random_min;
-#define A_surfxml_random_min (surfxml_bufferstack + AX_surfxml_random_min)
-short int surfxml_random_min_isset;
+AT_surfxml_bypassASroute_src AX_surfxml_bypassASroute_src;
+#define A_surfxml_bypassASroute_src (surfxml_bufferstack + AX_surfxml_bypassASroute_src)
+short int surfxml_bypassASroute_src_isset;
+AT_surfxml_host_coordinates AX_surfxml_host_coordinates;
+#define A_surfxml_host_coordinates (surfxml_bufferstack + AX_surfxml_host_coordinates)
+short int surfxml_host_coordinates_isset;
+AT_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction;
+#define A_surfxml_link___ctn_direction AX_surfxml_link___ctn_direction
+short int surfxml_link___ctn_direction_isset;
+AT_surfxml_mstorage_name AX_surfxml_mstorage_name;
+#define A_surfxml_mstorage_name (surfxml_bufferstack + AX_surfxml_mstorage_name)
+short int surfxml_mstorage_name_isset;
+AT_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy;
+#define A_surfxml_cluster_sharing___policy AX_surfxml_cluster_sharing___policy
+short int surfxml_cluster_sharing___policy_isset;
+AT_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical;
+#define A_surfxml_ASroute_symmetrical AX_surfxml_ASroute_symmetrical
+short int surfxml_ASroute_symmetrical_isset;
+AT_surfxml_host_power AX_surfxml_host_power;
+#define A_surfxml_host_power (surfxml_bufferstack + AX_surfxml_host_power)
+short int surfxml_host_power_isset;
+AT_surfxml_model___prop_id AX_surfxml_model___prop_id;
+#define A_surfxml_model___prop_id (surfxml_bufferstack + AX_surfxml_model___prop_id)
+short int surfxml_model___prop_id_isset;
 AT_surfxml_mstorage_typeId AX_surfxml_mstorage_typeId;
 #define A_surfxml_mstorage_typeId (surfxml_bufferstack + AX_surfxml_mstorage_typeId)
 short int surfxml_mstorage_typeId_isset;
-AT_surfxml_host___link_down AX_surfxml_host___link_down;
-#define A_surfxml_host___link_down (surfxml_bufferstack + AX_surfxml_host___link_down)
-short int surfxml_host___link_down_isset;
-AT_surfxml_cluster_limiter___link AX_surfxml_cluster_limiter___link;
-#define A_surfxml_cluster_limiter___link (surfxml_bufferstack + AX_surfxml_cluster_limiter___link)
-short int surfxml_cluster_limiter___link_isset;
-AT_surfxml_peer_id AX_surfxml_peer_id;
-#define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
-short int surfxml_peer_id_isset;
+AT_surfxml_cluster_id AX_surfxml_cluster_id;
+#define A_surfxml_cluster_id (surfxml_bufferstack + AX_surfxml_cluster_id)
+short int surfxml_cluster_id_isset;
 AT_surfxml_cluster_topology AX_surfxml_cluster_topology;
 #define A_surfxml_cluster_topology AX_surfxml_cluster_topology
 short int surfxml_cluster_topology_isset;
-AT_surfxml_host_state AX_surfxml_host_state;
-#define A_surfxml_host_state AX_surfxml_host_state
-short int surfxml_host_state_isset;
-AT_surfxml_trace___connect_trace AX_surfxml_trace___connect_trace;
-#define A_surfxml_trace___connect_trace (surfxml_bufferstack + AX_surfxml_trace___connect_trace)
-short int surfxml_trace___connect_trace_isset;
-AT_surfxml_AS_id AX_surfxml_AS_id;
-#define A_surfxml_AS_id (surfxml_bufferstack + AX_surfxml_AS_id)
-short int surfxml_AS_id_isset;
-AT_surfxml_bypassASroute_gw___src AX_surfxml_bypassASroute_gw___src;
-#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src)
-short int surfxml_bypassASroute_gw___src_isset;
-AT_surfxml_process_on___failure AX_surfxml_process_on___failure;
-#define A_surfxml_process_on___failure AX_surfxml_process_on___failure
-short int surfxml_process_on___failure_isset;
+AT_surfxml_include_file AX_surfxml_include_file;
+#define A_surfxml_include_file (surfxml_bufferstack + AX_surfxml_include_file)
+short int surfxml_include_file_isset;
 AT_surfxml_link_state AX_surfxml_link_state;
 #define A_surfxml_link_state AX_surfxml_link_state
 short int surfxml_link_state_isset;
-AT_surfxml_random_generator AX_surfxml_random_generator;
-#define A_surfxml_random_generator AX_surfxml_random_generator
-short int surfxml_random_generator_isset;
+AT_surfxml_random_max AX_surfxml_random_max;
+#define A_surfxml_random_max (surfxml_bufferstack + AX_surfxml_random_max)
+short int surfxml_random_max_isset;
+AT_surfxml_storage___type_content AX_surfxml_storage___type_content;
+#define A_surfxml_storage___type_content (surfxml_bufferstack + AX_surfxml_storage___type_content)
+short int surfxml_storage___type_content_isset;
+AT_surfxml_host_state___file AX_surfxml_host_state___file;
+#define A_surfxml_host_state___file (surfxml_bufferstack + AX_surfxml_host_state___file)
+short int surfxml_host_state___file_isset;
+AT_surfxml_route_symmetrical AX_surfxml_route_symmetrical;
+#define A_surfxml_route_symmetrical AX_surfxml_route_symmetrical
+short int surfxml_route_symmetrical_isset;
+AT_surfxml_random_id AX_surfxml_random_id;
+#define A_surfxml_random_id (surfxml_bufferstack + AX_surfxml_random_id)
+short int surfxml_random_id_isset;
+AT_surfxml_link_state___file AX_surfxml_link_state___file;
+#define A_surfxml_link_state___file (surfxml_bufferstack + AX_surfxml_link_state___file)
+short int surfxml_link_state___file_isset;
+AT_surfxml_gpu_name AX_surfxml_gpu_name;
+#define A_surfxml_gpu_name (surfxml_bufferstack + AX_surfxml_gpu_name)
+short int surfxml_gpu_name_isset;
+AT_surfxml_backbone_id AX_surfxml_backbone_id;
+#define A_surfxml_backbone_id (surfxml_bufferstack + AX_surfxml_backbone_id)
+short int surfxml_backbone_id_isset;
 AT_surfxml_link___ctn_id AX_surfxml_link___ctn_id;
 #define A_surfxml_link___ctn_id (surfxml_bufferstack + AX_surfxml_link___ctn_id)
 short int surfxml_link___ctn_id_isset;
-AT_surfxml_storage_typeId AX_surfxml_storage_typeId;
-#define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId)
-short int surfxml_storage_typeId_isset;
-AT_surfxml_cluster_power AX_surfxml_cluster_power;
-#define A_surfxml_cluster_power (surfxml_bufferstack + AX_surfxml_cluster_power)
-short int surfxml_cluster_power_isset;
-AT_surfxml_ASroute_dst AX_surfxml_ASroute_dst;
-#define A_surfxml_ASroute_dst (surfxml_bufferstack + AX_surfxml_ASroute_dst)
-short int surfxml_ASroute_dst_isset;
-AT_surfxml_AS_routing AX_surfxml_AS_routing;
-#define A_surfxml_AS_routing AX_surfxml_AS_routing
-short int surfxml_AS_routing_isset;
-AT_surfxml_storage_content___type AX_surfxml_storage_content___type;
-#define A_surfxml_storage_content___type (surfxml_bufferstack + AX_surfxml_storage_content___type)
-short int surfxml_storage_content___type_isset;
-AT_surfxml_link_latency AX_surfxml_link_latency;
-#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
-short int surfxml_link_latency_isset;
-AT_surfxml_config_id AX_surfxml_config_id;
-#define A_surfxml_config_id (surfxml_bufferstack + AX_surfxml_config_id)
-short int surfxml_config_id_isset;
+AT_surfxml_router_id AX_surfxml_router_id;
+#define A_surfxml_router_id (surfxml_bufferstack + AX_surfxml_router_id)
+short int surfxml_router_id_isset;
 AT_surfxml_process_host AX_surfxml_process_host;
 #define A_surfxml_process_host (surfxml_bufferstack + AX_surfxml_process_host)
 short int surfxml_process_host_isset;
+AT_surfxml_random_radical AX_surfxml_random_radical;
+#define A_surfxml_random_radical (surfxml_bufferstack + AX_surfxml_random_radical)
+short int surfxml_random_radical_isset;
+AT_surfxml_host_id AX_surfxml_host_id;
+#define A_surfxml_host_id (surfxml_bufferstack + AX_surfxml_host_id)
+short int surfxml_host_id_isset;
+AT_surfxml_peer_lat AX_surfxml_peer_lat;
+#define A_surfxml_peer_lat (surfxml_bufferstack + AX_surfxml_peer_lat)
+short int surfxml_peer_lat_isset;
+AT_surfxml_cluster_loopback___bw AX_surfxml_cluster_loopback___bw;
+#define A_surfxml_cluster_loopback___bw (surfxml_bufferstack + AX_surfxml_cluster_loopback___bw)
+short int surfxml_cluster_loopback___bw_isset;
+AT_surfxml_process_function AX_surfxml_process_function;
+#define A_surfxml_process_function (surfxml_bufferstack + AX_surfxml_process_function)
+short int surfxml_process_function_isset;
+AT_surfxml_ASroute_gw___dst AX_surfxml_ASroute_gw___dst;
+#define A_surfxml_ASroute_gw___dst (surfxml_bufferstack + AX_surfxml_ASroute_gw___dst)
+short int surfxml_ASroute_gw___dst_isset;
+AT_surfxml_mount_storageId AX_surfxml_mount_storageId;
+#define A_surfxml_mount_storageId (surfxml_bufferstack + AX_surfxml_mount_storageId)
+short int surfxml_mount_storageId_isset;
 AT_surfxml_bypassRoute_dst AX_surfxml_bypassRoute_dst;
 #define A_surfxml_bypassRoute_dst (surfxml_bufferstack + AX_surfxml_bypassRoute_dst)
 short int surfxml_bypassRoute_dst_isset;
+AT_surfxml_cluster_state___file AX_surfxml_cluster_state___file;
+#define A_surfxml_cluster_state___file (surfxml_bufferstack + AX_surfxml_cluster_state___file)
+short int surfxml_cluster_state___file_isset;
+AT_surfxml_storage___type_model AX_surfxml_storage___type_model;
+#define A_surfxml_storage___type_model (surfxml_bufferstack + AX_surfxml_storage___type_model)
+short int surfxml_storage___type_model_isset;
 AT_surfxml_trace_id AX_surfxml_trace_id;
 #define A_surfxml_trace_id (surfxml_bufferstack + AX_surfxml_trace_id)
 short int surfxml_trace_id_isset;
+AT_surfxml_bypassASroute_gw___src AX_surfxml_bypassASroute_gw___src;
+#define A_surfxml_bypassASroute_gw___src (surfxml_bufferstack + AX_surfxml_bypassASroute_gw___src)
+short int surfxml_bypassASroute_gw___src_isset;
+AT_surfxml_host_pstate AX_surfxml_host_pstate;
+#define A_surfxml_host_pstate (surfxml_bufferstack + AX_surfxml_host_pstate)
+short int surfxml_host_pstate_isset;
+AT_surfxml_process_kill___time AX_surfxml_process_kill___time;
+#define A_surfxml_process_kill___time (surfxml_bufferstack + AX_surfxml_process_kill___time)
+short int surfxml_process_kill___time_isset;
+AT_surfxml_random_std___deviation AX_surfxml_random_std___deviation;
+#define A_surfxml_random_std___deviation (surfxml_bufferstack + AX_surfxml_random_std___deviation)
+short int surfxml_random_std___deviation_isset;
 AT_surfxml_link_bandwidth AX_surfxml_link_bandwidth;
 #define A_surfxml_link_bandwidth (surfxml_bufferstack + AX_surfxml_link_bandwidth)
 short int surfxml_link_bandwidth_isset;
+AT_surfxml_route_src AX_surfxml_route_src;
+#define A_surfxml_route_src (surfxml_bufferstack + AX_surfxml_route_src)
+short int surfxml_route_src_isset;
+AT_surfxml_cluster_bb___bw AX_surfxml_cluster_bb___bw;
+#define A_surfxml_cluster_bb___bw (surfxml_bufferstack + AX_surfxml_cluster_bb___bw)
+short int surfxml_cluster_bb___bw_isset;
+AT_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy;
+#define A_surfxml_link_sharing___policy AX_surfxml_link_sharing___policy
+short int surfxml_link_sharing___policy_isset;
+AT_surfxml_storage___type_id AX_surfxml_storage___type_id;
+#define A_surfxml_storage___type_id (surfxml_bufferstack + AX_surfxml_storage___type_id)
+short int surfxml_storage___type_id_isset;
+AT_surfxml_platform_version AX_surfxml_platform_version;
+#define A_surfxml_platform_version (surfxml_bufferstack + AX_surfxml_platform_version)
+short int surfxml_platform_version_isset;
+AT_surfxml_cluster_loopback___lat AX_surfxml_cluster_loopback___lat;
+#define A_surfxml_cluster_loopback___lat (surfxml_bufferstack + AX_surfxml_cluster_loopback___lat)
+short int surfxml_cluster_loopback___lat_isset;
+AT_surfxml_storage_typeId AX_surfxml_storage_typeId;
+#define A_surfxml_storage_typeId (surfxml_bufferstack + AX_surfxml_storage_typeId)
+short int surfxml_storage_typeId_isset;
+AT_surfxml_backbone_bandwidth AX_surfxml_backbone_bandwidth;
+#define A_surfxml_backbone_bandwidth (surfxml_bufferstack + AX_surfxml_backbone_bandwidth)
+short int surfxml_backbone_bandwidth_isset;
+AT_surfxml_cluster_bw AX_surfxml_cluster_bw;
+#define A_surfxml_cluster_bw (surfxml_bufferstack + AX_surfxml_cluster_bw)
+short int surfxml_cluster_bw_isset;
+AT_surfxml_peer_id AX_surfxml_peer_id;
+#define A_surfxml_peer_id (surfxml_bufferstack + AX_surfxml_peer_id)
+short int surfxml_peer_id_isset;
+AT_surfxml_storage___type_size AX_surfxml_storage___type_size;
+#define A_surfxml_storage___type_size (surfxml_bufferstack + AX_surfxml_storage___type_size)
+short int surfxml_storage___type_size_isset;
+AT_surfxml_link_id AX_surfxml_link_id;
+#define A_surfxml_link_id (surfxml_bufferstack + AX_surfxml_link_id)
+short int surfxml_link_id_isset;
+AT_surfxml_model___prop_value AX_surfxml_model___prop_value;
+#define A_surfxml_model___prop_value (surfxml_bufferstack + AX_surfxml_model___prop_value)
+short int surfxml_model___prop_value_isset;
+AT_surfxml_storage_content___type AX_surfxml_storage_content___type;
+#define A_surfxml_storage_content___type (surfxml_bufferstack + AX_surfxml_storage_content___type)
+short int surfxml_storage_content___type_isset;
+AT_surfxml_trace___connect_element AX_surfxml_trace___connect_element;
+#define A_surfxml_trace___connect_element (surfxml_bufferstack + AX_surfxml_trace___connect_element)
+short int surfxml_trace___connect_element_isset;
+AT_surfxml_peer_coordinates AX_surfxml_peer_coordinates;
+#define A_surfxml_peer_coordinates (surfxml_bufferstack + AX_surfxml_peer_coordinates)
+short int surfxml_peer_coordinates_isset;
+AT_surfxml_trace___connect_trace AX_surfxml_trace___connect_trace;
+#define A_surfxml_trace___connect_trace (surfxml_bufferstack + AX_surfxml_trace___connect_trace)
+short int surfxml_trace___connect_trace_isset;
+AT_surfxml_cabinet_suffix AX_surfxml_cabinet_suffix;
+#define A_surfxml_cabinet_suffix (surfxml_bufferstack + AX_surfxml_cabinet_suffix)
+short int surfxml_cabinet_suffix_isset;
+AT_surfxml_random_seed AX_surfxml_random_seed;
+#define A_surfxml_random_seed (surfxml_bufferstack + AX_surfxml_random_seed)
+short int surfxml_random_seed_isset;
+AT_surfxml_peer_bw___in AX_surfxml_peer_bw___in;
+#define A_surfxml_peer_bw___in (surfxml_bufferstack + AX_surfxml_peer_bw___in)
+short int surfxml_peer_bw___in_isset;
+AT_surfxml_bypassASroute_dst AX_surfxml_bypassASroute_dst;
+#define A_surfxml_bypassASroute_dst (surfxml_bufferstack + AX_surfxml_bypassASroute_dst)
+short int surfxml_bypassASroute_dst_isset;
+AT_surfxml_prop_value AX_surfxml_prop_value;
+#define A_surfxml_prop_value (surfxml_bufferstack + AX_surfxml_prop_value)
+short int surfxml_prop_value_isset;
+AT_surfxml_router_coordinates AX_surfxml_router_coordinates;
+#define A_surfxml_router_coordinates (surfxml_bufferstack + AX_surfxml_router_coordinates)
+short int surfxml_router_coordinates_isset;
+AT_surfxml_link_latency AX_surfxml_link_latency;
+#define A_surfxml_link_latency (surfxml_bufferstack + AX_surfxml_link_latency)
+short int surfxml_link_latency_isset;
 
 /* XML state. */
 #ifdef FLEX_DEBUG
@@ -5927,13 +5927,13 @@ case 26:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</platform>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(S_surfxml_platform_4):
+case YY_STATE_EOF(S_surfxml_platform_3):
 case YY_STATE_EOF(S_surfxml_platform_6):
+case YY_STATE_EOF(S_surfxml_platform_1):
 case YY_STATE_EOF(S_surfxml_platform_8):
+case YY_STATE_EOF(S_surfxml_platform_4):
 case YY_STATE_EOF(E_surfxml_platform):
 case YY_STATE_EOF(S_surfxml_platform):
-case YY_STATE_EOF(S_surfxml_platform_1):
-case YY_STATE_EOF(S_surfxml_platform_3):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</platform>' expected.");
        YY_BREAK
 
@@ -5975,9 +5975,9 @@ YY_RULE_SETUP
   if (!AX_surfxml_include_file) FAIL("Required attribute `file' not set for `include' element.");
   LEAVE; STag_surfxml_include(); surfxml_pcdata_ix = 0; ETag_surfxml_include(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform_5: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
+   case S_surfxml_platform_1: case S_surfxml_platform_5: case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_6: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
    case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
   }
  }
@@ -6002,9 +6002,9 @@ YY_RULE_SETUP
   ETag_surfxml_include();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform_5: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
+   case S_surfxml_platform_1: case S_surfxml_platform_5: case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_1: case S_surfxml_AS_3: case S_surfxml_AS_6: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
    case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
   }
  }
@@ -6019,8 +6019,8 @@ YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</include>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(S_surfxml_include):
-case YY_STATE_EOF(S_surfxml_include_2):
 case YY_STATE_EOF(E_surfxml_include):
+case YY_STATE_EOF(S_surfxml_include_2):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</include>' expected.");
        YY_BREAK
 
@@ -6088,13 +6088,13 @@ YY_RULE_SETUP
   if (!AX_surfxml_trace_periodicity) FAIL("Required attribute `periodicity' not set for `trace' element.");
   LEAVE; STag_surfxml_trace(); surfxml_pcdata_ix = 0; ETag_surfxml_trace(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
-   case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_6: case S_surfxml_platform: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_16: case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: SET(S_surfxml_AS_16); break;
-   case S_surfxml_AS_8: case S_surfxml_AS_6: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
-   case S_surfxml_AS_11: case S_surfxml_AS_4: case S_surfxml_AS_10: case S_surfxml_AS: case S_surfxml_AS_7: case S_surfxml_AS_3: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_include_1: case S_surfxml_include: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_7: case S_surfxml_AS_9: case S_surfxml_AS_1: case S_surfxml_AS_11: SET(S_surfxml_AS_11); break;
+   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: case S_surfxml_platform_1: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS: case S_surfxml_AS_16: case S_surfxml_AS_12: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -6120,13 +6120,13 @@ YY_RULE_SETUP
   surfxml_pcdata_ix = popbuffer();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
-   case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_6: case S_surfxml_platform: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_16: case S_surfxml_AS_12: case S_surfxml_AS_14: case S_surfxml_AS_15: SET(S_surfxml_AS_16); break;
-   case S_surfxml_AS_8: case S_surfxml_AS_6: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
-   case S_surfxml_AS_11: case S_surfxml_AS_4: case S_surfxml_AS_10: case S_surfxml_AS: case S_surfxml_AS_7: case S_surfxml_AS_3: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_include_1: case S_surfxml_include: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_7: case S_surfxml_AS_9: case S_surfxml_AS_1: case S_surfxml_AS_11: SET(S_surfxml_AS_11); break;
+   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: case S_surfxml_platform_1: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS: case S_surfxml_AS_16: case S_surfxml_AS_12: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -6287,7 +6287,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_random_std___deviation) FAIL("Required attribute `std_deviation' not set for `random' element.");
   LEAVE; STag_surfxml_random(); surfxml_pcdata_ix = 0; ETag_surfxml_random(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
+   case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
   }
  }
        YY_BREAK
@@ -6311,7 +6311,7 @@ YY_RULE_SETUP
   ETag_surfxml_random();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
+   case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
   }
  }
        YY_BREAK
@@ -6417,13 +6417,13 @@ YY_RULE_SETUP
   if (!AX_surfxml_trace___connect_element) FAIL("Required attribute `element' not set for `trace_connect' element.");
   LEAVE; STag_surfxml_trace___connect(); surfxml_pcdata_ix = 0; ETag_surfxml_trace___connect(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_9: case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break;
-   case S_surfxml_AS_15: case S_surfxml_AS_12: case S_surfxml_AS_16: case S_surfxml_AS_14: SET(S_surfxml_AS_16); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_7: case S_surfxml_AS_10: case S_surfxml_AS_4: case S_surfxml_AS_11: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_include_1: case S_surfxml_include: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_7: case S_surfxml_AS_9: case S_surfxml_AS_11: case S_surfxml_AS_1: SET(S_surfxml_AS_11); break;
+   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: case S_surfxml_platform_1: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_12: case S_surfxml_AS: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -6447,13 +6447,13 @@ YY_RULE_SETUP
   ETag_surfxml_trace___connect();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
-   case S_surfxml_AS_1: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_9: case S_surfxml_AS_6: case S_surfxml_AS_8: SET(S_surfxml_AS_9); break;
-   case S_surfxml_AS_15: case S_surfxml_AS_12: case S_surfxml_AS_16: case S_surfxml_AS_14: SET(S_surfxml_AS_16); break;
-   case S_surfxml_AS_3: case S_surfxml_AS_7: case S_surfxml_AS_10: case S_surfxml_AS_4: case S_surfxml_AS_11: case S_surfxml_AS: SET(S_surfxml_AS_11); break;
+   case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_include_1: case S_surfxml_include: case S_surfxml_include_2: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_5: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_10: case S_surfxml_AS_7: case S_surfxml_AS_9: case S_surfxml_AS_11: case S_surfxml_AS_1: SET(S_surfxml_AS_11); break;
+   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_5: case S_surfxml_platform_6: case S_surfxml_platform_1: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_12: case S_surfxml_AS: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -6575,9 +6575,9 @@ YY_RULE_SETUP
   if (!AX_surfxml_AS_routing) FAIL("Required attribute `routing' not set for `AS' element.");
   LEAVE; STag_surfxml_AS(); surfxml_pcdata_ix = 0; ETag_surfxml_AS(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
    case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS: SET(S_surfxml_AS_6); break;
   }
  }
        YY_BREAK
@@ -6601,9 +6601,9 @@ YY_RULE_SETUP
   ETag_surfxml_AS();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
    case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_5: case S_surfxml_platform_6: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS: SET(S_surfxml_AS_6); break;
   }
  }
        YY_BREAK
@@ -6616,18 +6616,18 @@ case 134:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</AS>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(S_surfxml_AS):
+case YY_STATE_EOF(S_surfxml_AS_4):
+case YY_STATE_EOF(S_surfxml_AS_1):
+case YY_STATE_EOF(S_surfxml_AS_3):
+case YY_STATE_EOF(S_surfxml_AS_11):
 case YY_STATE_EOF(S_surfxml_AS_14):
-case YY_STATE_EOF(S_surfxml_AS_9):
+case YY_STATE_EOF(E_surfxml_AS):
 case YY_STATE_EOF(S_surfxml_AS_6):
+case YY_STATE_EOF(S_surfxml_AS_7):
+case YY_STATE_EOF(S_surfxml_AS_9):
 case YY_STATE_EOF(S_surfxml_AS_16):
+case YY_STATE_EOF(S_surfxml_AS):
 case YY_STATE_EOF(S_surfxml_AS_12):
-case YY_STATE_EOF(S_surfxml_AS_3):
-case YY_STATE_EOF(S_surfxml_AS_11):
-case YY_STATE_EOF(S_surfxml_AS_7):
-case YY_STATE_EOF(S_surfxml_AS_1):
-case YY_STATE_EOF(E_surfxml_AS):
-case YY_STATE_EOF(S_surfxml_AS_4):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</AS>' expected.");
        YY_BREAK
 
@@ -6721,8 +6721,8 @@ YY_RULE_SETUP
   if (!AX_surfxml_storage___type_size) FAIL("Required attribute `size' not set for `storage_type' element.");
   LEAVE; STag_surfxml_storage___type(); surfxml_pcdata_ix = 0; ETag_surfxml_storage___type(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
   }
  }
        YY_BREAK
@@ -6746,8 +6746,8 @@ YY_RULE_SETUP
   ETag_surfxml_storage___type();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
   }
  }
        YY_BREAK
@@ -6761,8 +6761,8 @@ YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</storage_type>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_storage___type):
-case YY_STATE_EOF(S_surfxml_storage___type):
 case YY_STATE_EOF(S_surfxml_storage___type_2):
+case YY_STATE_EOF(S_surfxml_storage___type):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</storage_type>' expected.");
        YY_BREAK
 
@@ -6818,7 +6818,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_mount_name) FAIL("Required attribute `name' not set for `mount' element.");
   LEAVE; STag_surfxml_mount(); surfxml_pcdata_ix = 0; ETag_surfxml_mount(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_host_2: case S_surfxml_host: case S_surfxml_host_1: SET(S_surfxml_host_2); break;
+   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
   }
  }
        YY_BREAK
@@ -6842,7 +6842,7 @@ YY_RULE_SETUP
   ETag_surfxml_mount();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_host_2: case S_surfxml_host: case S_surfxml_host_1: SET(S_surfxml_host_2); break;
+   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
   }
  }
        YY_BREAK
@@ -6911,7 +6911,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_mstorage_name) FAIL("Required attribute `name' not set for `mstorage' element.");
   LEAVE; STag_surfxml_mstorage(); surfxml_pcdata_ix = 0; ETag_surfxml_mstorage(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
+   case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
   }
  }
        YY_BREAK
@@ -6935,7 +6935,7 @@ YY_RULE_SETUP
   ETag_surfxml_mstorage();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
+   case S_surfxml_host_1: case S_surfxml_host_2: case S_surfxml_host: SET(S_surfxml_host_2); break;
   }
  }
        YY_BREAK
@@ -7092,7 +7092,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_host_power) FAIL("Required attribute `power' not set for `host' element.");
   LEAVE; STag_surfxml_host(); surfxml_pcdata_ix = 0; ETag_surfxml_host(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7116,7 +7116,7 @@ YY_RULE_SETUP
   ETag_surfxml_host();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7129,9 +7129,9 @@ case 208:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</host>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_surfxml_host):
 case YY_STATE_EOF(S_surfxml_host_2):
 case YY_STATE_EOF(S_surfxml_host):
+case YY_STATE_EOF(E_surfxml_host):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</host>' expected.");
        YY_BREAK
 
@@ -7225,8 +7225,8 @@ YY_RULE_SETUP
   if (!AX_surfxml_storage_attach) FAIL("Required attribute `attach' not set for `storage' element.");
   LEAVE; STag_surfxml_storage(); surfxml_pcdata_ix = 0; ETag_surfxml_storage(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7250,8 +7250,8 @@ YY_RULE_SETUP
   ETag_surfxml_storage();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_1: case S_surfxml_AS_5: case S_surfxml_AS_6: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7265,8 +7265,8 @@ YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</storage>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(E_surfxml_storage):
-case YY_STATE_EOF(S_surfxml_storage_2):
 case YY_STATE_EOF(S_surfxml_storage):
+case YY_STATE_EOF(S_surfxml_storage_2):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</storage>' expected.");
        YY_BREAK
 
@@ -7308,7 +7308,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_gpu_name) FAIL("Required attribute `name' not set for `gpu' element.");
   LEAVE; STag_surfxml_gpu(); surfxml_pcdata_ix = 0; ETag_surfxml_gpu(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7332,7 +7332,7 @@ YY_RULE_SETUP
   ETag_surfxml_gpu();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7415,7 +7415,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_host___link_down) FAIL("Required attribute `down' not set for `host_link' element.");
   LEAVE; STag_surfxml_host___link(); surfxml_pcdata_ix = 0; ETag_surfxml_host___link(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7439,7 +7439,7 @@ YY_RULE_SETUP
   ETag_surfxml_host___link();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_14: case S_surfxml_AS_1: case S_surfxml_AS_13: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7760,9 +7760,9 @@ YY_RULE_SETUP
   if (!AX_surfxml_cluster_lat) FAIL("Required attribute `lat' not set for `cluster' element.");
   LEAVE; STag_surfxml_cluster(); surfxml_pcdata_ix = 0; ETag_surfxml_cluster(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS: case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_6); break;
+   case S_surfxml_include_1: case S_surfxml_include_2: case S_surfxml_include: SET(S_surfxml_include_2); break;
   }
  }
        YY_BREAK
@@ -7786,9 +7786,9 @@ YY_RULE_SETUP
   ETag_surfxml_cluster();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_6: case S_surfxml_platform: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS: case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_1: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_6); break;
+   case S_surfxml_include_1: case S_surfxml_include_2: case S_surfxml_include: SET(S_surfxml_include_2); break;
   }
  }
        YY_BREAK
@@ -7929,10 +7929,10 @@ YY_RULE_SETUP
   if (!AX_surfxml_cabinet_lat) FAIL("Required attribute `lat' not set for `cabinet' element.");
   LEAVE; STag_surfxml_cabinet(); surfxml_pcdata_ix = 0; ETag_surfxml_cabinet(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_1: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_platform_1: case S_surfxml_platform_5: case S_surfxml_platform_6: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_13: case S_surfxml_AS: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -7956,10 +7956,10 @@ YY_RULE_SETUP
   ETag_surfxml_cabinet();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_include: case S_surfxml_include_2: case S_surfxml_include_1: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_1: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_platform_1: case S_surfxml_platform_5: case S_surfxml_platform_6: case S_surfxml_platform: case S_surfxml_platform_3: SET(S_surfxml_platform_6); break;
+   case S_surfxml_AS_13: case S_surfxml_AS: case S_surfxml_AS_14: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -8106,9 +8106,9 @@ YY_RULE_SETUP
   if (!AX_surfxml_peer_lat) FAIL("Required attribute `lat' not set for `peer' element.");
   LEAVE; STag_surfxml_peer(); surfxml_pcdata_ix = 0; ETag_surfxml_peer(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
+   case S_surfxml_include_1: case S_surfxml_include_2: case S_surfxml_include: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_1: SET(S_surfxml_AS_6); break;
+   case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: SET(S_surfxml_platform_6); break;
   }
  }
        YY_BREAK
@@ -8132,9 +8132,9 @@ YY_RULE_SETUP
   ETag_surfxml_peer();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_5: SET(S_surfxml_platform_6); break;
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
-   case S_surfxml_include_2: case S_surfxml_include_1: case S_surfxml_include: SET(S_surfxml_include_2); break;
+   case S_surfxml_include_1: case S_surfxml_include_2: case S_surfxml_include: SET(S_surfxml_include_2); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_5: case S_surfxml_AS: case S_surfxml_AS_6: case S_surfxml_AS_1: SET(S_surfxml_AS_6); break;
+   case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_5: case S_surfxml_platform_1: SET(S_surfxml_platform_6); break;
   }
  }
        YY_BREAK
@@ -8201,7 +8201,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_router_id) FAIL("Required attribute `id' not set for `router' element.");
   LEAVE; STag_surfxml_router(); surfxml_pcdata_ix = 0; ETag_surfxml_router(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -8225,7 +8225,7 @@ YY_RULE_SETUP
   ETag_surfxml_router();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: case S_surfxml_AS_13: case S_surfxml_AS_3: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS: case S_surfxml_AS_13: case S_surfxml_AS_1: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -8308,8 +8308,8 @@ YY_RULE_SETUP
   if (!AX_surfxml_backbone_latency) FAIL("Required attribute `latency' not set for `backbone' element.");
   LEAVE; STag_surfxml_backbone(); surfxml_pcdata_ix = 0; ETag_surfxml_backbone(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_1: SET(S_surfxml_AS_6); break;
   }
  }
        YY_BREAK
@@ -8333,8 +8333,8 @@ YY_RULE_SETUP
   ETag_surfxml_backbone();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_1: SET(S_surfxml_AS_6); break;
   }
  }
        YY_BREAK
@@ -8490,8 +8490,8 @@ YY_RULE_SETUP
   if (!AX_surfxml_link_bandwidth) FAIL("Required attribute `bandwidth' not set for `link' element.");
   LEAVE; STag_surfxml_link(); surfxml_pcdata_ix = 0; ETag_surfxml_link(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_1: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -8515,8 +8515,8 @@ YY_RULE_SETUP
   ETag_surfxml_link();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_1: case S_surfxml_AS_13: case S_surfxml_AS_14: case S_surfxml_AS: SET(S_surfxml_AS_14); break;
-   case S_surfxml_AS_5: case S_surfxml_AS_6: case S_surfxml_AS_3: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_3: case S_surfxml_AS_6: case S_surfxml_AS_5: case S_surfxml_AS_1: SET(S_surfxml_AS_6); break;
+   case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_13: SET(S_surfxml_AS_14); break;
   }
  }
        YY_BREAK
@@ -8603,7 +8603,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_route_dst) FAIL("Required attribute `dst' not set for `route' element.");
   LEAVE; STag_surfxml_route(); surfxml_pcdata_ix = 0; ETag_surfxml_route(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_15: case S_surfxml_AS_3: case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_12: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS: case S_surfxml_AS_16: case S_surfxml_AS_12: case S_surfxml_AS_1: case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS_15: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -8627,7 +8627,7 @@ YY_RULE_SETUP
   ETag_surfxml_route();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_15: case S_surfxml_AS_3: case S_surfxml_AS_14: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_12: case S_surfxml_AS_16: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS: case S_surfxml_AS_16: case S_surfxml_AS_12: case S_surfxml_AS_1: case S_surfxml_AS_14: case S_surfxml_AS_3: case S_surfxml_AS_15: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -8640,9 +8640,9 @@ case 436:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</route>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_surfxml_route):
 case YY_STATE_EOF(S_surfxml_route_2):
 case YY_STATE_EOF(S_surfxml_route):
+case YY_STATE_EOF(E_surfxml_route):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</route>' expected.");
        YY_BREAK
 
@@ -8742,7 +8742,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_ASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `ASroute' element.");
   LEAVE; STag_surfxml_ASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_ASroute(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS: case S_surfxml_AS_4: case S_surfxml_AS_1: case S_surfxml_AS_9: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_9: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
   }
  }
        YY_BREAK
@@ -8766,7 +8766,7 @@ YY_RULE_SETUP
   ETag_surfxml_ASroute();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_6: case S_surfxml_AS_8: case S_surfxml_AS: case S_surfxml_AS_4: case S_surfxml_AS_1: case S_surfxml_AS_9: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_6: case S_surfxml_AS_9: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_8: case S_surfxml_AS_4: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
   }
  }
        YY_BREAK
@@ -8779,9 +8779,9 @@ case 457:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</ASroute>' expected.",surf_parse_text[0]);
        YY_BREAK
+case YY_STATE_EOF(S_surfxml_ASroute):
 case YY_STATE_EOF(E_surfxml_ASroute):
 case YY_STATE_EOF(S_surfxml_ASroute_2):
-case YY_STATE_EOF(S_surfxml_ASroute):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</ASroute>' expected.");
        YY_BREAK
 
@@ -8846,9 +8846,9 @@ YY_RULE_SETUP
   if (!AX_surfxml_link___ctn_id) FAIL("Required attribute `id' not set for `link_ctn' element.");
   LEAVE; STag_surfxml_link___ctn(); surfxml_pcdata_ix = 0; ETag_surfxml_link___ctn(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_bypassRoute_1: case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: SET(S_surfxml_bypassRoute_2); break;
-   case S_surfxml_route_2: case S_surfxml_route: case S_surfxml_route_1: SET(S_surfxml_route_2); break;
-   case S_surfxml_bypassASroute_1: case S_surfxml_bypassASroute: case S_surfxml_bypassASroute_2: SET(S_surfxml_bypassASroute_2); break;
+   case S_surfxml_route_1: case S_surfxml_route_2: case S_surfxml_route: SET(S_surfxml_route_2); break;
+   case S_surfxml_bypassASroute: case S_surfxml_bypassASroute_2: case S_surfxml_bypassASroute_1: SET(S_surfxml_bypassASroute_2); break;
+   case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
    case S_surfxml_ASroute: case S_surfxml_ASroute_2: case S_surfxml_ASroute_1: SET(S_surfxml_ASroute_2); break;
   }
  }
@@ -8873,9 +8873,9 @@ YY_RULE_SETUP
   ETag_surfxml_link___ctn();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_bypassRoute_1: case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_2: SET(S_surfxml_bypassRoute_2); break;
-   case S_surfxml_route_2: case S_surfxml_route: case S_surfxml_route_1: SET(S_surfxml_route_2); break;
-   case S_surfxml_bypassASroute_1: case S_surfxml_bypassASroute: case S_surfxml_bypassASroute_2: SET(S_surfxml_bypassASroute_2); break;
+   case S_surfxml_route_1: case S_surfxml_route_2: case S_surfxml_route: SET(S_surfxml_route_2); break;
+   case S_surfxml_bypassASroute: case S_surfxml_bypassASroute_2: case S_surfxml_bypassASroute_1: SET(S_surfxml_bypassASroute_2); break;
+   case S_surfxml_bypassRoute_2: case S_surfxml_bypassRoute: case S_surfxml_bypassRoute_1: SET(S_surfxml_bypassRoute_2); break;
    case S_surfxml_ASroute: case S_surfxml_ASroute_2: case S_surfxml_ASroute_1: SET(S_surfxml_ASroute_2); break;
   }
  }
@@ -8945,7 +8945,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_bypassRoute_dst) FAIL("Required attribute `dst' not set for `bypassRoute' element.");
   LEAVE; STag_surfxml_bypassRoute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassRoute(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_3: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_12: case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_3: case S_surfxml_AS_12: case S_surfxml_AS_16: case S_surfxml_AS: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -8969,7 +8969,7 @@ YY_RULE_SETUP
   ETag_surfxml_bypassRoute();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_3: case S_surfxml_AS_15: case S_surfxml_AS_16: case S_surfxml_AS_12: case S_surfxml_AS_1: case S_surfxml_AS: case S_surfxml_AS_14: SET(S_surfxml_AS_16); break;
+   case S_surfxml_AS_14: case S_surfxml_AS_15: case S_surfxml_AS_3: case S_surfxml_AS_12: case S_surfxml_AS_16: case S_surfxml_AS: case S_surfxml_AS_1: SET(S_surfxml_AS_16); break;
   }
  }
        YY_BREAK
@@ -8982,9 +8982,9 @@ case 487:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</bypassRoute>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(S_surfxml_bypassRoute):
 case YY_STATE_EOF(S_surfxml_bypassRoute_2):
 case YY_STATE_EOF(E_surfxml_bypassRoute):
+case YY_STATE_EOF(S_surfxml_bypassRoute):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</bypassRoute>' expected.");
        YY_BREAK
 
@@ -9068,7 +9068,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_bypassASroute_gw___dst) FAIL("Required attribute `gw_dst' not set for `bypassASroute' element.");
   LEAVE; STag_surfxml_bypassASroute(); surfxml_pcdata_ix = 0; ETag_surfxml_bypassASroute(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_8: case S_surfxml_AS_6: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_9: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_4: case S_surfxml_AS_3: case S_surfxml_AS_8: case S_surfxml_AS_1: case S_surfxml_AS_6: case S_surfxml_AS: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
   }
  }
        YY_BREAK
@@ -9092,7 +9092,7 @@ YY_RULE_SETUP
   ETag_surfxml_bypassASroute();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_AS_8: case S_surfxml_AS_6: case S_surfxml_AS: case S_surfxml_AS_1: case S_surfxml_AS_4: case S_surfxml_AS_9: case S_surfxml_AS_3: SET(S_surfxml_AS_9); break;
+   case S_surfxml_AS_4: case S_surfxml_AS_3: case S_surfxml_AS_8: case S_surfxml_AS_1: case S_surfxml_AS_6: case S_surfxml_AS: case S_surfxml_AS_9: SET(S_surfxml_AS_9); break;
   }
  }
        YY_BREAK
@@ -9106,8 +9106,8 @@ YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</bypassASroute>' expected.",surf_parse_text[0]);
        YY_BREAK
 case YY_STATE_EOF(S_surfxml_bypassASroute):
-case YY_STATE_EOF(S_surfxml_bypassASroute_2):
 case YY_STATE_EOF(E_surfxml_bypassASroute):
+case YY_STATE_EOF(S_surfxml_bypassASroute_2):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</bypassASroute>' expected.");
        YY_BREAK
 
@@ -9203,7 +9203,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_process_function) FAIL("Required attribute `function' not set for `process' element.");
   LEAVE; STag_surfxml_process(); surfxml_pcdata_ix = 0; ETag_surfxml_process(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_7: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break;
+   case S_surfxml_platform_7: case S_surfxml_platform_6: case S_surfxml_platform_1: case S_surfxml_platform_4: case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break;
   }
  }
        YY_BREAK
@@ -9227,7 +9227,7 @@ YY_RULE_SETUP
   ETag_surfxml_process();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform_3: case S_surfxml_platform_1: case S_surfxml_platform_7: case S_surfxml_platform: case S_surfxml_platform_6: case S_surfxml_platform_4: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break;
+   case S_surfxml_platform_7: case S_surfxml_platform_6: case S_surfxml_platform_1: case S_surfxml_platform_4: case S_surfxml_platform_3: case S_surfxml_platform: case S_surfxml_platform_8: SET(S_surfxml_platform_8); break;
   }
  }
        YY_BREAK
@@ -9240,9 +9240,9 @@ case 525:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</process>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(E_surfxml_process):
 case YY_STATE_EOF(S_surfxml_process_2):
 case YY_STATE_EOF(S_surfxml_process):
+case YY_STATE_EOF(E_surfxml_process):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</process>' expected.");
        YY_BREAK
 
@@ -9284,7 +9284,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_argument_value) FAIL("Required attribute `value' not set for `argument' element.");
   LEAVE; STag_surfxml_argument(); surfxml_pcdata_ix = 0; ETag_surfxml_argument(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_process: case S_surfxml_process_2: case S_surfxml_process_1: SET(S_surfxml_process_2); break;
+   case S_surfxml_process_2: case S_surfxml_process: case S_surfxml_process_1: SET(S_surfxml_process_2); break;
   }
  }
        YY_BREAK
@@ -9308,7 +9308,7 @@ YY_RULE_SETUP
   ETag_surfxml_argument();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_process: case S_surfxml_process_2: case S_surfxml_process_1: SET(S_surfxml_process_2); break;
+   case S_surfxml_process_2: case S_surfxml_process: case S_surfxml_process_1: SET(S_surfxml_process_2); break;
   }
  }
        YY_BREAK
@@ -9361,7 +9361,7 @@ YY_RULE_SETUP
 {
   LEAVE; STag_surfxml_config(); surfxml_pcdata_ix = 0; ETag_surfxml_config(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
+   case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
   }
  }
        YY_BREAK
@@ -9385,7 +9385,7 @@ YY_RULE_SETUP
   ETag_surfxml_config();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_platform: case S_surfxml_platform_3: case S_surfxml_platform_2: SET(S_surfxml_platform_3); break;
+   case S_surfxml_platform_2: case S_surfxml_platform_3: case S_surfxml_platform: SET(S_surfxml_platform_3); break;
   }
  }
        YY_BREAK
@@ -9398,9 +9398,9 @@ case 547:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</config>' expected.",surf_parse_text[0]);
        YY_BREAK
-case YY_STATE_EOF(S_surfxml_config):
-case YY_STATE_EOF(E_surfxml_config):
 case YY_STATE_EOF(S_surfxml_config_2):
+case YY_STATE_EOF(E_surfxml_config):
+case YY_STATE_EOF(S_surfxml_config):
 if(!ETag_surfxml_include_state()) FAIL("Premature EOF: `</config>' expected.");
        YY_BREAK
 
@@ -9458,14 +9458,14 @@ YY_RULE_SETUP
   if (!AX_surfxml_prop_value) FAIL("Required attribute `value' not set for `prop' element.");
   LEAVE; STag_surfxml_prop(); surfxml_pcdata_ix = 0; ETag_surfxml_prop(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_storage_1: case S_surfxml_storage_2: case S_surfxml_storage: SET(S_surfxml_storage_2); break;
-   case S_surfxml_cluster_2: case S_surfxml_cluster: case S_surfxml_cluster_1: SET(S_surfxml_cluster_2); break;
-   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
-   case S_surfxml_config_1: case S_surfxml_config_2: case S_surfxml_config: SET(S_surfxml_config_2); break;
-   case S_surfxml_AS: case S_surfxml_AS_3: case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
-   case S_surfxml_storage___type: case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break;
+   case S_surfxml_config: case S_surfxml_config_2: case S_surfxml_config_1: SET(S_surfxml_config_2); break;
+   case S_surfxml_storage_2: case S_surfxml_storage_1: case S_surfxml_storage: SET(S_surfxml_storage_2); break;
+   case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: case S_surfxml_storage___type: SET(S_surfxml_storage___type_2); break;
+   case S_surfxml_link: case S_surfxml_link_2: case S_surfxml_link_1: SET(S_surfxml_link_2); break;
    case S_surfxml_process_1: case S_surfxml_process_2: case S_surfxml_process: SET(S_surfxml_process_2); break;
-   case S_surfxml_link_2: case S_surfxml_link_1: case S_surfxml_link: SET(S_surfxml_link_2); break;
+   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
+   case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
+   case S_surfxml_cluster_1: case S_surfxml_cluster: case S_surfxml_cluster_2: SET(S_surfxml_cluster_2); break;
   }
  }
        YY_BREAK
@@ -9489,14 +9489,14 @@ YY_RULE_SETUP
   ETag_surfxml_prop();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_storage_1: case S_surfxml_storage_2: case S_surfxml_storage: SET(S_surfxml_storage_2); break;
-   case S_surfxml_cluster_2: case S_surfxml_cluster: case S_surfxml_cluster_1: SET(S_surfxml_cluster_2); break;
-   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
-   case S_surfxml_config_1: case S_surfxml_config_2: case S_surfxml_config: SET(S_surfxml_config_2); break;
-   case S_surfxml_AS: case S_surfxml_AS_3: case S_surfxml_AS_2: SET(S_surfxml_AS_3); break;
-   case S_surfxml_storage___type: case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: SET(S_surfxml_storage___type_2); break;
+   case S_surfxml_config: case S_surfxml_config_2: case S_surfxml_config_1: SET(S_surfxml_config_2); break;
+   case S_surfxml_storage_2: case S_surfxml_storage_1: case S_surfxml_storage: SET(S_surfxml_storage_2); break;
+   case S_surfxml_storage___type_1: case S_surfxml_storage___type_2: case S_surfxml_storage___type: SET(S_surfxml_storage___type_2); break;
+   case S_surfxml_link: case S_surfxml_link_2: case S_surfxml_link_1: SET(S_surfxml_link_2); break;
    case S_surfxml_process_1: case S_surfxml_process_2: case S_surfxml_process: SET(S_surfxml_process_2); break;
-   case S_surfxml_link_2: case S_surfxml_link_1: case S_surfxml_link: SET(S_surfxml_link_2); break;
+   case S_surfxml_host_1: case S_surfxml_host: case S_surfxml_host_2: SET(S_surfxml_host_2); break;
+   case S_surfxml_AS_2: case S_surfxml_AS_3: case S_surfxml_AS: SET(S_surfxml_AS_3); break;
+   case S_surfxml_cluster_1: case S_surfxml_cluster: case S_surfxml_cluster_2: SET(S_surfxml_cluster_2); break;
   }
  }
        YY_BREAK
@@ -9567,7 +9567,7 @@ YY_RULE_SETUP
   if (!AX_surfxml_model___prop_value) FAIL("Required attribute `value' not set for `model_prop' element.");
   LEAVE; STag_surfxml_model___prop(); surfxml_pcdata_ix = 0; ETag_surfxml_model___prop(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_storage___type_2: case S_surfxml_storage___type_1: case S_surfxml_storage___type: SET(S_surfxml_storage___type_2); break;
+   case S_surfxml_storage___type_2: case S_surfxml_storage___type: case S_surfxml_storage___type_1: SET(S_surfxml_storage___type_2); break;
   }
  }
        YY_BREAK
@@ -9591,7 +9591,7 @@ YY_RULE_SETUP
   ETag_surfxml_model___prop();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_surfxml_storage___type_2: case S_surfxml_storage___type_1: case S_surfxml_storage___type: SET(S_surfxml_storage___type_2); break;
+   case S_surfxml_storage___type_2: case S_surfxml_storage___type: case S_surfxml_storage___type_1: SET(S_surfxml_storage___type_2); break;
   }
  }
        YY_BREAK
index 6de2b62..2e79954 100644 (file)
@@ -117,6 +117,9 @@ s_surf_model_description_t surf_network_model_description[] = {
   {"SMPI",
    "Realistic network model specifically tailored for HPC settings (accurate modeling of slow start with correction factors on three intervals: < 1KiB, < 64 KiB, >= 64 KiB)",
    surf_network_model_init_SMPI},
+  {"IB",
+   "Realistic network model specifically tailored for HPC settings, with Infiniband contention model",
+   surf_network_model_init_IB},
   {"CM02",
    "Legacy network analytic model (Very similar to LV08, but without corrective factors. The timings of small messages are thus poorly modeled).",
    surf_network_model_init_CM02},
@@ -872,7 +875,7 @@ void Action::setBound(double bound)
 {
   XBT_IN("(%p,%g)", this, bound);
   if (p_variable)
-    lmm_update_variable_bound(getModel()->getMaxminSystem(), getVariable(), bound);
+    lmm_update_variable_bound(getModel()->getMaxminSystem(), p_variable, bound);
 
   if (getModel()->getUpdateMechanism() == UM_LAZY && getLastUpdate()!=surf_get_clock())
     heapRemove(getModel()->getActionHeap());
index d6e56e4..e5f85d8 100644 (file)
@@ -1937,7 +1937,7 @@ void xbt_automaton_parser_free (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 77 "parserPromela.lex"
+#line 76 "parserPromela.lex"
 
 
 
index 60bf7a6..0c23d46 100644 (file)
@@ -275,7 +275,7 @@ xbt_cfg_register(xbt_cfg_t * cfg,
     break;
 
   default:
-    XBT_ERROR("%d is an invalide type code", (int)type);
+    XBT_ERROR("%d is an invalid type code", (int)type);
   }
 
   xbt_dict_set((xbt_dict_t) * cfg, name, res, NULL);
@@ -284,7 +284,7 @@ xbt_cfg_register(xbt_cfg_t * cfg,
 /** @brief Unregister an element from a config set.
  *
  *  @param cfg the config set
- *  @param name the name of the elem to be freed
+ *  @param name the name of the element to be freed
  *
  *  Note that it removes both the description and the actual content.
  *  Throws not_found when no such element exists.
index be9aeaa..4a3c959 100644 (file)
@@ -1142,42 +1142,42 @@ const char graphxml_flexml_version[] = "1.9.6";
 int graphxml_pcdata_ix;
 extern char *graphxml_bufferstack;
 #define graphxml_pcdata (graphxml_bufferstack + graphxml_pcdata_ix)
+AT_graphxml_graph_isDirected AX_graphxml_graph_isDirected;
+#define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
+short int graphxml_graph_isDirected_isset;
+AT_graphxml_node_label AX_graphxml_node_label;
+#define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
+short int graphxml_node_label_isset;
+AT_graphxml_edge_target AX_graphxml_edge_target;
+#define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
+short int graphxml_edge_target_isset;
+AT_graphxml_edge_name AX_graphxml_edge_name;
+#define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
+short int graphxml_edge_name_isset;
+AT_graphxml_node_data AX_graphxml_node_data;
+#define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
+short int graphxml_node_data_isset;
 AT_graphxml_node_position___y AX_graphxml_node_position___y;
 #define A_graphxml_node_position___y (graphxml_bufferstack + AX_graphxml_node_position___y)
 short int graphxml_node_position___y_isset;
-AT_graphxml_edge_label AX_graphxml_edge_label;
-#define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
-short int graphxml_edge_label_isset;
 AT_graphxml_edge_data AX_graphxml_edge_data;
 #define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
 short int graphxml_edge_data_isset;
-AT_graphxml_node_name AX_graphxml_node_name;
-#define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
-short int graphxml_node_name_isset;
-AT_graphxml_edge_name AX_graphxml_edge_name;
-#define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
-short int graphxml_edge_name_isset;
-AT_graphxml_edge_source AX_graphxml_edge_source;
-#define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
-short int graphxml_edge_source_isset;
-AT_graphxml_edge_length AX_graphxml_edge_length;
-#define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
-short int graphxml_edge_length_isset;
-AT_graphxml_graph_isDirected AX_graphxml_graph_isDirected;
-#define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
-short int graphxml_graph_isDirected_isset;
 AT_graphxml_node_position___x AX_graphxml_node_position___x;
 #define A_graphxml_node_position___x (graphxml_bufferstack + AX_graphxml_node_position___x)
 short int graphxml_node_position___x_isset;
-AT_graphxml_node_data AX_graphxml_node_data;
-#define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
-short int graphxml_node_data_isset;
-AT_graphxml_edge_target AX_graphxml_edge_target;
-#define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
-short int graphxml_edge_target_isset;
-AT_graphxml_node_label AX_graphxml_node_label;
-#define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
-short int graphxml_node_label_isset;
+AT_graphxml_edge_label AX_graphxml_edge_label;
+#define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
+short int graphxml_edge_label_isset;
+AT_graphxml_edge_length AX_graphxml_edge_length;
+#define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
+short int graphxml_edge_length_isset;
+AT_graphxml_edge_source AX_graphxml_edge_source;
+#define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
+short int graphxml_edge_source_isset;
+AT_graphxml_node_name AX_graphxml_node_name;
+#define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
+short int graphxml_node_name_isset;
 
 /* XML state. */
 #ifdef FLEX_DEBUG
@@ -1860,11 +1860,11 @@ case 30:
 YY_RULE_SETUP
 FAIL("Unexpected character `%c': `</graph>' expected.",xbt_graph_parse_text[0]);
        YY_BREAK
+case YY_STATE_EOF(S_graphxml_graph_3):
 case YY_STATE_EOF(S_graphxml_graph_5):
 case YY_STATE_EOF(E_graphxml_graph):
-case YY_STATE_EOF(S_graphxml_graph_3):
-case YY_STATE_EOF(S_graphxml_graph):
 case YY_STATE_EOF(S_graphxml_graph_1):
+case YY_STATE_EOF(S_graphxml_graph):
 FAIL("Premature EOF: `</graph>' expected.");
        YY_BREAK
 
@@ -1960,8 +1960,8 @@ YY_RULE_SETUP
   if (!AX_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
   LEAVE; STag_graphxml_node(); graphxml_pcdata_ix = 0; ETag_graphxml_node(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case ROOT_graphxml_node: SET(EPILOG); break;
    case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
+   case ROOT_graphxml_node: SET(EPILOG); break;
   }
  }
        YY_BREAK
@@ -1985,8 +1985,8 @@ YY_RULE_SETUP
   ETag_graphxml_node();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case ROOT_graphxml_node: SET(EPILOG); break;
    case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
+   case ROOT_graphxml_node: SET(EPILOG); break;
   }
  }
        YY_BREAK
@@ -2110,8 +2110,8 @@ YY_RULE_SETUP
   if (!AX_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
   LEAVE; STag_graphxml_edge(); graphxml_pcdata_ix = 0; ETag_graphxml_edge(); popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph_1: case S_graphxml_graph: case S_graphxml_graph_3: SET(S_graphxml_graph_5); break;
    case ROOT_graphxml_edge: SET(EPILOG); break;
+   case S_graphxml_graph_4: case S_graphxml_graph_5: case S_graphxml_graph_3: case S_graphxml_graph_1: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
   }
  }
        YY_BREAK
@@ -2135,8 +2135,8 @@ YY_RULE_SETUP
   ETag_graphxml_edge();
   popbuffer(); /* attribute */
   switch (YY_START) {
-   case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph_1: case S_graphxml_graph: case S_graphxml_graph_3: SET(S_graphxml_graph_5); break;
    case ROOT_graphxml_edge: SET(EPILOG); break;
+   case S_graphxml_graph_4: case S_graphxml_graph_5: case S_graphxml_graph_3: case S_graphxml_graph_1: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
   }
  }
        YY_BREAK
index ce695aa..f04e5b5 100644 (file)
@@ -651,7 +651,6 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(msg_io);
   XBT_LOG_CONNECT(msg_kernel);
   XBT_LOG_CONNECT(msg_mailbox);
-  XBT_LOG_CONNECT(msg_new_API);
   XBT_LOG_CONNECT(msg_process);
   XBT_LOG_CONNECT(msg_synchro);
   XBT_LOG_CONNECT(msg_task);
@@ -676,9 +675,8 @@ static void xbt_log_connect_categories(void)
   XBT_LOG_CONNECT(simix_io);
   XBT_LOG_CONNECT(simix_kernel);
   XBT_LOG_CONNECT(simix_network);
-  XBT_LOG_CONNECT(simix_new_api);
   XBT_LOG_CONNECT(simix_process);
-  XBT_LOG_CONNECT(simix_smurf);
+  XBT_LOG_CONNECT(simix_popping);
   XBT_LOG_CONNECT(simix_synchro);
   XBT_LOG_CONNECT(simix_vm);
 
index 5586cf5..373c114 100644 (file)
@@ -215,4 +215,3 @@ void mfree(struct mdesc *mdp, void *ptr)
     break;
   }
 }
-
index 68cd43f..3d58ba5 100644 (file)
@@ -34,7 +34,7 @@ void mmalloc_set_current_heap(xbt_mheap_t new_heap)
 
 
 #ifdef MMALLOC_WANT_OVERRIDE_LEGACY
-#ifdef HAVE_GNU_LD
+#if 0 && defined(HAVE_GNU_LD)
 
 #undef _GNU_SOURCE
 #define _GNU_SOURCE 1
@@ -49,7 +49,7 @@ static void mm_gnuld_legacy_init(void) { /* This function is called from mmalloc
   real_realloc = (void * (*) (void*,size_t)) dlsym(RTLD_NEXT, "realloc");
   real_free = (void * (*) (void*)) dlsym(RTLD_NEXT, "free");
   __mmalloc_current_heap = __mmalloc_default_mdp;
-}
+} 
 
 /* Hello pimple!
  * DL needs some memory while resolving the malloc symbol, that is somehow problematic
@@ -57,7 +57,7 @@ static void mm_gnuld_legacy_init(void) { /* This function is called from mmalloc
  */
 static int allocated_junk = 0; /* keep track of many blocks of our little area was already given to someone */
 #define JUNK_SIZE 8
-#define MAX_JUNK_AREAS (32 * 1024 / JUNK_SIZE)
+#define MAX_JUNK_AREAS (64 * 1024 / JUNK_SIZE)
 static char junkareas[MAX_JUNK_AREAS][JUNK_SIZE];
 
 /* This version use mmalloc if there is a current heap, or the legacy implem if not */
@@ -141,7 +141,9 @@ void free(void *p)
 {
   if (p==NULL)
     return;
-  if (p<=(void*)junkareas || p>(void*)(junkareas[MAX_JUNK_AREAS]) ) {
+  if (p<(void*)junkareas || p>=(void*)(junkareas[MAX_JUNK_AREAS]) ) {
+    // main use case
+
     xbt_mheap_t mdp = __mmalloc_current_heap;
 
     if (mdp) {
@@ -151,10 +153,16 @@ void free(void *p)
     } else {
       real_free(p);
     }
-  } else if(allocated_junk && p==junkareas[allocated_junk-1]) {
-    allocated_junk--;
   } else {
-    // Leaked memory.
+    // We are in the junkarea.
+    // This area is used to allocate memory at initilization time.
+
+    if(allocated_junk && p==junkareas[allocated_junk-1]) {
+      // Last junkarea. We can reuse it.
+      allocated_junk--;
+    } else {
+      // We currently cannot reuse freed junkareas in the general case.
+    }
   }
 }
 
@@ -168,6 +176,7 @@ void *malloc(size_t n)
   void *ret = mmalloc(mdp, n);
   UNLOCK(mdp);
 
+
   return ret;
 }
 
@@ -178,8 +187,11 @@ void *calloc(size_t nmemb, size_t size)
   LOCK(mdp);
   void *ret = mmalloc(mdp, nmemb*size);
   UNLOCK(mdp);
-  memset(ret, 0, nmemb * size);
 
+  // This was already done in the callee:
+  if(!(mdp->options & XBT_MHEAP_OPTION_MEMSET)) {
+    memset(ret, 0, nmemb * size);
+  }
 
   return ret;
 }
@@ -208,5 +220,3 @@ void free(void *p)
 }
 #endif /* NO GNU_LD */
 #endif /* WANT_MALLOC_OVERRIDE */
-
-
index a2c36cd..affa209 100644 (file)
@@ -330,6 +330,8 @@ void *mmalloc_preinit(void)
 {
   int res;
   if (__mmalloc_default_mdp == NULL) {
+    if(!xbt_pagesize)
+      xbt_pagesize = getpagesize();
     unsigned long mask = ~((unsigned long)xbt_pagesize - 1);
     void *addr = (void*)(((unsigned long)sbrk(0) + HEAP_OFFSET) & mask);
     __mmalloc_default_mdp = xbt_mheap_new_options(-1, addr, XBT_MHEAP_OPTION_MEMSET);
@@ -343,7 +345,7 @@ void *mmalloc_preinit(void)
   }
   xbt_assert(__mmalloc_default_mdp != NULL);
 
-#if defined(HAVE_GNU_LD) && defined(MMALLOC_WANT_OVERRIDE_LEGACY)
+#if 0 && defined(HAVE_GNU_LD) && defined(MMALLOC_WANT_OVERRIDE_LEGACY)
   mm_gnuld_legacy_init();
 #endif
 
diff --git a/src/xbt/probes.h b/src/xbt/probes.h
new file mode 100644 (file)
index 0000000..187e4cd
--- /dev/null
@@ -0,0 +1,52 @@
+/* Copyright (c) 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. */
+
+#ifdef USE_UST
+#  include <lttng/tracepoint.h>
+#  include "simgrid_ust.h"
+#  define XBT_TRACE0 tracepoint
+#  define XBT_TRACE1 tracepoint
+#  define XBT_TRACE2 tracepoint
+#  define XBT_TRACE3 tracepoint
+#  define XBT_TRACE4 tracepoint
+#  define XBT_TRACE5 tracepoint
+#  define XBT_TRACE6 tracepoint
+#  define XBT_TRACE7 tracepoint
+#  define XBT_TRACE8 tracepoint
+#  define XBT_TRACE9 tracepoint
+#  define XBT_TRACE10 tracepoint
+#  define XBT_TRACE11 tracepoint
+#  define XBT_TRACE12 tracepoint
+#elif USE_SDT
+#  include <sys/sdt.h>
+#  define XBT_TRACE0  DTRACE_PROBE0
+#  define XBT_TRACE1  DTRACE_PROBE1
+#  define XBT_TRACE2  DTRACE_PROBE2
+#  define XBT_TRACE3  DTRACE_PROBE3
+#  define XBT_TRACE4  DTRACE_PROBE4
+#  define XBT_TRACE5  DTRACE_PROBE5
+#  define XBT_TRACE6  DTRACE_PROBE6
+#  define XBT_TRACE7  DTRACE_PROBE7
+#  define XBT_TRACE8  DTRACE_PROBE8
+#  define XBT_TRACE9  DTRACE_PROBE9
+#  define XBT_TRACE10  DTRACE_PROBE10
+#  define XBT_TRACE11  DTRACE_PROBE11
+#  define XBT_TRACE12  DTRACE_PROBE12
+#else
+#  define XBT_TRACE0(...)
+#  define XBT_TRACE1(...)
+#  define XBT_TRACE2(...)
+#  define XBT_TRACE3(...)
+#  define XBT_TRACE4(...)
+#  define XBT_TRACE5(...)
+#  define XBT_TRACE6(...)
+#  define XBT_TRACE7(...)
+#  define XBT_TRACE8(...)
+#  define XBT_TRACE9(...)
+#  define XBT_TRACE10(...)
+#  define XBT_TRACE11(...)
+#  define XBT_TRACE12(...)
+#endif
index 7cc39e4..47ae0ee 100644 (file)
@@ -20,7 +20,8 @@ typedef struct s_replay_reader {
   char *line;
   size_t line_len;
   char *position; /* stable storage */
-  char *filename; int linenum;
+  char *filename; 
+  int linenum;
 } s_xbt_replay_reader_t;
 
 FILE *action_fp;
@@ -154,6 +155,7 @@ void _xbt_replay_action_exit(void)
 int xbt_replay_action_runner(int argc, char *argv[])
 {
   int i;
+  xbt_ex_t e;
   if (action_fp) {              // A unique trace file
     char **evt;
     while ((evt = action_get_action(argv[0]))) {
@@ -161,7 +163,14 @@ int xbt_replay_action_runner(int argc, char *argv[])
       action_fun function =
         (action_fun)xbt_dict_get(action_funs, lowername);
       xbt_free(lowername);
-      function((const char **)evt);
+      TRY{
+        function((const char **)evt);
+      }
+      CATCH(e) {
+        free(evt);
+        xbt_die("Replay error :\n %s"
+                  , e.msg);
+      }
       for (i=0;evt[i]!= NULL;i++)
         free(evt[i]);
       free(evt);
@@ -179,7 +188,14 @@ int xbt_replay_action_runner(int argc, char *argv[])
         char* lowername = str_tolower (evt[1]);
         action_fun function = (action_fun)xbt_dict_get(action_funs, lowername);
         xbt_free(lowername);
-        function(evt);
+        TRY{
+          function(evt);
+        }
+        CATCH(e) {
+          free(evt);
+          xbt_die("Replay error on line %d of file %s :\n %s"
+                     , reader->linenum,reader->filename, e.msg);               
+        }
       } else {
         XBT_WARN("%s: Ignore trace element not for me",
               xbt_replay_reader_position(reader));
index d99d4af..1d60cad 100644 (file)
@@ -38,8 +38,7 @@ public class SleepHostOff extends Process{
           try {
             Process.sleep(10);
           } catch (HostFailureException e) {
-            Msg.info("catch HostException");
-            e.printStackTrace();
+            Msg.info("catch HostException: "+e.getLocalizedMessage());
             break; //Break is needed to finalize the endless loop 
           }
         }
index a1d464e..ba1c11c 100644 (file)
@@ -1,2 +1,13 @@
 $ java -classpath ${classpath:=.} sleep_host_off.Main ${srcdir:=.}/../../examples/platforms/small_platform.xml ${srcdir:=.}/sleep_host_off/sleep_host_off_d.xml "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n"
+> [  0.000000] (0:@) Using regular java threads. Coroutines could speed your simulation up.
+> [  0.000000] (1:sleep_host_off.SleepHostOff@Tremblay) **** **** **** ***** ***** Test Sleep ***** ***** **** **** ****
+> [  0.000000] (1:sleep_host_off.SleepHostOff@Tremblay) Test sleep: Create a process on Jupiter, the process simply make periodic sleep, turn off Jupiter
+> [  0.000000] (2:sleep@Jupiter) I'm not dead
+> [  0.010000] (2:sleep@Jupiter) I'm not dead
+> [  0.020000] (1:sleep_host_off.SleepHostOff@Tremblay) Stop Jupiter
+> [  0.020000] (2:sleep@Jupiter) I'm not dead
+> [  0.020000] (1:sleep_host_off.SleepHostOff@Tremblay) Jupiter has been stopped
+> [  0.020000] (2:sleep@Jupiter) catch HostException: Host Failure (null)
+> [  0.320000] (1:sleep_host_off.SleepHostOff@Tremblay) Test sleep seems ok, cool !(number of Process : 1, it should be 1 (i.e. the Test one))
 >
+> [  0.320000] (0:@) MSG_main finished; Cleaning up the simulation...
\ No newline at end of file
index ab52f5b..7378579 100644 (file)
@@ -82,7 +82,15 @@ static void test_local_variable(mc_object_info_t info, const char* function, con
   assert(var);
 
   void* frame_base = mc_find_frame_base(subprogram, info, cursor);
-  xbt_assert((void*)mc_dwarf_resolve_locations(&var->locations, info, cursor, frame_base, NULL, -1) == address,
+  s_mc_location_t location;
+
+  mc_dwarf_resolve_locations(&location,
+    &var->locations, info, cursor, frame_base, NULL, -1);
+
+  xbt_assert(mc_get_location_type(&location)==MC_LOCATION_TYPE_ADDRESS,
+    "Unexpected location type for variable %s of %s", variable, function);
+
+  xbt_assert(location.memory_location == address,
     "Bad resolution of local variable %s of %s", variable, function);
 
 }
index cb48a8a..8c13617 100644 (file)
@@ -32,7 +32,7 @@ int test_launcher(int argc, char *argv[])
 
   test = 1;
   // Create a process running a simple task on a host and turn the host off during the execution of the process.
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
     XBT_INFO("Test 1:");
     XBT_INFO("  Create a process on Jupiter");
     argvF = xbt_new(char*, 2);
@@ -47,7 +47,7 @@ int test_launcher(int argc, char *argv[])
 
   test = 2;
   // Create a process that on a host that is turned off (this should not be possible)
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
     XBT_INFO("Test 2:");
     XBT_INFO("  Turn off Jupiter");
     // adsein: Jupiter is already, hence nothing should happen
@@ -69,7 +69,7 @@ int test_launcher(int argc, char *argv[])
 
    test = 3;
   // Create a process running sucessive sleeps on a host and turn the host off during the execution of the process.
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
     XBT_INFO("Test 3:");
     MSG_host_on(jupiter);
     argvF = xbt_new(char*, 2);
@@ -84,7 +84,7 @@ int test_launcher(int argc, char *argv[])
   }
 
   test = 4;
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
     XBT_INFO("Test 4 (turn off src during a communication) : Create a Process/task to make a communication between Jupiter and Tremblay and turn off Jupiter during the communication");
     MSG_host_on(jupiter);
     MSG_process_sleep(10);
@@ -102,7 +102,7 @@ int test_launcher(int argc, char *argv[])
   }
 
   test = 5;
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
     XBT_INFO("Test 5 (turn off dest during a communication : Create a Process/task to make a communication between Tremblay and Jupiter and turn off Jupiter during the communication");
     MSG_host_on(jupiter);
     MSG_process_sleep(10);
@@ -120,7 +120,7 @@ int test_launcher(int argc, char *argv[])
   }
 
   test =6;
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
     XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node");
 
     // Create VM0
@@ -155,17 +155,17 @@ int test_launcher(int argc, char *argv[])
   }
 
   test = 7;
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
 
   }
 
   test = 8;
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
 
   }
 
   test = 9;
-  if (xbt_dynar_member(tests, &test)){
+  if (xbt_dynar_search_or_negative(tests, &test)!=-1){
 
   }
   XBT_INFO("  Test done. See you!");
index 0945a17..97cb9cd 100644 (file)
@@ -16,7 +16,11 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   add_executable(allgather3 allgather3.c)
   add_executable(allgatherv2 allgatherv2.c)
   add_executable(allgatherv3 allgatherv3.c)
-  add_executable(allgatherv4 allgatherv4.c)
+  if(HAVE_MMAP)
+    add_executable(allgatherv4 allgatherv4.c)
+  else()
+    add_executable(allgatherv4 allgatherv4_manual.c)
+  endif()
   add_executable(allred2 allred2.c)
   add_executable(allred3 allred3.c)
   add_executable(allred4 allred4.c)
@@ -212,6 +216,7 @@ set(examples_src
  ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv2.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv3.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv4.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/allgatherv4_manual.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/allred2.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/allred3.c 
  ${CMAKE_CURRENT_SOURCE_DIR}/allred4.c 
index 60bf0a4..2af91af 100644 (file)
@@ -112,8 +112,8 @@ int main(int argc, char ** argv)
     comm_tests(comm);
     MPI_Comm_free(&comm);
 
-    //free(SMPI_VARGET_GLOBAL(sbuf));
-    //free(SMPI_VARGET_GLOBAL(rbuf));
+    free(SMPI_VARGET_GLOBAL(sbuf));
+    free(SMPI_VARGET_GLOBAL(rbuf));
     free(SMPI_VARGET_GLOBAL(recvcounts));
     free(SMPI_VARGET_GLOBAL(displs));
 
diff --git a/teshsuite/smpi/mpich3-test/coll/allgatherv4_manual.c b/teshsuite/smpi/mpich3-test/coll/allgatherv4_manual.c
new file mode 100644 (file)
index 0000000..60bf0a4
--- /dev/null
@@ -0,0 +1,251 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ *  (C) 2003 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#include "mpi.h"
+#include "mpitest.h"
+#include "smpi_cocci.h"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <time.h>
+#include <math.h>
+#include <assert.h>
+
+/* FIXME: What is this test supposed to accomplish? */
+
+#define START_BUF (1)
+#define LARGE_BUF (256 * 1024)
+
+/* FIXME: MAX_BUF is too large */
+#define MAX_BUF   (32 * 1024 * 1024)
+#define LOOPS 10
+
+SMPI_VARINIT_GLOBAL(sbuf, char*);
+SMPI_VARINIT_GLOBAL(rbuf, char*);
+SMPI_VARINIT_GLOBAL(recvcounts, int*);
+SMPI_VARINIT_GLOBAL(displs, int*);
+SMPI_VARINIT_GLOBAL_AND_SET(errs, int, 0);
+
+/* #define dprintf printf */
+#define dprintf(...)
+
+typedef enum {
+    REGULAR,
+    BCAST,
+    SPIKE,
+    HALF_FULL,
+    LINEAR_DECREASE,
+    BELL_CURVE
+} test_t;
+
+void comm_tests(MPI_Comm comm);
+double run_test(long long msg_size, MPI_Comm comm, test_t test_type, double * max_time);
+
+int main(int argc, char ** argv)
+{
+    int comm_size, comm_rank;
+    MPI_Comm comm;
+
+    MTest_Init(&argc, &argv);
+    MPI_Comm_size(MPI_COMM_WORLD, &comm_size);
+    MPI_Comm_rank(MPI_COMM_WORLD, &comm_rank);
+
+    if (LARGE_BUF * comm_size > MAX_BUF)
+        goto fn_exit;
+
+    SMPI_VARGET_GLOBAL(sbuf) = (void *) calloc(MAX_BUF, 1);
+    SMPI_VARGET_GLOBAL(rbuf) = (void *) calloc(MAX_BUF, 1);
+
+    srand(time(NULL));
+
+    SMPI_VARGET_GLOBAL(recvcounts) = (void *) malloc(comm_size * sizeof(int));
+    SMPI_VARGET_GLOBAL(displs) = (void *) malloc(comm_size * sizeof(int));
+    if (!SMPI_VARGET_GLOBAL(recvcounts) || !SMPI_VARGET_GLOBAL(displs) || !SMPI_VARGET_GLOBAL(sbuf) || !SMPI_VARGET_GLOBAL(rbuf)) {
+        fprintf(stderr, "Unable to allocate memory:\n");
+       if (!SMPI_VARGET_GLOBAL(sbuf)) fprintf(stderr,"\tsbuf of %d bytes\n", MAX_BUF );
+       if (!SMPI_VARGET_GLOBAL(rbuf)) fprintf(stderr,"\trbuf of %d bytes\n", MAX_BUF );
+       if (!SMPI_VARGET_GLOBAL(recvcounts)) fprintf(stderr,"\trecvcounts of %zd bytes\n", comm_size * sizeof(int) );
+       if (!SMPI_VARGET_GLOBAL(displs)) fprintf(stderr,"\tdispls of %zd bytes\n", comm_size * sizeof(int) );
+        fflush(stderr);
+        MPI_Abort(MPI_COMM_WORLD, -1);
+        exit(-1);
+    }
+
+    if (!comm_rank) {
+        dprintf("Message Range: (%d, %d); System size: %d\n", START_BUF, LARGE_BUF, comm_size);
+        fflush(stdout);
+    }
+
+
+    /* COMM_WORLD tests */
+    if (!comm_rank) {
+        dprintf("\n\n==========================================================\n");
+        dprintf("                         MPI_COMM_WORLD\n");
+        dprintf("==========================================================\n");
+    }
+    comm_tests(MPI_COMM_WORLD);
+
+    /* non-COMM_WORLD tests */
+    if (!comm_rank) {
+        dprintf("\n\n==========================================================\n");
+        dprintf("                         non-COMM_WORLD\n");
+        dprintf("==========================================================\n");
+    }
+    MPI_Comm_split(MPI_COMM_WORLD, (comm_rank == comm_size - 1) ? 0 : 1, 0, &comm);
+    if (comm_rank < comm_size - 1)
+        comm_tests(comm);
+    MPI_Comm_free(&comm);
+
+    /* Randomized communicator tests */
+    if (!comm_rank) {
+        dprintf("\n\n==========================================================\n");
+        dprintf("                         Randomized Communicator\n");
+        dprintf("==========================================================\n");
+    }
+    MPI_Comm_split(MPI_COMM_WORLD, 0, rand(), &comm);
+    comm_tests(comm);
+    MPI_Comm_free(&comm);
+
+    //free(SMPI_VARGET_GLOBAL(sbuf));
+    //free(SMPI_VARGET_GLOBAL(rbuf));
+    free(SMPI_VARGET_GLOBAL(recvcounts));
+    free(SMPI_VARGET_GLOBAL(displs));
+
+fn_exit:
+    MTest_Finalize(SMPI_VARGET_GLOBAL(errs));
+    MPI_Finalize();
+
+    return 0;
+}
+
+void comm_tests(MPI_Comm comm)
+{
+    int comm_size, comm_rank;
+    double rtime = rtime;       /* stop warning about unused variable */
+    double max_time;
+    long long msg_size;
+
+    MPI_Comm_size(comm, &comm_size);
+    MPI_Comm_rank(comm, &comm_rank);
+
+    for (msg_size = START_BUF; msg_size <= LARGE_BUF; msg_size *= 2) {
+        if (!comm_rank) {
+            dprintf("\n====> MSG_SIZE: %d\n", (int) msg_size);
+            fflush(stdout);
+        }
+
+        rtime = run_test(msg_size, comm, REGULAR, &max_time);
+        if (!comm_rank) {
+            dprintf("REGULAR:\tAVG: %.3f\tMAX: %.3f\n", rtime, max_time);
+            fflush(stdout);
+        }
+
+        rtime = run_test(msg_size, comm, BCAST, &max_time);
+        if (!comm_rank) {
+            dprintf("BCAST:\tAVG: %.3f\tMAX: %.3f\n", rtime, max_time);
+            fflush(stdout);
+        }
+
+        rtime = run_test(msg_size, comm, SPIKE, &max_time);
+        if (!comm_rank) {
+            dprintf("SPIKE:\tAVG: %.3f\tMAX: %.3f\n", rtime, max_time);
+            fflush(stdout);
+        }
+
+        rtime = run_test(msg_size, comm, HALF_FULL, &max_time);
+        if (!comm_rank) {
+            dprintf("HALF_FULL:\tAVG: %.3f\tMAX: %.3f\n", rtime, max_time);
+            fflush(stdout);
+        }
+
+        rtime = run_test(msg_size, comm, LINEAR_DECREASE, &max_time);
+        if (!comm_rank) {
+            dprintf("LINEAR_DECREASE:\tAVG: %.3f\tMAX: %.3f\n", rtime, max_time);
+            fflush(stdout);
+        }
+
+        rtime = run_test(msg_size, comm, BELL_CURVE, &max_time);
+        if (!comm_rank) {
+            dprintf("BELL_CURVE:\tAVG: %.3f\tMAX: %.3f\n", rtime, max_time);
+            fflush(stdout);
+        }
+    }
+}
+
+double run_test(long long msg_size, MPI_Comm comm, test_t test_type, 
+               double * max_time)
+{
+    int i, j;
+    int comm_size, comm_rank;
+    double start, end;
+    double total_time, avg_time;
+    MPI_Aint tmp;
+
+    MPI_Comm_size(comm, &comm_size);
+    MPI_Comm_rank(comm, &comm_rank);
+
+    SMPI_VARGET_GLOBAL(displs)[0] = 0;
+    for (i = 0; i < comm_size; i++) {
+        if (test_type == REGULAR)
+            SMPI_VARGET_GLOBAL(recvcounts)[i] = msg_size;
+        else if (test_type == BCAST)
+            SMPI_VARGET_GLOBAL(recvcounts)[i] = (!i) ? msg_size : 0;
+        else if (test_type == SPIKE)
+            SMPI_VARGET_GLOBAL(recvcounts)[i] = (!i) ? (msg_size / 2) : (msg_size / (2 * (comm_size - 1)));
+        else if (test_type == HALF_FULL)
+            SMPI_VARGET_GLOBAL(recvcounts)[i] = (i < (comm_size / 2)) ? (2 * msg_size) : 0;
+        else if (test_type == LINEAR_DECREASE) {
+            tmp = 2 * msg_size * (comm_size - 1 - i) / (comm_size - 1);
+           if (tmp != (int)tmp) {
+               fprintf( stderr, "Integer overflow in variable tmp\n" );
+               MPI_Abort( MPI_COMM_WORLD, 1 );
+                exit(1);
+           }
+            SMPI_VARGET_GLOBAL(recvcounts)[i] = (int) tmp;
+
+            /* If the maximum message size is too large, don't run */
+            if (tmp > MAX_BUF) return 0;
+        }
+        else if (test_type == BELL_CURVE) {
+            for (j = 0; j < i; j++) {
+                if (i - 1 + j >= comm_size) continue;
+                tmp = msg_size * comm_size / (log(comm_size) * i);
+                SMPI_VARGET_GLOBAL(recvcounts)[i - 1 + j] = (int) tmp;
+                SMPI_VARGET_GLOBAL(displs)[i - 1 + j] = 0;
+
+                /* If the maximum message size is too large, don't run */
+                if (tmp > MAX_BUF) return 0;
+            }
+        }
+
+        if (i < comm_size - 1)
+            SMPI_VARGET_GLOBAL(displs)[i+1] = SMPI_VARGET_GLOBAL(displs)[i] + SMPI_VARGET_GLOBAL(recvcounts)[i];
+    }
+
+    /* Test that:
+       1: sbuf is large enough
+       2: rbuf is large enough
+       3: There were no failures (e.g., tmp nowhere > rbuf size 
+    */
+    MPI_Barrier(comm);
+    start = MPI_Wtime();
+    for (i = 0; i < LOOPS; i++) {
+        MPI_Allgatherv(SMPI_VARGET_GLOBAL(sbuf), SMPI_VARGET_GLOBAL(recvcounts)[comm_rank], MPI_CHAR,
+                       SMPI_VARGET_GLOBAL(rbuf), SMPI_VARGET_GLOBAL(recvcounts), SMPI_VARGET_GLOBAL(displs), MPI_CHAR, comm);
+    }
+    end = MPI_Wtime();
+    MPI_Barrier(comm);
+
+    /* Convert to microseconds (why?) */
+    total_time = 1.0e6 * (end - start);
+    MPI_Reduce(&total_time, &avg_time, 1, MPI_DOUBLE, MPI_SUM, 0, comm);
+    MPI_Reduce(&total_time, max_time, 1, MPI_DOUBLE, MPI_MAX, 0, comm);
+
+    return (avg_time / (LOOPS * comm_size));
+}
index 8f4b6c4..10f915e 100644 (file)
@@ -15,7 +15,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  add_executable(blockindexed-misc blockindexed-misc.c)
   add_executable(blockindexed-zero-count blockindexed-zero-count.c)
 #  add_executable(contents contents.c)
-#  add_executable(contigstruct contigstruct.c)
+  add_executable(contigstruct contigstruct.c)
   add_executable(contig-zero-count contig-zero-count.c)
   add_executable(cxx-types cxx-types.c)
 #  add_executable(darray-cyclic darray-cyclic.c)
@@ -35,7 +35,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  add_executable(large_type large_type.c)
 #  add_executable(large_type_sendrec large_type_sendrec.c)
 #  add_executable(lbub lbub.c)
-#  add_executable(localpack localpack.c)
+  add_executable(localpack localpack.c)
   add_executable(longdouble longdouble.c)
 #  add_executable(lots-of-types lots-of-types.c)
 #  add_executable(pairtype-pack pairtype-pack.c)
@@ -44,7 +44,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   add_executable(sendrecvt2 ${CMAKE_CURRENT_SOURCE_DIR}/../util/dtypes.c sendrecvt2.c)
   add_executable(sendrecvt4 ${CMAKE_CURRENT_SOURCE_DIR}/../util/dtypes.c sendrecvt4.c)
   add_executable(simple-commit simple-commit.c)
-#  add_executable(simple-pack simple-pack.c)
+  add_executable(simple-pack simple-pack.c)
 #  add_executable(simple-pack-external simple-pack-external.c)
   add_executable(simple-resized simple-resized.c)
   add_executable(simple-size-extent simple-size-extent.c)
@@ -55,7 +55,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  add_executable(struct-empty-el struct-empty-el.c)
   add_executable(struct-ezhov struct-ezhov.c)
 #  add_executable(struct-no-real-types struct-no-real-types.c)
-#  add_executable(struct-pack struct-pack.c)
+  add_executable(struct-pack struct-pack.c)
 #  add_executable(structpack2 structpack2.c)
   add_executable(struct-verydeep struct-verydeep.c)
   add_executable(struct-zero-count struct-zero-count.c)
@@ -63,7 +63,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  add_executable(subarray-pack subarray-pack.c)
   add_executable(tfree tfree.c)
 #  add_executable(tmatchsize tmatchsize.c)
-#  add_executable(transpose-pack transpose-pack.c)
+  add_executable(transpose-pack transpose-pack.c)
   add_executable(tresized2 tresized2.c)
   add_executable(tresized tresized.c)
 #  add_executable(triangular-pack triangular-pack.c)
@@ -71,17 +71,17 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   add_executable(typefree typefree.c)
   add_executable(typelb typelb.c)
   add_executable(typename typename.c)
-#  add_executable(unpack unpack.c)
+  add_executable(unpack unpack.c)
 #  add_executable(unusual-noncontigs unusual-noncontigs.c)
 #  add_executable(vecblklen vecblklen.c)
 #  add_executable(zero-blklen-vector zero-blklen-vector.c)
-#  add_executable(zeroblks zeroblks.c)
+  add_executable(zeroblks zeroblks.c)
   add_executable(zeroparms zeroparms.c)
 
 #  target_link_libraries(blockindexed-misc simgrid mtest_c)
   target_link_libraries(blockindexed-zero-count simgrid mtest_c)
 #  target_link_libraries(contents simgrid mtest_c)
-#  target_link_libraries(contigstruct simgrid mtest_c)
+  target_link_libraries(contigstruct simgrid mtest_c)
   target_link_libraries(contig-zero-count simgrid mtest_c)
   target_link_libraries(cxx-types simgrid mtest_c)
 #  target_link_libraries(darray-cyclic simgrid mtest_c)
@@ -101,7 +101,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  target_link_libraries(large_type simgrid mtest_c)
 #  target_link_libraries(large_type_sendrec simgrid mtest_c)
 #  target_link_libraries(lbub simgrid mtest_c)
-#  target_link_libraries(localpack simgrid mtest_c)
+  target_link_libraries(localpack simgrid mtest_c)
   target_link_libraries(longdouble simgrid mtest_c)
 #  target_link_libraries(lots-of-types simgrid mtest_c)
 #  target_link_libraries(pairtype-pack simgrid mtest_c)
@@ -110,7 +110,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   target_link_libraries(sendrecvt2 simgrid mtest_c)
   target_link_libraries(sendrecvt4 simgrid mtest_c)
   target_link_libraries(simple-commit simgrid mtest_c)
-#  target_link_libraries(simple-pack simgrid mtest_c)
+  target_link_libraries(simple-pack simgrid mtest_c)
 #  target_link_libraries(simple-pack-external simgrid mtest_c)
   target_link_libraries(simple-resized simgrid mtest_c)
   target_link_libraries(simple-size-extent simgrid mtest_c)
@@ -121,7 +121,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  target_link_libraries(struct-empty-el simgrid mtest_c)
   target_link_libraries(struct-ezhov simgrid mtest_c)
 #  target_link_libraries(struct-no-real-types simgrid mtest_c)
-#  target_link_libraries(struct-pack simgrid mtest_c)
+  target_link_libraries(struct-pack simgrid mtest_c)
 #  target_link_libraries(structpack2 simgrid mtest_c)
   target_link_libraries(struct-verydeep simgrid mtest_c)
   target_link_libraries(struct-zero-count simgrid mtest_c)
@@ -129,7 +129,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
 #  target_link_libraries(subarray-pack simgrid mtest_c)
   target_link_libraries(tfree simgrid mtest_c)
 #  target_link_libraries(tmatchsize simgrid mtest_c)
-#  target_link_libraries(transpose-pack simgrid mtest_c)
+  target_link_libraries(transpose-pack simgrid mtest_c)
   target_link_libraries(tresized2 simgrid mtest_c)
   target_link_libraries(tresized simgrid mtest_c)
 #  target_link_libraries(triangular-pack simgrid mtest_c)
@@ -137,11 +137,11 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite)
   target_link_libraries(typefree simgrid mtest_c)
   target_link_libraries(typelb simgrid mtest_c)
   target_link_libraries(typename simgrid mtest_c)
-#  target_link_libraries(unpack simgrid mtest_c)
+  target_link_libraries(unpack simgrid mtest_c)
 #  target_link_libraries(unusual-noncontigs simgrid mtest_c)
 #  target_link_libraries(vecblklen simgrid mtest_c)
 #  target_link_libraries(zero-blklen-vector simgrid mtest_c)
-#  target_link_libraries(zeroblks simgrid mtest_c)
+  target_link_libraries(zeroblks simgrid mtest_c)
   target_link_libraries(zeroparms simgrid mtest_c)
 
 endif()
index 23f42be..c16b840 100644 (file)
@@ -3,13 +3,13 @@
 gaddress 1
 #complex games with negative extents...
 #lbub 1
-#needs MPI_Pack, MPI_Unpack
-#localpack 1
+localpack 1
+#needs MPI_Type_get_envelope
 #simple-pack 1
 #simple-pack-external 1
-#transpose-pack 1
+transpose-pack 1
 #slice-pack 1
-#struct-pack 1
+struct-pack 1
 #structpack2 1
 typecommit 1
 typename 1
@@ -25,13 +25,11 @@ sendrecvt4 2
 #tmatchsize 1
 tfree 2
 typelb 1
-#needs MPI_Pack_size
-#contigstruct 1
+contigstruct 1
 struct-zero-count 1
 blockindexed-zero-count 1
-#needs MPI_Pack, MPI_unpack, MPI_Pack_size
+#needs better handling of lb/ub
 #blockindexed-misc 1
-#needs MPI_Pack, MPI_unpack, MPI_Pack_size
 #indexed-misc 1
 #needs MPI_Type_create_subarray
 #subarray-pack 1
@@ -57,10 +55,9 @@ simple-resized 1
 #hindexed-zeros 1
 #lots-of-types 1
 #get-elements-pairtype 1
-#unpack 1
+unpack 1
 struct-ezhov 1
-#needs MPI_Pack, MPI_Unpack
-#zeroblks 1
+zeroblks 1
 struct-derived-zeros 1
 struct-verydeep 1
 #get-elements 1
diff --git a/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/info/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a7aa476
--- /dev/null
@@ -0,0 +1,46 @@
+cmake_minimum_required(VERSION 2.6)
+
+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()
+    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
+  endif()
+
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+  include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
+  include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
+
+
+  add_executable(infotest2f infotest2f.f ../util/mtestf.f)
+  add_executable(infotestf infotestf.f ../util/mtestf.f)
+  target_link_libraries(infotest2f simgrid mtest_f77)
+  target_link_libraries(infotestf simgrid mtest_f77)
+
+endif()
+
+set(tesh_files
+  ${tesh_files}
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+ ${CMAKE_CURRENT_SOURCE_DIR}/infotest2f.f 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infotestf.f 
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/testlist
+  PARENT_SCOPE
+  )
diff --git a/teshsuite/smpi/mpich3-test/f77/info/infotest2f.f b/teshsuite/smpi/mpich3-test/f77/info/infotest2f.f
new file mode 100644 (file)
index 0000000..204897c
--- /dev/null
@@ -0,0 +1,141 @@
+C -*- Mode: Fortran; -*- 
+C
+C  (C) 2003 by Argonne National Laboratory.
+C      See COPYRIGHT in top-level directory.
+C
+      program main
+      implicit none
+      include 'mpif.h'
+      integer ierr, errs
+      integer i1, i2
+      integer nkeys, i, j, sumindex, vlen, ln, valuelen
+      logical found, flag
+      character*(MPI_MAX_INFO_KEY) keys(6)
+      character*(MPI_MAX_INFO_VAL) values(6)
+      character*(MPI_MAX_INFO_KEY) mykey
+      character*(MPI_MAX_INFO_VAL) myvalue
+C
+      data keys/"Key1", "key2", "KeY3", "A Key With Blanks","See Below",
+     &          "last"/
+      data values/"value 1", "value 2", "VaLue 3", "key=valu:3","false",
+     &            "no test"/
+C
+      errs = 0
+
+      call mtest_init( ierr )
+      
+C Note that the MPI standard requires that leading an trailing blanks
+C are stripped from keys and values (Section 4.10, The Info Object)
+C
+C First, create and initialize an info
+      call mpi_info_create( i1, ierr )
+      call mpi_info_set( i1, keys(1), values(1), ierr )
+      call mpi_info_set( i1, keys(2), values(2), ierr )
+      call mpi_info_set( i1, keys(3), values(3), ierr )
+      call mpi_info_set( i1, keys(4), values(4), ierr )
+      call mpi_info_set( i1, " See Below", values(5), ierr )
+      call mpi_info_set( i1, keys(6), " no test ", ierr )
+C
+      call mpi_info_get_nkeys( i1, nkeys, ierr )
+      if (nkeys .ne. 6) then
+         print *, ' Number of keys should be 6, is ', nkeys
+      endif
+      sumindex = 0
+      do i=1, nkeys
+C        keys are number from 0 to n-1, even in Fortran (Section 4.10)
+         call mpi_info_get_nthkey( i1, i-1, mykey, ierr )
+         found = .false.
+         do j=1, 6
+            if (mykey .eq. keys(j)) then
+               found = .true.
+               sumindex = sumindex + j
+               call mpi_info_get_valuelen( i1, mykey, vlen, flag, ierr )
+               if (.not.flag) then
+                  errs = errs + 1
+                  print *, ' no value for key', mykey
+               else
+                  call mpi_info_get( i1, mykey, MPI_MAX_INFO_VAL,
+     &                               myvalue, flag, ierr )
+                  if (myvalue .ne. values(j)) then
+                     errs = errs + 1
+                     print *, ' Value for ', mykey, ' not expected'
+                  else
+                     do ln=MPI_MAX_INFO_VAL,1,-1
+                        if (myvalue(ln:ln) .ne. ' ') then
+                           if (vlen .ne. ln) then
+                              errs = errs + 1
+                              print *, ' length is ', ln, 
+     &                          ' but valuelen gave ',  vlen, 
+     &                          ' for key ', mykey
+                           endif
+                           goto 100
+                        endif
+                     enddo
+ 100                 continue
+                  endif
+               endif
+            endif
+         enddo
+         if (.not.found) then
+            print *, i, 'th key ', mykey, ' not in list'
+         endif
+      enddo
+      if (sumindex .ne. 21) then
+         errs = errs + 1
+         print *, ' Not all keys found'
+      endif
+C
+C delete 2, then dup, then delete 2 more
+      call mpi_info_delete( i1, keys(1), ierr )
+      call mpi_info_delete( i1, keys(2), ierr )
+      call mpi_info_dup( i1, i2, ierr )
+      call mpi_info_delete( i1, keys(3), ierr )
+C
+C check the contents of i2
+C valuelen does not signal an error for unknown keys; instead, sets
+C flag to false
+      do i=1,2
+         flag = .true.
+         call mpi_info_get_valuelen( i2, keys(i), valuelen, flag, ierr )
+         if (flag) then
+            errs = errs + 1
+            print *, ' Found unexpected key ', keys(i)
+         endif
+         myvalue = 'A test'
+         call mpi_info_get( i2, keys(i), MPI_MAX_INFO_VAL, 
+     &                      myvalue, flag, ierr )
+         if (flag) then
+            errs = errs + 1
+            print *, ' Found unexpected key in MPI_Info_get ', keys(i)
+         else 
+            if (myvalue .ne. 'A test') then
+               errs = errs + 1
+               print *, ' Returned value overwritten, is now ', myvalue
+            endif
+         endif
+         
+      enddo
+      do i=3,6
+         myvalue = ' '
+         call mpi_info_get( i2, keys(i), MPI_MAX_INFO_VAL, 
+     &                      myvalue, flag, ierr )
+         if (.not. flag) then
+             errs = errs + 1
+             print *, ' Did not find key ', keys(i)
+         else 
+            if (myvalue .ne. values(i)) then
+               errs = errs + 1
+               print *, ' Found wrong value (', myvalue, ') for key ', 
+     &                  keys(i)
+            endif
+         endif
+      enddo
+C
+C     Free info
+      call mpi_info_free( i1, ierr )
+      call mpi_info_free( i2, ierr )
+
+      call mtest_finalize( errs )
+      call mpi_finalize( ierr )
+
+      end
diff --git a/teshsuite/smpi/mpich3-test/f77/info/infotestf.f b/teshsuite/smpi/mpich3-test/f77/info/infotestf.f
new file mode 100644 (file)
index 0000000..a2ec83b
--- /dev/null
@@ -0,0 +1,57 @@
+C -*- Mode: Fortran; -*- 
+C
+C  (C) 2003 by Argonne National Laboratory.
+C      See COPYRIGHT in top-level directory.
+C
+C Simple info test 
+       program main
+       implicit none
+       include 'mpif.h'
+       integer i1, i2
+       integer i, errs, ierr
+       integer valuelen
+       parameter (valuelen=64)
+       character*(valuelen) value
+       logical flag
+C
+       errs = 0
+
+       call MTest_Init( ierr )
+
+       call mpi_info_create( i1, ierr )
+       call mpi_info_create( i2, ierr )
+
+       call mpi_info_set( i1, "key1", "value1", ierr )
+       call mpi_info_set( i2, "key2", "value2", ierr )
+
+       call mpi_info_get( i1, "key2", valuelen, value, flag, ierr )
+       if (flag) then
+          print *, "Found key2 in info1"
+          errs = errs + 1
+       endif
+
+       call MPI_Info_get( i1, "key1", 64, value, flag, ierr )
+       if (.not. flag ) then
+          print *, "Did not find key1 in info1"
+          errs = errs + 1
+       else 
+          if (value .ne. "value1") then
+             print *, "Found wrong value (", value, "), expected value1"
+             errs = errs + 1
+          else
+C     check for trailing blanks             
+             do i=7,valuelen
+                if (value(i:i) .ne. " ") then
+                   print *, "Found non blank in info value"
+                   errs = errs + 1
+                endif
+             enddo
+          endif
+       endif
+
+       call mpi_info_free( i1, ierr )
+       call mpi_info_free( i2, ierr )
+
+       call MTest_Finalize( errs )
+       call MPI_Finalize( ierr )
+       end
diff --git a/teshsuite/smpi/mpich3-test/f77/info/testlist b/teshsuite/smpi/mpich3-test/f77/info/testlist
new file mode 100644 (file)
index 0000000..e7512e6
--- /dev/null
@@ -0,0 +1,2 @@
+infotestf 1
+infotest2f 1
diff --git a/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f90/info/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a1a319c
--- /dev/null
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 2.6)
+
+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()
+    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpif90")
+  endif()
+
+  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+  include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
+
+  add_executable(infotest2f90 infotest2f90.f90 ../util/mtestf90.f90)
+  add_executable(infotestf90 infotestf90.f90 ../util/mtestf90.f90)
+  target_link_libraries(infotest2f90  simgrid mtest_f90)
+  target_link_libraries(infotestf90  simgrid mtest_f90)
+
+endif()
+
+set(tesh_files
+  ${tesh_files}
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+ ${CMAKE_CURRENT_SOURCE_DIR}/infotest2f90.f90 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infotestf90.f90 
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/testlist
+  PARENT_SCOPE
+  )
diff --git a/teshsuite/smpi/mpich3-test/f90/info/infotest2f90.f90 b/teshsuite/smpi/mpich3-test/f90/info/infotest2f90.f90
new file mode 100644 (file)
index 0000000..d3f6091
--- /dev/null
@@ -0,0 +1,141 @@
+! This file created from test/mpi/f77/info/infotest2f.f with f77tof90
+! -*- Mode: Fortran; -*- 
+!
+!  (C) 2003 by Argonne National Laboratory.
+!      See COPYRIGHT in top-level directory.
+!
+      program main
+      use mpi
+      integer ierr, errs
+      integer i1, i2
+      integer nkeys, i, j, sumindex, vlen, ln, valuelen
+      logical found, flag
+      character*(MPI_MAX_INFO_KEY) keys(6)
+      character*(MPI_MAX_INFO_VAL) values(6)
+      character*(MPI_MAX_INFO_KEY) mykey
+      character*(MPI_MAX_INFO_VAL) myvalue
+!
+      data keys/"Key1", "key2", "KeY3", "A Key With Blanks","See Below", &
+      &          "last"/
+      data values/"value 1", "value 2", "VaLue 3", "key=valu:3","false", &
+      &            "no test"/
+!
+      errs = 0
+
+      call mtest_init( ierr )
+      
+! Note that the MPI standard requires that leading an trailing blanks
+! are stripped from keys and values (Section 4.10, The Info Object)
+!
+! First, create and initialize an info
+      call mpi_info_create( i1, ierr )
+      call mpi_info_set( i1, keys(1), values(1), ierr )
+      call mpi_info_set( i1, keys(2), values(2), ierr )
+      call mpi_info_set( i1, keys(3), values(3), ierr )
+      call mpi_info_set( i1, keys(4), values(4), ierr )
+      call mpi_info_set( i1, " See Below", values(5), ierr )
+      call mpi_info_set( i1, keys(6), " no test ", ierr )
+!
+      call mpi_info_get_nkeys( i1, nkeys, ierr )
+      if (nkeys .ne. 6) then
+         print *, ' Number of keys should be 6, is ', nkeys
+      endif
+      sumindex = 0
+      do i=1, nkeys
+!        keys are number from 0 to n-1, even in Fortran (Section 4.10)
+         call mpi_info_get_nthkey( i1, i-1, mykey, ierr )
+         found = .false.
+         do j=1, 6
+            if (mykey .eq. keys(j)) then
+               found = .true.
+               sumindex = sumindex + j
+               call mpi_info_get_valuelen( i1, mykey, vlen, flag, ierr )
+               if (.not.flag) then
+                  errs = errs + 1
+                  print *, ' no value for key', mykey
+               else
+                  call mpi_info_get( i1, mykey, MPI_MAX_INFO_VAL, &
+      &                               myvalue, flag, ierr )
+                  if (myvalue .ne. values(j)) then
+                     errs = errs + 1
+                     print *, ' Value for ', mykey, ' not expected'
+                  else
+                     do ln=MPI_MAX_INFO_VAL,1,-1
+                        if (myvalue(ln:ln) .ne. ' ') then
+                           if (vlen .ne. ln) then
+                              errs = errs + 1
+                              print *, ' length is ', ln,  &
+      &                          ' but valuelen gave ',  vlen,  &
+      &                          ' for key ', mykey
+                           endif
+                           goto 100
+                        endif
+                     enddo
+ 100                 continue
+                  endif
+               endif
+            endif
+         enddo
+         if (.not.found) then
+            print *, i, 'th key ', mykey, ' not in list'
+         endif
+      enddo
+      if (sumindex .ne. 21) then
+         errs = errs + 1
+         print *, ' Not all keys found'
+      endif
+!
+! delete 2, then dup, then delete 2 more
+      call mpi_info_delete( i1, keys(1), ierr )
+      call mpi_info_delete( i1, keys(2), ierr )
+      call mpi_info_dup( i1, i2, ierr )
+      call mpi_info_delete( i1, keys(3), ierr )
+!
+! check the contents of i2
+! valuelen does not signal an error for unknown keys; instead, sets
+! flag to false
+      do i=1,2
+         flag = .true.
+         call mpi_info_get_valuelen( i2, keys(i), valuelen, flag, ierr )
+         if (flag) then
+            errs = errs + 1
+            print *, ' Found unexpected key ', keys(i)
+         endif
+         myvalue = 'A test'
+         call mpi_info_get( i2, keys(i), MPI_MAX_INFO_VAL,  &
+      &                      myvalue, flag, ierr )
+         if (flag) then
+            errs = errs + 1
+            print *, ' Found unexpected key in MPI_Info_get ', keys(i)
+         else 
+            if (myvalue .ne. 'A test') then
+               errs = errs + 1
+               print *, ' Returned value overwritten, is now ', myvalue
+            endif
+         endif
+         
+      enddo
+      do i=3,6
+         myvalue = ' '
+         call mpi_info_get( i2, keys(i), MPI_MAX_INFO_VAL,  &
+      &                      myvalue, flag, ierr )
+         if (.not. flag) then
+             errs = errs + 1
+             print *, ' Did not find key ', keys(i)
+         else 
+            if (myvalue .ne. values(i)) then
+               errs = errs + 1
+               print *, ' Found wrong value (', myvalue, ') for key ',  &
+      &                  keys(i)
+            endif
+         endif
+      enddo
+!
+!     Free info
+      call mpi_info_free( i1, ierr )
+      call mpi_info_free( i2, ierr )
+
+      call mtest_finalize( errs )
+      call mpi_finalize( ierr )
+
+      end
diff --git a/teshsuite/smpi/mpich3-test/f90/info/infotestf90.f90 b/teshsuite/smpi/mpich3-test/f90/info/infotestf90.f90
new file mode 100644 (file)
index 0000000..05419ab
--- /dev/null
@@ -0,0 +1,57 @@
+! This file created from test/mpi/f77/info/infotestf.f with f77tof90
+! -*- Mode: Fortran; -*- 
+!
+!  (C) 2003 by Argonne National Laboratory.
+!      See COPYRIGHT in top-level directory.
+!
+! Simple info test 
+       program main
+       use mpi
+       integer i1, i2
+       integer i, errs, ierr
+       integer valuelen
+       parameter (valuelen=64)
+       character*(valuelen) value
+       logical flag
+!
+       errs = 0
+
+       call MTest_Init( ierr )
+
+       call mpi_info_create( i1, ierr )
+       call mpi_info_create( i2, ierr )
+
+       call mpi_info_set( i1, "key1", "value1", ierr )
+       call mpi_info_set( i2, "key2", "value2", ierr )
+
+       call mpi_info_get( i1, "key2", valuelen, value, flag, ierr )
+       if (flag) then
+          print *, "Found key2 in info1"
+          errs = errs + 1
+       endif
+
+       call MPI_Info_get( i1, "key1", 64, value, flag, ierr )
+       if (.not. flag ) then
+          print *, "Did not find key1 in info1"
+          errs = errs + 1
+       else 
+          if (value .ne. "value1") then
+             print *, "Found wrong value (", value, "), expected value1"
+             errs = errs + 1
+          else
+!     check for trailing blanks             
+             do i=7,valuelen
+                if (value(i:i) .ne. " ") then
+                   print *, "Found non blank in info value"
+                   errs = errs + 1
+                endif
+             enddo
+          endif
+       endif
+
+       call mpi_info_free( i1, ierr )
+       call mpi_info_free( i2, ierr )
+
+       call MTest_Finalize( errs )
+       call MPI_Finalize( ierr )
+       end
diff --git a/teshsuite/smpi/mpich3-test/f90/info/testlist b/teshsuite/smpi/mpich3-test/f90/info/testlist
new file mode 100644 (file)
index 0000000..9c664b1
--- /dev/null
@@ -0,0 +1,3 @@
+# This file generated by f77tof90
+infotestf90 1
+infotest2f90 1
diff --git a/teshsuite/smpi/mpich3-test/info/CMakeLists.txt b/teshsuite/smpi/mpich3-test/info/CMakeLists.txt
new file mode 100644 (file)
index 0000000..350e83f
--- /dev/null
@@ -0,0 +1,70 @@
+cmake_minimum_required(VERSION 2.6)
+
+if(enable_smpi AND enable_smpi_MPICH3_testsuite)
+  if(WIN32)
+    set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
+  else()
+    set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
+    set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
+  endif()
+
+  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+  
+  include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
+  include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
+
+
+  add_executable(infodel infodel.c)
+  add_executable(infodup infodup.c)
+#  add_executable(infoenv infoenv.c)
+  add_executable(infomany2 infomany2.c)
+  add_executable(infomany infomany.c)
+  add_executable(infoorder infoorder.c)
+  add_executable(infotest infotest.c)
+  add_executable(infovallen infovallen.c)
+
+
+
+  target_link_libraries(infodel simgrid mtest_c)
+  target_link_libraries(infodup simgrid mtest_c)
+#  target_link_libraries(infoenv simgrid mtest_c)
+  target_link_libraries(infomany2 simgrid mtest_c)
+  target_link_libraries(infomany simgrid mtest_c)
+  target_link_libraries(infoorder simgrid mtest_c)
+  target_link_libraries(infotest simgrid mtest_c)
+  target_link_libraries(infovallen simgrid mtest_c)
+
+
+
+
+endif()
+
+set(tesh_files
+  ${tesh_files}
+  PARENT_SCOPE
+  )
+set(xml_files
+  ${xml_files}
+  PARENT_SCOPE
+  )
+set(examples_src
+  ${examples_src}
+ ${CMAKE_CURRENT_SOURCE_DIR}/infodel.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infodup.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infoenv.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infomany2.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infomany.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infoorder.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infotest.c 
+ ${CMAKE_CURRENT_SOURCE_DIR}/infovallen.c 
+  PARENT_SCOPE
+  )
+set(bin_files
+  ${bin_files}
+  PARENT_SCOPE
+  )
+set(txt_files
+  ${txt_files}
+  ${CMAKE_CURRENT_SOURCE_DIR}/testlist
+  PARENT_SCOPE
+  )
diff --git a/teshsuite/smpi/mpich3-test/info/infodel.c b/teshsuite/smpi/mpich3-test/info/infodel.c
new file mode 100644 (file)
index 0000000..a62f362
--- /dev/null
@@ -0,0 +1,83 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ *  (C) 2003 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitest.h"
+#include "mpitestconf.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#define NKEYS 3
+int main( int argc, char *argv[] )
+{
+    int errs = 0;
+    MPI_Info info;
+    char *keys[NKEYS] = { (char*)"file", (char*)"soft", (char*)"host" };
+    char *values[NKEYS] = { (char*)"runfile.txt", (char*)"2:1000:4,3:1000:7", 
+                           (char*)"myhost.myorg.org" };
+    char value[MPI_MAX_INFO_VAL];
+    int i, flag, nkeys;
+
+    MTest_Init( &argc, &argv );
+
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_set( info, keys[i], values[i] );
+    }
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) { 
+       MPI_Info_get( info, keys[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys[i] );
+       }
+       if (strcmp( value, values[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s, got %s expected %s\n", 
+                   keys[i], value, values[i] );
+       }
+    }
+
+    /* Now, change one value and remove another, then check again */
+    MPI_Info_delete( info, keys[NKEYS-1] );
+    MPI_Info_get_nkeys( info, &nkeys );
+    if (nkeys != NKEYS - 1) {
+       errs++;
+       printf( "Deleting a key did not change the number of keys\n" );
+    }
+
+    values[0] = (char*)"backfile.txt";
+    MPI_Info_set( info, keys[0], values[0] );
+    for (i=0; i<NKEYS-1; i++) {
+       MPI_Info_get( info, keys[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "(after reset) No value for key %s\n", keys[i] );
+       }
+       if (strcmp( value, values[i] )) {
+           errs++;
+           printf( "(after reset) Incorrect value for key %s, got %s expected %s\n", 
+                   keys[i], value, values[i] );
+       }
+    }
+
+    MPI_Info_free( &info );
+    if (info != MPI_INFO_NULL) {
+       errs++;
+       printf( "MPI_Info_free should set info to MPI_INFO_NULL\n" );
+    }
+
+    MTest_Finalize( errs );
+    MPI_Finalize();
+    return 0;
+  
+}
diff --git a/teshsuite/smpi/mpich3-test/info/infodup.c b/teshsuite/smpi/mpich3-test/info/infodup.c
new file mode 100644 (file)
index 0000000..b89d020
--- /dev/null
@@ -0,0 +1,82 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ *  (C) 2003 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitest.h"
+#include "mpitestconf.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int main( int argc, char *argv[] )
+{
+    int errs = 0;
+    MPI_Info info1, infodup;
+    int nkeys, nkeysdup, i, vallen, flag, flagdup;
+    char key[MPI_MAX_INFO_KEY], keydup[MPI_MAX_INFO_KEY];
+    char value[MPI_MAX_INFO_VAL], valdup[MPI_MAX_INFO_VAL];
+
+    MTest_Init( &argc, &argv );
+
+    MPI_Info_create( &info1 );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    MPI_Info_set( info1, (char*)"host", (char*)"myhost.myorg.org" );
+    MPI_Info_set( info1, (char*)"file", (char*)"runfile.txt" );
+    MPI_Info_set( info1, (char*)"soft", (char*)"2:1000:4,3:1000:7" );
+
+    MPI_Info_dup( info1, &infodup );
+
+    MPI_Info_get_nkeys( infodup, &nkeysdup );
+    MPI_Info_get_nkeys( info1, &nkeys );
+    if (nkeys != nkeysdup) {
+       errs++;
+       printf( "Dup'ed info has a different number of keys; is %d should be %d\n",
+               nkeysdup, nkeys );
+    }
+    vallen = MPI_MAX_INFO_VAL;
+    for (i=0; i<nkeys; i++) {
+       /* MPI requires that the keys are in the same order after the dup */
+       MPI_Info_get_nthkey( info1, i, key );
+       MPI_Info_get_nthkey( infodup, i, keydup );
+       if (strcmp(key, keydup)) {
+           errs++;
+           printf( "keys do not match: %s should be %s\n", keydup, key );
+       }
+
+       vallen = MPI_MAX_INFO_VAL;
+       MPI_Info_get( info1, key, vallen, value, &flag );
+       MPI_Info_get( infodup, keydup, vallen, valdup, &flagdup );
+       if (!flag || !flagdup) {
+           errs++;
+           printf( "Info get failed for key %s\n", key );
+       }
+       else if (strcmp( value, valdup )) {
+           errs++;
+           printf( "Info values for key %s not the same after dup\n", key );
+       }
+    }
+
+    /* Change info and check that infodup does NOT have the new value 
+       (ensure that lazy dups are still duped) */
+    MPI_Info_set( info1, (char*)"path", (char*)"/a:/b:/c/d" );
+
+    MPI_Info_get( infodup, (char*)"path", vallen, value, &flag );
+    if (flag) {
+       errs++;
+       printf( "inserting path into info changed infodup\n" );
+    }
+    
+    MPI_Info_free( &info1 );
+    MPI_Info_free( &infodup );
+    
+    MTest_Finalize( errs );
+    MPI_Finalize();
+    return 0;
+  
+}
diff --git a/teshsuite/smpi/mpich3-test/info/infoenv.c b/teshsuite/smpi/mpich3-test/info/infoenv.c
new file mode 100644 (file)
index 0000000..ff895c8
--- /dev/null
@@ -0,0 +1,31 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+#include "mpi.h"
+#include <stdio.h>
+
+static int verbose = 0;
+
+int main(int argc, char *argv[])
+{
+    char value[MPI_MAX_INFO_VAL];
+    char *keys[] = { "command", "argv", "maxprocs", "soft", "host", "arch", "wdir", "file",
+                     "thread_level", 0 };
+    int flag, i;
+
+    MPI_Init(NULL, NULL);
+
+    for (i = 0; keys[i]; i++) {
+        MPI_Info_get(MPI_INFO_ENV, keys[i], MPI_MAX_INFO_VAL, value, &flag);
+        if (flag && verbose)
+            printf("command: %s\n", value);
+    }
+
+    printf(" No Errors\n");
+
+    MPI_Finalize();
+    return 0;
+}
diff --git a/teshsuite/smpi/mpich3-test/info/infomany.c b/teshsuite/smpi/mpich3-test/info/infomany.c
new file mode 100644 (file)
index 0000000..c9f8213
--- /dev/null
@@ -0,0 +1,105 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+/* Test of info that makes use of the extended handles */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitest.h"
+#include "mpitestconf.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#ifndef MAX_INFOS
+#define MAX_INFOS 4000
+#endif
+#define MAX_ERRORS 10
+#define info_list 16
+/* #define DBG  */
+
+int main( int argc, char *argv[] )
+{
+    MPI_Info infos[MAX_INFOS];
+    char key[64], value[64];
+    int  errs = 0;
+    int  i, j;
+
+    MTest_Init( &argc, &argv );
+    
+    for (i=0; i<MAX_INFOS; i++) {
+       MPI_Info_create( &infos[i] );
+#ifdef DBG
+       printf( "Info handle is %x\n", infos[i] );
+#endif
+       for (j=0; j<info_list; j++) {
+           sprintf( key, "key%d-%d", i, j );
+           sprintf( value, "value%d-%d", i, j );
+#ifdef DBG
+           printf( "Creating key/value %s=%s\n", key, value );
+#endif
+           MPI_Info_set( infos[i], key, value );
+       }
+#ifdef DBG
+       { int nkeys;
+       MPI_Info_get_nkeys( infos[0], &nkeys );
+       if (nkeys != info_list) {
+           printf( "infos[0] changed at %d info\n", i );}
+       }
+#endif
+    }
+    
+    for (i=0; i<MAX_INFOS; i++) {
+       int nkeys;
+       /*printf( "info = %x\n", infos[i] );
+         print_handle( infos[i] ); printf( "\n" );*/
+       MPI_Info_get_nkeys( infos[i], &nkeys );
+       if (nkeys != info_list) {
+           errs++;
+           if (errs < MAX_ERRORS) {
+               printf( "Wrong number of keys for info %d; got %d, should be %d\n",
+                       i, nkeys, info_list );
+           }
+       }
+       for (j=0; j<nkeys; j++) {
+           char keystr[64];
+           char valstr[64];
+           int  flag;
+           MPI_Info_get_nthkey( infos[i], j, key );
+           sprintf( keystr, "key%d-%d", i, j );
+           if (strcmp( keystr, key ) != 0) {
+               errs++;
+               if (errs < MAX_ERRORS) {
+                   printf( "Wrong key for info %d; got %s expected %s\n", 
+                           i, key, keystr );
+               }
+               continue;
+           }
+           MPI_Info_get( infos[i], key, sizeof(value), value, &flag );
+           if (!flag) {
+               errs++;
+               if (errs < MAX_ERRORS) {
+                   printf( "Get failed to return value for info %d\n", i );
+               }
+               continue;
+           }
+           sprintf( valstr, "value%d-%d", i, j );
+           if (strcmp( valstr, value ) != 0) {
+               errs++;
+               if (errs < MAX_ERRORS) {
+                   printf( "Wrong value for info %d; got %s expected %s\n",
+                           i, value, valstr );
+               }
+           }
+       }
+    }
+    for (i=0; i<MAX_INFOS; i++) {
+       MPI_Info_free( &infos[i] );
+    }
+    
+    MTest_Finalize( errs );
+    MPI_Finalize( );
+    return 0;
+}
diff --git a/teshsuite/smpi/mpich3-test/info/infomany2.c b/teshsuite/smpi/mpich3-test/info/infomany2.c
new file mode 100644 (file)
index 0000000..f400648
--- /dev/null
@@ -0,0 +1,133 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+/* Test of info that makes use of the extended handles, including
+   inserts and deletes */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitest.h"
+#include "mpitestconf.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#ifndef MAX_INFOS
+#define MAX_INFOS 4000
+#endif
+#define MAX_ERRORS 10
+#define info_list 16
+/* #define DBG  */
+
+#ifdef DEBUG
+#define DBGPRINTF(a) printf a; fflush(stdout)
+#else
+#define DBGPRINTF(a)
+#endif
+
+int main( int argc, char *argv[] )
+{
+    MPI_Info infos[MAX_INFOS];
+    char key[64], value[64];
+    int  errs = 0;
+    int  i, j;
+
+    MTest_Init( &argc, &argv );
+
+    /* We create max_info items, then delete the middle third of them,
+       then recreate them, then check them, then 
+       delete them all.  This checks that the MPICH algorithm for 
+       handling large numbers of items works correctly; other MPI 
+       implementations should also be able to handle this */
+
+    /* Create them all */
+    for (i=0; i<MAX_INFOS; i++) {
+       MPI_Info_create( &infos[i] );
+       DBGPRINTF( ( "Info handle is %x\n", infos[i] ) );
+       for (j=0; j<info_list; j++) {
+           sprintf( key, "key%d-%d", i, j );
+           sprintf( value, "value%d-%d", i, j );
+           DBGPRINTF( ( "Creating key/value %s=%s\n", key, value ));
+           MPI_Info_set( infos[i], key, value );
+       }
+#ifdef DBG
+       { int nkeys;
+       MPI_Info_get_nkeys( infos[0], &nkeys );
+       if (nkeys != info_list) {
+           printf( "infos[0] changed at %d info\n", i );}
+       }
+#endif
+    }
+
+    /* Delete the middle set */
+    for (i=MAX_INFOS/3; i<(2*MAX_INFOS/3); i++) {
+       MPI_Info_free( &infos[i] );
+    }
+    
+    /* Recreate the middle set */
+    for (i=MAX_INFOS/3; i<(2*MAX_INFOS/3); i++) {
+       MPI_Info_create( &infos[i] );
+       DBGPRINTF( ( "Info handle is %x\n", infos[i] ) );
+       for (j=0; j<info_list; j++) {
+           sprintf( key, "key%d-%d", i, j );
+           sprintf( value, "value%d-%d", i, j );
+           DBGPRINTF( ( "Creating key/value %s=%s\n", key, value ));
+           MPI_Info_set( infos[i], key, value );
+       }
+    }
+
+    /* Now, check that they are still valid */
+    for (i=0; i<MAX_INFOS; i++) {
+       int nkeys;
+       /*printf( "info = %x\n", infos[i] );
+         print_handle( infos[i] ); printf( "\n" );*/
+       MPI_Info_get_nkeys( infos[i], &nkeys );
+       if (nkeys != info_list) {
+           errs++;
+           if (errs < MAX_ERRORS) {
+               printf( "Wrong number of keys for info %d; got %d, should be %d\n",
+                       i, nkeys, info_list );
+           }
+       }
+       for (j=0; j<nkeys; j++) {
+           char keystr[64];
+           char valstr[64];
+           int  flag;
+           MPI_Info_get_nthkey( infos[i], j, key );
+           sprintf( keystr, "key%d-%d", i, j );
+           if (strcmp( keystr, key ) != 0) {
+               errs++;
+               if (errs < MAX_ERRORS) {
+                   printf( "Wrong key for info %d; got %s expected %s\n", 
+                           i, key, keystr );
+               }
+               continue;
+           }
+           MPI_Info_get( infos[i], key, 64, value, &flag );
+           if (!flag) {
+               errs++;
+               if (errs < MAX_ERRORS) {
+                   printf( "Get failed to return value for info %d\n", i );
+               }
+               continue;
+           }
+           sprintf( valstr, "value%d-%d", i, j );
+           if (strcmp( valstr, value ) != 0) {
+               errs++;
+               if (errs < MAX_ERRORS) {
+                   printf( "Wrong value for info %d; got %s expected %s\n",
+                           i, value, valstr );
+               }
+           }
+       }
+    }
+    for (i=0; i<MAX_INFOS; i++) {
+       MPI_Info_free( &infos[i] );
+    }
+    
+    MTest_Finalize( errs );
+    MPI_Finalize( );
+    return 0;
+}
diff --git a/teshsuite/smpi/mpich3-test/info/infoorder.c b/teshsuite/smpi/mpich3-test/info/infoorder.c
new file mode 100644 (file)
index 0000000..aa1db8c
--- /dev/null
@@ -0,0 +1,166 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ *  (C) 2003 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitest.h"
+#include "mpitestconf.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#define NKEYS 3
+int main( int argc, char *argv[] )
+{
+    int errs = 0;
+    MPI_Info info;
+    char *keys1[NKEYS] = { (char*)"file", (char*)"soft", (char*)"host" };
+    char *values1[NKEYS] = { (char*)"runfile.txt", (char*)"2:1000:4,3:1000:7", 
+                            (char*)"myhost.myorg.org" };
+
+    char value[MPI_MAX_INFO_VAL];
+    int i, flag;
+
+    MTest_Init( &argc, &argv );
+
+    /* 1,2,3 */
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_set( info, keys1[i], values1[i] );
+    }
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_get( info, keys1[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys1[i] );
+       }
+       if (strcmp( value, values1[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s\n", keys1[i] );
+       }
+    }
+    MPI_Info_free( &info );
+
+    /* 3,2,1 */
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    for (i=NKEYS-1; i>=0; i--) {
+       MPI_Info_set( info, keys1[i], values1[i] );
+    }
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_get( info, keys1[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys1[i] );
+       }
+       if (strcmp( value, values1[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s\n", keys1[i] );
+       }
+    }
+    MPI_Info_free( &info );
+
+    /* 1,3,2 */
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    MPI_Info_set( info, keys1[0], values1[0] );
+    MPI_Info_set( info, keys1[2], values1[2] );
+    MPI_Info_set( info, keys1[1], values1[1] );
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_get( info, keys1[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys1[i] );
+       }
+       if (strcmp( value, values1[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s\n", keys1[i] );
+       }
+    }
+    MPI_Info_free( &info );
+
+    /* 2,1,3 */
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    MPI_Info_set( info, keys1[1], values1[1] );
+    MPI_Info_set( info, keys1[0], values1[0] );
+    MPI_Info_set( info, keys1[2], values1[2] );
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_get( info, keys1[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys1[i] );
+       }
+       if (strcmp( value, values1[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s\n", keys1[i] );
+       }
+    }
+    MPI_Info_free( &info );
+
+    /* 2,3,1 */
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    MPI_Info_set( info, keys1[1], values1[1] );
+    MPI_Info_set( info, keys1[2], values1[2] );
+    MPI_Info_set( info, keys1[0], values1[0] );
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_get( info, keys1[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys1[i] );
+       }
+       if (strcmp( value, values1[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s\n", keys1[i] );
+       }
+    }
+    MPI_Info_free( &info );
+    
+    /* 3,1,2 */
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    MPI_Info_set( info, keys1[2], values1[2] );
+    MPI_Info_set( info, keys1[0], values1[0] );
+    MPI_Info_set( info, keys1[1], values1[1] );
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_get( info, keys1[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys1[i] );
+       }
+       if (strcmp( value, values1[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s\n", keys1[i] );
+       }
+    }
+    MPI_Info_free( &info );
+    
+    MTest_Finalize( errs );
+    MPI_Finalize();
+    return 0;
+  
+}
diff --git a/teshsuite/smpi/mpich3-test/info/infotest.c b/teshsuite/smpi/mpich3-test/info/infotest.c
new file mode 100644 (file)
index 0000000..1ce76ae
--- /dev/null
@@ -0,0 +1,56 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2001 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+/* Simple info test */
+
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "mpitestconf.h"
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+int main( int argc, char *argv[] )
+{
+    MPI_Info i1, i2;
+    int errs = 0;
+    char value[64];
+    int flag;
+
+    MPI_Init( &argc, &argv );
+    
+    MPI_Info_create( &i1 );
+    MPI_Info_create( &i2 );
+
+    MPI_Info_set( i1, (char*)"key1", (char*)"value1" );
+    MPI_Info_set( i2, (char*)"key2", (char*)"value2" );
+
+    MPI_Info_get( i1, (char*)"key2", 64, value, &flag );
+    if (flag) {
+       printf( "Found key2 in info1\n" );
+       errs ++;
+    }
+    MPI_Info_get( i1, (char*)"key1", 64, value, &flag );
+    if (!flag) {
+       errs++;
+       printf( "Did not find key1 in info1\n" );
+    }
+    else if (strcmp( value, "value1" )) {
+       errs++;
+       printf( "Found wrong value (%s), expected value1\n", value );
+    }
+
+    MPI_Info_free( &i1 );
+    MPI_Info_free( &i2 );
+    if (errs) {
+       printf( " Found %d errors\n", errs );
+    }
+    else {
+       printf( " No Errors\n" );
+    }
+    MPI_Finalize( );
+    return 0;
+}
diff --git a/teshsuite/smpi/mpich3-test/info/infovallen.c b/teshsuite/smpi/mpich3-test/info/infovallen.c
new file mode 100644 (file)
index 0000000..fdce0e3
--- /dev/null
@@ -0,0 +1,61 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ *  (C) 2003 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+#include "mpi.h"
+#include <stdio.h>
+#include <string.h>
+#include "mpitest.h"
+
+#define NKEYS 3
+int main( int argc, char *argv[] )
+{
+    int errs = 0;
+    MPI_Info info;
+    char *keys[NKEYS] = { (char*)"file", (char*)"soft", (char*)"host" };
+    char *values[NKEYS] = { (char*)"runfile.txt", (char*)"2:1000:4,3:1000:7", 
+                           (char*)"myhost.myorg.org" };
+    char value[MPI_MAX_INFO_VAL];
+    int i, flag, vallen;
+
+    MTest_Init( &argc, &argv );
+
+    MPI_Info_create( &info );
+    /* Use only named keys incase the info implementation only supports
+       the predefined keys (e.g., IBM) */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_set( info, keys[i], values[i] );
+    }
+
+    /* Check that all values are present */
+    for (i=0; i<NKEYS; i++) {
+       MPI_Info_get_valuelen( info, keys[i], &vallen, &flag );
+       if (!flag) {
+           errs++;
+           printf( "get_valuelen failed for valid key %s\n", keys[i] );
+       }
+       MPI_Info_get( info, keys[i], MPI_MAX_INFO_VAL, value, &flag );
+       if (!flag) {
+           errs++;
+           printf( "No value for key %s\n", keys[i] );
+       }
+       if (strcmp( value, values[i] )) {
+           errs++;
+           printf( "Incorrect value for key %s\n", keys[i] );
+       }
+       if (strlen(value) != vallen) {
+           errs++;
+           printf( "value_len returned %d but actual len is %d\n", 
+                   vallen, (int) strlen(value) );
+       }
+    }
+
+    MPI_Info_free( &info );
+    
+    MTest_Finalize( errs );
+    MPI_Finalize();
+    return 0;
+  
+}
diff --git a/teshsuite/smpi/mpich3-test/info/testlist b/teshsuite/smpi/mpich3-test/info/testlist
new file mode 100644 (file)
index 0000000..3ecf7f7
--- /dev/null
@@ -0,0 +1,9 @@
+infodup 1
+infodel 1
+infovallen 1
+infoorder 1
+#need a really working mpi_info_get_nthkey..
+#infomany 1
+#infomany2 1
+infotest 1
+infoenv 1 mpiversion=3.0
index aef3b2c..9904225 100644 (file)
@@ -8,7 +8,7 @@ datatype
 #errhan
 rma
 group
-#info
+info
 init
 #mpi_t
 pt2pt
index 1082e69..22152d3 100644 (file)
@@ -13,6 +13,7 @@
 + \.cproject
 + \.gitignore
 + \.project
++ \.travis.yml
 + COPYRIGHT.template
 + README\.(coding|git)
 + mk_win-dist.sh
diff --git a/tools/stack-cleaner/README b/tools/stack-cleaner/README
new file mode 100644 (file)
index 0000000..3aff70a
--- /dev/null
@@ -0,0 +1,26 @@
+Provides stack-cleaning compilers for x86_64:
+
+ * as
+ * cc
+ * c++
+ * fortran
+
+Each of them modify the generated/given X86_64 assembly by prepending
+stack-cleanup code to each function:
+
+       movq $0x7ffff7ff8000, %r11
+       cmpq %r11, %rsp
+       jbe .Lstack_cleaner_done0
+       movq $QSIZE, %r11
+.Lstack_cleaner_loop0:
+        movq $0, OFFSET(%rsp,%r11,8)
+        subq $1, %r11
+        jne  .Lstack_cleaner_loop0:
+.Lstack_cleaner_done0:
+
+The modification of the assembly is done by the clean-stack-filter
+program.
+
+If the underlying compiler is clang, it might be necessary to add the
+-no-integrated-as flag in order to force the usage of an external
+assembler.
diff --git a/tools/stack-cleaner/as b/tools/stack-cleaner/as
new file mode 100755 (executable)
index 0000000..1a66dd3
--- /dev/null
@@ -0,0 +1,59 @@
+#!/usr/bin/ruby
+# Wrapper around the real `as` which adds filtering capabilities.
+
+require "tempfile"
+require "fileutils"
+
+def wrapped_as(argv)
+
+  args=[]
+  input=nil
+
+  i = 0
+  while i<argv.size
+    case argv[i]
+    when "-o", "-I"
+      args.push(argv[i])
+      args.push(argv[i+1])
+      i = i + 1
+    when /^-/
+      args.push(argv[i])
+    else
+      if input
+        exit 1
+      else
+        input = argv[i]
+      end
+    end
+    i = i + 1
+  end
+
+  if input==nil
+    # We dont handle pipe yet:
+    exit 1
+  end
+
+  # Generate temp file
+  tempfile = Tempfile.new("as-filter")
+  tempfile.close
+  script = File.dirname($0) + "/clean-stack-filter"
+  unless system([script, script], 0 => input, 1 => tempfile.path)
+    status=$?.exitstatus
+    FileUtils.rm tempfile
+    exit status
+  end
+  args.push(tempfile.path)
+
+  # Call the real assembler:
+  res = system("as", *args)
+  status = if res != nil
+             $?.exitstatus
+           else
+             1
+           end
+  FileUtils.rm tempfile
+  exit status
+
+end
+
+wrapped_as(ARGV)
diff --git a/tools/stack-cleaner/c++ b/tools/stack-cleaner/c++
new file mode 100755 (executable)
index 0000000..51082b0
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+path="$(dirname $0)"
+exec "$path"/compiler-wrapper c++ "$@"
diff --git a/tools/stack-cleaner/cc b/tools/stack-cleaner/cc
new file mode 100755 (executable)
index 0000000..d6da0f2
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+path="$(dirname $0)"
+exec "$path"/compiler-wrapper cc "$@"
diff --git a/tools/stack-cleaner/clean-stack-filter b/tools/stack-cleaner/clean-stack-filter
new file mode 100755 (executable)
index 0000000..95a3b52
--- /dev/null
@@ -0,0 +1,70 @@
+#!/usr/bin/perl -w
+# Transform assembly in order to clean each stack frame for X86_64.
+
+use strict;
+$SIG{__WARN__} = sub { die @_ };
+
+
+# Whether we are still scanning the content of a function:
+our $scanproc = 0;
+
+# Save lines of the function:
+our $lines = "";
+
+# Size of the stack for this function:
+our $size = 0;
+
+
+# Counter for assigning unique ids to labels:
+our $id=0;
+
+sub emit_code {
+    my $qsize = $size / 8;
+    my $offset = - $size - 8;
+
+    if($size != 0) {
+      # This is a crude hack to disable the stack cleaning on the main
+      # stack.  It rellies on the fact that the main stack is high in
+      # the address space and the other stacks are in the hap (lower).
+      print("\tmovq \$0x7fff00000000, %r11\n");
+      print("\tcmpq %r11, %rsp\n");
+      print("\tjae .Lstack_cleaner_done$id\n");
+
+      # Loop over the stack frame quadwords and zero it:
+      print("\tmovabsq \$$qsize, %r11\n");
+      print(".Lstack_cleaner_loop$id:\n");
+      print("\tmovq    \$0, $offset(%rsp,%r11,8)\n");
+      print("\tsubq    \$1, %r11\n");
+      print("\tjne     .Lstack_cleaner_loop$id\n");
+      print(".Lstack_cleaner_done$id:\n");
+    }
+
+    print $lines;
+
+    $id = $id + 1;
+    $size = 0;
+    $lines = "";
+    $scanproc = 0;
+}
+
+while (<>) {
+  if ($scanproc) {
+      $lines = $lines . $_;
+      if (m/^[ \t]*.cfi_endproc$/) {
+         emit_code();
+      } elsif (m/^[ \t]*pushq/) {
+         $size += 8;
+      } elsif (m/^[ \t]*subq[\t *]\$([0-9]*),[ \t]*%rsp$/) {
+          my $val = $1;
+          $val = oct($val) if $val =~ /^0/;
+          $size += $val;
+          emit_code();
+      }
+  } elsif (m/^[ \t]*.cfi_startproc$/) {
+      print $_;
+
+      $scanproc = 1;
+  } else {
+      print $_;
+  }
+}
diff --git a/tools/stack-cleaner/compiler-wrapper b/tools/stack-cleaner/compiler-wrapper
new file mode 100755 (executable)
index 0000000..8b8a62f
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/perl -w
+# Compiler wrapper with stack-cleaner support (enabled by default).
+# Usage: ./compiler-wrapper target-compiler args [-f[no-]stack-cleaner]
+
+use File::Basename;
+
+my $compiler = shift(@ARGV);
+
+my $enable = 1;
+
+my @args;
+my $arg;
+while($arg=shift(@ARGV)) {
+  if ($arg eq "-fno-stack-cleaner") {
+    $enable = 0;    
+  } elsif ($arg eq "-fstack-cleaner") {
+    $enable = 1;
+  }
+  else {
+    push @args, $arg;
+  }
+}
+
+if ($enable) {
+  if (basename($0) =~ /^clang/) {
+    unshift @args, "-no-integrated-as"
+  }
+  unshift @args, dirname($0);
+  unshift @args, "-B";
+}
+
+exec $compiler, @args
diff --git a/tools/stack-cleaner/fortran b/tools/stack-cleaner/fortran
new file mode 100755 (executable)
index 0000000..62087fd
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+path="$(dirname $0)"
+exec "$path"/compiler-wrapper gfortran "$@"