Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
Posted
Updated 11-May-10 1:10am
v4

1 solution

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.
 
Share this answer
 
Comments
yusof_hardy 11-May-10 7:13am    
Sorry I'm not familiar with the whole grid thing. Does it really matter which library I use (since the program is compiled anyway)? Does the engine only run interpreted scripts?
Michel Godfroid 11-May-10 7:38am    
Your program in it's current state will run on the grid. Only it will use one processor and one thread, and will take as long as it does now.
In order to use the grid, you have to re-write your program so that the grid 'knows' how it can spread your program over it's processors. Informing the the grid about these capabilities is done through a parallellisation library (like OpenMPI). There you will define the parallel architecture, and how messages will be passed betwween grid cells). the whole subject is too large to treat here, but your University must have a Grid information center, where you will find literature and assistance in developing your programs. Colleagues/students who have used the grid before may also be helpful. I'm sorry but the whole subject is just too large to treat here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900