[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Fw: Questions about JAXB parser
|
Dave
1. Let me check on the output problem.
2. The validator. I'm not sure I can tie in directly to the mechanism which puts the messages up there. That's controlled by a core.launch layer, or by the top-level tabs.
Al
----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> Al
> The validator is triggering now. What I'm getting is a popup dialog that
> displays a message telling me the value is not valid and that it will be
> reset, then a second line showing me my error message text, the regex and
> the failing value.
>
> What I was expecting is that the error message I specified would be
> displayed in the upper left corner of the run configuration like other
> errors, and that the error message would go away when the error was fixed.
> The error dialog seems a little intrusive since I have to hit enter or
> click OK to clear it then resume typing.
>
> Environment variables seem to be working ok.
>
> For some reason, I'm not seeing my script output show up in the console
> view, but I'm also not sure I have the right console view. The one I have
> is titled CDT Build console. I'm not sure what I'm supposed to be doing to
> get a job console.
> Dave
>
>
>
>
>
> Re: [ptp-dev] Fw: Questions about JAXB parser
>
> Albert L. Rossi
> to:
> Parallel Tools Platform general developers
> 05/19/2011 12:20 PM
>
>
> Sent by:
> ptp-dev-bounces@xxxxxxxxxxx
> Please respond to Parallel Tools Platform general developers
>
>
>
>
>
>
> Dave,
>
> I've checked in the fixes (one meant having to retrieve the remote
> connection lazily because it is not available to the widget during the
> createControl method). I _believe_ that typing into an editable ComboBox
> should trigger a validator on the attribute the way it does for Text
> because it triggers a ModifyListener. But let me know if it doesn't work.
>
> I want to look at that other issue with executable path now, and then I am
> disappearing until Monday (;-)). But you can always open a bug and I'll
> take care of it when I'm back.
>
> Thanks for testing this; I had a suspicion I had left the validator only
> partially implemented.
>
> Al
> ----- Albert L. Rossi <arossi@xxxxxxxxxxxxx> wrote:
> > Dave,
> >
> > I think I found the bug. There is a setValidator() method which is not
> being called anywhere. I'll see if I can't fix this now.
> >
> > Al
> > ----- Albert L. Rossi <arossi@xxxxxxxxxxxxx> wrote:
> > > Dave,
> > >
> > > I fixed the environment variable value to take the ${ptp_rm:} tag (I
> haven't checked it in yet), and this is what I see in the redirect:
> > >
> > > Executable= /u/ncsa/arossi/SC2010/simple-mpi/ring MP_PROCS_ATTR= 12
> MP_PROCS= MP_PROCS_env= 12
> > >
> > > MP_PROCS of course is undefined, because there is no attribute in the
> resource manager list by that name. Two things.
> > >
> > > 1. If you separate the names from the values this way, then you will
> get a space on the line, because <arg> is space-delimited. You need to
> do:
> > >
> > > <arg>MP_PROCS_ATTR=${ptp_rm:MP_PROCS_ATTR#value}</arg>
> > >
> > > 2. If you don't want an undefined variable to appear at all, you
> should do:
> > >
> > > <arg
> isUndefinedIfMatches="MP_PROCS_ATTR=">MP_PROCS_ATTR=${ptp_rm:MP_PROCS_ATTR#value}</arg>
> > >
> > > then it will be eliminated if the value comes up empty.
> > >
> > > As for the spinner, it only accepts numerical values; you can set its
> min and max, but you can't do something like accepting values 1,2,3,6,11.
> You would need a validator for that, as well as your alphanumeric
> examples. But for processor count, I would think a Spinner is good enough
> (that's what I put on the PBS mpi cores attribute).
> > >
> > >
> > > I'll look at the validator next.
> > >
> > > Al
> > > ----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> > > > Al
> > > > I'll take a look at the spinner class to see if that does what I
> want.
> > > >
> > > > I have at least one case where the value can be numeric or one of a
> set of
> > > > strings where I expect to use an editable dropdown/combo box and
> need
> > > > numeric validation. I also have some values where the PE
> implementation
> > > > accepts values like 1M instead of 1000000 and I'm thinking I want to
>
> > > > follow that pattern, so would need validation there.
> > > >
> > > > I'm also not sure what happens with a spinner if I enter out of
> range or
> > > > non-numeric data. If it just beeps at me I think that's confusing
> since it
> > > > doesn't tell me what's wrong, whether I'm entering invalid data or
> if the
> > > > keyboard focus is somewhere where it shouldn't be.
> > > >
> > > > The command actually does work and write to /tmp/ptp_out. I can
> implement
> > > > a shell script which echoes environment variables and invoke that in
> place
> > > > of the echo command to see if environment variables are being passed
>
> > > > across in the process environment.
> > > >
> > > > One other question.
> > > >
> > > > Is there a stdout or stderr parser implementation in your code that
> simply
> > > > echoes the stdout/stderr to the console view in Eclipse? I'm using
> shell
> > > > redirection as an alternative to that now since I'm taking this one
> step
> > > > at a time.
> > > >
> > > > No need for you to be on the call this morning unless you choose to.
> It
> > > > sounds like I'm not too far off track with what I'm doing, so I can
> make
> > > > progress until you are back at work.
> > > > Dave
> > > >
> > > >
> > > >
> > > > From: "Albert L. Rossi" <arossi@xxxxxxxxxxxxx>
> > > > To: Parallel Tools Platform general developers
> <ptp-dev@xxxxxxxxxxx>
> > > > Date: 05/19/2011 08:43 AM
> > > > Subject: Re: [ptp-dev] Fw: Questions about JAXB parser
> > > > Sent by: ptp-dev-bounces@xxxxxxxxxxx
> > > >
> > > >
> > > >
> > > > Hi Dave,
> > > >
> > > > I'm taking a couple of days away from work, but I have been checking
> my
> > > > email. I can respond initially to your questions but ultimately
> we'll
> > > > need to revisit them.
> > > >
> > > > First, the validator. This may be a bug; it should work. However,
> in the
> > > > case of simple numerical validation, why not just use a Spinner
> widget for
> > > > that value and forget validation in the attribute? (of course, if
> this is
> > > > a bug, I will fix it).
> > > >
> > > > Second, environment variables defined inside a command are precisely
> that;
> > > > they are not defined in the scope of the resource manager
> configuration.
> > > > So you will not get it as a substitution into the actual command
> that is
> > > > issued; however, I would have thought the echo would get the actual
> > > > environment variable from the process environment. Two things:
> > > >
> > > > a) as it stands, the value of the environment variable should not
> have the
> > > > ${...} tag, this is added under the covers; try getting rid of that
> and
> > > > see if it works. Your usage, however, has suggested to me that it
> > > > actually is better to do what you are doing, because the value may
> just be
> > > > a constant, not a reference to a property or attribute (I had
> overlooked
> > > > this), in which case, wrapping it in ${ptp_rm:...#value} would fail.
> So I
> > > > will eventually change the environment variable to work the way you
> have
> > > > it here.
> > > >
> > > > b) I am actually surprised this command runs at all. Do you actually
> get
> > > > ptp_out? I didn't think the RemoteProcessBuilder allowed explicit
> shell
> > > > I/O redirection.
> > > >
> > > > I can be on the call today if you want to discuss this more. Let me
> know.
> > > >
> > > > Al
> > > >
> > > > ----- Dave Wootton <dwootton@xxxxxxxxxx> wrote:
> > > > > I intended to attach my XML file but hit send too soon. Trying
> again.
> > > > > Dave
> > > > >
> > > > >
> > > > >
> > > > > ----- Forwarded by Dave Wootton/Poughkeepsie/IBM on 05/18/2011
> 08:36 PM
> > > > > -----
> > > > >
> > > > >
> > > > >
> > > > > Questions about JAXB parser
> > > > >
> > > > > Dave Wootton
> > > > > to:
> > > > > ptp-dev
> > > > > 05/18/2011 08:35 PM
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Al
> > > > > I have partial success with getting a working resource manager. I
> have a
> > > >
> > > > > simple XML file that defines two widgets in a dynamic tab,
> intended to
> > > > set
> > > > > MP_PROCS_ATTR and MP_HOSTFILE_ATTR attributes which each are
> defined as
> > > > > attributes. I have a sumbit-interactive element which I use to
> invoke an
> > > >
> > > > > 'echo' command to try to display variables passed across to the
> remote
> > > > > system. For now, I'm just redirecting stdout & stderr to a file on
> the
> > > > > remote system by shell redirection ('echo foo > /tmp/file 2>&1')
> > > > >
> > > > > I also have two environment variables MP_PROCS and MP_HOSTFILE
> which I
> > > > > intende to get their values from MP_PROCS_ATTR and
> MP_HOSTFILE_ATTR
> > > > > respectively.
> > > > >
> > > > > When I open the run configurations, my widgets are displayed and I
> can
> > > > > fill in values. Those values are saved across sessions.
> > > > >
> > > > > I have two problems
> > > > >
> > > > > 1) If I click run in the run configuration, then look at the echo
> > > > command
> > > > > output, I can see the executable path and the value of the
> MP_PROCS_ATTR
> > > >
> > > > > attribute. However, I don't seem to get the value of the MP_PROCS
> > > > > environment variable, either as a substitution into the args array
> for
> > > > the
> > > > > command or as an actual environment variable in the echo command.
> > > > >
> > > > > 2) Also, I have a validator defined for MP_PROCS which I'm
> intending to
> > > > > accept only numeric input and reject anything else. That doesn't
> seem to
> > > >
> > > > > be working.
> > > > >
> > > > > Dave
> > > > _______________________________________________
> > > > ptp-dev mailing list
> > > > ptp-dev@xxxxxxxxxxx
> > > > https://dev.eclipse.org/mailman/listinfo/ptp-dev
> > > >
> > >
> > > _______________________________________________
> > > ptp-dev mailing list
> > > ptp-dev@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/ptp-dev
> > >
> >
> > _______________________________________________
> > ptp-dev mailing list
> > ptp-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/ptp-dev
> >
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev
>