CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Parallel Fortran (http://www.cfd-online.com/Forums/main/74550-parallel-fortran.html)

ho_afshar April 3, 2010 03:05

Parallel Fortran
 
Hi every body.
I'm working on a cfd code in fortran. Run times take several days so I need to run my code in parallel mode. As I have not used parallel commands, is there any way to run it on multiple Cpus.

Thanks.
Hossein.
Ho_afshar@yahoo.com

aladdincham April 3, 2010 03:40

you can read the user manual of fortran,it will tell you what do you want to know!

ho_afshar April 3, 2010 03:56

Quote:

Originally Posted by aladdincham (Post 252965)
you can read the user manual of fortran,it will tell you what do you want to know!


Thanks,
You mean that it's possible to run a serial program on multiple cpus in all versions of fortran?
I will be thankful if you send me the related documents.
ho_afhar@yahoo.com...
(ho_afshar)
Regards.

quarkz April 3, 2010 07:49

to run your code in parallel, u 'll 've to modify the code ie add some commands in your code to instruct how to run it in parallel. u can use openmp, which seems to be easier, or mpi, which seems more flexible.

DoHander April 3, 2010 13:57

You need to re-write your code to be able to run this in parallel. You need to specifically develop a parallel version of your code.

Search some tutorials (on Google) about OpenMp and MPI to clarify your ideas about parallel programming. My recommendation is to use OpenMP if you have a multiprocessor machine and MPI if you have a cluster made by a few computers.

Do

ho_afshar April 4, 2010 02:04

Quote:

Originally Posted by DoHander (Post 253031)
You need to re-write your code to be able to run this in parallel. You need to specifically develop a parallel version of your code.

Search some tutorials (on Google) about OpenMp and MPI to clarify your ideas about parallel programming. My recommendation is to use OpenMP if you have a multiprocessor machine and MPI if you have a cluster made by a few computers.

Do


Dear Do,
Thank you very much for your comment.
I had heard that some versions of fortran are capable to handle a serial program on multiple cpus. The one who told me about that is not available now. So I asked if someone else has done so.

Cheers.
Hossein

quarkz April 4, 2010 10:31

Well, u are partly right in saying that. intel fortran has an auto parallel option to enable openmp on some loops. however, u need to make sure it won't cause any error.

ho_afshar April 4, 2010 12:52

Quote:

Originally Posted by quarkz (Post 253101)
Well, u are partly right in saying that. intel fortran has an auto parallel option to enable openmp on some loops. however, u need to make sure it won't cause any error.


Ok. Thanks.
I need that in Compaq Visual Fortran 6.
Whould you explain more how I can use this parallel option.

Thanks.

DoHander April 6, 2010 11:20

I'm sorry to inform you but Compaq Visual Fortran does not have an auto parallel option and it is a quite old Fortran compiler.

If you want a new, modern, Fortran compiler try Intel Fortran (commercial) or gfortran (free alternative).

Please try to understand that what you want a compiler that will magically transform your serial code to a parallel code does not exist (at least not after my knowledge). You have two alternatives:

1. OpenMP - this will allow you to parallelize your code in a relative simple way (work on multiprocessors machines), check this link for a short introduction and a few examples:

http://en.wikipedia.org/wiki/OpenMP

2. MPI - true parallel codes, this will run on multiple computers at once (a cluster). More complicated then 1.

Don't waist your time searching for a silver bullet and take some time and read about parallel programming, you will have a much clear idea about what you can use.

Do

ho_afshar April 7, 2010 07:47

Quote:

Originally Posted by DoHander (Post 253358)
I'm sorry to inform you but Compaq Visual Fortran does not have an auto parallel option and it is a quite old Fortran compiler.

If you want a new, modern, Fortran compiler try Intel Fortran (commercial) or gfortran (free alternative).

Please try to understand that what you want a compiler that will magically transform your serial code to a parallel code does not exist (at least not after my knowledge). You have two alternatives:

1. OpenMP - this will allow you to parallelize your code in a relative simple way (work on multiprocessors machines), check this link for a short introduction and a few examples:

http://en.wikipedia.org/wiki/OpenMP

2. MPI - true parallel codes, this will run on multiple computers at once (a cluster). More complicated then 1.

Don't waist your time searching for a silver bullet and take some time and read about parallel programming, you will have a much clear idea about what you can use.

Do


Thank you very much for your helpful comments.

Cheers


All times are GMT -4. The time now is 16:58.