NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.42k stars 12.92k forks source link

Foldingathome ROCM GPU Support #304868

Open codebam opened 2 months ago

codebam commented 2 months ago

Describe the bug

https://foldingforum.org/viewtopic.php?p=358294 Essentially this bug. Work Units download endlessly and cannot be completed due to crashing.

Steps To Reproduce

Steps to reproduce the behavior:

  1. gpu with rocm support
  2. enable foldingathome and rocmPackages.clr.icd
  3. run foldingathome

Expected behavior

Work units would be executed and completed on gpu.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Log: https://r2.seanbehan.ca/a083b097-4abb-482e-909f-204df82a6d81

Notify maintainers

@sergv

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.6, NixOS, 24.05 (Uakari), 24.05.20240417.edd8117`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/18p0lvi8gzlcj0nwnm6rhaqza5kg3g1g-source`

Add a :+1: reaction to issues you find important.

sergv commented 2 months ago

@codebam Could you please try playing with extraPkgs argument of the folding at home nix package (defined at https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/misc/foldingathome/client.nix#L13C3-L13C12) to see whether explicitly adding libstdc++ in there solves the problem? If yes then it could be added to FHS packages. Sadly I don't have AMD-capable OpenCL so cannot test the suggestion myself.

Notifying real maintainer in the meantime @zimbatm.

codebam commented 2 months ago

Not sure how to do that sorry. What package would provide libstdc++? I asked on Matrix and was told it should already be part of stdenv.

sergv commented 2 months ago

I don't really know which package provides C++ standard library. One possibility seems to be the LLVM: llvmPackages_17.libcxx with the default being libcxx.

If it's already in stdenv then it seems like it could be accessed via pkgs.stdenv.cc.cc.lib according to https://discourse.nixos.org/t/how-to-solve-libstdc-not-found-in-shell-nix/25458/15.

Overall I cannot really suggest a working way because I cannot test my suggestions so you'll need to find a way.

codebam commented 2 months ago

Oh I just realized extraPkgs isn't available. Thank you anyways for trying to help