如何编写在网格上运行的软件? [英] How do I write software that run on a Grid?

查看:125
本文介绍了如何编写在网格上运行的软件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以访问我大学的网格系统(在具有100多个节点和1000多个CPU的Sun Grid Engine 6.1上运行)

我有一个程序,它基本上是用C ++编写的在某些数据集上运行遗传算法的程序.当前,它在单个线程中执行.


我的问题是..是否需要我自己使用MPI和OpenMP来并行化程序?还是由主机引擎本身完成并行化?


如果必须自己进行并行化,应该创建多少个线程?



在此先感谢

I have access to my university''s grid system (running on Sun Grid Engine 6.1 with 100+ nodes and 1000+ CPUs)

I have a program, which basically runs genetic algorithm on some dataset, written in C++. It currently executes in a single thread.


My question is.. do I need to parallelize the program on my own, perhaps, using MPI and OpenMP? Or is the parallelization done by the host engine itself?


If I have to parallelize on my own, how many threads should I create?



Thanks in advance

推荐答案

嗯,它要复杂得多.
首先,您需要一个并行化框架. OpenMPI可与Sun Grid Engine配合使用.
线程的数量无关紧要,如果您很好地使用库,则网格将能够为您优化线程的数量(取决于当前的负载,其他正在运行的作业,分配给程序的资源...). > 您应该计划使用尽可能多的线程(当然,您的算法可能会限制并行任务的数量),但是如果可用线程较少,则应进行调整.
Eh, it''s a little more complicated than that.
First you''ll need a parallellisation framework. OpenMPI works fine with Sun Grid Engine.
The number of threads is irrelevant, if you use the libraries well, the grid will be able to optimise the number of threads for you ( depending on current load, other running jobs, resources allocated to your program...).
You should plan on using as many threads as possible (your algorithms may have a limit on number of parallel tasks, of course), but adapt if fewer threads are available.


这篇关于如何编写在网格上运行的软件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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