cmake_minimum_required(VERSION 2.6)
if(enable_smpi)
- set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
+ if(WIN32)
+ set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
+ else(WIN32)
+ set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
+ endif(WIN32)
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
if(enable_smpi)
set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
-
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
-add_executable(MM_mpi MM_mpi.c 2.5D_MM.c Summa.c Matrix_init.c)
-
-### Add definitions for compile
-if(NOT WIN32)
- target_link_libraries(MM_mpi simgrid pthread m smpi)
-else()
- target_link_libraries(MM_mpi simgrid smpi)
-endif()
+ if(NOT WIN32)
+ add_executable(MM_mpi MM_mpi.c 2.5D_MM.c Summa.c Matrix_init.c)
+ ### Add definitions for compile
+ target_link_libraries(MM_mpi simgrid pthread m smpi)
+ else()
+ target_link_libraries(MM_mpi simgrid smpi)
+ endif()
endif()
set(tesh_files
/*int sched_setaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask);
int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *mask);
*/
+#include <stdio.h>
+#include <string.h>
#include <mpi.h>
#include <math.h>
#include <getopt.h>
-#include <stdio.h>
-#include <string.h>
XBT_LOG_NEW_DEFAULT_CATEGORY(MM_mpi,
"Messages specific for this msg example");
+#include <stdlib.h>
#include "mpi.h"
#include "wtime.h"
-#include <stdlib.h>
-
-
void mpi_error( void )
{
#include <stdlib.h>
#include <mpi.h>
+#ifdef _WIN32
+ #define srandom srand
+ #define random rand
+#endif
+
#define GETTIMEOFDAY_ERROR 1
#define N_START 1
/* 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 <stdio.h>
#include "smpi/smpi.h"
int main(int argc, char *argv[])
/* 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 "mpi.h"
#include <stdio.h>
+#include "mpi.h"
#include "instr/instr.h"
#define DATATOSENT 100000
/* 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 <mpi.h>
+
#include <stdio.h>
+#include <mpi.h>
int main(int argc, char *argv[])
{
#! /bin/bash
CC=@CMAKE_C_COMPILER@
-CFLAGS="-O2 -Dmain=smpi_simulated_main"
-INCLUDEARGS="-I@includedir@ -I@includedir@/smpi"
+INCLUDEARGS="-I@includedir@ -I@includedir@/smpi -I@CMAKE_BINARY_DIR@/include"
CMAKE_LINKARGS="-L@CMAKE_LINKARGS@"
+
+if [ @WIN32@ != 1 ]; then
LINKARGS="-lsimgrid -lsmpi -lm"
+CFLAGS="-O2 -Dmain=smpi_simulated_main"
+else
+CFLAGS="-O2 -include @includedir@/smpi/smpi_main.h"
+LINKARGS="@CMAKE_BINARY_DIR@\lib\libsimgrid.dll @CMAKE_BINARY_DIR@\lib\libsmpi.dll"
+fi
CMDLINE=""
while [ -n "$1" ]; do
cmake_minimum_required(VERSION 2.6)
if(enable_smpi)
- set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
-
+ if(WIN32)
+ set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
+ else(WIN32)
+ set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
+ endif(WIN32)
+
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
+
include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
add_executable(alltoall2 alltoall2.c )
add_executable(scatter scatter.c)
add_executable(reduce reduce.c)
add_executable(split split.c)
- add_executable(dsend dsend.c)
add_executable(smpi_sendrecv sendrecv.c)
add_executable(ttest01 ttest01.c)
add_executable(vector_test vector_test.c)
target_link_libraries(scatter m simgrid smpi )
target_link_libraries(reduce m simgrid smpi )
target_link_libraries(split m simgrid smpi )
- target_link_libraries(dsend m simgrid smpi )
target_link_libraries(smpi_sendrecv m simgrid smpi )
target_link_libraries(ttest01 m simgrid smpi )
target_link_libraries(vector_test m simgrid smpi )
target_link_libraries(struct_test m simgrid smpi )
set_target_properties(smpi_sendrecv PROPERTIES RENAME sendrecv)
+
+ if(NOT WIN32)
+ add_executable(dsend dsend.c)
+ target_link_libraries(dsend m simgrid smpi )
+ endif()
+
endif()
+
set(tesh_files
${tesh_files}
${CMAKE_CURRENT_SOURCE_DIR}/bcast.tesh
****************************************************************************
*/
-#include "mpi.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
-
+#include "mpi.h"
#define MAXLEN 10000
/* 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 "mpi.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include "mpi.h"
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
-#include "mpi.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
+#include "mpi.h"
/*
This program tests MPI_Alltoallv by having processor i send different
-#include "mpi.h"
#include <stdio.h>
+#include "mpi.h"
int main(int argc, char *argv[])
{
/* 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 "mpi.h"
#include <stdio.h>
+#include "mpi.h"
static int test(int myid, int numprocs)
{
/* 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 "mpi.h"
#include <stdio.h>
+#include "mpi.h"
#include "instr/instr.h"
#define DATATOSENT 100000000