Hi Aroon,
In addition to Rafael comments, you may want to have a look at this paper:
Global Data Re-allocation via Communication Aggregation in Chapel
this slides,
and play a little bit with this code:
puts-gets.chpl
(trunk/test/optimizations/bulkcomm/asenjo/testGasnet/puts-gets.chpl)
to help you understand how these routines work.
Thank you,
Rafa.
El 23/01/2014, a las 21:13, Aroon Sharma <[email protected]> escribió:
> Hi everyone,
>
> > Hi everyone,
> >
> > I am running into bugs in a multi-locale Chapel program and came across the
> > following in $CHPL_HOME/STATUS:
> >
> > - The --gdb flag is only supported for single-locale platforms that
> > support gdb. Please ask us for help if you want to debug a
> > multilocale program.
> >
> > That being said, I would like to know what options I have to debug a
> > multi-locale Chapel program and how to use these options.
> >
> > The specific problems I think I am encountering in my multi-locale program
> > have to do with the chpl_comm_get_strd and chpl_comm_put_strd communication
> > calls. I want to split a single get or put call into multiple calls to
> > conserve memory on a locale. The following code shows a single call
> > (assuming parameters are declared beforehand):
> >
> > //copy remote data to local buffer
> > __primitive("chpl_comm_get_strd",
> > __primitive("array_get", dest, buf._value.getDataIndex(1)),
> > __primitive("array_get",dststr,dstStride._value.getDataIndex(1)),
> > rid,
> > __primitive("array_get", src,
> > arrSection.myElems._value.getDataIndex(myFollowThis.low)),
> > __primitive("array_get",srcstr,srcStride._value.getDataIndex(1)),
> > __primitive("array_get",cnt, count._value.getDataIndex(1)),
> > stridelevels);
>
> Regarding the strided get call in my previous message, what does each
> "array_get" call mean semantically? For example, the __primitive("array_get",
> src, arrSection.myElems._value.getDataIndex(myFollowThis.low)). I understand
> vaguely that this call determines the source pointer at which to start from
> when communicating remote data, but that is about it. If I wanted to start
> from another source pointer (some offset from the original source pointer)
> that is determined dynamically at runtime, how might I do this? Any further
> help in understanding this would be appreciated. Here is the full code
> portion that might be useful in answering my question:
>
> var buf: [1..bufsize] this.eltType;
> var dest = buf._value.theData;
> const src = arrSection.myElems._value.theData;
> const rid=arrSection.locale.id;
> var dststr=dstStride._value.theData;
> var srcstr=srcStride._value.theData;
> var cnt=bounded_count._value.theData;
>
> //copy remote data to local buffer
> __primitive("chpl_comm_get_strd",
>
> __primitive("array_get", dest, buf._value.getDataIndex(1)),
>
> __primitive("array_get",dststr,dstStride._value.getDataIndex(1)),
> rid,
> __primitive("array_get", src,
> arrSection.myElems._value.getDataIndex(myFollowThis.low)),
>
> __primitive("array_get",srcstr,srcStride._value.getDataIndex(1)),
> __primitive("array_get",cnt,
> bounded_count._value.getDataIndex(1)),
> stridelevels);
>
> Aroon Sharma
> University of Maryland, Class of 2015
> M.S. Computer Engineering
> (301) 908-9528
>
>
> On Wednesday, January 22, 2014 3:31 PM, Rafael Larrosa Jiménez
> <[email protected]> wrote:
> Hi,
>
> > Hi everyone,
> >
> > I am running into bugs in a multi-locale Chapel program and came across the
> > following in $CHPL_HOME/STATUS:
> >
> > - The --gdb flag is only supported for single-locale platforms that
> > support gdb. Please ask us for help if you want to debug a
> > multilocale program.
> >
> > That being said, I would like to know what options I have to debug a
> > multi-locale Chapel program and how to use these options.
> >
> > The specific problems I think I am encountering in my multi-locale program
> > have to do with the chpl_comm_get_strd and chpl_comm_put_strd communication
> > calls. I want to split a single get or put call into multiple calls to
> > conserve memory on a locale. The following code shows a single call
> > (assuming parameters are declared beforehand):
> >
> > //copy remote data to local buffer
> > __primitive("chpl_comm_get_strd",
> > __primitive("array_get", dest, buf._value.getDataIndex(1)),
> > __primitive("array_get",dststr,dstStride._value.getDataIndex(1)),
> > rid,
> > __primitive("array_get", src,
> > arrSection.myElems._value.getDataIndex(myFollowThis.low)),
> > __primitive("array_get",srcstr,srcStride._value.getDataIndex(1)),
> > __primitive("array_get",cnt, count._value.getDataIndex(1)),
> > stridelevels);
>
>
> If you are using the trunk, one problem can be that you need to use
> getUnshiftedDataIndex in the pointers to source and destination instead of
> getDataIndex.
>
> Also I have found quite useful to activate the bounds checker for the
> programs
> with:
> --bounds-checks --local-checks --nil-checks --debug
>
> And it can help also to wrap those primitive calls with :
>
> startVerboseComm();
> __primitive("chpl_comm_get_strd",....
> stopVerboseComm();
>
>
> Hope this helps,
>
> Rafael
>
>
>
> > with the following semantics:
> >
> > __primitive("chpl_comm_get_strd",
> > pointer to source,
> > source strides,
> > remote locale id,
> > pointer to destination,
> > destination strides,
> > copy length,
> > number of dimensions
> > );
> >
> > Any suggestions or documentation relating to either of these topics would be
> > helpful.
> > Aroon Sharma
> > University of Maryland, Class of 2015
> > M.S. Computer Engineering
> > (301) 908-9528
>
> --
> Rafael Larrosa Jiménez
> Centro de Supercomputación y Bioinformática - http://www.scbi.uma.es
> Universidad de Málaga
>
> EMAIL: [email protected] Edificio de Bioinnovación
> TELEF: + 34951952788 C/ Severo Ochoa 34
> FAX : +34951952792 Parque Tecnológico de Andalucía
> 29590 Málaga (SPAIN)
>
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________
> Chapel-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/chapel-developers
__
Rafael Asenjo Plaza
Dept. Arquitectura de Computadores
Complejo Tecnologico Campus de Teatinos
E-29071 MALAGA (SPAIN)
Tel: +34 95 213 27 91
Fax: +34 95 213 27 90
http://www.ac.uma.es/~asenjo
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers