Help with process migration, in openmosix

M

mikegw

I would appreciate some help to get started so I can go off and be able to
return with more intelligent questions.

My child processes will not need to speak to each other, they will only need
to return the calculation results and exit. I understand that all the child
processes will have to complete before the code can move to the next time
step. So with that in mind I expect that I will have to ensure that all the
children finish their calculations and should any fail it must be possible
to restart that process.

The reason for wanting to migrate this code is so that the independent
processes can run concurrently on an open mosix cluster.


Preferred language c. Using Linux openmosix kernel 2.4.22

If someone could either help me or point me in the right direction I would
be most grateful.

What I would like to do is to farm out various, discrete
sections of the simulation to separate threads (where openmosix will then
work its magic) .

My pseudo code would look roughly like this


For Time = 0 to time_max
Make_list_of_neighbours (particle_neighbours)
For particle_id = 0 to num_particles
calculate_new_particle_position (particle_id, particle_neighbours)
Next particle_id
Next time

Of course there is other code in the main bit, but I would like the
calculate_new_particle_position routine to spawn/fork/clone.

If someone has an example of such a routine I would appreciate some help.

Cheers

Mike
 
J

Joona I Palaste

mikegw said:
I would appreciate some help to get started so I can go off and be able to
return with more intelligent questions.
My child processes will not need to speak to each other, they will only need
to return the calculation results and exit. I understand that all the child
processes will have to complete before the code can move to the next time
step. So with that in mind I expect that I will have to ensure that all the
children finish their calculations and should any fail it must be possible
to restart that process.
The reason for wanting to migrate this code is so that the independent
processes can run concurrently on an open mosix cluster.
Preferred language c. Using Linux openmosix kernel 2.4.22

ISO standard C has no concept of processes. Please ask in
comp.unix.programmer.

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"Remember: There are only three kinds of people - those who can count and those
who can't."
- Vampyra
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,614
Members
45,292
Latest member
EttaCasill

Latest Threads

Top