From db133c6f446afd8ba3373353111ee70703538f7e Mon Sep 17 00:00:00 2001 From: Thomas Hoffmann Date: Tue, 31 Oct 2023 12:43:53 +0100 Subject: [PATCH 1/4] {bio}[GCCcore/11.3.0] AreTomo2 v1.0.0 /w CUDA 11.7.0 --- .../AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb | 54 +++++++++++++++++++ .../a/AreTomo2/AreTomo2-1.0.0_makefile.patch | 46 ++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb create mode 100644 easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0_makefile.patch diff --git a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb new file mode 100644 index 000000000000..0950bda0bdab --- /dev/null +++ b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb @@ -0,0 +1,54 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2023/10 +easyblock = 'MakeCp' + +name = 'AreTomo2' +version = '1.0.0' + +homepage = 'https://github.com/czimaginginstitute/AreTomo2' +description = """AreTomo2, a multi-GPU accelerated software package that fully automates motion- +corrected marker-free tomographic alignment and reconstruction, now includes +robust GPU-accelerated CTF (Contrast Transfer Function) estimation in a single +package. AreTomo2 is part of our endeavor to build a fully-automated high- +throughput processing pipeline that enables real-time reconstruction of +tomograms in parallel with tomographic data collection. It strives to be fast +and accurate, as well as provides for easy integration into subtomogram +processing workflows by generating IMod compatible files containing alignment +and CTF parameters needed to bootstrap subtomogram averaging. AreTomo2 can also +be used for on-the-fly reconstruction of tomograms and CTF estimation in +parallel with tilt series collection, enabling real-time assessment of sample +quality and adjustment of collection parameters""" + +toolchain = {'name': 'GCCcore', 'version': '11.3.0'} +toolchainopts = {'cstd': 'c++11'} + +source_urls = [GITHUB_SOURCE] +sources = ['v%(version)s.tar.gz'] +patches = ['%(name)s-%(version)s_makefile.patch'] +checksums = [ + {'v1.0.0.tar.gz': '5518cd5d7bc13a6dbb6d9310b22c301e73a0c91dc059da403445d79ca0ff8892'}, + {'AreTomo2-1.0.0_makefile.patch': '8595b2fc55e0b5e1bf7c077c93c09503b4e8f95123c6aaf0a5fbe44dda871c73'}, +] + +github_account = 'czimaginginstitute' + +build_cmd = 'make exe -f makefile11 CUDAHOME=$CUDA_HOME CUDACC="%(cuda_cc_cmake)s"' + +builddependencies = [ + ('binutils', '2.38') +] + +dependencies = [ + ('CUDA', '11.7.0', '', SYSTEM), + ('libglvnd', '1.4.0') +] + +files_to_copy = [(['AreTomo2'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/%(name)s'], + 'dirs': ['bin'], +} + +sanity_check_commands = ['%(name)s -h'] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0_makefile.patch b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0_makefile.patch new file mode 100644 index 000000000000..ebef90dd5d2e --- /dev/null +++ b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0_makefile.patch @@ -0,0 +1,46 @@ +# Thomas Hoffmann, EBML Heidelberg, structures-it@embl.de, 2023/10 +# allow to inject cuda compute capabilities and cfalgs +diff -ru AreTomo2-1.0.0/makefile11 AreTomo2-1.0.0_makefile/makefile11 +--- AreTomo2-1.0.0/makefile11 2023-10-26 19:49:07.000000000 +0200 ++++ AreTomo2-1.0.0_makefile/makefile11 2023-10-30 19:00:07.212270395 +0100 +@@ -156,18 +156,21 @@ + $(CUCPPS) + OBJS = $(patsubst %.cpp, %.o, $(SRCS)) + #------------------------------------- +-CC = g++ -std=c++11 +-CFLAG = -c -g -pthread -m64 ++#CC = g++ -std=c++11 ++CFLAG = -c -g -pthread -m64 $(CFLAGS) + NVCC = $(CUDAHOME)/bin/nvcc -std=c++11 +-CUFLAG = -Xptxas -dlcm=ca -O2 \ +- -gencode arch=compute_80,code=sm_80 \ +- -gencode arch=compute_75,code=sm_75 \ +- -gencode arch=compute_70,code=sm_70 \ +- -gencode arch=compute_61,code=sm_61 \ +- -gencode arch=compute_60,code=sm_60 \ +- -gencode arch=compute_53,code=sm_53 \ +- -gencode arch=compute_52,code=sm_52 \ +- -gencode arch=compute_86,code=sm_86 ++SPACE= ' ' ++SEMI= ; ++GENCODES = $(foreach x,$(subst $(SEMI),$(SPACE),$(CUDACC)),-gencode arch=compute_$x,code=sm_$x) ++CUFLAG = -Xptxas -dlcm=ca -O2 $(GENCODES) ++# -gencode arch=compute_80,code=sm_80 \ ++# -gencode arch=compute_75,code=sm_75 \ ++# -gencode arch=compute_70,code=sm_70 \ ++# -gencode arch=compute_61,code=sm_61 \ ++# -gencode arch=compute_60,code=sm_60 \ ++# -gencode arch=compute_53,code=sm_53 \ ++# -gencode arch=compute_52,code=sm_52 \ ++# -gencode arch=compute_86,code=sm_86 + #------------------------------------------ + cuda: $(CUCPPS) + +@@ -183,6 +186,7 @@ + -lcufft -lcudart -lcuda -lc -lm -lpthread \ + -o AreTomo2 + @echo AreTomo2 has been generated. ++ @echo used cuda gencodes: $(GENCODES) + + %.o: %.cu + @$(NVCC) -c $(CUFLAG) -I$(PRJINC) -I$(CUPRJINC) $< -o $@ From 32e883c4397577e3fb20771f168810eb98f0f248 Mon Sep 17 00:00:00 2001 From: Thomas Hoffmann <81254262+ThomasHoffmann77@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:40:12 +0100 Subject: [PATCH 2/4] Update AreTomo2-1.0.0-GCCcore-11.3.0.eb delete dependecy liddbglvnd --- .../easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb index 0950bda0bdab..f20734d2ca50 100644 --- a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb +++ b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb @@ -39,7 +39,6 @@ builddependencies = [ dependencies = [ ('CUDA', '11.7.0', '', SYSTEM), - ('libglvnd', '1.4.0') ] files_to_copy = [(['AreTomo2'], 'bin')] From c066e2242ce23330e4c276ebb8339a3243bc8512 Mon Sep 17 00:00:00 2001 From: Thomas Hoffmann <81254262+ThomasHoffmann77@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:52:28 +0100 Subject: [PATCH 3/4] Update AreTomo2-1.0.0-GCCcore-11.3.0.eb add versionsuffix --- .../easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb index f20734d2ca50..cc38f336282c 100644 --- a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb +++ b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb @@ -3,6 +3,7 @@ easyblock = 'MakeCp' name = 'AreTomo2' version = '1.0.0' +versionsuffix = '-CUDA-%(cudaver)s' homepage = 'https://github.com/czimaginginstitute/AreTomo2' description = """AreTomo2, a multi-GPU accelerated software package that fully automates motion- From aa3ec6109edce6ee20ce9680b7329fe6b14f8665 Mon Sep 17 00:00:00 2001 From: Thomas Hoffmann <81254262+ThomasHoffmann77@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:56:07 +0100 Subject: [PATCH 4/4] Rename AreTomo2-1.0.0-GCCcore-11.3.0.eb to AreTomo2-1.0.0-GCCcore-11.3.0-CUDA-11.7.0.eb --- ...ore-11.3.0.eb => AreTomo2-1.0.0-GCCcore-11.3.0-CUDA-11.7.0.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/a/AreTomo2/{AreTomo2-1.0.0-GCCcore-11.3.0.eb => AreTomo2-1.0.0-GCCcore-11.3.0-CUDA-11.7.0.eb} (100%) diff --git a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0-CUDA-11.7.0.eb similarity index 100% rename from easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0.eb rename to easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0-GCCcore-11.3.0-CUDA-11.7.0.eb