Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Try Coarray Fortran in the cloud

206 views
Skip to first unread message

Zaak

unread,
Jun 15, 2017, 8:19:27 PM6/15/17
to
Hi All,

I just wanted to announce that we have created a Jupyter kernel for using OpenCoarrays and GFortran 7.1 from within a Jupyter Notebook. The project can be found at https://github.com/sourceryinstitute/jupyter-CAF-kernel. To launch only the demo notebook, please navigate https://bit.ly/TryCoarrays. If you want a fuller Jupyter Notebook environment and the ability to create your own Coarray Fortran Jupyter notebooks, use https://bit.ly/CAF-Binder. Navigate to the index.ipynb file to see how things work. This is the file that the other link points to.

Best,

Izaak "Zaak" Beekman

Stefano Zaghi

unread,
Jun 15, 2017, 11:03:58 PM6/15/17
to
Dear Zaak,

wonderful work!

My best regards.

vladim...@gmail.com

unread,
Jun 16, 2017, 6:55:20 AM6/16/17
to
Wow, that looks really great!

Beliavsky

unread,
Jun 16, 2017, 7:13:35 AM6/16/17
to
Thank you! There are two advances here:

(1) Fortran in a browser
(2) Coarray Fortran

It may be worth creating notebooks showing "regular" Fortran in Jupyter for people new to the language.

When you are ready I suggest posting a link to Hacker News.

Zaak

unread,
Jun 16, 2017, 6:22:15 PM6/16/17
to
Hacker news link is here: https://news.ycombinator.com/item?id=14565429

Please head over there and give me any feedback/pointers/tips/criticism/praise/money/beer/coffee you wish!

Also posted on r/programming: https://www.reddit.com/r/programming/comments/6hiwrb/a_coarray_fortran_kernel_for_jupyter_notebooks/?st=j40f3ncr&sh=029aa458

We have plans for at least some Coarray tutorials to be added to that binder. Feel free to use the cloud service to spawn new notebooks, create tutorials and examples, download the .ipynb files and then open up a pull request to add them to an examples folder at the top level of the git repo at https://github.com/sourceryinstitute/jupyter-CAF-kernels. Those will then be included in the online demo in the future.

Stefano Zaghi

unread,
Jun 17, 2017, 12:45:13 AM6/17/17
to
Dear Zaak,

you could consider to contact Micheal and exploit his CAF MPMD examples that are very useful for who want to cross-the-line from MPI to CAF. Having some notebooks based on his repositories could be very interesting for me.

Great work!

Cheers.

Zaak

unread,
Jun 18, 2017, 11:47:15 AM6/18/17
to
Hi Stefano,

That is a good idea. I'm quite pressed for time right now, so I don't know how soon I'll get to it. But as I said, I will gladly accept pull requests for adding additional examples, tutorials, etc. You can fire up a new Coarray-Fortran notebook, add your markdown and Fortran cells to it, then download it and email it to me or open up a pull request on Github.

Stefano Zaghi

unread,
Jun 18, 2017, 12:20:24 PM6/18/17
to
Il giorno domenica 18 giugno 2017 17:47:15 UTC+2, Zaak ha scritto:
> Hi Stefano,
>
> That is a good idea. I'm quite pressed for time right now, so I don't know how soon I'll get to it. But as I said, I will gladly accept pull requests for adding additional examples, tutorials, etc. You can fire up a new Coarray-Fortran notebook, add your markdown and Fortran cells to it, then download it and email it to me or open up a pull request on Github.

Dear Zaak, I'll try, but I have to admit that Michael is a quantum leap far from me, so I can try, but the success is highly in doubt. Before, I have to learn more about Jupiter notebooks...

My best regards.

michael siehl

unread,
Jun 18, 2017, 6:26:24 PM6/18/17
to
Hi everybody,
this all sounds really great to me. Frankly, as a Fortraner it is the first time I'm reading something about Jupyter / IPython but I am eager to learn the basic concepts shortly.

My main focus is currently on atomic subroutines and the SYNC MEMORY statement. My related coarray Github repositories are still experimental, but I would suggest to consider the content of the following two main repositories (as well as the few smaller ones that are related to them):
https://github.com/MichaelSiehl/Atomic_Subroutines--How_the_Parallel_Codes_may_look_like--Part_1
https://github.com/MichaelSiehl/Atomic_Subroutines--How_the_Parallel_Codes_may_look_like--Part_2

Just a brief update:
To my current understanding, the core solution of these is very similar to the solution of the ABA problem with the Compare-And-Swap (CAS) hardware implementation for atomic operations on x86 computers. This is explained here ( https://jfdube.wordpress.com/2011/11/30/understanding-atomic-operations/ ) and here ( https://en.wikipedia.org/wiki/Compare-and-swap ).
Compared to the ABA solution, we just use an ordinary integer scalar to store an integer-based enumeration value (this is similar to the appended increment counter of the ABA solution) together with the main atomic value (which I call 'additional atomic value' in the repository's source code). The integer-based enumeration helps to make sophisticated parallel logic codes more readable, compared to a simple increment counter.
OpenCoarrays does allow to use remote atomic_define together with a single (scalar) array element of an integer array component (of a derived type coarray). (The 'remote' here is not supported by ifort 18 beta update 1 yet). With the above ABA-like solution, we can safely synchronize the value of each distinct scalar array element atomically. This might also be the promising solution for synchronizing whole integer arrays atomically. And if we can process whole integer arrays atomically (and since integer is a very general data type that can in principle be used to store anything else with it), there might be no restrictions for implementing sophisticated algorithms based entirely on atomics (and thus, with user-defined segment ordering).

cheers
0 new messages