Slice Emittance

Moderators: cyao, michael_borland

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

Slice Emittance

Post by tennant » 09 Dec 2013, 07:17

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

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

Re: Slice Emittance

Post by soliday » 09 Dec 2013, 15:41

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" "$@"

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

Re: Slice Emittance

Post by tennant » 10 Dec 2013, 09:45

I made the edit, but now I get the message: "/cygdrive/c/Program Files/APS/Elegant/coreEmittance: line 3: exec: oagtclsh: not found".

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

Re: Slice Emittance

Post by soliday » 10 Dec 2013, 09:58

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.

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

Re: Slice Emittance

Post by tennant » 10 Dec 2013, 10:06

Okay, thanks!

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

Re: Slice Emittance

Post by tennant » 10 Dec 2013, 11:07

Unfortunately I'm still getting the error about "exec: oagtclsh: not found" after installing the programs and rebooting my machine.

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

Re: Slice Emittance

Post by soliday » 10 Dec 2013, 11:15

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.

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

Re: Slice Emittance

Post by tennant » 10 Dec 2013, 12:15

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.
Attachments
screen.png

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

Re: Slice Emittance

Post by soliday » 10 Dec 2013, 14:00

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.

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

Re: Slice Emittance

Post by tennant » 10 Dec 2013, 14:46

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.

Post Reply