mpi
楼边斜月为明
学习记录,出错之处,还望指出
展开
-
mpi_allgather实现
#include "mpi.h"#include <stdio.h>#define dataLength 32void mpi_allgatherSelfImpl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datat原创 2016-12-08 09:48:11 · 2040 阅读 · 0 评论 -
mpi comm 划分
Maybe it can‘t be run ,but it just provides a thinking way and mpi api overview.#include "mpi.h"#include <stdio.h>#include <unistd.h>#define nodeNameLength 20int main(int argc, char *argv[]){原创 2016-12-17 09:56:01 · 1590 阅读 · 0 评论 -
mpi 通信域划分不完整版
#include "mpi.h"#include <stdio.h>#include <unistd.h>#define nodeNameLength 20int main(int argc, char *argv[]){ int rank,nproc; MPI_Init( &argc, &argv ); MPI_Comm_size( MPI_COMM_WOR原创 2016-12-17 11:39:15 · 1006 阅读 · 0 评论 -
mpi错误
int nproc;MPI_Comm_size( MPI_COMM_WORLD, &nproc);MPI_Comm_rank( MPI_COMM_WORLD, &rank);int allName[nproc];int num=rank+1; MPI_Gather(&num, 1, MPI_INT, allName,nproc, MPI_INT, 0,MPI_COMM_WORLD); i原创 2016-12-17 17:01:25 · 1006 阅读 · 0 评论 -
#pragma omp threadprivate(alpha)
#include <omp.h>int alpha[10],beta[10],i;#pragma omp threadprivate(alpha)main(){/* first parallel region */#pragma omp parallel private(i,beta){ int id ; id = omp_get_thread_num(); for(i=原创 2016-12-30 09:54:43 · 761 阅读 · 0 评论 -
fox 算法 mpi 实现
#include <stdio.h>#include <stdlib.h>#include <time.h>#include<math.h>#include <string.h>#include "mpi.h"#define matrixLength 8#define matrixMaxValue 50void initialMatrix(int matrixA[matrixLeng原创 2016-12-20 21:46:01 · 1233 阅读 · 1 评论