Page 1 of 2
Slice Emittance
Posted: 09 Dec 2013, 07:17
by tennant
Hi,
I'm trying to use "coreEmittance" and I get the following error when I try to run it: "bash: /cygdrive/c/Program Files/APS/Elegant/coreEmittance: /usr/bin/tclsh: bad interpreter: Permission denied". Sounds like a problem on my end, but I'm not sure what it means. Any other way to extract slice emittances from a distribution?
Thanks,
chris
Re: Slice Emittance
Posted: 09 Dec 2013, 15:41
by soliday
This script has the wrong initialization compared to the other scripts.
You will need to edit the coreEmittance script and change:
#!/usr/bin/tclsh
to:
#!/bin/sh
# \
exec oagtclsh "$0" "$@"
Re: Slice Emittance
Posted: 10 Dec 2013, 09:45
by tennant
I made the edit, but now I get the message: "/cygdrive/c/Program Files/APS/Elegant/coreEmittance: line 3: exec: oagtclsh: not found".
Re: Slice Emittance
Posted: 10 Dec 2013, 09:58
by soliday
Do you have OAG_Tcl-Tk installed? The link is:
http://www.aps.anl.gov/asd/oag/software.shtml#TclTk
In the description it has a link to ActiveTcl which you will also need.
Re: Slice Emittance
Posted: 10 Dec 2013, 10:06
by tennant
Okay, thanks!
Re: Slice Emittance
Posted: 10 Dec 2013, 11:07
by tennant
Unfortunately I'm still getting the error about "exec: oagtclsh: not found" after installing the programs and rebooting my machine.
Re: Slice Emittance
Posted: 10 Dec 2013, 11:15
by soliday
oagtclsh should be in your path. The installer adds it there. Are you overwriting your PATH environment variable when you start cygwin? From my cygwin terminal I can type "which oagtclsh" and I get "/cygdrive/c/Tcl/bin/oagtclsh". Try adding the directory containing oagtclsh to your path manually and see if it solves the problem.
Re: Slice Emittance
Posted: 10 Dec 2013, 12:15
by tennant
Sorry that this is turning into troubleshooting. When I look at the contents of Tcl/bin this is what I have after installation. So where is oagtclsh supposed to be? I don't know how to define a path since I can't seem to find oagtclsh. Thanks.
Re: Slice Emittance
Posted: 10 Dec 2013, 14:00
by soliday
Sorry about that. The Window's setup is real goofy. Just copy the tclsh.exe to oagtclsh.exe. I just did a clean install on mine and that seemed to be the missing step.
Re: Slice Emittance
Posted: 10 Dec 2013, 14:46
by tennant
Not sure if this counts as progress or not...
So I copied tclsh and renamed it to oagtclsh. Now when I do a "which oagtclsh" I get the same path as you. However, when I type in "coreEmittance" I get the following message: "couldn't read file "/cygdrive/c/Program Files/APS/Elegant/coreEmittance": no such file or directory". If I change the header information in the script back to its original (i.e. "#!/usr/bin/tclsh") then I get the "bad interpreter" error message. Not sure how to proceed.