Register to reply

Fortran multiprocessor cpu?

by gholamghar
Tags: fortran, multiprocessor
Share this thread:
gholamghar
#1
May11-09, 06:57 AM
P: 28
hello
i have intel core 2 quad and my operating system is windows,every time i execute my fortran code it takes 8 hours to finish and just 25% of my cpu is used during the run(cpu usage=25%),it means just one core of my processor is used,so is there any way that i can use all the 4 cores of my processor for executing my fortran code so that the executing time is reduced?
thanks in advance
Phys.Org News Partner Science news on Phys.org
Security CTO to detail Android Fake ID flaw at Black Hat
Huge waves measured for first time in Arctic Ocean
Mysterious molecules in space
minger
#2
May11-09, 07:07 AM
Sci Advisor
P: 1,498
For using multiple processors on a large scale, we need to use a message passing interface to let the processors "talk" to each other. We use LAM/MPI if you're curious. Now, this is on large-scale clusters.

When the processors are all on-board, even though the memory is shared between the processors, I would still assume that some coding or MPI would need to be done to let code take full advantage of multiple cores.
Maxwell
#3
May11-09, 08:43 AM
P: 531
Yup, the obvious answer is MPI. Note that you will have to restructure your code for parallel implementation and add the message sending/receiving functionality into it. MPI is really easy, only about six functions are completely necessary.

rcgldr
#4
May11-09, 10:33 AM
HW Helper
P: 7,034
Fortran multiprocessor cpu?

Are there any operations in your program that can be peformed in parallel? These could be split up into multiple threads. Also depending on the GPU in your video card, you might be able to use a GPU math library (ATI and nVIdia have these) which includes some vectorized floating point math operations, 4 to 16 operations in parallel.
AUMathTutor
#5
May11-09, 10:48 AM
P: 490
Another option is something called co-array fortran. I heard about it somewhere... it could be worth looking into.
gholamghar
#6
May11-09, 02:39 PM
P: 28
thank you all,i doubted that maybe i have not said the exact sentences to explain my questin,i am running my code in my personal computer not in a cluster,and my personal computer has just one core 2 quad processor,so you suggest that with MPI i can take advantage of all 4 cores of my processor?
(i have heard about OPENMP,is this like MPI? and could be used on my personal computer or it can be used only in a cluster?)
rcgldr
#7
May12-09, 03:08 AM
HW Helper
P: 7,034
You can create a mutli-threaded application, which should end up using one cpu per thread. I've done this with a C program running under windows, but don't know how it would be done in Fortran.
Maxwell
#8
May13-09, 04:30 PM
P: 531
You don't need to be running on a cluster to use MPI. You can break up your program into smaller pieces and run them in separate processes. Then you can use MPI to send data between the processes.
giovane
#9
May27-10, 10:41 AM
P: 1
My code was taking 35 hours.
I've just enable software parallelization ( /Qparallel) in Intel's Fortran Compiler ( writing in Ms. Visual Studio 2008) and I saved a third of the time!

Please answer me for talk about this process,

Giovane


Register to reply

Related Discussions
Program that converts f77 to f90/95? Programming & Computer Science 4
Accessing Fortran Modules within a Fortran library from Fortran Programming & Computer Science 0
Fortran v.s. Visual Fortran Programming & Computer Science 0
Multiprocessor Workstation Motherboards Computing & Technology 4
I need some fortran 90 help Programming & Computer Science 1