- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome to the world of parallel programming.
If you have the source code, and are willing to invest some of your time in recoding, then you can increase the utilization of coresand generally improve theperformance of the application.
Study the examples relating to OpenMP in Fortran.
Most applications can benefit from parallel programming. It is not all that hard, once you are famillier with the techniques.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you,i am running my code in my personal computer with a intel processor core 2 quad and 2 gigabytes of ram,you said i should use OPENMP with my code while running in my personal computer,i have heard about MPI is it possible to use MPI method with my personal computer too or MPI can be used just in clusters?
(in your opinion which one is easier to learn the techniques?)
(in your opinion which one is easier to learn the techniques?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use MPI but it is not designed for optimal use on a single system. OpenMP looks complicated but if you start slow it's not bad. You may want to try as an experiment adding the /parallel option and see if you get an acceptable speedup. The compiler can automatically parallelize, but it is very conservative in doing so. Enabling optimization reports allows the compiler to tell you what is stopping it from parallelizing a loop.
I strongly recommend reading the sections of the Optimizing Applications documentation that discuss parallel processing.
I strongly recommend reading the sections of the Optimizing Applications documentation that discuss parallel processing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OpenMP would be the route to take.
MPI is suitable when you have multiple processors that do not have shared memory
or
When you have a shared memory system but each process (application) has a limited amount of addressable memory (x32 application running on x64 platform or running with more than 3GB).
or
When you must compartmentalize code | code | data |data
You will get help here on the forum.
Jim Dempsey

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page