Hi everyone,
In reference to Rafael's proposed method of dynamically splitting up a
communication call into multiple ones:
Just use a variable, for example, to use another offset at the source you can
use:
var origin=100:int;
var lmin=5:int;
__primitive("array_get", src,
arrSection.myElems._value.getUnshiftedDataIndex(origin-lmin)),
Then you can change the values of origin and lmin in different loops.
Also remember that in the first line you must also use the Unshifted version of
getdataindex :
__primitive("array_get", dest, buf._value.getUnshiftedDataIndex(1)),
How would this be extended if the block of data to be sent in a message was
multidimensional? The method above seems to work fine for one dimensional
blocks of data, but not for multidimensional. For example, if I wanted to
communicate a 6 x 6 block into 2 6 x 3 blocks, my understanding would be to
modify the "copy length" parameter to accommodate a 6 x 3 block. The "offset"
for the second 6 x 3 block now would be 3*srcStride[1], where srcStride[1] is
the distance in memory between two successive rows of the 6 x 6 block. Does
this method make sense? I have implemented this extension this way and I see
that my program crashes when attempting to communicate memory from the second
block, which leads me to believe that I have chosen an incorrect pointer to the
second 6 x 3 block.
Any additional insight would be appreciated. Thanks.
Aroon Sharma
University of Maryland, Class of 2015
M.S. Computer Engineering
(301) 908-9528
On Thursday, January 23, 2014 3:34 PM, Rafael Asenjo Plaza <[email protected]>
wrote:
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