A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2e54bf1
)
Compilation fix on SMPI with WIN32
author
navarro
<pierre.navarro@imag.fr>
Wed, 24 Oct 2012 20:03:53 +0000
(13:03 -0700)
committer
navarro
<pierre.navarro@imag.fr>
Thu, 25 Oct 2012 17:24:47 +0000
(10:24 -0700)
16 files changed:
examples/smpi/CMakeLists.txt
patch
|
blob
|
history
examples/smpi/MM/CMakeLists.txt
patch
|
blob
|
history
examples/smpi/MM/MM_mpi.c
patch
|
blob
|
history
examples/smpi/NAS/MPI_dummy/mpi_dummy.c
patch
|
blob
|
history
examples/smpi/bcbench.c
patch
|
blob
|
history
examples/smpi/replay/replay.c
patch
|
blob
|
history
examples/smpi/tracing/smpi_traced.c
patch
|
blob
|
history
examples/smpi/tracing/smpi_traced_simple.c
patch
|
blob
|
history
src/smpi/smpicc.in
patch
|
blob
|
history
teshsuite/smpi/CMakeLists.txt
patch
|
blob
|
history
teshsuite/smpi/alltoall2.c
patch
|
blob
|
history
teshsuite/smpi/alltoall_basic.c
patch
|
blob
|
history
teshsuite/smpi/alltoallv.c
patch
|
blob
|
history
teshsuite/smpi/indexed_test.c
patch
|
blob
|
history
teshsuite/smpi/sendrecv.c
patch
|
blob
|
history
teshsuite/smpi/ttest01.c
patch
|
blob
|
history
diff --git
a/examples/smpi/CMakeLists.txt
b/examples/smpi/CMakeLists.txt
index
eaeb8d0
..
70df6b0
100644
(file)
--- a/
examples/smpi/CMakeLists.txt
+++ b/
examples/smpi/CMakeLists.txt
@@
-1,7
+1,11
@@
cmake_minimum_required(VERSION 2.6)
if(enable_smpi)
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}")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
diff --git
a/examples/smpi/MM/CMakeLists.txt
b/examples/smpi/MM/CMakeLists.txt
index
af62a30
..
e4ea2c2
100644
(file)
--- a/
examples/smpi/MM/CMakeLists.txt
+++ b/
examples/smpi/MM/CMakeLists.txt
@@
-2,19
+2,16
@@
cmake_minimum_required(VERSION 2.6)
if(enable_smpi)
set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
if(enable_smpi)
set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/bin/smpicc")
-
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
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
endif()
set(tesh_files
diff --git
a/examples/smpi/MM/MM_mpi.c
b/examples/smpi/MM/MM_mpi.c
index
df0b9bc
..
d112cde
100644
(file)
--- a/
examples/smpi/MM/MM_mpi.c
+++ b/
examples/smpi/MM/MM_mpi.c
@@
-11,11
+11,11
@@
/*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);
*/
/*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 <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");
XBT_LOG_NEW_DEFAULT_CATEGORY(MM_mpi,
"Messages specific for this msg example");
diff --git
a/examples/smpi/NAS/MPI_dummy/mpi_dummy.c
b/examples/smpi/NAS/MPI_dummy/mpi_dummy.c
index
d2cbfb8
..
4cb7f06
100644
(file)
--- a/
examples/smpi/NAS/MPI_dummy/mpi_dummy.c
+++ b/
examples/smpi/NAS/MPI_dummy/mpi_dummy.c
@@
-1,8
+1,6
@@
+#include <stdlib.h>
#include "mpi.h"
#include "wtime.h"
#include "mpi.h"
#include "wtime.h"
-#include <stdlib.h>
-
-
void mpi_error( void )
{
void mpi_error( void )
{
diff --git
a/examples/smpi/bcbench.c
b/examples/smpi/bcbench.c
index
75defac
..
5cd2f64
100644
(file)
--- a/
examples/smpi/bcbench.c
+++ b/
examples/smpi/bcbench.c
@@
-8,6
+8,11
@@
#include <stdlib.h>
#include <mpi.h>
#include <stdlib.h>
#include <mpi.h>
+#ifdef _WIN32
+ #define srandom srand
+ #define random rand
+#endif
+
#define GETTIMEOFDAY_ERROR 1
#define N_START 1
#define GETTIMEOFDAY_ERROR 1
#define N_START 1
diff --git
a/examples/smpi/replay/replay.c
b/examples/smpi/replay/replay.c
index
3aad3c2
..
f508f9d
100644
(file)
--- a/
examples/smpi/replay/replay.c
+++ b/
examples/smpi/replay/replay.c
@@
-4,6
+4,7
@@
/* 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. */
/* 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[])
#include "smpi/smpi.h"
int main(int argc, char *argv[])
diff --git
a/examples/smpi/tracing/smpi_traced.c
b/examples/smpi/tracing/smpi_traced.c
index
f23bb7b
..
6c9e8fe
100644
(file)
--- a/
examples/smpi/tracing/smpi_traced.c
+++ b/
examples/smpi/tracing/smpi_traced.c
@@
-4,8
+4,8
@@
/* 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. */
/* 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 <stdio.h>
+#include "mpi.h"
#include "instr/instr.h"
#define DATATOSENT 100000
#include "instr/instr.h"
#define DATATOSENT 100000
diff --git
a/examples/smpi/tracing/smpi_traced_simple.c
b/examples/smpi/tracing/smpi_traced_simple.c
index
1de1115
..
ff92c0e
100644
(file)
--- a/
examples/smpi/tracing/smpi_traced_simple.c
+++ b/
examples/smpi/tracing/smpi_traced_simple.c
@@
-3,8
+3,9
@@
/* 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. */
/* 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 <stdio.h>
+#include <mpi.h>
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
diff --git
a/src/smpi/smpicc.in
b/src/smpi/smpicc.in
index
a1d1de1
..
c5627b3
100755
(executable)
--- a/
src/smpi/smpicc.in
+++ b/
src/smpi/smpicc.in
@@
-1,11
+1,17
@@
#! /bin/bash
CC=@CMAKE_C_COMPILER@
#! /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@"
CMAKE_LINKARGS="-L@CMAKE_LINKARGS@"
+
+if [ @WIN32@ != 1 ]; then
LINKARGS="-lsimgrid -lsmpi -lm"
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
CMDLINE=""
while [ -n "$1" ]; do
diff --git
a/teshsuite/smpi/CMakeLists.txt
b/teshsuite/smpi/CMakeLists.txt
index
6d9731a
..
0396a4a
100644
(file)
--- a/
teshsuite/smpi/CMakeLists.txt
+++ b/
teshsuite/smpi/CMakeLists.txt
@@
-1,10
+1,14
@@
cmake_minimum_required(VERSION 2.6)
if(enable_smpi)
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}")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-
+
include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
add_executable(alltoall2 alltoall2.c )
include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
add_executable(alltoall2 alltoall2.c )
@@
-19,7
+23,6
@@
if(enable_smpi)
add_executable(scatter scatter.c)
add_executable(reduce reduce.c)
add_executable(split split.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)
add_executable(smpi_sendrecv sendrecv.c)
add_executable(ttest01 ttest01.c)
add_executable(vector_test vector_test.c)
@@
-39,7
+42,6
@@
if(enable_smpi)
target_link_libraries(scatter m simgrid smpi )
target_link_libraries(reduce m simgrid smpi )
target_link_libraries(split m simgrid smpi )
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(smpi_sendrecv m simgrid smpi )
target_link_libraries(ttest01 m simgrid smpi )
target_link_libraries(vector_test m simgrid smpi )
@@
-48,8
+50,15
@@
if(enable_smpi)
target_link_libraries(struct_test m simgrid smpi )
set_target_properties(smpi_sendrecv PROPERTIES RENAME sendrecv)
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()
endif()
+
set(tesh_files
${tesh_files}
${CMAKE_CURRENT_SOURCE_DIR}/bcast.tesh
set(tesh_files
${tesh_files}
${CMAKE_CURRENT_SOURCE_DIR}/bcast.tesh
diff --git
a/teshsuite/smpi/alltoall2.c
b/teshsuite/smpi/alltoall2.c
index
ef2068e
..
34e5912
100644
(file)
--- a/
teshsuite/smpi/alltoall2.c
+++ b/
teshsuite/smpi/alltoall2.c
@@
-34,12
+34,11
@@
****************************************************************************
*/
****************************************************************************
*/
-#include "mpi.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
-
+#include "mpi.h"
#define MAXLEN 10000
#define MAXLEN 10000
diff --git
a/teshsuite/smpi/alltoall_basic.c
b/teshsuite/smpi/alltoall_basic.c
index
485752e
..
ad25e7a
100644
(file)
--- a/
teshsuite/smpi/alltoall_basic.c
+++ b/
teshsuite/smpi/alltoall_basic.c
@@
-4,11
+4,11
@@
/* 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. */
/* 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 <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
+#include "mpi.h"
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
diff --git
a/teshsuite/smpi/alltoallv.c
b/teshsuite/smpi/alltoallv.c
index
492db4e
..
f2717b9
100644
(file)
--- a/
teshsuite/smpi/alltoallv.c
+++ b/
teshsuite/smpi/alltoallv.c
@@
-3,11
+3,11
@@
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
* (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 <string.h>
#include <stdlib.h>
#include <stdio.h>
+#include "mpi.h"
/*
This program tests MPI_Alltoallv by having processor i send different
/*
This program tests MPI_Alltoallv by having processor i send different
diff --git
a/teshsuite/smpi/indexed_test.c
b/teshsuite/smpi/indexed_test.c
index
e557575
..
3afb440
100644
(file)
--- a/
teshsuite/smpi/indexed_test.c
+++ b/
teshsuite/smpi/indexed_test.c
@@
-1,5
+1,5
@@
-#include "mpi.h"
#include <stdio.h>
#include <stdio.h>
+#include "mpi.h"
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
diff --git
a/teshsuite/smpi/sendrecv.c
b/teshsuite/smpi/sendrecv.c
index
ae9e297
..
1e4962d
100644
(file)
--- a/
teshsuite/smpi/sendrecv.c
+++ b/
teshsuite/smpi/sendrecv.c
@@
-4,8
+4,8
@@
/* 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. */
/* 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 <stdio.h>
+#include "mpi.h"
static int test(int myid, int numprocs)
{
static int test(int myid, int numprocs)
{
diff --git
a/teshsuite/smpi/ttest01.c
b/teshsuite/smpi/ttest01.c
index
ada55b9
..
981d2a2
100644
(file)
--- a/
teshsuite/smpi/ttest01.c
+++ b/
teshsuite/smpi/ttest01.c
@@
-4,8
+4,8
@@
/* 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. */
/* 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 <stdio.h>
+#include "mpi.h"
#include "instr/instr.h"
#define DATATOSENT 100000000
#include "instr/instr.h"
#define DATATOSENT 100000000