Skip to content

mmseqs2: add missing include when +cuda - #2752

Merged
bernhardkaindl merged 1 commit into
spack:developfrom
ResearchIT:mmseqs2-cuda-thread-fix
Jul 14, 2026
Merged

mmseqs2: add missing include when +cuda#2752
bernhardkaindl merged 1 commit into
spack:developfrom
ResearchIT:mmseqs2-cuda-thread-fix

Conversation

@snehring

Copy link
Copy Markdown
Collaborator

I ran into a compilation issue when building +cuda. It seems to be a small refactoring error. I've put in a PR upstream (soedinglab/MMseqs2#1069) with the same change this makes, hopefully we'll only need this for the current version.

Signed-off-by: Shane Nehring <snehring@iastate.edu>
@spackbot-triage spackbot-triage Bot added the update-package Modifications to packages in the repository label Dec 12, 2025
@snehring

Copy link
Copy Markdown
Collaborator Author

@emwjacobson you've got some recent commits on this, would you like to look it over/give it a try?

@emwjacobson

Copy link
Copy Markdown
Contributor

Odd, I'm not able to reproduce this...

spack install mmseqs2@18-8cc5c +cuda cuda_arch=80 %gcc@12.5.0 installs successfully for me w/o the patch.

On a side note, I'm also now seeing that I wrote "Cuda" instead of "cmake" within one of the conflicts... whoops

"cmake@3.14:,:4", when="@18-8cc5c", msg="Cuda >=3.15 and <4 is required to compile MMseqs2"

@snehring

Copy link
Copy Markdown
Collaborator Author

Hmm. I wonder if it's a gcc 12 change (I'm using 11.5), let me see if I hit it with 12.

@snehring

snehring commented Dec 13, 2025

Copy link
Copy Markdown
Collaborator Author

I am not sure why this doesn't seem to happen with gcc@12:. I'm not sure if it's a compler or glibcxx change, but on 11 I consistently get

     763    /tmp/root/spack-stage/spack-stage-mmseqs2-18-8cc5c-gkk6etkdkuwxrddxzccsfiasd4w47hnk/spack-src/src/util/gpuserver.cpp: In function 'int gpuserver(int, const char**, const Command&)':
  >> 764    /tmp/root/spack-stage/spack-stage-mmseqs2-18-8cc5c-gkk6etkdkuwxrddxzccsfiasd4w47hnk/spack-src/src/util/gpuserver.cpp:89:18: error: 'std::this_thread' has not been declared
     765       89 |             std::this_thread::yield();
     766          |                  ^~~~~~~~~~~

without the added include.

@snehring

Copy link
Copy Markdown
Collaborator Author

I can confirm that this change doesn't break anything when building with gcc@13.3.0 and does seem correct per cppreference. I wonder if it's just implicitly included in later glibcxx versions.

@rtrigg

rtrigg commented Jan 9, 2026

Copy link
Copy Markdown

FWIW I wasn't able to reproduce this building mmseqs2@18-8cc5c +cuda cuda_arch=86 with GCC 11.5.0 and CUDA 12.6.2 on RHEL9, so it might be more environment-specific than just the GCC version?

@snehring

snehring commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator Author

@rtrigg el 9.7?

I'll dig into this more when I get time clearly something odd going on

@rtrigg

rtrigg commented Jan 12, 2026

Copy link
Copy Markdown

@snehring yeah rhel 9.7, this is how it concretized; it's reusing some stuff I already built, so there could be some differences there from what you had:

concretization of mmseqs2@18-8cc5c+cuda~ipo~mpi~openmp build_system=cmake build_type=Release cuda_arch:=86 generator=make platform=linux os=rhel9 target=sapphirerapids %c,cxx=gcc@11.5.0
[+]  mmseqs2@18-8cc5c+cuda~ipo~mpi~openmp build_system=cmake build_type=Release cuda_arch:=86 generator=make platform=linux os=rhel9 target=sapphirerapids %c,cxx=gcc@11.5.0
[+]      ^cmake@3.26.6~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release patches:=dbc3892 platform=linux os=rhel9 target=x86_64 
[+]          ^curl@8.10.1~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=openssl platform=linux os=rhel9 target=x86_64 
[+]              ^nghttp2@1.63.0 build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]                  ^diffutils@3.10 build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]              ^openssl@3.4.0~docs+shared build_system=generic certs=mozilla platform=linux os=rhel9 target=x86_64 
[+]                  ^ca-certificates-mozilla@2023-05-30 build_system=generic platform=linux os=rhel9 target=x86_64 
[+]                  ^perl@5.40.0+cpanm+opcode+open+shared+threads build_system=generic platform=linux os=rhel9 target=x86_64 
[+]                      ^berkeley-db@18.1.40+cxx~docs+stl build_system=autotools patches:=26090f4,b231fcc platform=linux os=rhel9 target=x86_64 
[+]                      ^bzip2@1.0.8~debug~pic+shared build_system=generic platform=linux os=rhel9 target=x86_64 
[+]                      ^gdbm@1.23 build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]                          ^readline@8.2 build_system=autotools patches:=bbf97f1 platform=linux os=rhel9 target=x86_64 
[+]              ^pkgconf@2.2.0 build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]          ^gcc-runtime@11.5.0 build_system=generic platform=linux os=rhel9 target=x86_64 
[e]          ^glibc@2.34 build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]          ^ncurses@6.5~symlinks+termlib abi=none build_system=autotools patches:=7a351bc platform=linux os=rhel9 target=x86_64 
[+]          ^zlib-ng@2.2.1+compat~new_strategies+opt+pic+shared build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]      ^compiler-wrapper@1.0 build_system=generic platform=linux os=rhel9 target=sapphirerapids 
[+]      ^cuda@12.6.2~allow-unsupported-compilers~dev build_system=generic platform=linux os=rhel9 target=x86_64 
[+]          ^libxml2@2.13.4+pic~python+shared build_system=autotools platform=linux os=rhel9 target=x86_64 
[+]              ^libiconv@1.17 build_system=autotools libs:=shared,static platform=linux os=rhel9 target=x86_64 
[+]              ^xz@5.4.6~pic build_system=autotools libs:=shared,static platform=linux os=rhel9 target=x86_64 
[e]      ^gcc@11.5.0~binutils+bootstrap~graphite~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' platform=linux os=rhel9 target=x86_64 
[+]      ^gcc-runtime@11.5.0 build_system=generic platform=linux os=rhel9 target=sapphirerapids 
[e]      ^glibc@2.34 build_system=autotools platform=linux os=rhel9 target=sapphirerapids 
[+]      ^gmake@4.4.1~guile build_system=generic platform=linux os=rhel9 target=x86_64 
[+]      ^zstd@1.5.6+programs build_system=makefile compression:=none libs:=shared,static platform=linux os=rhel9 target=x86_64_v3 
[+]          ^gcc-runtime@11.5.0 build_system=generic platform=linux os=rhel9 target=x86_64_v3 
[e]          ^glibc@2.34 build_system=autotools platform=linux os=rhel9 target=x86_64_v3 
[-]          ^gmake@4.4.1~guile build_system=generic platform=linux os=rhel9 target=x86_64_v3 

