| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Dear all; I have written a code in Fortran90, but this code is run for large systems very slowly (because of large amount of data) now I want to convert my program to a parallel one. but I haven't ever written parallel program. Would you please guide me what should I do? I'm anxiously looking forward your reply and guidelines. Kind regards, Fatemeh |
|
#2
| |||
| |||
| On 3 sep, 12:34, Fatemeh <fateme.mirj...@gmail.com> wrote: > Dear all; > > I have written a code in Fortran90, but this code is run for large > systems very slowly (because of large amount of data) > now I want to convert my program to a parallel one. but I haven't ever > written parallel program. > Would you please guide me what should I do? > > I'm anxiously looking forward your reply and guidelines. > > Kind regards, > Fatemeh There are roughly speaking three methods you can use: - OpenMP - the easiest method, as it involves compiler directives mostly - multithreading (tricky to get right, but more flexible than OpenMP) - multiprocessing (MPI is a commonly used method) Since you have no experience with it, I suggest you look at OpenMP. There are enough references and documents on the Internet to get you started. But be aware: you only get benefits from parallel programming techniques if the problem you are solving allows some form of parallel processing and if the hardware allows it (i.e. several processors within one machine or a collection of cooperating machines) Regards, Arjen |
|
#3
| |||
| |||
| On Wed, 3 Sep 2008 03:34:59 -0700 (PDT), Fatemeh <fateme.mirjani@gmail.com> wrote in <d816d14b-41e9-49de-a606-4396b595b0e6@l42g2000hsc.googlegroups.com>: > I have written a code in Fortran90, but this code is run for large > systems very slowly (because of large amount of data) > now I want to convert my program to a parallel one. but I haven't ever > written parallel program. > Would you please guide me what should I do? What is your compiler, and what is your target system? Intel Fortran, for example, can parallelise sections of code for execution on multi-core processors. For example, a dataset comparison I wrote (on Linux) executed in 9 hours, but reported 13-1/4 hours CPU time on a 2.2 GHz dual-core Athlon. It ran much faster than that on a quad-core 2.4 GHz Core 2 processor, but I think much of that was due to being able to use SSE3 instructions (and maybe SSSE3). The compile flags I used were ifort -O3 -parallel -ipo0 -- Ivan Reid, School of Engineering & Design, _____________ CMS Collaboration, Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN KotPT -- "for stupidity above and beyond the call of duty". |
|
#4
| |||
| |||
| On Sep 3, 3:54*am, Arjen Markus <arjen.mar...@wldelft.nl> wrote: > On 3 sep, 12:34, Fatemeh <fateme.mirj...@gmail.com> wrote: > > > Dear all; > > > I have written a code in Fortran90, but this code is run for large > > systems very slowly (because of large amount of data) > > now I want to convert my program to a parallel one. but I haven't ever > > written parallel program. > > Would you please guide me what should I do? > > > I'm anxiously looking forward your reply and guidelines. > > > Kind regards, > > Fatemeh > > There are roughly speaking three methods you can use: > - OpenMP - the easiest method, as it involves compiler directives > * mostly > - multithreading (tricky to get right, but more flexible than > * OpenMP) > - multiprocessing (MPI is a commonly used method) > > Since you have no experience with it, I suggest you look at > OpenMP. There are enough references and documents on the > Internet to get you started. > > But be aware: you only get benefits from parallel programming > techniques if the problem you are solving allows some form > of parallel processing and if the hardware allows it (i.e. > several processors within one machine or a collection of > cooperating machines) > > Regards, > > Arjen I too recommend OpenMP if you want really quick turnaround and very modest speedups. Obviously, the actual speedup is very algorithm- and hardware-dependent. On my applications, I can parallelize 95% of the code (~10,000 lines) with OpenMP in a day or two using mostly one or two commands, but I could never get beyond a speedup in the 2-4 range on 6-8 single-core processors. My experiences with automatic parallelization by compilers proved even less fruitful, but it's so easy to try that it's worth an attempt. If you want large speedup on large numbers of processors, it seems MPI is the only way to go, but it will require significant time investment and will touch every part of your code. As a compromise, you might consider a toolkit such as Bundle-Exchange-Compute (http:// www.cs.sandia.gov/BEC/). It is compatible with MPI (not a competitor) but much simpler to use and apparentely gives speedup comparable to hand-tuned MPI with far fewer commands. A very important first step is to profile your code to determine which parts are taking the most time and to concentrate your efforts there. For serial code on Linux, you might use the 'gprof' system command. For both serial and parallel (of any flavor), you might use the Timing Analysis Utilities (TAU): http://www.cs.uoregon.edu/research/tau/cca/index.php. Damian |
|
#5
| |||
| |||
| On Wed, 3 Sep 2008, Fatemeh wrote: |----------------------------------------------------------------------| |"I have written a code in Fortran90, [..] | | | |[..]" | |----------------------------------------------------------------------| Dear Fatemeh, When did you write this Fortran90 code? With best regards, Colin Paul |
|
#6
| |||
| |||
| On Sep 5, 2:47 pm, Colin Paul Gloster <Colin_Paul_Glos...@ACM.org> wrote: > On Wed, 3 Sep 2008, Fatemeh wrote: > > |----------------------------------------------------------------------| > |"I have written a code in Fortran90, [..] | > | | > |[..]" | > |----------------------------------------------------------------------| > > Dear Fatemeh, > > When did you write this Fortran90 code? > > With best regards, > Colin Paul It's new. I have just written it. (can I see your code?) |
|
#7
| |||
| |||
| Fatemeh wrote: > Dear all; > > I have written a code in Fortran90, but this code is run for large > systems very slowly (because of large amount of data) > now I want to convert my program to a parallel one. but I haven't ever > written parallel program. > Would you please guide me what should I do? > > I'm anxiously looking forward your reply and guidelines. > > Kind regards, > Fatemeh Google is your friend. |
|
#8
| |||
| |||
| On Fri, 5 Sep 2008, Fatemeh wrote: |--------------------------------------------------------------------------| |"On Sep 5, 2:47 pm, Colin Paul Gloster <Colin_Paul_Glos...@ACM.org> | |wrote: | |> On Wed, 3 Sep 2008, Fatemeh wrote: | |> | |> |----------------------------------------------------------------------|| |> |"I have written a code in Fortran90, [..] || |> | || |> |[..]" || |> |----------------------------------------------------------------------|| |> | |> Dear Fatemeh, | |> | |> When did you write this Fortran90 code? | |> | |> With best regards, | |> Colin Paul | | | |It's new. I have just written it." | |--------------------------------------------------------------------------| Thank you. |--------------------------------------------------------------------------| |" (can I see your code?)" | |--------------------------------------------------------------------------| I do not have code to show you. Regards, Colin Paul |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.