CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Parallel Fortran

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 3, 2010, 03:05
Default Parallel Fortran
  #1
New Member
 
afshar
Join Date: Apr 2010
Posts: 5
Rep Power: 7
ho_afshar is on a distinguished road
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
ho_afshar is offline   Reply With Quote

Old   April 3, 2010, 03:40
Default
  #2
New Member
 
Aladdin
Join Date: Jan 2010
Posts: 26
Rep Power: 7
aladdincham is on a distinguished road
you can read the user manual of fortran,it will tell you what do you want to know!
aladdincham is offline   Reply With Quote

Old   April 3, 2010, 03:56
Default
  #3
New Member
 
afshar
Join Date: Apr 2010
Posts: 5
Rep Power: 7
ho_afshar is on a distinguished road
Quote:
Originally Posted by aladdincham View Post
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.
ho_afshar is offline   Reply With Quote

Old   April 3, 2010, 07:49
Default
  #4
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 105
Rep Power: 8
quarkz is on a distinguished road
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.
quarkz is offline   Reply With Quote

Old   April 3, 2010, 13:57
Default
  #5
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 10
DoHander is on a distinguished road
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
DoHander is offline   Reply With Quote

Old   April 4, 2010, 02:04
Default
  #6
New Member
 
afshar
Join Date: Apr 2010
Posts: 5
Rep Power: 7
ho_afshar is on a distinguished road
Quote:
Originally Posted by DoHander View Post
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
ho_afshar is offline   Reply With Quote

Old   April 4, 2010, 10:31
Default
  #7
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 105
Rep Power: 8
quarkz is on a distinguished road
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.
quarkz is offline   Reply With Quote

Old   April 4, 2010, 12:52
Default
  #8
New Member
 
afshar
Join Date: Apr 2010
Posts: 5
Rep Power: 7
ho_afshar is on a distinguished road
Quote:
Originally Posted by quarkz View Post
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.
ho_afshar is offline   Reply With Quote

Old   April 6, 2010, 11:20
Default
  #9
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 10
DoHander is on a distinguished road
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
DoHander is offline   Reply With Quote

Old   April 7, 2010, 07:47
Default
  #10
New Member
 
afshar
Join Date: Apr 2010
Posts: 5
Rep Power: 7
ho_afshar is on a distinguished road
Quote:
Originally Posted by DoHander View Post
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
ho_afshar is offline   Reply With Quote

Reply

Tags
code, fortran, parallel

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
parallel fortran code Ahmed Main CFD Forum 1 October 23, 2008 07:15
User fortran error when running CFX-10 in parallel CFDworker CFX 2 October 26, 2007 16:01
Parallel Processing of Fortran Subroutine Ashwini Mishra CFX 1 November 3, 2004 11:02
definite integrals, parallel fortran dino Main CFD Forum 0 October 3, 2002 08:25
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 13:00


All times are GMT -4. The time now is 06:14.