Replies: 2 comments 13 replies
-
I'm not sure I fully understand your question, but hopefully this helps a bit. So long as the main chare has no pending messages for it, it will "wait" in an idle state until it receives something. The canonical way to do the sort of synchronization you're talking about is through reductions (perhaps multiple reductions if you need to synchronize over chare arrays of multiple types). |
Beta Was this translation helpful? Give feedback.
-
Yes, this sounds like a good approach. We can work on adding real support for concat and other types of reductions to the Fortran interface too. |
Beta Was this translation helpful? Give feedback.
-
After some helpful pointing to the ldbRedDemo.f90 example for my last question, I still have some questions about how to add a Charm++ reduction to the legacy Fortran code I'm trying to refactor.
What I have, is 3,000 lines of code with some REALLY expensive computations on a number of multidimensional arrays in the middle of it, and a lot of serial code bracketing the expensive operations that I don't want distributed to multiple workers
The legacy code I have is all one big file. a semi-pseudo-code is given below:
IDEALLY, I want every call to FFT_THINGS or MORE_FFT_THINGS to happpen in its own chare, nested withing every NY layer happening within it's own chare (so I could have up to 300-ish calls to FFT_THINGS happening concurrently). In my mind, refactoring this code means refactoring the PROGRAM into a subroutine, and calling that subroutine within a main chare. After that, all the refactoring is going to happen in PROCESS_A and PROCESS_B--for both, it means Invoking entry methods on chars that are responsible for inidividual layers, which in turn invoke chares responsible for doing the invidiual FFTs.
As far as I've gotten, however, is just trying to get a main chare that will invoke the FFT functions and properly get back results using the Fortran90 bindings. What has me stuck is figuring out exactly how to get results out of chares called from the main chare, for a number of reasons:
Beta Was this translation helpful? Give feedback.
All reactions