diff --git a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.1.2-GCCcore-12.3.0-CUDA-12.1.1.eb b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.1.2-GCCcore-12.3.0-CUDA-12.1.1.eb new file mode 100644 index 000000000000..b72be8afec6b --- /dev/null +++ b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.1.2-GCCcore-12.3.0-CUDA-12.1.1.eb @@ -0,0 +1,56 @@ +# Thomas Hoffmann, EMBL Heidelberg, structures-it@embl.de, 2024/1 +easyblock = 'MakeCp' + +name = 'AreTomo2' +version = '1.1.2' +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_lib.patch'] +checksums = [ + {'v1.1.2.tar.gz': '4cbb4d25d28778041d80ef2c598519b17b9a40aa84e1e99daf48ad5a90d946b4'}, + {'AreTomo2-1.1.2_makefile_lib.patch': '53b3694104c4149d2714e503fb2a7cb9be7cbb0e500ee6991a606faa1c10a314'}, +] + +github_account = 'czimaginginstitute' + +prebuildopts = 'rm -rf LibSrc/Lib/*.a && ' +build_cmd = 'make clean -f makefile11 && 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' diff --git a/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.1.2_makefile_lib.patch b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.1.2_makefile_lib.patch new file mode 100644 index 000000000000..781ef3866178 --- /dev/null +++ b/easybuild/easyconfigs/a/AreTomo2/AreTomo2-1.1.2_makefile_lib.patch @@ -0,0 +1,96 @@ +# Thomas Hoffmann, EBML Heidelberg, structures-it@embl.de, 2024/10 +# Allow to inject cuda compute capabilities and cfalgs. +# Add targets for libmrcfile.a, libutil.a, and libclean +diff -ru AreTomo2-1.1.2/LibSrc/Mrcfile/makefile AreTomo2-1.1.2_makefile/LibSrc/Mrcfile/makefile +--- AreTomo2-1.1.2/LibSrc/Mrcfile/makefile 2024-02-21 05:57:47.000000000 +0100 ++++ AreTomo2-1.1.2_makefile/LibSrc/Mrcfile/makefile 2024-10-31 12:55:25.131194106 +0100 +@@ -19,8 +19,8 @@ + OBJS = $(patsubst %.cpp, %.o, $(SRCS)) + OUT = libmrcfile.a + +-CC = g++ -std=c++11 +-CFLAGS = -m64 -c -g -pthread -IInclude -I$(INCDIR) ++#CC = g++ -std=c++11 ++CFLAGS_ = -m64 -c -g -pthread -IInclude -I$(INCDIR) $(CFLAGS) + + all: $(OBJS) + @ar rcs $(OUT) $(OBJS) +@@ -33,7 +33,9 @@ + + %.o: %.cpp + @echo Compile $< +- @$(CC) $(CFLAGS) $< -o $@ ++ @echo $(CC) $(CFLAGS_) $< -o $@ ++ @$(CC) $(CFLAGS_) $< -o $@ + + clean: ++ @echo rm -f $(OUT) $(OBJS) *.*~ makefile~ + @rm -f $(OUT) $(OBJS) *.*~ makefile~ +diff -ru AreTomo2-1.1.2/LibSrc/Util/makefile AreTomo2-1.1.2_makefile/LibSrc/Util/makefile +--- AreTomo2-1.1.2/LibSrc/Util/makefile 2024-02-21 05:57:47.000000000 +0100 ++++ AreTomo2-1.1.2_makefile/LibSrc/Util/makefile 2024-10-31 12:55:10.603854025 +0100 +@@ -5,8 +5,8 @@ + #------------------- + OUT = libutil.a + +-CC = g++ -std=c++11 +-CFLAG = -c -g -pthread -m64 ++#CC = g++ -std=c++11 ++CFLAG = -c -g -pthread -m64 $(CFLAGS) + + all: $(OBJS) + @echo create library $(OUT) and move to $(PROJ_DIR)/Lib +@@ -16,6 +16,7 @@ + @cp $(HDRS) $(PROJ_DIR)/Include/Util + + %.o: %.cpp ++ echo $(CC) $(CFLAG) $< -o $@ + $(CC) $(CFLAG) $< -o $@ + + list: +diff -ru AreTomo2-1.1.2/makefile11 AreTomo2-1.1.2_makefile/makefile11 +--- AreTomo2-1.1.2/makefile11 2024-02-21 05:57:47.000000000 +0100 ++++ AreTomo2-1.1.2_makefile/makefile11 2024-10-31 12:52:55.796679029 +0100 +@@ -179,7 +179,24 @@ + + compile: $(OBJS) + +-exe: $(OBJS) ++libclean: ++ $(MAKE) -C LibSrc/Util clean ++ $(MAKE) -C LibSrc/Mrcfile clean ++ ++LibSrc/Lib/libutil.a: ++ $(MAKE) -C LibSrc/Util ++ ++LibSrc/Lib/libmrcfile.a: ++ $(MAKE) -C LibSrc/Mrcfile ++ ++exe: $(OBJS) LibSrc/Lib/libmrcfile.a LibSrc/Lib/libutil.a ++ @echo g++ -g -pthread -m64 $(OBJS) \ ++ $(PRJLIB)/libmrcfile.a \ ++ $(PRJLIB)/libutil.a \ ++ -L$(CUDALIB) -L/usr/lib64 \ ++ -lcufft -lcudart -lcuda -lc -lm -lpthread \ ++ -o AreTomo2 ++ + @g++ -g -pthread -m64 $(OBJS) \ + $(PRJLIB)/libmrcfile.a \ + $(PRJLIB)/libutil.a \ +@@ -193,10 +210,12 @@ + @echo $< has been compiled. + + %.o: %.cpp ++ @echo $(CC) $(CFLAG) -I$(PRJINC) -I$(CUDAINC) \ ++ $< -o $@ + @$(CC) $(CFLAG) -I$(PRJINC) -I$(CUDAINC) \ + $< -o $@ + @echo $< has been compiled. + +-clean: +- @rm -f $(OBJS) $(CUCPPS) *.h~ makefile~ AreTomo2 +- ++clean: libclean ++ @echo rm -f $(OBJS) $(CUCPPS) *.h~ makefile~ AreTomo2 LibSrc/Lib/*.a ++ @rm -f $(OBJS) $(CUCPPS) *.h~ makefile~ AreTomo2 LibSrc/Lib/*.a +Only in AreTomo2-1.1.2_makefile: .makefile11.swp