# Code for Robert Numrich's Parallel Programming with Co-arrays

**URL:** <https://fortran-lang.discourse.group/t/code-for-robert-numrichs-parallel-programming-with-co-arrays/9627>\
**Category:** Uncategorized\
**Created:** [April 25, 2025, 4:53pm UTC](https://fortran-lang.discourse.group/t/code-for-robert-numrichs-parallel-programming-with-co-arrays/9627 "2025-04-25T16:53:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![general\_rishkin](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@general\_rishkin](https://fortran-lang.discourse.group/u/general_rishkin)\
**Post date:** [April 25, 2025, 4:53pm UTC](https://fortran-lang.discourse.group/t/code-for-robert-numrichs-parallel-programming-with-co-arrays/9627/1 "2025-04-25T16:53:40Z")

</div>

Does anyone know if the code for the book is available. On the Fortran wiki page, there is mention of an associated website for code download but I am unable to find any such site.

Alternatively, does anyone have the code for download.

Additionally, I am intending to invest some time in mastering co-arrays. So, what is the status/future of it. I would prefer to be stopped now before I go down the rabbit hole.

@certik : What is its status in LFortran?

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [April 25, 2025, 5:32pm UTC](https://fortran-lang.discourse.group/t/code-for-robert-numrichs-parallel-programming-with-co-arrays/9627/2 "2025-04-25T17:32:05Z")

</div>

> [@general\_rishkin](#):
>
> : What is its statuse in LFortran?

We don’t support co-arrays yet. Overall we are still in alpha stage, but making good progress towards beta with compiling more and more codes.

---

<div class="post-metadata">

**Author:** ![rwmsu](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Post date:** [April 25, 2025, 6:19pm UTC](https://fortran-lang.discourse.group/t/code-for-robert-numrichs-parallel-programming-with-co-arrays/9627/3 "2025-04-25T18:19:18Z")

</div>

There have been several threads here over the last few years that discussed co-array performance and usage. You might go back and read those because they give you a broad view of co-arrays. My personal experience is they work very well and are competitive with MPI on large HPC systems with the hardware to support PGAS. Trying to run them on plain vanilla multi-core workstations has been disappointing. I think the NAG compiler is your best bet if you want to use co-arrays on workstations because they aren’t built on top of MPI but use their own shared memory subsystem. You should also look at @milancurcic excellent book

[https://www.simonandschuster.com/books/Modern-Fortran/Milan-Curcic/9781617295287](https://www.simonandschuster.com/books/Modern-Fortran/Milan-Curcic/9781617295287)

---

<div class="post-metadata">

**Author:** ![m\_b\_metcalf](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@m\_b\_metcalf](https://fortran-lang.discourse.group/u/m_b_metcalf)\
**Post date:** [April 26, 2025, 9:39am UTC](https://fortran-lang.discourse.group/t/code-for-robert-numrichs-parallel-programming-with-co-arrays/9627/4 "2025-04-26T09:39:50Z")

</div>

FWIW, the coarray codes described in App. C of MFE can be freely downloaded using the ‘codes’ button at [the Companion website.](https://global.oup.com/booksites/content/9780198876571/)

Regards,

Mike Metcalf

---

<div class="post-metadata">

**Author:** ![han190](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/han190/32/7158_2.png) [@han190](https://fortran-lang.discourse.group/u/han190)\
**Post date:** [April 26, 2025, 3:38pm UTC](https://fortran-lang.discourse.group/t/code-for-robert-numrichs-parallel-programming-with-co-arrays/9627/5 "2025-04-26T15:38:37Z")

</div>

Since you mentioned Robert Numerich’s book, I would like to share a self-study/experimental repository I wrote a while ago, which essentially implements a multidimensional (using PDT) forward partitioner as described in Chapters 3 and 4 of the book:

> **[GitHub - han190/CoDecomp: Coarray decomposition/forward partition tool](https://github.com/han190/CoDecomp)**
>
> Coarray decomposition/forward partition tool

I tested it with fpm + gfortran + OpenCoarray. Hope it helps!
