return smpi_process()->index();
}
+void * smpi_process_get_user_data(){
+ return smpi_process()->get_user_data();
+}
+
+void smpi_process_set_user_data(void *data){
+ return smpi_process()->set_user_data(data);
+}
+
int smpi_global_size()
{
return false;
}
+void Process::set_user_data(void *data)
+{
+ data_ = data;
+}
+
+void *Process::get_user_data()
+{
+ return data_;
+}
+
smx_actor_t Process::process(){
return process_;
}
MPI_Comm comm_self_ = MPI_COMM_NULL;
MPI_Comm comm_intra_ = MPI_COMM_NULL;
MPI_Comm* comm_world_ = nullptr;
+ void* data_ = nullptr; /* user data */
int index_ = MPI_UNDEFINED;
char state_;
int sampling_ = 0; /* inside an SMPI_SAMPLE_ block? */
void mark_as_initialized();
void set_replaying(bool value);
bool replaying();
+ void set_user_data(void *data);
+ void *get_user_data();
smpi_trace_call_location_t* call_location();
int index();
MPI_Comm comm_world();
include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
foreach(x coll-allgather coll-allgatherv coll-allreduce coll-alltoall coll-alltoallv coll-barrier coll-bcast
coll-gather coll-reduce coll-reduce-scatter coll-scatter macro-sample pt2pt-dsend pt2pt-pingpong
- type-hvector type-indexed type-struct type-vector bug-17132 timers )
+ type-hvector type-indexed type-struct type-vector bug-17132 timers privatization )
add_executable (${x} ${x}/${x}.c)
target_link_libraries(${x} simgrid)
set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
${CMAKE_CURRENT_SOURCE_DIR}/coll-allreduce/coll-allreduce-automatic.tesh
${CMAKE_CURRENT_SOURCE_DIR}/coll-alltoall/clusters.tesh
${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/broken_hostfiles.tesh
- ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/TI_output.tesh PARENT_SCOPE)
+ ${CMAKE_CURRENT_SOURCE_DIR}/pt2pt-pingpong/TI_output.tesh
+ ${CMAKE_CURRENT_SOURCE_DIR}/privatization/privatization_dlopen.tesh PARENT_SCOPE)
set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/hostfile
${CMAKE_CURRENT_SOURCE_DIR}/hostfile_cluster
${CMAKE_CURRENT_SOURCE_DIR}/hostfile_coll
# Extra pt2pt pingpong test: broken usage ti-tracing
ADD_TESH_FACTORIES(tesh-smpi-broken "thread" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong broken_hostfiles.tesh)
ADD_TESH(tesh-smpi-replay-ti-tracing --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/pt2pt-pingpong --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/pt2pt-pingpong TI_output.tesh)
+
+ # Simple privatization tests
+ if(HAVE_PRIVATIZATION)
+ ADD_TESH_FACTORIES(tesh-smpi-privatization-mmap "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/privatization --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/privatization privatization.tesh)
+ endif()
+
+ ADD_TESH_FACTORIES(tesh-smpi-privatization-dlopen "thread;ucontext;raw;boost" --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/smpi/privatization --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/privatization privatization_dlopen.tesh)
+
endif()
--- /dev/null
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <mpi.h>
+
+
+static int myvalue = 0;
+
+int main(int argc, char **argv)
+{
+ int me;
+
+ MPI_Init(&argc, &argv);
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &me);
+
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ myvalue = me;
+
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ if(myvalue!=me)
+ printf("Privatization error - %d != %d\n", myvalue, me);
+ MPI_Finalize();
+ return 0;
+}
--- /dev/null
+p Test privatization
+! setenv LD_LIBRARY_PATH=../../lib
+! timeout 5
+$ ${bindir:=.}/../../../smpi_script/bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 32 ${bindir:=.}/privatization --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning --cfg=smpi/privatization:1
+> You requested to use 32 processes, but there is only 5 processes in your hostfile...
--- /dev/null
+p Test privatization with dlopen
+! setenv LD_LIBRARY_PATH=../../lib
+! timeout 5
+$ ${bindir:=.}/../../../smpi_script/bin/smpirun -hostfile ../hostfile -platform ../../../examples/platforms/small_platform.xml -np 32 ${bindir:=.}/privatization --log=smpi_kernel.thres:warning --log=xbt_cfg.thres:warning --cfg=smpi/privatization:dlopen
+> You requested to use 32 processes, but there is only 5 processes in your hostfile...