Hi John --
> const D = function_returning_sparse_domain_with_string_keys_and_values();
>
> causes following warning:
>
> src/test.chpl:56: warning: whole-domain assignment has been serialized
> (see note in $CHPL_HOME/STATUS) [functionResolution.cpp:2556]
>
> I checked the status file but couldn't quite understand what are the
> practical implications of this? Everything related to that domain will
> happen on a single locale.
Even on a single locale, domain<-domain assignment is intended to have a
parallel implementation for sparse/associative domains that require O(n)
work to do the assignment. This warning warns that that isn't implemented
yet (I can't recall why offhand). The only implication is a possible
performance surprise. There's been some debate about how useful these
warnings really are, but nobody's gotten around to deciding that they
aren't and pulling them out...
> - Following code
>
> class Outer {
> class NestedBase {
> var fieldOne: real;
> }
>
> class NestedDerived: NestedBase {
> var anotherField: int;
> }
> }
>
> results in this error message:
>
> src/test.chpl:6: error: '_mt' has multiple definitions, redefined at:
> src/test.chpl:2 [scopeResolve.cpp:240]
>
> Is this a bug or a feature? I worked around that by not making those
> classes nested since that was possible in this case. However I would
> rather not to clutter the global namespace, maybe modules could help
> mere?
Sounds like a bug to me. My guess is that nested classes are not
used/tested much and that that's the source of the error.
If you want to dip a toe into the compiler (since most of us are
struggling to get the release out this week), a simple fix might be to
have the _mt identifiers that the compiler generates increment a global
counter to avoid them colliding with one antoher. I'm not entirely sure
why nesting classes makes this happen more than sibling classes at module
scope would be. Grepping on "_mt" in the compiler makes it pretty easy to
find the dozen or so places where they're created (which could/should
arguably be refactored into a utility routine defining the global
counter).
-Brad
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users