Closed cchall closed 4 years ago
oagtclsh is a custom Tcl interpreter. Any setup would be to run Tcl.
computeGeneralizedGradients is a Tcl script so it would need to be transliterated to bash. That would be feasible but a bit of work.
We can install oagtclsh, which is also work. I think that would be the fastest path. Is that what you would like?
Let's go ahead and install oagtclsh then.
So I was wrong. oagtclsh
is simply a link to /usr/bin/tclsh
. I have no idea why they do this, but it is referenced in every script so it has to be there.
What is important is where the .tcl
libs are, and setting $OAG_TOP_DIR
.
I will create a bash script called oagtclsh
that will set $OAG_TOP_DIR
properly.
Sorry for the delay, but I had to wade through Build-AOP-RPMs, Build-AOP-RPMs.tcl, and OAGTclTk.spec before I figured out what this line meant:
ln -sf %{_bindir}/tclsh %{buildroot}%{_bindir}/oagtclsh
It seems obvious now...
I need to figure out which .tcl
files to install. There are lots.
I tested computeGeneralizedGradients with this example. The output was the same. Even though it is incorrect, I think the Tcl parts are working correctly.
A number of tools packaged with elegant do not function on Jupyter because they require oagtclsh (from https://www.aps.anl.gov/Accelerator-Operations-Physics/Software#PEM,%20Tcl/Tk I think)
computeGeneralizedGradients motived this issue, but there are others that are part of the list in the elegant manual in Section 8 (Specialized Tools for Use with elegant). Not all have this problem though.
oagtclsh is normally just used in performing boilerplate setup that is either not strictly necessary or can be replaced by bash. I've manually removed it from scripts that I need in the past, but it is a tedious process - for me at least. Is there a better option for getting these running?