A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use for push_as and get_as for dynar
[simgrid.git]
/
examples
/
smpi
/
split.c
diff --git
a/examples/smpi/split.c
b/examples/smpi/split.c
index f451b877af76eb8286323339cdb2bcdce3652498..a3bb58fd6318b840fa661cfc5d0d1c74cc9e71d0 100644
(file)
--- a/
examples/smpi/split.c
+++ b/
examples/smpi/split.c
@@
-1,10
+1,18
@@
+/* Copyright (c) 2009, 2010. 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 <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[])
{
#include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[])
{
- int worldrank, localrank;
+ int worldrank;
+ int localrank;
MPI_Comm localcomm;
MPI_Comm localcomm;
+
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &worldrank);
MPI_Comm_split(MPI_COMM_WORLD, worldrank % 2, worldrank, &localcomm);
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &worldrank);
MPI_Comm_split(MPI_COMM_WORLD, worldrank % 2, worldrank, &localcomm);