1、环境搭建

终端:sudo apt-get install mpich2

安装的是mpich2的1.4.1版本。

2、编译

终端:mpicc mpi_hello.c -g -Wall -o mpi_hello

3、运行

终端:mpiexec -n <number of processes> ./mpi_hello

例:用4个进程运行程序

mpiexec -n 4 ./mpi_hello

【并行】Ubuntu安装MPI库的更多相关文章

  1. ubuntu 安装 RPostgreSQL 库

    其实大家在Linux 的R 中安装其他库,完全可以使用R 自带的安装方式,只是这个 RPostgreSQL 库需要用到 postgresql 的lib 库与include 头文件,所以才有若干个步骤去 ...

  2. Ubuntu 安装boost 库

    使用 apt-get进行安装 sudo apt-get install libboost-dev

  3. Ubuntu安装usb库

    sudo pip install pyserial sudo pip install pyusb

  4. 在Ubuntu上安装boost库[转]

    在编译kenlm的时候需要安装boost,去官网下载boost安装包,然后按照以下步骤安装. boost官网 -----------------以下内容,网上转载------------------- ...

  5. ubuntu 下安装boost库

    ubuntu下安装boost库,,在网上试了一些其他人推荐的libboost-dev 但是会缺少,编译程序会报错: /usr/bin/ld: cannot find -lboost_serializa ...

  6. Ubuntu 16.04 安装PCL库以及测试

    参考链接:https://blog.csdn.net/dantengc/article/details/78446600 参考博客,官网一直安装不成功,后来参照一篇博客终于安装成功了,记录如下. 1. ...

  7. Ubuntu安装MySQL和Python库MySQLdb步骤

    一.安装MySQL服务器和客户端 执行以下命令: sudo apt-get install mysql-server-5.6 mysql-client-5.6 sudo apt-get install ...

  8. Ubuntu下dlib库编译安装

    安装libboost 按照dlib的说明安装始终不成功,参考machine learning is fun作者的指导installing_dlib_on_macos_for_python.md,需要首 ...

  9. Ubuntu 安装MySQL报共享库找不到

    错误信息1: ./mysqld: error : cannot open shared object file: No such file or directory 解决办法:安装改库 # apt-g ...

随机推荐

  1. RocketMQ 自定义文件路径

    一 .1. 修改store路径2. 修改logs路径3. 修改rmq_bk_gc.log路径4. 修改rmq_srv_gc.log路径二 .1. 获取正确的rocketmq 源码2. 地址:https ...

  2. [转]分布式中使用Redis实现Session共享(二)

    本文转自:http://www.cnblogs.com/yanweidie/p/4678095.html 上一篇介绍了一些redis的安装及使用步骤,本篇开始将介绍redis的实际应用场景,先从最常见 ...

  3. [leetcode] 5. Minimum Depth of Binary Tree

    二叉树基本功练习题,题目如下: Given a binary tree, find its minimum depth. The minimum depth is the number of node ...

  4. 使用Docker部署ASP.NET Core应用程序实践

    前言 最近把很火的Docker给看了,于是就磨拳擦掌要去实践一下.于是就拿之前一个aps.net core的项目(已被停止)去练手.该项目之前在ubuntu14.04上确保可以正常运行,所以docke ...

  5. 浅议Github的注册和使用

    Self-introduction:编者本人叫司明周,现就读于南通大学计算机学院网络工程142班.爱好数学和音乐,喜欢数学中的逻辑性和天马行空的思维 编程能力:可以跳过略过得过且过吗..好吧,面对现实 ...

  6. Flask数据库

    一 数据库的设置 Web应用中普遍使用的是关系模型的数据库,关系型数据库把所有的数据都存储在表中,表用来给应用的实体建模,表的列数是固定的,行数是可变的.它使用结构化的查询语言.关系型数据库的列定义了 ...

  7. eayui js动态加载Datagrid,自适应宽度,高度

    HTML: <div class="easyui-layout" style="min-height:100%;min-width:100%;"> ...

  8. 【OCP题库-12c】最新CUUG OCP 071考试题库(71题)

    71.(32-18) choose three Which three statements indicate the end of a transaction? (Choose three.) A) ...

  9. JS 获取各个偶数之和!!

    <html>    <head>        <meta charset="utf-8" />        <title>js& ...

  10. 使用java中for循环,循环打印出五角星--

    //5.0 输出五角星        int touHigh = 6;        int jianHigh = 25 ;        int kuang =50;        for (int ...