smoothDist6(s)

Moderators: michael_borland, soliday

Post Reply
tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

smoothDist6(s)

Post by tennant » 19 Jul 2010, 13:55

Hi,

Not sure if this is a bug or not. The SDDS documentation says that the command is "smoothDist6s" but when you click on it for more details, it says it is "smoothDist6". Typing "smoothDist6" gives me an "command does not exist" error, while typing "smoothDist6s" gives me the attached message/error(?). When I try using the command on a file, I also get an error message about "unknown token: c_mks" (see attached). Is the problem on my end?

Thanks,
chris
Attachments
error.png

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

Re: smoothDist6(s)

Post by soliday » 19 Jul 2010, 14:11

It looks like your RPN_DEFNS environment variable is not set correctly. If you type:
echo $RPN_DEFNS
do you get:
C:\WINDOWS\defns.rpn or something similar and does this file exist? It should be installed by the Elegant installation.

Also to test it try running:
$ rpn
Welcome to rpn version 6, by Michael Borland and Robert Soliday (June 1999).
rpn> pi
3.141592653589793

If this is the problem you can download the defns.rpn file from:
http://www.aps.anl.gov/asd/oag/downloads/defns.rpn

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: smoothDist6(s)

Post by tennant » 19 Jul 2010, 14:25

Everything tests out okay:

"echo $RPN_DEFNS" gives C:\WINDOWS\defns.rpn
"$ rpn" gives Welcome to rpn version 6, by Michael Borland and Robert Soliday (June 1999).
"rpn> pi" gives 3.141592653589793

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: smoothDist6(s)

Post by michael_borland » 19 Jul 2010, 14:42

Chris,

This is definitely an rpn definitions problem. I suspect it has to do with the environment that gets inherited by the smoothDist6s script. I'm never quite sure how this works (or if it works) on Windows machines.

--Michael

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

Re: smoothDist6(s)

Post by soliday » 19 Jul 2010, 14:45

One more thing before I dive into this further. The script is a Tcl script, are you using the tclsh from cygwin or from ActiveTcl? The cygwin version will not pass the RPN_DEFNS variable correctly and you will need the ActiveTcl version installed and the cygwin version uninstalled.

Refer to RPN error if this is the case.

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: smoothDist6(s)

Post by tennant » 19 Jul 2010, 17:01

Yes, I am using cygwin. I will follow the steps from you previous post that addressed this problem. Thanks.

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: smoothDist6(s)

Post by tennant » 28 Jul 2010, 09:05

I followed the directions from the previous post you recommended (uninstalled tcltk from cygwin, installed ActiveTcl, etc...) and when I type "smoothDist6s" I get the following error: "couldn't read file "/cygdrive/c/Program Files/APS/Elegant/smoothDist6s": no such file or directory". This seems like a worse error message than the original one I was getting. Any suggestions?

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

Re: smoothDist6(s)

Post by soliday » 28 Jul 2010, 11:03

I forgot about this. If you are using a full path name and not a relative path name then you will run into this problem. ActiveTcl does not understand the POSIX directory names from cygwin. What you can do is run cygpath with the -m option to convert the pathname to a version that will work with cygwin and ActiveTcl.

$ cygpath -m /cygdrive/c/Program\ Files/APS/Elegant/smoothDist6s
C:/Program Files/APS/Elegant/smoothDist6s

So to run the program you can type:
C:/Program\ Files/APS/Elegant/smoothDist6s on the cygwin terminal.

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: smoothDist6(s)

Post by tennant » 28 Jul 2010, 11:52

Thanks, it seems to be working now!

tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Re: smoothDist6(s)

Post by tennant » 30 Aug 2010, 12:34

Okay, so I thought it was working... when I type in the command on cygwin I get the attached message. I also tried passing an input file and setting ripple and amplitude and I get almost the same message. Help please! Thanks.
Attachments
msg.png

Post Reply