3 ms·
> Fortran coarrays are a relatively simple mechanism to distribute work across CPUs, pin work to selected CPUs, and synchronize the computation across CPUs. Pot
by bayindirh 4y ago
> Fortran coarrays are a relatively simple mechanism to distribute work across CPUs, pin work to selected CPUs, and synchronize the computation across CPUs. Potentially thousands of them.
Add MPI to the mix, and you can distribute that work to multiple machines. Potentially to thousands of them.
MPI over InfiniBand also can do some computations on the fly (in the HBAs and switches), so it makes it even fasterer (sic).
> This makes Fortran a one trick pony. It does parallel multi-dimensional data very well, but that’s really where it ends.
That one weird trick is a very strategic and cross-cutting one so almost every scientist can benefit from using FORTRAN. So, having one trick is not a bad thing here.
- rad_gruchalski 4y ago> Add MPI to the mix, and you can distribute that work to multiple machines. Potentially to thousands of them. My understanding is that coarrays are a modern replacement for MPI and that coarrays abstract the notion of "machines", they bundle that under "multiple CPUs". I'm not very fluent in either of those, only know as much as the "Modern Fortran" book explains but from the examples I have seen, coarrays can do anything MPI can and they're simpler to work with. > So, having one trick is not a bad thing here. Definitely not. Personally, I would imagine myself using it if integration with other technologies over the network was available out of the box.
- m_mueller 4y agoAren’t coarrays only for single machine CPU parallelization? I‘d be surprised if you could abstract a whole network topology over it. The MPI communicator is really where it’s at when you want to drive a whole cluster (and if you’re using Fortran, you probably do).
- bayindirh 4y agoA quick glance at Coarray Fortran [0] shows that Coarray library is built on top of MPI instead of replacing it. MPI and InfiniBand are irreplaceable technologies for HPC clusters as of today, both in terms of speed and latency. Lastly IB is not a connectivity layer. It's a HBA which carries information from memory space of one application to another. So it's properly "Magick" in terms of programming and research. [0]: https://en.wikipedia.org/wiki/Coarray_Fortran https://en.wikipedia.org/wiki/Coarray_Fortran
- TheRealKing 4y agonot necessarily. But at least one of the major Coarray implementations (Intel Fortran compiler) translates the Coarray syntax to MPI so that the Intel MPI library can be used underneath. As a counter-example, the NAG Fortran compiler implements Coarrays for shared-memory architecture, and apparently has nothing to do with MPI.
- jabl 4y ago> My understanding is that coarrays are a modern replacement for MPI Well, yes and no. Co-arrays are a higher level abstraction, belonging to the category of Partitioned Global Address Space (PGAS). Depending on the implementation, co-arrays might very well be implemented on top of a MPI library (as there has been a huge amount of work making MPI fast over all kinds of fancy interconnect fabrics).
- amarcozzi 4y agoWhat resources did you use to learn modern Fortran? I'd like to some something similar in order to better understand the code base for a popular fire model, and would appreciate any advice.
- rad_gruchalski 4y agoNot fire but waves. Here’s the book: https://www.manning.com/books/modern-fortran https://www.manning.com/books/modern-fortran. This is the resource I used while learning. The author of the book is very active on github: https://github.com/milancurcic https://github.com/milancurcic.
- amarcozzi 4y agoThank you!
- bayindirh 4y agoI know no FORTRAN. I just support many researchers who use it extensively, and make sure their code works with the hardware we provide to them.