Hi John,
Assuming that I have understood your proposal, I find this concept
intriguing in the abstract. Unfortunately I think that you are considering
a notion that is beyond the current design of Chapel. It is, of course,
possible that someone else in the community will propose an approach
that I am overlooking.
As you know, domain maps are intended to allow a relatively advanced
user to define how the indices of a domain and the elements of an array
map to storage locations in memory. The Chapel implementation provides
a number of useful domains maps.
As you indicate this means that a user could, for example, implement
a domain map that causes array elements to be stored in row major
order rather than the default column major order.
However accessing the field of a record that is an element of an array
requires two levels of addressing that Chapel considers to be distinct.
I think one could imagine developing a language feature that allows Chapel
to transform an array of structures to be a structure of arrays. However, if I
understand correctly, you are imagining a more general language feature
that generates this behavior as one of its use cases. Is that right?
I wonder if you have a path in mind?
With thanks and regards,
Mike
On Jun 15, 2016, at 11:20 AM, John Hall
<[email protected]<mailto:[email protected]>> wrote:
It appears I forgot to reply all to my original reply...
After looking over the documentation a bit more thoroughly, I think that what
I'm referring to is closer to the layout in the Domain Map section, rather than
putting things on different locales. For instance, there is the discussion
about being able to customize things so that an array is row major instead of
column major, but I don't see any description of how to do that.
With respect to AoS vs. SoA, I was thinking about customizing the layout of the
struct/record using a domain map. For instance, the code prints an array of
structs in Chapel. It's possible to manually adjust the AoS so that it is a
SoA. However, it would be interesting if I could provide a layout/domain/domain
map that accomplishes this without needing to adjust Foo itself and instead
could just provide an alternate D.
record Foo {
var bar: int;
var baz: int;
}
proc main() {
var n: int = 2;
var D: domain(1) = {1..n};
var foo: [D] Foo;
writeln(foo);
}
On Tue, Jun 14, 2016 at 1:26 PM, Elliot Ronaghan
<[email protected]<mailto:[email protected]>> wrote:
Hi John,
I'm not entirely sure what you're asking WRT to domains. Domains are a
first-class language feature, and they are not exclusive to arrays. You
can definitely use them as a field of a record. I think I'm missing the
relation to AoS vs. SoA though. Can you say more about how you want to
use domains?
As far as the cygwin issue: We test cygwin nightly, and that's not a
familiar issue. I would try doing a `make clobber` in $CHPL_HOME and
then rebuilding. My best guess is that you might have tried to build
without all the dependencies and when you did install them the tree was
left in a weird state?
If that doesn't fix it, can you send me the output of `uname -a` as well
as `gcc --version`? (You can send that to me off-list since it probably
won't be of much use/interest to others.)
Elliot
>I was curious if domains only worked for arrays or if they can also be used
>for records. Some people find it an inconvenience to change an array of
>structs to a struct of arrays. I was thinking that the equivalent array of
>records to record of arrays might
> be more easily accomplished using domains.
>
>
>I was going to test this myself, but I had issues installing with Cygwin. At
>first I just realized that I hadn't installed all the dependencies, but I
>found the doc for Cygwin and think I installed them all. The last time I ran
>make, the tail of the output
> is below. I see a bunch of these undefined reference to ___ lines.
>
>./util/gen/cygwin64.gnu.wide-struct.llvm-none/misc.o:misc.cpp:(.text+0xe5f):
>undefined reference to `Symbol::hasFlag(Flag) const'
>./util/gen/cygwin64.gnu.wide-struct.llvm-none/misc.o:misc.cpp:(.text+0x1113):
>undefined reference to `FnSymbol::isIterator() const'
>./util/gen/cygwin64.gnu.wide-struct.llvm-none/misc.o:misc.cpp:(.rdata$.refptr.currentAstLoc[.refptr.currentAstLoc]+0x0):
> undefined reference to `currentAstLoc'
>collect2: error: ld returned 1 exit status
>make[2]: *** [Makefile:128:
>/cygdrive/c/chapel/chapel-1.13.0/chapel-1.13.0/bin/cygwin64/chpl.exe] Error 1
>make[1]: *** [Makefile:65: compiler] Error 2
>make: *** [Makefile:57: comprt] Error 2
>
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.
http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381_______________________________________________
Chapel-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/chapel-users
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users