[Swift-devel] [Swift-commit] r5316 - in branches/release-0.93/src/org/griphyn/vdl: karajan/lib mapping
Michael Wilde
wilde at mcs.anl.gov
Fri Nov 25 20:43:00 CST 2011
What seems to be happening here is that when a mapped file variable is assigned to a variable, the mapping is not assigned with it.
I need to check, but I think that in older revisions (eg 0.92.1 ?) the mapping *was* assigned along with the value (i.e. the state) of the file variable.
Whats happening in this case is that when the array [out,out2] is created, the file-typed members of the constructed array have only default mappings (ie _concurrent/etc) - they have lost their original mappings assigned by the single_file_mapper <"filename">.
I *think* this is incorrect behavior, but perhaps that needs discussion. What do you think?
- Mike
----- Original Message -----
> From: "Michael Wilde" <wilde at mcs.anl.gov>
> To: hategan at ci.uchicago.edu
> Cc: "Swift Devel" <swift-devel at ci.uchicago.edu>
> Sent: Friday, November 25, 2011 7:59:19 PM
> Subject: Re: [Swift-devel] [Swift-commit] r5316 - in branches/release-0.93/src/org/griphyn/vdl: karajan/lib mapping
> Actually, looking at the error message more closely I am not sure my
> comment below is correct. The message may be complaining about the
> array object as a whole, and the [2] may be stating the number of
> elements (the array does indeed have 2 elements) as opposed to a
> member of the array that it believes is not mapped.
>
> I need to experiment further. Do you see an error in the test case?
>
> - Mike
>
>
> ----- Original Message -----
> > From: "Michael Wilde" <wilde at mcs.anl.gov>
> > To: hategan at ci.uchicago.edu
> > Cc: "Swift Devel" <swift-devel at ci.uchicago.edu>
> > Sent: Friday, November 25, 2011 7:52:26 PM
> > Subject: Re: [Swift-devel] [Swift-commit] r5316 - in
> > branches/release-0.93/src/org/griphyn/vdl: karajan/lib mapping
> > Mihael, this does not fix the bug that I reported in bug 644, but it
> > does seem to clarify the cause: the test case in bug 644 now gives
> > the
> > message:
> >
> > ?:file[2] - Closed is not a mapped type
> >
> > @filenames() should only be looking at array elements [0] and [1] -
> > seems to me that its going beyond the assigned elements of the array
> > to complain about [2] not being mapped. If I set element [2] it
> > complains about element [3] in the error message above.
> >
> > Did you try the test case? That case should not generate an error -
> > I
> > believe that its a valid program. if you replace @filenames() with
> > two
> > calls to @filename() it works. Ie all elements of the array passed
> > to
> > @filenames() are properly mapped.
> >
> > - Mike
> >
> >
> >
> >
> > ----- Original Message -----
> > > From: hategan at ci.uchicago.edu
> > > To: swift-commit at ci.uchicago.edu
> > > Sent: Thursday, November 24, 2011 3:18:52 PM
> > > Subject: [Swift-commit] r5316 - in
> > > branches/release-0.93/src/org/griphyn/vdl: karajan/lib mapping
> > > Author: hategan
> > > Date: 2011-11-24 15:18:51 -0600 (Thu, 24 Nov 2011)
> > > New Revision: 5316
> > >
> > > Modified:
> > > branches/release-0.93/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/AbstractDataNode.java
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java
> > > Log:
> > > throw better exception than NPE when @filename is called with a
> > > non-mapped argument
> > >
> > > Modified:
> > > branches/release-0.93/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
> > > ===================================================================
> > > ---
> > > branches/release-0.93/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
> > > 2011-11-23 19:33:26 UTC (rev 5315)
> > > +++
> > > branches/release-0.93/src/org/griphyn/vdl/karajan/lib/VDLFunction.java
> > > 2011-11-24 21:18:51 UTC (rev 5316)
> > > @@ -197,8 +197,17 @@
> > >
> > > private static String[] leavesFileNames(DSHandle var) throws
> > > ExecutionException, HandleOpenException {
> > > Mapper mapper;
> > > +
> > > synchronized (var.getRoot()) {
> > > - mapper = var.getMapper();
> > > + if (var instanceof AbstractDataNode) {
> > > + mapper = ((AbstractDataNode) var).getActualMapper();
> > > + if (mapper == null) {
> > > + throw new ExecutionException(var + " is not a mapped type");
> > > + }
> > > + }
> > > + else {
> > > + mapper = var.getMapper();
> > > + }
> > > }
> > > List<String> l = new ArrayList<String>();
> > > try {
> > >
> > > Modified:
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/AbstractDataNode.java
> > > ===================================================================
> > > ---
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/AbstractDataNode.java
> > > 2011-11-23 19:33:26 UTC (rev 5315)
> > > +++
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/AbstractDataNode.java
> > > 2011-11-24 21:18:51 UTC (rev 5316)
> > > @@ -513,7 +513,7 @@
> > > }
> > > }
> > >
> > > - protected Mapper getActualMapper() {
> > > + public Mapper getActualMapper() {
> > > return null;
> > > }
> > >
> > >
> > > Modified:
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
> > > ===================================================================
> > > ---
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
> > > 2011-11-23 19:33:26 UTC (rev 5315)
> > > +++
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootArrayDataNode.java
> > > 2011-11-24 21:18:51 UTC (rev 5316)
> > > @@ -103,7 +103,7 @@
> > > throw new
> > > FutureNotYetAvailable(waitingMapperParam.getFutureWrapper());
> > > }
> > >
> > > - protected Mapper getActualMapper() {
> > > + public Mapper getActualMapper() {
> > > return mapper;
> > > }
> > >
> > >
> > > Modified:
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java
> > > ===================================================================
> > > ---
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java
> > > 2011-11-23 19:33:26 UTC (rev 5315)
> > > +++
> > > branches/release-0.93/src/org/griphyn/vdl/mapping/RootDataNode.java
> > > 2011-11-24 21:18:51 UTC (rev 5316)
> > > @@ -213,7 +213,7 @@
> > > throw new
> > > FutureNotYetAvailable(waitingMapperParam.getFutureWrapper());
> > > }
> > >
> > > - protected Mapper getActualMapper() {
> > > + public Mapper getActualMapper() {
> > > return mapper;
> > > }
> > >
> > >
> > > _______________________________________________
> > > Swift-commit mailing list
> > > Swift-commit at ci.uchicago.edu
> > > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-commit
> >
> > --
> > Michael Wilde
> > Computation Institute, University of Chicago
> > Mathematics and Computer Science Division
> > Argonne National Laboratory
> >
> > _______________________________________________
> > Swift-devel mailing list
> > Swift-devel at ci.uchicago.edu
> > https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
>
> --
> Michael Wilde
> Computation Institute, University of Chicago
> Mathematics and Computer Science Division
> Argonne National Laboratory
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel
--
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory
More information about the Swift-devel
mailing list