- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have a piece of ancient Fortran code that has two independent subroutines. Both use a NxM matrix as input to compute two distinct things. In short,
PROGRAM ANCIENT
...
CALL METHOD1
CALL METHOD2
...
END
Is it possible (guess so) to use OpenMP to speed up this code without compromising portability ?
I realize this is a generic question so here is the real problem :
The real code is a in-house developed molecular dynamics code where METHOD1 computes intermolecular pairwise forces and METHOD2 does intramolecular ones. We would like to compute these forces in parallel to reduce simulation time.
Appreciate any suggestion.
Thanks,
Jen.
I have a piece of ancient Fortran code that has two independent subroutines. Both use a NxM matrix as input to compute two distinct things. In short,
PROGRAM ANCIENT
...
CALL METHOD1
CALL METHOD2
...
END
Is it possible (guess so) to use OpenMP to speed up this code without compromising portability ?
I realize this is a generic question so here is the real problem :
The real code is a in-house developed molecular dynamics code where METHOD1 computes intermolecular pairwise forces and METHOD2 does intramolecular ones. We would like to compute these forces in parallel to reduce simulation time.
Appreciate any suggestion.
Thanks,
Jen.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jenheta
Hi,
I have a piece of ancient Fortran code that has two independent subroutines. Both use a NxM matrix as input to compute two distinct things. In short,
PROGRAM ANCIENT
...
CALL METHOD1
CALL METHOD2
...
END
Is it possible (guess so) to use OpenMP to speed up this code without compromising portability ?
I realize this is a generic question so here is the real problem :
The real code is a in-house developed molecular dynamics code where METHOD1 computes intermolecular pairwise forces and METHOD2 does intramolecular ones. We would like to compute these forces in parallel to reduce simulation time.
Appreciate any suggestion.
Thanks,
Jen.
I have a piece of ancient Fortran code that has two independent subroutines. Both use a NxM matrix as input to compute two distinct things. In short,
PROGRAM ANCIENT
...
CALL METHOD1
CALL METHOD2
...
END
Is it possible (guess so) to use OpenMP to speed up this code without compromising portability ?
I realize this is a generic question so here is the real problem :
The real code is a in-house developed molecular dynamics code where METHOD1 computes intermolecular pairwise forces and METHOD2 does intramolecular ones. We would like to compute these forces in parallel to reduce simulation time.
Appreciate any suggestion.
Thanks,
Jen.
portability is maintened using OpenMP because it works as compiler indications. If you use a compiler that "understands" OpenMP and you turn it on by the corresponding compiler flag, it will use OpenMP. If not the code is unafected. You could check the several OpenMP tutorial existing on the web, if METHOD1 and METHOD2 are independent using OpenMP would seem trivial (I'm assuming complete independence. memory dependencies must be looked for and etc, etc). Maybe you can start reading a bit more on OpenMP here, for instance,
http://www.llnl.gov/computing/tutorials/openMP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One main thing you must keep in mind is each of the thread should be independent. For MD. this is usually the case, but all depends on the implimentation. I dont know what your METHOD1 and METHOD2 contains, but as a suggestion, you can check threading the force calculation first, as (if you succeed,) you will get HUGE time save and if you make any fault, it will reveal very quickly.

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