Skip to content
Merged
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, 2024/1
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.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.40')
]

dependencies = [
('CUDA', '12.1.1', '', 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 $@
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2024/1
easyblock = 'MakeCp'

name = 'MotionCor3'
version = '1.0.1'
versionsuffix = '-CUDA-%(cudaver)s'

homepage = 'https://github.com/czimaginginstitute/MotionCor3'

description = """Anisotropic correction of beam induced motion for cryo-electron microscopy and
cryo-electron tomography images.
MotionCor3, an improved implementation of MotionCor2 with addition of CTF
(Contrast Transfer Function) estimation, is a multi-GPU accelerated software
package that enables single-pixel level correction of anisotropic beam induced
sample motion for cryo-electron microscopy and cryo-electron tomography images.
The iterative, patch-based motion detection combined with spatial and temporal
constraints and dose weighting provides robust and accurate correction. By
refining the measurement of early motion, MotionCor3 further improves correction
on tilted samples. The efficiency achieved by multi-GPU acceleration and
parallelization enables correction to keep pace with automated data collection.
The recent addition of a very robust GPU-accelerated CTF estimation makes
MotionCor3 more versatile in cryoEM and cryoET processing pipeline."""

toolchain = {'name': 'GCCcore', 'version': '12.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.1.tar.gz': '9b1eaa43f67c6ca54c1cea6ad53ee78726a14a87a3c5d91e7820786ebe0786a3'},
{'MotionCor3-1.0.1_makefile.patch': 'd047c1f097eead3173a60fd3ae821ee7b285728bf8470f496021580f11875d12'},
]

github_account = 'czimaginginstitute'

build_cmd = 'make exe -f makefile11 CUDAHOME=$CUDA_HOME CUDACC="%(cuda_cc_cmake)s"'

builddependencies = [
('binutils', '2.40')
]

dependencies = [
('CUDA', '12.1.1', '', SYSTEM),
('LibTIFF', '4.5.0'),
]

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

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

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

moduleclass = 'bio'
54 changes: 54 additions & 0 deletions easybuild/easyconfigs/m/MotionCor3/MotionCor3-1.0.1_makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Thomas Hoffmann, EBML Heidelberg, structures-it@embl.de, 2023/10
# allow to inject cuda compute capabilities and cfalgs
diff -ru MotionCor3-1.0.1/makefile11 MotionCor3-1.0.1_makefile/makefile11
--- MotionCor3-1.0.1/makefile11 2023-10-25 23:59:50.000000000 +0200
+++ MotionCor3-1.0.1_makefile/makefile11 2023-10-31 14:24:25.377992618 +0100
@@ -1,6 +1,6 @@
PRJHOME = $(shell pwd)
CONDA = $(HOME)/miniconda3
-CUDAHOME = $(HOME)/nvidia/cuda-12.1
+#CUDAHOME = $(HOME)/nvidia/cuda-12.1
CUDAINC = $(CUDAHOME)/include
CUDALIB = $(CUDAHOME)/lib64
PRJINC = $(PRJHOME)/Include
@@ -139,18 +139,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_86,code=sm_86 \
- -gencode arch=compute_80,code=sm_80 \
- -gencode arch=compute_75,code=sm_75 \
- -gencode arch=compute_70,code=sm_70 \
- -gencode arch=compute_52,code=sm_52 \
- -gencode arch=compute_53,code=sm_53 \
- -gencode arch=compute_60,code=sm_60 \
- -gencode arch=compute_61,code=sm_61
+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_86,code=sm_86 \
+# -gencode arch=compute_80,code=sm_80 \
+# -gencode arch=compute_75,code=sm_75 \
+# -gencode arch=compute_70,code=sm_70 \
+# -gencode arch=compute_52,code=sm_52 \
+# -gencode arch=compute_53,code=sm_53 \
+# -gencode arch=compute_60,code=sm_60 \
+# -gencode arch=compute_61,code=sm_61
#------------------------------------------
cuda: $(CUCPPS)

@@ -165,6 +168,7 @@
-lcufft -lcudart -lcuda -lnvToolsExt -ltiff -lc -lm -lpthread \
-o MotionCor3
@echo MotionCor3 has been generated.
+ @echo used cuda gencodes: $(GENCODES)

%.cpp: %.cu
@echo "-----------------------------------------------"