auriocus / VecTcl

Numeric array and linear algebra extension for Tcl
http://auriocus.github.io/VecTcl
Other
34 stars 9 forks source link

Win64: could not find interpreter "vectcl" #4

Closed auxym closed 5 years ago

auxym commented 9 years ago

Running windows 7 (x64). Tried compiling from source (msys2/mingw64) as well as the precompiled 0.2 release (plain vectcl).

% package require vectcl
could not find interpreter "vectcl"
auriocus commented 9 years ago

Am 19.11.15 um 16:44 schrieb Francis Thérien:

Running windows 7 (x64). Tried compiling from source (msys2/mingw64) as well as the precompiled 0.2 release (plain vectcl).

|% package require vectcl could not find interpreter "vectcl" |

this is a very strange error message. What does

puts $errorInfo

say?

Do you run this in a special tclsh? Does the VecTcLab-binary work for you?

Christian
auxym commented 9 years ago

Using ActiveTCL 8.5.18. VecTcLab.exe appears to work fine! Here's the output from errorinfo:

(ActiveState ActiveTcl 8.5.18.0 (64-bit)) 6 % package require vectcl
could not find interpreter "vectcl"
(ActiveState ActiveTcl 8.5.18.0 (64-bit)) 7 % puts $errorInfo
could not find interpreter "vectcl"
    while executing
"load -global C:/Tcl/lib/vectcl/vectcl02.dll vectcl"
    ("package ifneeded vectcl 0.2" script)
    invoked from within
"package require vectcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 {package require vectcl}"
auriocus commented 9 years ago

Ah yes. It is an incompatibility with 8.5. The -global switch was introduced only in 8.6. For use with 8.5, just delete the "-global" from this line in pkgIndex.tcl, it should still work. There might be more incompatbilities, I test only on 8.6

auxym commented 9 years ago

I see! Too bad, I was hoping to use vectcl in an app that has a built in tcl (8.5.9) interpreter.

Still, I'll try it out without -global. Thanks for the quick help!. (Suggestion: you might want to specify the minimum tcl version in the readme?)

auriocus commented 9 years ago

Am 20.11.15 um 01:25 schrieb Francis Thérien:

I see! Too bad, I was hoping to use vectcl in an app that has a built in tcl (8.5.9) interpreter.

You will at least need the TclOO package, which is built into 8.6 but not into 8.5. Otherwise it worked some time, it's just not generally tested.

Still, I'll try it out without -global. Thanks for the quick help!.

Tell me if it works for you.The -global is only needed for the experimental jit branch. I will remove it from master.

(Suggestion: you might want to specify the minimum tcl version in the readme?)

Thanks for the suggestion, I'll update the readme.

Christian
auxym commented 9 years ago

Good news, it appears to work fine without the -global switch.

Much thanks, and great job on the package so far by the way, quite user friendly and feature complete. If I may make one last suggestion, not related at all to this issue, logical indexing of arrays could be rather useful.

auriocus commented 9 years ago

Am 20.11.15 um 20:59 schrieb Francis Thérien:

Good news, it appears to work fine without the -global switch.

Much thanks, and great job on the package so far by the way, quite user friendly and feature complete. If I may make one last suggestion, not related at all to this issue, logical indexing of arrays could be rather useful.

Yes that would be very useful. I couldn't decide so far whether to implement logical indexing (i.e. index with the same shape and either true/false), or indexed indexing (indexing with a vector of indices). I'm not sure both is possible, unless there are Booleans as a distinct type.

May I ask what you are using it for? So far the package does not have many users.

Christian
auxym commented 9 years ago

Forgot to mention in my previous comment, but I also had to add to escaped braces to the pkgIndex script to get it to handle a $dir that contains spaces:

package ifneeded vectcl 0.2 \
    "load \{[file join $dir vectcl02.dll]\} vectcl;
     source \{[file join $dir vexpr.tcl]\}"

I was mostly thinking of boolean indexing, to allow things like A[A<2] = 3 which is pretty common in MATLAB, for example. I do believe numpy implements both, I even think I remember needing to use the array indexing at one point, can't remember exactly why though.

TCL is pretty common as en embedded scripting/macro/plugin language in CAD/CAE applications. I'm [attempting to] use vectcl to speed up some custom post-processing on FEA results in Altair's Hyperworks suite, mostly by vectorizing operations that used to be done in a plain tcl foreach loop. Preliminary results show about 2x speedup, which is decent. It is unfortunate that the app's API only passes records one by one instead of entire tables. Records contain anywhere between 3-20 float values, whereas tables can be multiple hundred thousand records. A vectorized operation on an entire table at once would be blazing fast.

auriocus commented 5 years ago

The problem with spaces in the path was fixed. Tcl 8.5 support is not planned (won't fix). Boolean operator indexing is, in principle, planned, but not realised at the moment due to lack of time.