experchange > fortran

Michael Siehl (01-02-19, 03:41 PM)
Am Sonntag, 30. Dezember 2018 00:19:22 UTC+1 schrieb Marcin Modrzejewski:
> On Sunday, December 23, 2018 at 4:37:11 AM UTC+1, Marcin Modrzejewski wrote:
> I've added the bug corresponding to my second example to gfortran's bugzilla (bug 88624). It's confirmed to affect the compiler at least since version 4.8.


Happy New Year, and thanks for your effort on this.
FortranFan (01-05-19, 12:27 AM)
On Tuesday, December 18, 2018 at 2:50:56 PM UTC-5, Marcin Modrzejewski wrote:

>.. I'm trying to pass an allocatable coarray, which is a component of a user-defined type ..


@Marcin,

I've always wondered about the *use case(s)* of coarray components of derived types not having seen this facility illustrated in any application context in any of the literature on Fortran coarrays I have reviewed.

The book mentioned in this thread, Modern Fortran Explained, doesn't inform me about this facility in the standard either.

Would it be possible for you to share why you have considered this feature and for what which then led you to the (likely) bug in Intel Fortran compiler?

Thanks much,
Gareth (01-06-19, 08:19 AM)
Regarding a "use-case" for derived types with coarray components -- I think
this would help for applications with irregular-communication needs.

Background: I have a 2D shallow water equations solver with nested-grids.
To run this in parallel, each individual grid can be decomposed among all images. Halos are communicated as required, with interpolation to deal with coarse-to-fine and fine-to-coarse communication. Because of the nesting,
there is a somewhat irregular communication pattern among the images.

Without coarrays, one could approach such irregular communication using
MPI_AllToAllv, or simply "a bunch of point-to-point sends".

With coarrays, one may allocate a single "suffiently large" coarray
receive-buffer. We can then do "a bunch of point-to-point sends" using
pre-defined parts of the receive-buffer. The receive-buffer size should be:
size = max_over_all_images(total-amount-of-data-to-receive)
This allows us to meet the constraint that the coarray is
allocated with the same size on all images.

Irrespective of whether we use MPI or coarrays, this requires a bit of
book-keeping. Each image needs to figure out how much data it receives, which data it should send data to other images, where it should send that data, etc.

It would be nice to encapsulate all this data inside a derived type with
type-bound procedures to expose the key functionality. Compared with just putting the data in a module, the main benefit is that more than one "irregular communication" object could exist in a single program.

For now I have not done this because of concerns about compiler support for derived types with coarray components.
Marcin Modrzejewski (01-06-19, 04:13 PM)
On Friday, January 4, 2019 at 11:27:42 PM UTC+1, FortranFan wrote:
> On Tuesday, December 18, 2018 at 2:50:56 PM UTC-5, Marcin Modrzejewski wrote:
> @Marcin,
> I've always wondered about the *use case(s)* of coarray components of derived types not having seen this facility illustrated in any application context in any of the literature on Fortran coarrays I have reviewed.
> The book mentioned in this thread, Modern Fortran Explained, doesn't inform me about this facility in the standard either.
> Would it be possible for you to share why you have considered this feature and for what which then led you to the (likely) bug in Intel Fortran compiler?
> Thanks much,


@FortranFan,

My case is a quantum-chemical software which keeps a big coarray, and the computational work associated with it, distributed across several nodes.

As I add features to this program, the number of arguments passed to the core computational subroutines grows immensely. To make things simpler, I keep these arguments in subsets bunched together in derived-type variables. Such derived-type arguments are passed along several layers of subroutine calls, and then finally unpacked when a core subroutine is called. Thus, my use of coarrays as components of a derived type is just for making the code readable.

Thanks,
Marcin
FortranFan (01-07-19, 11:39 PM)
On Sunday, January 6, 2019 at 1:19:37 AM UTC-5, Gareth wrote:

> Regarding a "use-case" for derived types with coarray components -- I think
> this would help for applications with irregular-communication needs. ..
> For now I have not done this because of concerns about compiler support for derived types with coarray components.


On Sunday, January 6, 2019 at 9:13:03 AM UTC-5, Marcin Modrzejewski wrote:

> ..
> My case is a quantum-chemical software which keeps a big coarray, and thecomputational work associated with it, distributed across several nodes.
> .. my use of coarrays as components of a derived type is just for making the code readable.
>..


Thank you both very much for your feedback, appreciate it greatly.

Under the SPMD model toward Fortran coarrays, what is unclear to me yet is the relative advantage of employing derived type with allocatable *coarray*components versus using derived types that have allocatable *but not* coarray components.

I'm glad though the standard did include support for both the approaches, perhaps there is need for both such derived types in certain applications and the standard has been kind in allowing both! I hope as you all get to try out your approaches using coarrays and achieve success, more and more folks get to benefit from your "lessons learned".

Thanks again,
brooksj631 (01-15-19, 09:16 AM)
CONTACT US FOR Pain Pills,Nembutal,Seconal ,Oxycotin, Dilaudid,Valium,Hydrocodone & Ritalin Online.
call or text +1(405)500-0724
website :
email me at cliffbudman237
Hello, we are suppliers of assorted pain killers and anxietay pain relief meds, and other research chemicals. Discount are also applicable for bulk buyers.The shipping is meticulously planned; packaging is done with professionalis.
We have the following meds below available in stock now for auction;
Pain/ Anxiety Pills
Seconal
Nembutal (Powder,Pills and Liquid form)
Oxycotin / Oxycodone 10,20 a,40 and 80 mg
Actavis Promethazine Codeine Purple Cough Syrup (16oz and 320z)
Hydrocodone 10500, 10325 ,7.5750 mg
Valium 10,15 and 20 mg
Xanax 1 and 2 mg
Dilaudid 2,4 and 8 mg
Ritalin 5,10, 20 mg
Percocet 7.5mg,5mg and 10mg
Opana 20mg and 40mg
Lorcet - (Hydrocodone Bitartrate/Acetaminophen) 10 mg/650 mg
Midazolam 3mg
Motrin 400mg and 600mg
Norco - ( Hydrocodone Bitartrate/Acetaminophen ) 5 mg/325 mg
Soma 350mg
Tramadol (Ultram) 50mg
Valium 2mg,5mg and 10mg
Valium Roche Brand 10mg
Voltaren 50mg and 100mg
Adderall,Anaprox,Ansaid,Acephen
Bupren , ex,Butrans
Percocet,Phrenilin,Percodan
Soma, , Subutex
Cataflam,Celebrex
Flexeril, Fentora ..,
Demerol,Daypro,Dilaudid
Endocet
Lorcet, L, ortab
Ibudone
Methadone,Morphine
Naprosyn , ,Norco
Oxycontin, Opana
Ritalin, Roxicodone®

Similar Threads