Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2023/10
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-
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': '12.2.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.39')
]

dependencies = [
('CUDA', '12.0.0', '', SYSTEM),
]

files_to_copy = [(['%(name)s'], 'bin')]

sanity_check_paths = {
'files': ['bin/%(name)s'],
'dirs': ['bin'],
}

sanity_check_commands = ['%(name)s -h']

moduleclass = 'bio'
46 changes: 46 additions & 0 deletions easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.0.0_makefile.patch
Original file line number Diff line number Diff line change
@@ -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 $@