guix-science
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with guix copy


From: Simon Tournier
Subject: Re: Problem with guix copy
Date: Thu, 21 Mar 2024 23:19:26 +0100

Hi Emmanuel,

On mar., 19 mars 2024 at 16:40, Emmanuel Medernach 
<Emmanuel.Medernach@iphc.cnrs.fr> wrote:

> Machine_A # guix time-machine -q -C ~/.config/guix/channels.scm -- build 
> --no-grafts tensorflow -d
> /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv
>
> Machine_A # md5sum 
> /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv
> c7833f974f217ada62b3eb6cdccee11f 
> /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv
>
> Machine_B # guix time-machine -q -C ~/.config/guix/channels.scm -- build 
> --no-grafts tensorflow -d
> /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv
>
> Machine_B # md5sum 
> /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv
> c7833f974f217ada62b3eb6cdccee11f 
> /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv

The 2 derivations are the exact same.  Since they build tensorflow
without grafts, it means the issue comes from grafts, no?


> Machine_A # guix package --list-installed | grep tensorflow
> tensorflow              2.13.1          out 
> /gnu/store/jghvlb5dz4sy1p0cd1qx552r1ldj33wi-tensorflow-2.13.1

This information is useless, I think.  What is needed is the derivation
for grafting.  Something like:

Machine_A# guix time-machine -q -C ~/.config/guix/channels.scm -- build 
tensorflow -d



> Machine_B # guix copy --from=<Machine_A> tensorflow --dry-run
[…]
> /gnu/store/4g2whbzgn5nqs55x9iqgg23jdapf1srk-tensorflow-2.13.1.drv

[...]

> Without dry-run he would try to recompile tensorflow on Machine_B which 
> results in a memory crash.

Yeah, that’s expected because it needs the non-grafted item.


> Why 'guix copy' derivation is 
> /gnu/store/4g2whbzgn5nqs55x9iqgg23jdapf1srk-tensorflow-2.13.1.drv 
> instead of 
> /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv ?

Well, on Machine_A, these

    # guix build tensorflow -d --without-grafts
    # guix build tensorflow -d

should produce two different derivations.  Right?  On my machine, I get:

--8<---------------cut here---------------start------------->8---
$ guix time-machine -q -C channels.scm -- build tensorflow@2 -d --no-grafts -n
  /gnu/store/s6fm43503ra6yxclqvk80gfiw4zxbp91-tensorflow-2.13.1.drv

$ guix time-machine -q -C channels.scm -- build tensorflow@2 -d -n
  /gnu/store/4g2whbzgn5nqs55x9iqgg23jdapf1srk-tensorflow-2.13.1.drv
--8<---------------cut here---------------end--------------->8---


What does “guix copy --no-grafts”?


Well, to be sure we are on the same wavelength: there are 4 derivations,

 + Machine_A: the real build (--no-grafts) and the grafted
 + Machine_B: idem and idem

So the debug seems:

 + check the no-grafts derivations are the same on both machines
 + check the grafted derivations are the same on both machines
 + check that “guix copy” copy both (no-grafts and grafted)

Emacs provides a mode for easing the manipulation of derivation and
Scheme builder files.  If you do not use Emacs, “guix gc” can be helpful
for tracking the derivations, I guess.

Cheers,
simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]