设置代码块以运行MPICH2 [英] Setting Code Block to run MPICH2

查看:85
本文介绍了设置代码块以运行MPICH2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候大家!

我是一名学生,目前在设置代码块时遇到问题. 谁能帮助我或指导我如何配置代码块,使其可以运行MPI?

I am a student and currently I got problem in setting Code Block. Can anyone help me or guide me how to configure Code Block so it can run MPI?

我已经安装了Code Block和MPICH2.

I already install Code Block and MPICH2.

但是当我尝试编译代码时,它不起作用.代码块无法检测到MPI.

But when I trying to compile the code, it does not work. Code block doesn't detect MPI.

任何人都可以向我展示如何对其进行配置. 真的很感激:)

Anyone can show to me step by step to configure it. Really Appreciate it :)

推荐答案

我假设您是在询问Code :: Blocks IDE.

I assume you are asking about Code::Blocks IDE.

我认为,您应该修改IDE和项目设置,并从默认的GCC编译器设置切换到MPI之一.

I think, you should modify your IDE and project settings and switch from default GCC compiler setup to MPI one.

首先,您应该在IDE设置(菜单设置"->编译器和调试器")中克隆GCC编译器设置. http://www.codeblocks.org/docs/main_codeblocks_en3.html#x3 -270001.11.6 您必须克隆一些编译器设置(我建议复制默认的"GNU GCC编译器"),然后才能更改工具链可执行文件"选项卡上设置的新设置-替换gccg++分别是mpiccmpicxx.

First your should to clone GCC Compiler Setup in IDE Settings (menu "Settings" -> "Compiler and debugger"). http://www.codeblocks.org/docs/main_codeblocks_en3.html#x3-270001.11.6 You must clone the some complier settings (I recommend to copy a default "GNU GCC Compiler"), then you can change new settings set on the tab "Toolchain executables" -- replace the gcc and g++ by mpicc and mpicxx.

第二步是更改MPI项目构建设置以使用新的编译器设置.

Second step is to change your MPI project build settings to use new compiler settings.

这将允许您使用Code :: Blocks IDE构建MPI应用程序.

This will allow you to build MPI applications with Code::Blocks IDE.

要运行它们,可以使用命令行进行调试... MPI的调试不是那么容易...

To run them you can use the command line, and to debug them... debugging of MPI is not so easy...

这篇关于设置代码块以运行MPICH2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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