src/replay/replay
src/testall
+teshsuite/bug-17132/bug-17132
teshsuite/smpi/allgather_coll
teshsuite/smpi/allgatherv_coll
teshsuite/smpi/allreduce_coll
ADD_TEST(smpi-struct-thread ${TESH_COMMAND} ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/struct.tesh)
ADD_TEST(smpi-pt2pt-thread ${TESH_COMMAND} ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt.tesh)
ADD_TEST(smpi-compute-thread ${TESH_COMMAND} ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/compute.tesh)
+
+ # https://gforge.inria.fr/tracker/index.php?func=detail&aid=17132&group_id=12&atid=165
+ ADD_TEST(smpi-bug-17132 ${TESH_COMMAND} ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/bug-17132 ${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132.tesh)
+
if (NOT WIN32)
ADD_TEST(smpi-shared-thread ${TESH_COMMAND} ${TESH_OPTION} --cfg contexts/factory:thread --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/shared.tesh)
endif()
add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/partask)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simdag/platforms)
+add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132)
+
add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/simix)
add_subdirectory(${CMAKE_HOME_DIRECTORY}/teshsuite/smpi)
--- /dev/null
+cmake_minimum_required(VERSION 2.6)
+
+if(enable_smpi)
+ 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")
+ endif()
+
+
+ set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
+
+ add_executable(bug-17132 ${CMAKE_HOME_DIRECTORY}/teshsuite/bug-17132/bug-17132.c)
+ target_link_libraries(bug-17132 simgrid)
+
+ set(tesh_files
+ ${tesh_files}
+ ${CMAKE_CURRENT_SOURCE_DIR}/bug-17132.tesh
+ PARENT_SCOPE)
+ set(xml_files
+ ${xml_files}
+ ${CMAKE_CURRENT_SOURCE_DIR}/small_platform.xml
+ PARENT_SCOPE)
+ set(teshsuite_src
+ ${teshsuite_src}
+ ${CMAKE_CURRENT_SOURCE_DIR}/bug-17132.c
+ PARENT_SCOPE)
+ set(bin_files
+ ${bin_files}
+ PARENT_SCOPE)
+ set(txt_files
+ ${txt_files}
+ ${CMAKE_CURRENT_SOURCE_DIR}/hostfile.txt
+ PARENT_SCOPE)
+
+endif(enable_smpi)
--- /dev/null
+This is the bug #17132 described on gforge [1]. This small SMPI code
+triggers an issue in SURF, which is still to be debugged.
+
+The problem seems to be related to the order of events, as changing it
+(with another platform or another message size or a MPI_barrier in
+between) fixes the problem.
+
+[1] https://gforge.inria.fr/tracker/index.php?func=detail&aid=17132&group_id=12&atid=165
\ No newline at end of file
--- /dev/null
+#include "xbt/log.h"
+#include <stdio.h>
+#include <mpi.h>
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(MM_mpi, "Messages for this SMPI test");
+
+int main(int argc, char ** argv)
+{
+ size_t err;
+ size_t M = 8*1024;
+ size_t N = 32*1024;
+
+ MPI_Init(&argc, &argv);
+
+ double *a = malloc(sizeof(double) * M);
+ double *b = malloc(sizeof(double) * N);
+
+ // A broadcast
+ err = MPI_Bcast(a, M, MPI_DOUBLE, 0, MPI_COMM_WORLD);
+ if (err != MPI_SUCCESS) {
+ perror("Error Bcast A\n"); MPI_Finalize(); exit(-1);
+ }
+
+// Uncommenting this barrier fixes it!
+// MPI_Barrier(MPI_COMM_WORLD);
+
+ // Another broadcast
+ err = MPI_Bcast(b, N, MPI_DOUBLE, 0, MPI_COMM_WORLD );
+ if (err != MPI_SUCCESS) {
+ perror("Error Bcast B\n"); MPI_Finalize(); exit(-1);
+ }
+
+ // Commenting out this barrier fixes it!!
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ MPI_Finalize();
+ free(a);
+ free(b);
+ return 0;
+}
--- /dev/null
+$ smpirun -np 16 -platform small_platform.xml -hostfile hostfile.txt ./bug-17132
+> (some sensible output)
\ No newline at end of file
--- /dev/null
+host1
+host2
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version='3'>
+ <AS id='AS0' routing='Full'>
+
+ <host id='host1' power='1.0'/>
+ <host id='host2' power='1.0'/>
+ <link id='link' bandwidth='1e+10' latency='1e-09'/>
+
+ <route src='host1' dst='host2' symmetrical="YES">
+ <link_ctn id='link'/>
+ </route>
+
+ </AS>
+</platform>