↓ Skip to main content
  1. Posts/

MPI 学习笔记

·592 words·2 mins
Note: This article is available in Chinese only. 本文暂无英文版本。 View original

参考资料:

消息传递接口(MPI)维基百科

MPI_TUTORIAL

MPI 在大规模机器学习领域的前景如何?

因为要和平台组对接工作以及写我们自己的BN同步…所以来了解一下MPI相关…感谢平台组@gyz 菊苣提供指导。

下面写一些自己的理解 ^_^

OVERVIEW
#

MPI是一个跨语言的通讯协议,用于并行相关

MPI不是一种具体的语言实现,而是一种标准或者说接口,类比sql在关系型数据库中的地位,具体用的时候我们是用某个特定的实现,例如openmpi或者mpich2

对于机器学习问题,MPI很适合用在超算上…

下面随便补一些我认为需要了解的:

** **_communicator _是一个进程的group,该group里的所有进程可以相互通信。

在这组进程中,每个进程有一个唯一的rank,通信按照rank进行(做身份标识的作用?

MPI支持的通信方式有point-to-point 和 collective 两种,也就是点对点和广播

下面分别介绍这两种方式。

Blocking point-to-point communication
#

Blocking communication 就是阻塞通信

阻塞通信是指消息发送方的send调用需要接受方的recv调用的配合才可完成

对于非阻塞通信,不必等到通信操作完全完成便可以返回,该通信操作可以交给特定的通信硬件去完成,在该通信硬件完成该通信操作的同时,处理机可以同时进行计算操作,这样便实现了计算与通信的重叠。通过计算与通信的重叠,可以大大提高程序执行的效率。这一方法和通过异步I/O实现I/O与计算的重叠思路是完全一样的。

MPI Send and Receive
#

Related

python只获取当前目录下的文件夹及文件名

·237 words·1 min
list = os.listdir(rootdir)#列出目录下的所有文件和目录 1for line in list: 2 filepath = os.path.join(rootdir,line) 3 if os.path.isdir(filepath):#如果filepath是目录 4 print "dir:" + filepath 5 else: 6 print "file:" + filepath 如果需要遍历文件夹下的所以文件,可以使用os.walk()方法。

manjaro(archlinux) 安装 YouCompleteMe

·285 words·1 min
来来回回折腾了好多次,aur直接安装或者手动编译,安装后都无法补全 ycm的log文件是在/tmp目录下的。 发现问题是缺少libtinfo.so.5 12017-07-28 17:02:12,667 - ERROR - Error occurred while loading global extra conf /home/coder/.ycm_extra_conf.py 2Traceback (most recent call last): 3 File "/home/coder/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 94, in _CallGlobalExtraConfMethod 4 module = Load( global_ycm_extra_conf, force = True ) 5 File "/home/coder/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/extra_conf_store.py", line 173, in Load 6 module = LoadPythonSource( _RandomName(), module_file ) 7 File "/home/coder/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/utils.py", line 400, in LoadPythonSource 8 return imp.load_source( name, pathname ) 9 File "/home/coder/.ycm_extra_conf.py", line 32, in <module> 10 import ycm_core 11ImportError: libtinfo.so.5: cannot open shared object file: No such file or directory 122017-07-28 17:02:12,667 - ERROR - libtinfo.so.5: cannot open shared object file: No such file or directory 13Traceback (most recent call last): 14 File "/home/coder/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 96, in CompatibleWithCurrentCore 15 ycm_core = ImportCore() 16 File "/home/coder/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/server_utils.py", line 88, in ImportCore 17 import ycm_core as ycm_core 18ImportError: libtinfo.so.5: cannot open shared object file: No such file or directory 解决办法:

python numpy 用法 简明手册

·8276 words·17 mins
原文链接 感谢stanford,感谢原作者的翻译,我调整了一下代码格式,可以当做手册来用了,毕竟之前没怎么写过py 23333 译者注:本文智能单元首发,翻译自斯坦福CS231n课程笔记Python Numpy Tutorial,由课程教师Andrej Karpathy授权进行翻译。本篇教程由杜客翻译完成,Flood Sung、SunisDown、巩子嘉和一位不愿透露ID的知友对本翻译亦有贡献。

archlinux/manjaro 下 安装 qq/tim

·580 words·2 mins
参考资料:install qq/tim on linux with wine wine运行qq不能输入账号 This tutorial introduces how to install QQ/TIM in Linux with Wine, which had been tested on ArchLinux with Wine 2.4. Prerequisites # Before start, you need to get the latest Wine. I’m not sure whether QQ/TIM can run on lower version of Wine. In ArchLinux, you can easily get the latest Wine using following command: 1pacman -S wine However, in Debian, you need to install Wine with some more steps. You can see this tutorial.

libgfortran.so.4 missing under archlinux

·919 words·2 mins
。。。哭了哦,终于解决了这个 bug 参考资料: libgfortran broken? libgfortran=3.0 should not be install with numpy <= 1.9 [SOLVED] libgfortran.so.3:cannot open shared object file: No such file [Replacing gcc-libs-libs with gcc-multilib arch conflict with gcc-libs and gcc-libs-multilib on latest update 一开始以为是 anaconda 相关,搞了半天。 然后又按照第一个资料里说的,试图把 libgfortran 用 libgcc 替代。