CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   About the parallelization (

ptyue December 20, 2002 14:16

About the parallelization
I want to parallelize my code, but have no experience on parallel compuation. Do you have some ideas and which book should I begin with?

Patrick Godon December 20, 2002 15:14

Re: About the parallelization
I don't know what parallel machine you will use nor in which language you will write your code, but my advise is maybe to try and do what I did. I am using FORTRAN and was told to use MPI - Message Passing Interface. I could find on the paralle machine some guides for MPI and that was enough for me to get started. You could ask the computer person in your department or the system person (operator) ect... You could also do a search on Yahoo on MPI for example. The basic is to undertand that there are two main processes in parallel computing: the computing itself and the passing of the data from one processor to another. These two take a given time to be carried out and the optimization of a paralle code is to minimize the overall time. You can divide the taks between a given number of processors. Each processor will have to carry out part of the task (computing) and then the information will have to be passed between the different processors. Depending on the taks and the machine, ect... you could have a situation where a given program will be faster if it is carried out on N processor. The overall time will decrease as the number of processors n increases from 1 to N, but as you take more processors n>N the overal time will increase again, etc... MPI is actually a set of subroutines that you call from a FORTRAN program and they are actual commands for the parallel machine. It is very convenient to use MPI, other software might be using more details procedures or maybe even simpler ones, not sure.

I hope this help. I am sure there are other people out here who can help more.

Cheers, Patrick

ptyue December 20, 2002 16:55

Re: About the parallelization
Thank you very much.

I have no idea aout parallel computation before. I only know that we are using sun cluster. I've asked our system adminstrator for more information.

Peter Attar December 20, 2002 22:02

Re: About the parallelization
If you are interested in using MPI I would highly recommend the book: "Using MPI Portable Parallel Programming with the Message-Passing Interface second edition" by Gropp,Lusk and Skjellum You can get it in paperback for about 30 bucks. It goes over much of intricacies of MPI along with lots of code examples.

Adrin Gharakhani December 23, 2002 03:34

Re: About the parallelization
Sun compilers have very good automatic parallelization capability. All you have to do is to switch the parallelization option on at compile time and set your machine environment properly. Check out the Sun fortran manual on parallelization options (multithreading).

Depending on your algorithm (and how well your serial code is written) you can get quite high parallel efficiency in less than a day! (the day estimate includes reading the manual ...)

The algorithms I develop are inherently parallel and in the past I have achieved about 98% efficiency for up to 256 processors using MPI. Last year I had to use a friend's 4-cpu sun and parallelized the code using just the switch (no MPI implementation). I got a very impressive 75% efficiency.

So, I recommend you start with the switch first and in the mean time start looking into MPI manuals. I learned MPI programming in less than a week, basically found the list of MPI instructions from a site (it's been a long while and I forget where) and searched for the commands that would be useful for me.

Good luck

Adrin Gharakhani

wei December 23, 2002 14:47

Re: About the parallelization
Try this site for information on MPI. MPI itself is just standards for message passing. There are many different implemetations of MPI by different organizations.

Ajay S. Parihar January 8, 2003 13:02

Re: About the parallelization

I parallelized my LES code which was in FORTRAN, I used MPI library. Abt MPI so many friends have already given ideas. If you want i have very good book for MPI (electronic copy) and i can send it to you. I think this book is available itself on Net. I will tell you name and author book tomorrow...

Good luck...

ptyue January 15, 2003 12:07

Re: About the parallelization
That's great. Please tell me the name and author of the book. I think it should help.

Thanks a lot.

Ajay s. Parihar January 27, 2003 00:29

Re: About the parallelization
I sent electronic copy of book through email. Check your mail box.

All times are GMT -4. The time now is 13:05.