@snehring

snehring commented Jan 26, 2026

Copy link
Copy Markdown
Collaborator Author

I'm able to reproduce this reliably by running a fresh el9.6/9.7 container (I've tried alma and rocky in addition to our rhel container) doing dnf group install 'development tools', cloning spack, and attempting to install mmseqs2@18-8cc5c +cuda cuda_arch=86. At first I thought it might be cuda version related somehow, but I can also reproduce it with 12.6.2, so I don't think it should be unique to my environment.

example concretization

 -   mmseqs2@18-8cc5c+cuda~ipo~mpi~openmp build_system=cmake build_type=Release cuda_arch:=86 generator=make platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]      ^cmake@3.31.9~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]          ^curl@8.17.0~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=openssl platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]              ^nghttp2@1.67.1 build_system=autotools platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]                  ^diffutils@3.12 build_system=autotools platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]              ^openssl@3.6.0~docs+shared build_system=generic certs=mozilla platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]                  ^ca-certificates-mozilla@2025-08-12 build_system=generic platform=linux os=almalinux9 target=skylake 
[+]                  ^perl@5.42.0+cpanm+opcode+open+shared+threads build_system=generic platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]                      ^berkeley-db@18.1.40+cxx~docs+stl build_system=autotools patches:=26090f4,b231fcc platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]                      ^bzip2@1.0.8~debug~pic+shared build_system=generic platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]                      ^gdbm@1.25 build_system=autotools platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]                          ^readline@8.3 build_system=autotools patches:=21f0a03 platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]              ^pkgconf@2.5.1 build_system=autotools platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]          ^ncurses@6.5-20250705~symlinks+termlib abi=none build_system=autotools patches:=7a351bc platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]          ^zlib-ng@2.3.2+compat+new_strategies+opt+pic+shared build_system=autotools platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0
[+]      ^compiler-wrapper@1.0 build_system=generic platform=linux os=almalinux9 target=skylake 
[+]      ^cuda@13.0.2~allow-unsupported-compilers~dev build_system=generic platform=linux os=almalinux9 target=skylake 
[+]          ^libxml2@2.13.5~http+pic~python+shared build_system=autotools platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]              ^libiconv@1.18 build_system=autotools libs:=shared,static platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]              ^xz@5.6.3~pic build_system=autotools libs:=shared,static platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[e]      ^gcc@11.5.0~binutils+bootstrap~graphite~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' platform=linux os=almalinux9 target=x86_64 
[+]      ^gcc-runtime@11.5.0 build_system=generic platform=linux os=almalinux9 target=skylake 
[e]      ^glibc@2.34 build_system=autotools platform=linux os=almalinux9 target=x86_64 
[+]      ^gmake@4.4.1~guile build_system=generic platform=linux os=almalinux9 target=skylake %c=gcc@11.5.0
[+]      ^zstd@1.5.7~programs build_system=makefile libs:=shared,static platform=linux os=almalinux9 target=skylake %c,cxx=gcc@11.5.0

@bernhardkaindl bernhardkaindl self-assigned this Jul 13, 2026
@bernhardkaindl
bernhardkaindl self-requested a review July 13, 2026 02:22

@bernhardkaindl bernhardkaindl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICS, it only appends #include <thread>, so it should be safe I think.

@bernhardkaindl
bernhardkaindl merged commit 534b70f into spack:develop Jul 14, 2026
17 checks passed
@snehring
snehring deleted the mmseqs2-cuda-thread-fix branch July 14, 2026 14:34
d-reynolds pushed a commit to d-reynolds/spack-packages that referenced this pull request Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

update-package Modifications to packages in the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants