在我的笔记本电脑中运行MPI代码 [英] Running MPI code in my laptop

查看:261
本文介绍了在我的笔记本电脑中运行MPI代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是并行计算领域的新手.您能告诉我是否有可能在双核笔记本电脑中使用MPI例程来运行C ++代码?或者是否有任何模拟器/仿真器可以做到这一点?

I am new to parallel computing world. Can you tell me is it possible to run a c++ code uses MPI routines in my laptop with dual core or is there any simulator/emulator for doing that?

推荐答案

大多数MPI实现都使用共享内存在位于同一主机上的等级之间进行通信.设置笔记本电脑不需要任何特殊要求.

Most MPI implementations use shared memory for communication between ranks that are located on the same host. Nothing special is required in terms of setting up the laptop.

使用双核笔记本电脑,您可以运行两个等级,并且OS调度程序会将它们放置在单独的内核上. WinXP调度程序倾向于强制执行某种程度的"cpu绑定",因为默认情况下,作业倾向于在上次运行的核心上进行调度.但是,大多数MPI实现也允许显式的"cpu绑定",这将强制在一个特定的内核上安排排位.语法是非标准的,必须从特定的实现文档中获取.

Using a dual core laptop, you can run two ranks and the OS scheduler will tend to place them on separate cores. The WinXP scheduler tends to enforce some degree of "cpu binding" because by default jobs tend to be scheduled on the core where they last ran. However, most MPI implementations also allow for an explicit "cpu binding" that will force a rank to be scheduled on one specific core. The syntax for this is non-standard and must be gotten from the specific implementations documentation.

您应该尝试在与大学计算机运行的笔记本电脑上使用MPI的相同"版本和实现.这将有助于确保MPI运行时标志相同.

You should try to use "the same" version and implementation of MPI on your laptop that the university computers are running. That will help to ensure that the MPI runtime flags are the same.

大多数MPI实现都附带某种编译器包装器",或者至少有一组指令来构建包含MPI库的应用程序.请使用这些包装器,或按照这些说明进行操作.

Most MPI implementations ship with some kind of "compiler wrapper" or at least a set of instructions for building an application that will include the MPI library. Either use those wrappers, or follow those instructions.

这篇关于在我的笔记本电脑中运行MPI代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