<div dir="ltr"><div><div><div>OK, what I did on my Mac:<br><br>1) look under the Squeak app and edit the Contents/Info.plist<br></div><div>2) change value of SqueakPluginsBuiltInOrLocalOnly to "No"<br></div><div> otherwise library loading is restricted to the Squeak app bundle<br></div><div>3) copy the veclib framework library files (dylib) in same directory as squeak image<br></div><div>4) launch Squeak<br></div><div>5) install Smallapack<br> follow instruction from <a href="https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak">https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak</a><br></div>6) change CBlasLibrary class>>moduleName 'libcblas.dylib' -> 'libBlas.dylib'<br></div><div> nowadays, cblas and blas are in the same dylib...<br></div><div>7) change CLapackLibrary class>>moduleName 'libclapack.dylib' -> 'libLapack.dylib'<br></div><div> idem<br></div>8) re-initialize the cache (I know, I know, there are too many...)<br> CBlasLibrary install. CLapackLibrary install. LapackMatrix resetBlasInterfaces; resetLapackInterfaces.<br></div><div>9) run the TestCBlas suite<br><br></div><div>It should be green<br></div><div>I will commit the changes later, and will probably implement moduleNames as a Preference (pragma oriented).<br></div><div>No need to override code anymore :)<br></div><div><br></div><div>I think step 3) is necessary because of ioLoadModuleRaw() in platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m<br></div><div><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m">https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m</a><br></div><div>It would only look those frameworks:<br></div><div><br> static char *frameworks[]=<br> {<br> "",<br> "/CoreServices.framework/Frameworks",<br> "/ApplicationServices.framework/Frameworks",<br> "/Carbon.framework/Frameworks",<br> 0<br> };<br><br></div><div>But I did step 3) before I tried 1) + 2), adn did not retry, so maybe I'm wrong...<br></div><div>Scanning all the frameworks is not a solution. And what if we want a specific version?<br></div><div>It would be far better to be able to specify the path to the library from within the image like VW...<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-07-29 19:41 GMT+02:00 Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2016-07-29 19:28 GMT+02:00 Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima <span dir="ltr"><<a href="mailto:Yoshiki.Ohshima@acm.org" target="_blank">Yoshiki.Ohshima@acm.org</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">First question:<br>
<br>
The Mac OS comes with Accelerate.Framework and that contains BLAS.<br>
But probably I still should compile those libraries, right?<br>
<div><div><br></div></div></blockquote><div><br></div></span><div>No, it's better to link to accelerated library.<br></div><div>I don't have a Mac handy here to verify how to link to it though.<br></div><div>I'll be able to check latter in the evening<br></div><div><div><div> <br></div></div></div></div></div></div></blockquote><div><br></div></span><div>I've downloaded the code, and I see it now: the library names are hardcoded (see implementors of moduleName).<br></div><div>For Mac it is libblas.dylib and libcblas.dylib<br><div>Also note that there is a preference for switching to cblas (blas functions with C interface).<br></div>This should be faster because we pass some parameters by value rather than allocating them and pass reference...<br><br></div><div>Module names could also be replaced by Preferences eventually, but by now, you'll have to override...<br> <br></div><div><div class="h5"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div><div></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div><div>
<br>
On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima<br>
<<a href="mailto:Yoshiki.Ohshima@acm.org" target="_blank">Yoshiki.Ohshima@acm.org</a>> wrote:<br>
> Thanks!<br>
><br>
> On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier<br>
> <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
>> Hi Yoshiki,<br>
>><br>
>> Thanks for inquiring about Smallapack.<br>
>><br>
>> This problem has been solved in 2011 as the post tells.<br>
>> Moreover, it was about alignment of squeak objects that was on multiple of 4<br>
>> on SqueakV3 memory.<br>
>> Spur is 8 byte aligned, so the problem would have also vanished without any<br>
>> patch for those being patient :)<br>
>><br>
>> For the 15 arguments limit, Smallapack comes with it's own compiler, so it's<br>
>> a non issue.<br>
>> Maybe I should make the documentation more clear on<br>
>> <a rel="noreferrer" href="https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak" target="_blank">https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak</a><br>
>> ?<br>
>><br>
>> Unfortunately, there's no Sparse Matrix representation in Lapack.<br>
>> If you know of a good package for that, it could be integrated.<br>
>><br>
>> If you have other questions, don't hesitate to ask.<br>
>><br>
>> cheers<br>
>><br>
>> Nicolas<br>
>><br>
>> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima <<a href="mailto:Yoshiki.Ohshima@acm.org" target="_blank">Yoshiki.Ohshima@acm.org</a>>:<br>
>>><br>
>>> I am trying to do a bit of linear algebra stuff that involves to solve<br>
>>> a sparse 2D matrix (for a variation of doing least square fit).<br>
>>><br>
>>> There was a message from Nicolas:<br>
>>><br>
>>> <a rel="noreferrer" href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html" target="_blank">http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html</a><br>
>>><br>
>>> Is this where it stands today, too? It looks like that arg count<br>
>>> problem is still there in 5.0, but is it in a way non-issue as it is<br>
>>> still FFI based?<br>
>>><br>
>>> Thanks!<br>
>>><br>
>>> --<br>
>>> -- Yoshiki<br>
>>><br>
>><br>
>><br>
>><br>
>><br>
><br>
><br>
><br>
> --<br>
> -- Yoshiki<br>
<br>
<br>
<br>
</div></div><span><font color="#888888">--<br>
-- Yoshiki<br>
<br>
</font></span></blockquote></div></div></div><br></div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>