unofficial mirror of guix-science@gnu.org 
 help / color / mirror / Atom feed
From: Cayetano Santos via Guix-Science <guix-science@gnu.org>
To: Hugo Buddelmeijer <hugo@buddelmeijer.nl>
Cc: guix-science <guix-science@gnu.org>
Subject: Re: Julia and Flux
Date: Tue, 02 Apr 2024 21:29:15 +0200	[thread overview]
Message-ID: <87v84zbm2c.fsf@inventati.org> (raw)
In-Reply-To: <CA+Jv8O3mZcSKBXMMTTW8CzJXHm38BG4RtoZjNM25TN2-_HXkyg@mail.gmail.com> (Hugo Buddelmeijer's message of "Sun, 31 Mar 2024 15:48:41 +0200")


(reply to full mail list)

>dim. 31 mars 2024 at 15:48, Hugo Buddelmeijer <hugo@buddelmeijer.nl> wrote:

> Hi Cayetano,
>
> Disclaimer, I'm still learning Guix as well, and I'm not (yet) a Julia
> user. So here are my 2 cents, which might not be that useful.
>
> Thanks for the channel description. It is indeed possible to reproduce
> your error with those channels. It seems to be the Julia 1.9.3 in the
> guix-hpc channel that is the cause of the differences. Removing that
> channel will give you Julia 1.8 from the main guix channel, where Flux
> does seem to import.

Sure, there is no issue with main guix channel. The issue arises only with
guix-hpc channel.

> The main error message seems to be this:
>
>> Illegal inttoptr
>>  %magicptr = ptrtoint {} addrspace(10)* %242 to i64, !dbg !26
>
> And there are various issues (e.g. [1]) on github saying that this
> problem occurs because an incorrect version of LLVM is used, and that
> a specific "patched" version of LLVM is needed. This is about how far
> my investigation went.
>
> However, I've learned that using both Guix and a language's own
> package manager, can lead to problems. It might be better to create
> Guix packages for Flux and its dependencies. At least that is my plan,
> for my (Python) projects.

I see. Julia 1.8 uses llvm-julia, whereas julia 1.9 uses llvm-14-julia
in guix-hpc.

A. Out of a guix shell, when I compile something, I’m using my system
llvm, whatever it is, and this probably produces  some mess.

If you’re right, to fix the problem, it would be necessary to create a different
guix package to all my julia dependencies (and also to its
dependencies), using julia 1.9 instead of 1.8, as they currently do in
main channel.

At this point, I think it might be easier for all if julia 1.9 (and 1.10 at some
point), was merged into main guix repo, given that this problem will
arise with other packages too.

That being said, if you’re right, one will need to install a julia
package not in the guix repositories soon or later.

B.  Coming back to my original issue, I’m doing

    guix shell -C --network --emulate-fhs --link-profile julia nss-certs -- julia -e 'using Pkg; Pkg.add("Flux"); using Flux'

meaning that I’m using only guix provided packages and environment. This
implies julia itself, along with llvm-14-julia. The problem remains the
same, regardless of the system I’m using outside of the container environment.

> There is already a julia-zygote package in Guix itself. So perhaps you
> could already achieve what you need by using the julia from the main
> Guix channel, instead of the one from guix-hpc, because then you can
> use the packaged zygote.
>
> [1] "Zygote and Flux Illegal inttoptr"
> https://github.com/JuliaLang/julia/issues/50153
>
> Hope this was useful Cayetano; I doubt I can contribute more.
>
> Hugo

I’d prefer to use recent version  of julia, so main channel is not an
option for me.

Thanks anyway,

C.


      parent reply	other threads:[~2024-04-02 19:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 10:08 Julia and Flux Cayetano Santos via Guix-Science
2024-03-29 14:17 ` Hugo Buddelmeijer
2024-04-02 19:18   ` Cayetano Santos via Guix-Science
     [not found]   ` <87o7axt47s.fsf@inventati.org>
     [not found]     ` <CA+Jv8O3mZcSKBXMMTTW8CzJXHm38BG4RtoZjNM25TN2-_HXkyg@mail.gmail.com>
2024-04-02 19:29       ` Cayetano Santos via Guix-Science [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v84zbm2c.fsf@inventati.org \
    --to=guix-science@gnu.org \
    --cc=csantosb@inventati.org \
    --cc=hugo@buddelmeijer.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).