RPN error

Moderators: cyao, michael_borland

Post Reply
jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

RPN error

Post by jtobin » 22 Jun 2010, 12:26

Hello,
I am trying to run and test CSR in bunch compressor examples under various conditions.
When I try and run ./phaseSweep and ./energySweep i get an rpn -error. Both the $RPN_DEFNS and the $PATH show that this file is existing! What could I be doing wrong in there..I am attaching the printScreen.

regards,
Charles
Attachments
rpnquestion.JPG

soliday
Posts: 391
Joined: 28 May 2008, 09:15

Re: RPN error

Post by soliday » 22 Jun 2010, 13:09

I would start with this little test:

$ rpn
Welcome to rpn version 6, by Michael Borland and Robert Soliday (June 1999)
rpn> -4 abs
4.00000000000
rpn> exit

I would also try this with a simple DOS command terminal to see if the problem is cygwin specific. This test in cygwin and DOS terminals works for me.

This runs RPN directly and uses the "abs" command. If you see problems than there is probably something wrong with your $RPN_DEFNS file. I am a little surprised that your RPN_DEFNS is set to c:\defns.rpn instead of c:\windows\defns.rpn. This is where the installer puts it's defns.rpn file. But if you already have RPN_DEFNS set then it will not change it.

jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

Re: RPN error

Post by jtobin » 22 Jun 2010, 13:38

Hi,
rpn works fine both in DOS and cygwin by itself.
So, i don't know what could be the issue here..

regards,
Charles

soliday
Posts: 391
Joined: 28 May 2008, 09:15

Re: RPN error

Post by soliday » 22 Jun 2010, 14:04

I think I know what it happening. You are probably using the tclsh that comes with cygwin. This version of tclsh does not seem to pass the RPN_DEFNS variable to child processes. I would suggest you use your cygwin setup.exe to uninstall the tcltk package. Next go and install the ActiveTcl version 8.5.8.2 from www.activestate.com/activetcl/downloads. After this you might also want to install our OAG Tcl/Tk Interpreter from: www.aps.anl.gov/asd/oag/downloads/OAG_Tcl-Tk.exe.

This will allow you to use tclsh from ActiveTcl instead of Cygwin.

jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

Re: RPN error

Post by jtobin » 23 Jun 2010, 10:45

Hi,
I tried doing that.
First, i uninstall Tcl/tk from cygwin through cywinsetup. Just to make sure it is remove i tried running again the example script ./phaseSweep and got an error stating tclsh command not found, which i presume to mean that tclsh is out.
Next, i installed ActiveTcl to my C:\.
Unfortunately, when I am try to complete the last step and install the OAG Tcl/TK interpreter cannot find the Tcl and Tk version in the executable PATH. I did install the programs in C:\ and added C:\Tcl to my PATH. But the OAG Tcl/tk interpreter doesn't recognize. What should i do?

Charles

soliday
Posts: 391
Joined: 28 May 2008, 09:15

Re: RPN error

Post by soliday » 23 Jun 2010, 11:03

You need to have C:\Tcl\bin in your path. The installer goes through all the path directories looking for wish85.exe. Once this is found it knows where to install the needed files. Also it copies wish85.exe to wish.exe and oagwish.exe. It also copies tclsh85.exe to tclsh.exe and oagtclsh.exe.

The phaseSweep program does not use any special code from OAG Tcl/Tk so if you wanted, you could just manually copy c:\tcl\bin\tclsh85.exe to c:\tcl\bin\tclsh.exe and you should be able to run it.

--Bob

jtobin
Posts: 47
Joined: 23 Jul 2008, 15:00

Re: RPN error

Post by jtobin » 23 Jun 2010, 12:13

Perfect! Now I am able to run the script. Thanks!

After running the script, I set path to C:\Tcl\bin and tried to install the OAG Tcl/Tk . (In fact, the PATH is set to C:\Tcl\bin by the ActiveTcl installer itself). But no luck, again. It is still unable to find it.

Anyways, for now I am happy that i can run the bunch compressor examples for my work. Thanks for the timely help! Excellent!

regards,
Charles

Post Reply