unofficial mirror of guix-science@gnu.org 
 help / color / mirror / Atom feed
From: Emmanuel Medernach <Emmanuel.Medernach@iphc.cnrs.fr>
To: Simon Tournier <zimon.toutoune@gmail.com>, guix-science@gnu.org
Subject: Re: Problem with guix copy
Date: Tue, 19 Mar 2024 16:40:00 +0100	[thread overview]
Message-ID: <89e1cd35-3d37-4d5a-bf72-cc2147fa7118@iphc.cnrs.fr> (raw)
In-Reply-To: <87jzlyikl2.fsf@gmail.com>


Le 19/03/2024 à 11:26, Simon Tournier a écrit :
> Hi Emmanuel,
>
>> Machine_B # guix copy --from=Machine_A bazel --dry-run
>> The following derivation would be built:
>>     /gnu/store/0lscmi07b2y0aw6hscbgm2h7nqwc6sb1-bazel-6.4.0.drv
> Could you share this derivation file?  And the one from Machine A?
>
> To be precise, on Machine B, you should get:
>
>          $ guix time-machine -q -C channels.scm -- build --no-grafts bazel -d
>          /gnu/store/dnwdzl84cxgk232cwh8843f3dhqmyd69-bazel-6.4.0.drv
>
> And on Machine A, you get another one, right?

Hi Simon,

Bazel is now compiled on both machines, but I have similar issue with 
tensorflow

Both have the same derivation file:

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 derivation file and channels are both the same on both machines.

But I cannot copy tensorflow from Machine_A to Machine_B:

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

Machine_B # guix copy --from=<Machine_A> tensorflow --dry-run
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 
100.0%
The following derivations would be built:
/gnu/store/4g2whbzgn5nqs55x9iqgg23jdapf1srk-tensorflow-2.13.1.drv
/gnu/store/g90vfnx128ifhgy0n1zmlscjrn57l8xm-tensorflow-2.13.1-bazel-deps.tar.xz.drv
/gnu/store/h3zcigb52z7m6yyjl785w3a5ls1cjjc7-python-jax-0.4.20.drv
/gnu/store/h9m0ix80glph19k4pfqh130nmkil8f39-python-jaxlib-0.4.20.drv
/gnu/store/m4icdavpvbryliz34ai8817bb1d3l3xr-python-jaxlib-0.4.20.drv


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

Am I doing something wrong ?

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

Cheers,

Emmanuel


> For instance, run this command on both machines:
>
>      cp                                                                      \
>        $(guix time-machine -q -C channels.scm -- build --no-grafts bazel -d) \
>        /tmp/machine-X.drv
>
> where X is A or B, respectively.
>
> These files track exactly how the item is built (derived).  Therefore,
> since the hash of the output differs, you should differ somewhere.
> Previously, you checked about the inputs, now we need to compare the
> complete derivation.
>
>
> Cheers,
> simon
>
> PS: Please note that the content of two store items might be bit-to-bit
>      identical with different store item paths (hash).
>      
>      Consider the example with the exact same source where the difference
>      is just one comment somewhere in the code.  Then, their hashes are
>      different.  However, once compiled the binaries are identical
>      (compiler usually removes comments).
>
>      Since the hash of one input (source) differs, then the store item
>      paths are different but the content of these both store items are
>      bit-to-bit identical.
>
>      The machinery to track down the origin of the difference is all
>      these derivation .drv files.


  reply	other threads:[~2024-03-19 15:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15  9:14 Problem with guix copy Emmanuel Medernach
2024-03-15  9:21 ` Emmanuel Medernach
2024-03-15 13:58   ` Emmanuel Medernach
2024-03-15 14:10     ` Andreas Enge
2024-03-15 14:37       ` Emmanuel Medernach
2024-03-15 14:50         ` Emmanuel Medernach
2024-03-19 10:26 ` Simon Tournier
2024-03-19 15:40   ` Emmanuel Medernach [this message]
2024-03-19 15:51     ` Emmanuel Medernach
2024-03-21 22:19     ` Simon Tournier
2024-03-25 10:13       ` Emmanuel Medernach
2024-03-27 13:05 ` Simon Tournier

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=89e1cd35-3d37-4d5a-bf72-cc2147fa7118@iphc.cnrs.fr \
    --to=emmanuel.medernach@iphc.cnrs.fr \
    --cc=guix-science@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).