--- LONG MAIL -- Hello here,
I am requesting some testing for FriCAS with minimal support of Julia behind the scenes using libjulia. A work in progress I am working on among other FriCAS related things. I call it jlFriCAS as of now. Thanks to Qian for his work on GitHub CIs (Actions tab) which allowed me to automatically build this work on arch/OS that I do not have access to. Julia, https://julialang.org/, is necessary of course to load dynamically libjulia.(.so | .dll | .dylib). You can build it if the julia(.exe) executable is in your PATH. For simplicity I have tagged some binaries on GitHub built from the GitHub CI upload (you can use checksums to check their content if necessary, see Actions tab,I have only changed the names of some archives). The x86_64 Linux is built with all options set, Hunchentoot, HTML doc using Sphinx, Aldor support etc... './configure --help' shows them. All versions are built using SBCL as Common LISP backend. https://github.com/gvanuxem/jlfricas/releases/tag/snaphot-20241216 I would be very happy if you can download one or more of them and use some simple functions with your settings, see below for two main functions that interest me a lot, this addon uses two ways to interface Julia. I am testing this work with 'make check' on GitHub using CIs. For macOS I use 'julia-actions/setup-julia@latest' for CIs. But 'brew install julia' worked too. Since macOS version 13 it is more difficult to load the Julia library. For Windows julia.exe needs to be available in your PATH, the same directory contains libjulia.dll. For x86_64 Linux, I provide a .deb package. Every binaries are build by GitHub from GitHub source code, so source and commit are available (no security problem): https://github.com/gvanuxem/jlfricas For Windows I still have a .iss file (Inno Setup Script Wizard script). I will eventually adapt it, make a self install executable wizard for my snapshot binaries (testing purpose) and send the .iss script here for the contrib/ directory for example. Nevertheless, thanks again to Qian, clicking on FRICASsys after unzipping the archive starts jlFriCAS and the function jf64 does its job for example, I just checked (JuliaFloat64 is supported at underlying C and Lisp levels as a Lisp DoubleFloat). The Julia binaries are available here: https://julialang.org/downloads/. I tried juliaup on GitHub CIs for macOS without success but I do not have filesystem access to macOS so that's not easy to understand why, but 'brew install julia' does the job, see https://formulae.brew.sh/formula/julia About the internals, to resume things, I implemented two ways to use Julia in FriCAS, the first interface uses the underlying CL FFI, only SBCL and Clozure CL are supported actually. For data, JuliaInt64 uses (signed-byte 64) for arrays or the same implementation than SingeInteger in FriCAS for scalars. JuliaFloat32 and JuliaFloat64 use Lisp single-float and double-float CL type. A wrapper in C interfaces the CL FFI to use directly some specific operations in Julia. For scalars data are passed by values, for arrays, via the CL FFI from the underlying CL implementation, a C pointer is passed to Julia using libjulia available operations. The principal goal is efficiency, so even if some special scalar functions are added to FriCAS using Julia, the main part is operating on arrays (vectors or matrices). Usual linear algebra operations are provided using BLAS and LAPACK. a ')show JuliaF64LinearAlgebra' will show you somes for 64bit arrays. Julia uses internally the hardware optimized OpenBlas library which historically comes from the Goto BLAS library (autotuned at startup contrary to Atlas which used to tune the library a build time depending on your processor). This library can be changed at run time, for example with my Intel processor I can use MKL (called Intel oneAPI as of now), with jlUsing "MKL". The second interface is completely different. It implements a very simple Common Lisp class 'jlref' that holds a reference to every object used in Julia but created in FriCAS, and its Julia type. The manipulated Julia objects are used in FriCAS using this reference and the real data, arrays for example, but virtually everything in Julia, are in the Julia processes (multithreaded). - Greg -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/CAHnU2da0J5kL9eoTEA_d-BtMOSZyA9bOYVMzQZsgTQAH9XG5-w%40mail.gmail.com.