Revision [6860]
This is an old revision of Mpi made by ToBo on 2008-12-06 15:12:57.
MPI
MpiBeispiel01
int MPI_Send (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
int MPI_Recv (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status* status)
int MPI_Isend (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request)
int MPI_Irecv (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request* request)
int MPI_Test (MPI_Request* request, int* flag, MPI_Status* status)
int MPI_Wait (MPI_Request* request, MPI_Status* status)
int MPI_Comm_group (MPI_Comm comm, MPI_Group* group)
int MPI_Group_union (MPI_Group group1, MPI_Group group2, MPI_Group* new_group)
int MPI_Group_intersection (MPI_Group group1, MPI_Group group2, MPI_Group* new_group)
int MPI_Group_difference (MPI_Group group1, MPI_Group group2, MPI_Group* new_group)
int MPI_Bcast (void *buffer, int count, MPI_Datatype type, int root, MPI_Comm comm)
int MPI_Gather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Gatherv (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Scatter (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Scatterv (void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Reduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype type, MPI_Op op, int root, MPI_Comm comm)
int MPI_Recv (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status* status)
int MPI_Isend (void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request* request)
int MPI_Irecv (void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request* request)
int MPI_Test (MPI_Request* request, int* flag, MPI_Status* status)
int MPI_Wait (MPI_Request* request, MPI_Status* status)
int MPI_Comm_group (MPI_Comm comm, MPI_Group* group)
int MPI_Group_union (MPI_Group group1, MPI_Group group2, MPI_Group* new_group)
int MPI_Group_intersection (MPI_Group group1, MPI_Group group2, MPI_Group* new_group)
int MPI_Group_difference (MPI_Group group1, MPI_Group group2, MPI_Group* new_group)
int MPI_Bcast (void *buffer, int count, MPI_Datatype type, int root, MPI_Comm comm)
int MPI_Gather (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Gatherv (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int *recvcounts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Scatter (void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Scatterv (void *sendbuf, int *sendcounts, int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
int MPI_Reduce (void *sendbuf, void *recvbuf, int count, MPI_Datatype type, MPI_Op op, int root, MPI_Comm comm)
1. Installation
1.1unter Linux
unter Linux
Quellen herunterladen
./com
make
make install
smpd -install
oder speziell unter Debian
für OpenMPI
aptitude install openmpi-dev openmpi-dbg
und MPICH2
aptitude install mpich-bin libmpich1.0-dev
aptitude install mpi-doc
1.2 unter Windows
unter Windows
MPI 1.0.8
.NET 2.0. SP1
gcc MINGW 32
A) .Net framework 2.0 installieren, falls nicht vorhanden (der MPICh installer startet nicht, wenn .net 2.0 fehlt):
dotnetfx.exe herunterladen und ausführen
B) .Net 2.0 Service pack 1 installieren:
NetFx20_SP1_x86 herunterladen und ausführen
C) MPICH2 installieren
MPICH2 für Windows 32bit herunterladen, ausführen
D) Gcc aus MingW installieren, falls kein anderer C-Compiler vorhanden. Die Installation der neuen Version 1.08 habe ich nur mit Gcc getestet. VisualC++ oder Borland sollten auch funktionieren
E) SMPD als Dienst installieren (smpd -h listet die Optionen):
smpd -install
smpd -register_spn
F) Suchpfad ergänzen (<MINGW_ROOT>/bin und <MPICH2_ROOT>/bin hinzufügen)
G) Das fertige Beispiel testen:
cd <MPICH2_ROOT>/examples
mpirun -n 4 cpi