登录
首页 » 算法 » 基于mpi的矩阵相乘的并行算法

基于mpi的矩阵相乘的并行算法

于 2023-03-04 发布 文件大小:1.38 kB
0 228
下载积分: 2 下载次数: 1

代码说明:

使用MPI做并行计算时,根据程序的具体要求,可按任务进行分配或数据进行分配。根据矩阵乘积的特点,这里按数据进行分配,即每个计算机节点计算不同的数据,由于矩阵数据的特点,这里按行进行数据分块。矩阵乘法在于对矩阵进行分块,然后交由各进程执行,最后将计算结果传递给主进程。 假设是M*N,计算前,将矩阵N发送给所有从进程,然后将矩阵M分块,将M中数据按行分给各从进程,在从进程中计算M中部分行数据和N的乘积,最后将结果发送给主进程。这里为了方便,有多少进程,就将M分了多少块,除最后一块外的其他数据块大小都相等,最后一块是剩下的数据,大小大于等于其他数据块大小,因为矩阵行数不一定整除进程数。最后一块数据在主进程中计算,其他的在从进程中计算。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • objective function for the solution of optimization problem, the objective funct...
    用于解决目标函数的最优化问题,目标函数自编,在vc++6.0中运行通过-objective function for the solution of optimization problem, the objective function writing, the vc++6.0 running through
    2022-05-24 20:22:06下载
    积分:1
  • 数值分析jacobi方
    数值分析算法jacobi方法-numerical analysis algorithm Jacobi method
    2022-03-03 02:40:23下载
    积分:1
  • 用蒙特卡罗方求积分的小程序,可以设置求解精度
    用蒙特卡罗方法求积分的小程序,可以设置求解精度-using the Monte Carlo method for the integration of small procedures, the setting up of Accuracy
    2022-12-06 16:30:02下载
    积分:1
  • 用最小二乘求矩形区域上的N*M个数据点的拟合曲面。
    用最小二乘法求矩形区域上的N*M个数据点的拟合曲面。-Least square method for rectangular area on the N* M data points of the fitting surface.
    2022-02-14 01:32:42下载
    积分:1
  • 旅行salseman问题上的去噪方实现…
    Implemantation of the noising method algorithm for traveller salseman problem on java.
    2022-03-03 12:22:25下载
    积分:1
  • algoritmo de Dijkstra implementado EN C + +
    应用背景EL algoritmo de Dijkstra,tambiéN llamado de algoritmo卡米诺斯MíNiMoS,Es Un algoritmo对位La determinación del Camino Má的联合国Corto墙裙Vértice俄利根Al Resto de洛斯Vértices EN联合国grafo CON比索EN CADA芒。苏“硒refiere一Edsger Dijkstra,谁瞧describióPOR西甲查韦斯EN 1959。香格里拉的想法subyacente恩埃斯algoritmo consiste恩红外王子托多斯洛杉矶大街Má的cortos阙Parten del Vértice俄利根Y阙llevan一待办事项洛杉矶DEMáS Vértices;当SE obtiene El Camino Mádesde EL的战争Vértice俄利根,Al Resto Vértices阙埃尔grafo组成,ELalgoritmo SE detiene。埃尔algoritmo ES UNA especialización de la Búsqueda德肋均匀,Y科莫塔尔,没有funciona EN grafos CON阿里斯塔斯de介绍negativo(Al elegir SIEMPRE CON EL不是DISTANCIA弟弟,可以在现在quedar de la Búsqueda诺德斯阙恩公关óximas iteracionesbajaríEL肋一般del Camino al Pasar Por Una芒CON肋negativo)。关键技术dirigido ponderado teniendo联合国grafo N诺德斯没有aislados,海X EL实际工作,联合国矢量D德多摩ñO N和消费á最终del algoritmo拉斯维加斯distancias从x Al Resto de los诺德斯。所有的inicializar拉斯维加斯distancias EN D反对联合国英勇Infinito雷拉蒂沃鸦鹊儿desconocidas原则,exceptuando LA的X阙本身必须colocar EN 0 debido一阙LA DISTANCIA X X S
    2022-06-16 23:42:21下载
    积分:1
  • 用C编写的一些math函数
    用C编写的一些math函数-prepared by the math function
    2023-06-14 06:20:04下载
    积分:1
  • computer control Lawes list achieve
    计算机控制--劳斯表实现-computer control Lawes list achieve
    2022-08-11 15:15:50下载
    积分:1
  • dxf 读取
    应用背景Build Instructions: Make sure you have autoconf, swig, texinfo, python-dev, build-essential packages or equivalent installed via your package manager. cd libredwg ./autogen.sh && ./configure && make && sudo make install cd ../dxflib ./configure && make && sudo make install cd .. Once the above dependencies have been built, edit /usr/local/include/dwg.h, and rename the THICKNESS constant (or add _ to end). It conflicts with another constant included in the converter, but is not used itself. After that, just run "make". That"s it! 关键技术GNU LibreDWG 是一个免费开源的 C 库用来处理 DWG 文件,这
    2022-12-18 16:30:03下载
    积分:1
  • 机常用数值计与程序(C++),主要用于科学计中的复数运,多项式与连分式计,矩阵运,矩阵特征值与特征向量的计,线性方程组求解,非线性方程(组)...
    计算机常用数值计算算法与程序(C++),主要用于科学计算中的复数运算,多项式与连分式计算,矩阵运算,矩阵特征值与特征向量的计算,线性方程组求解,非线性方程(组)求解,插值,数值积分,常微分方程(组)求解,数值拟合与逼近,数据处理与回归分析,极值等。 -Commonly used computer algorithms and numerical procedures (C++), Mainly used for scientific computing complex in the computation, polynomials and continued fractions calculation, matrix operations, matrix eigenvalue and eigenvector calculation, solving linear equations , non-linear equation (group) to solve, interpolation, numerical integration, ordinary differential equations (group) to solve, numerical simulation and approximation, data processing and regression analysis, extreme value, etc..
    2022-05-22 17:21:07下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载