guix-science
[Top][All Lists]
Advanced

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

Re: Problem with guix copy


From: Emmanuel Medernach
Subject: Re: Problem with guix copy
Date: Mon, 25 Mar 2024 11:13:00 +0100
User-agent: Mozilla Thunderbird


Le 21/03/2024 à 23:19, Simon Tournier a écrit :
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.

Hi Simon,

Here are the results:

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

Machine_A # guix time-machine -q -C ~/.config/guix/channels.scm -- build tensorflow --no-grafts
/gnu/store/3mq3q11ripx53xg60shbshk7cr470yfx-tensorflow-2.13.1
/gnu/store/qc234r07i3ndgrpa0fdkpkbg4d20h7i1-tensorflow-2.13.1-python

Machine_A # guix time-machine -q -C ~/.config/guix/channels.scm -- build tensorflow -d
/gnu/store/vivxpmrpkh1wq5pnw28vq9c51qd3vwf6-tensorflow-2.13.1.drv

Machine_A # guix time-machine -q -C ~/.config/guix/channels.scm -- build tensorflow
/gnu/store/jghvlb5dz4sy1p0cd1qx552r1ldj33wi-tensorflow-2.13.1
/gnu/store/1pzdf2rfifgwdw92g8438mhqvzx948s5-tensorflow-2.13.1-python

For  all  of  this  store elements  guix  copy  on
Machine B  tried to recompile tensorflow.  I ended
up  to copy  the whole  profile, this  copy worked
fine:

Machine_B # guix copy --from=MachineA /gnu/store/...-profile
Machine_B # guix package --list-installed | grep tensorflow
tensorflow              2.13.1          out /gnu/store/3mq3q11ripx53xg60shbshk7cr470yfx-tensorflow-2.13.1

For now I will copy whole profile instead of store
elements.

Thanks for your help,

Cheers,

Emmanuel

Cheers,
simon



reply via email to

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