![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 2074 阅读 · 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 · 1631 阅读 · 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 · 1017 阅读 · 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 · 1137 阅读 · 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 · 776 阅读 · 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 · 1257 阅读 · 1 评论