forked from easybuilders/easybuild-easyconfigs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding easyconfigs: IMOD-5.0.1-foss-2023a-CUDA-12.1.1.eb
- Loading branch information
1 parent
115cd8f
commit 8106bb1
Showing
1 changed file
with
121 additions
and
0 deletions.
There are no files selected for viewing
121 changes: 121 additions & 0 deletions
121
easybuild/easyconfigs/i/IMOD/IMOD-5.0.1-foss-2023a-CUDA-12.1.1.eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
easyblock = 'ConfigureMake' | ||
|
||
name = 'IMOD' | ||
version = '5.0.1' | ||
versionsuffix = '-CUDA-%(cudaver)s' | ||
|
||
homepage = 'https://bio3d.colorado.edu/imod/' | ||
description = """IMOD is a set of image processing, modeling and display | ||
programs used for tomographic reconstruction and for 3D reconstruction of EM | ||
serial sections and optical sections. The package contains tools for assembling | ||
and aligning data within multiple types and sizes of image stacks, viewing 3-D | ||
data from any orientation, and modeling and display of the image files. IMOD | ||
was developed primarily by David Mastronarde, Rick Gaudette, Sue Held, Jim | ||
Kremer, Quanren Xiong, and John Heumann at the University of Colorado.""" | ||
|
||
toolchain = {'name': 'foss', 'version': '2023a'} | ||
toolchainopts = {'pic': True} # openmp leads to segfault with xftoxg tool | ||
|
||
# download manually from mercurial repository and create source tarball: | ||
# hg clone --debug http://bio3d.colorado.edu/imod/nightlyBuilds/IMOD | ||
# get lunch | ||
# cd IMOD | ||
# hg update -r IMOD_4-12-62 | ||
# rm .hg* -rf | ||
# cd .. | ||
# find IMOD -print|sort| tar -czf IMOD-`cat IMOD/.version`.tar.gz -T - | ||
sources = [SOURCE_TAR_GZ] | ||
patches = [ | ||
'IMOD-4.11.12_hdf1.12.patch', | ||
'IMOD-4.12.17_tiltalign_include.patch', | ||
# replace hardcoded CUDA compute capabilitites in machines/rhlinux. set as CUDACC: | ||
'IMOD-4.12.58_cudacc.patch', | ||
] | ||
checksums = [ | ||
# IMOD-4.12.62.tar.gz: | ||
None, # can't include a valid checksum for source tarball, since it has to be created manually | ||
# IMOD-4.11.12_hdf1.12.patch: | ||
'19e5bff97b997c600f157dd56eddae96a7f34fef528e7f40e76ea8e19144810e', | ||
# IMOD-4.12.17_tiltalign_include.patch: | ||
'998c01a4f78b0d48dbffc530fcb12faaa892b1d322bce4f1643df20799845ab7', | ||
# IMOD-4.12.58_cudacc.patch: | ||
'9563b1ac9ab1569689d7db4380301f330290d9695988f8b31e7ea08d2601ee25', | ||
] | ||
|
||
# can't include a valid checksum, since tarball has to be created manually | ||
dependencies = [ | ||
('LibTIFF', '4.5.0'), | ||
('Qt5', '5.15.10'), | ||
('Java', '11', '', SYSTEM), | ||
('HDF5', '1.14.0'), | ||
('Python', '3.11.3'), | ||
('libGLU', '9.0.3'), | ||
('tcsh', '6.24.10'), | ||
('CUDA', '12.1.1', '', SYSTEM), | ||
('UCX-CUDA', '1.14.1', versionsuffix), | ||
] | ||
|
||
# parallel build sometimes fails | ||
parallel = 1 | ||
|
||
# modify all qmake pro files in order to pass CFLAGS | ||
_qmake_pass_cflags = "find -name *.pro -exec sed -i -e '$aQMAKE_CXXFLAGS += $$(CFLAGS)' {} \\; && " | ||
|
||
# exports required for configure and build | ||
_exports = 'export QTDIR=$EBROOTQT5 && ' | ||
_exports += "export CUDACC='%(cuda_cc_cmake)s' && " | ||
_exports += 'export HDF5_DIR=$EBROOTHDF5 && ' | ||
_exports += 'export QMAKESPEC=$EBROOTQT5/mkspecs/`qmake -query QMAKE_SPEC` && ' | ||
_exports += 'export CUDA_DIR=$CUDA_HOME && ' | ||
# readw_or_imod.f and others with gfortran10: | ||
# Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/INTEGER(2)) | ||
# => set -fallow-argument-mismatch. Runs through without this option with GCC 8.3.0. | ||
_exports += 'export CFLAGS="$CFLAGS -fallow-argument-mismatch" && ' # required for gfortran10 | ||
|
||
# rename pysrc/pip.py to pysrc/PIP.py | ||
_renamePip = """sed -i 's/from pip/from PIP/g' pysrc/* &&""" | ||
_renamePip += """mv pysrc/pip.py pysrc/PIP.py &&""" | ||
_renamePip += """sed -i 's/pip.py/PIP.py/g' pysrc/Makefile &&""" | ||
|
||
_useTcsh = 'sed -i "s|#!/bin/csh -f|#!/usr/bin/env tcsh|g;s|#! /bin/csh -f|#!/usr/bin/env tcsh|g" ' | ||
_useTcsh += ' %(builddir)s/IMOD/{manpages/convert,setup,setup2,machines/rhlinux,packMacApps} &&' | ||
|
||
preconfigopts = _exports | ||
preconfigopts += _renamePip | ||
preconfigopts += _qmake_pass_cflags | ||
preconfigopts += _useTcsh | ||
|
||
# IMOD's configure script is named setup and does not know the parameter --prefix, but -i. | ||
# CFLAGs are passed with -flags. | ||
configure_cmd = './setup ' | ||
configure_cmd += '-c gnu ' # htf it finds icc? | ||
configure_cmd += '-flags "$CFLAGS" ' # inject CFLAGS | ||
configure_cmd += '-i %(installdir)s ' # set installdir | ||
configure_without_installdir = True | ||
|
||
prebuildopts = _exports | ||
|
||
# create some missing directories required for installation process: | ||
preinstallopts = 'mkdir %(installdir)s/{man/cat1,bin,autodoc,SystemTemplate,lib/imodplug,com,html,Plugins} -p && ' | ||
|
||
# patch hardcoded /usr/bin/python to use Python included as dependency | ||
preinstallopts += "find pysrc -name '*.py' | xargs sed -i 's@^#!/usr/bin/python@#!/usr/bin/env python@g' && " | ||
preinstallopts += "export PYTHONPATH=%(builddir)s/IMOD/pysrc:$PYTHONPATH && " | ||
preinstallopts += "ls manpages/{csvtohtml,adocdefaults} | xargs sed -i 's@^#!.*/python -u@#!/usr/bin/env python@g' && " | ||
preinstallopts += "xargs sed -i 's@^#!.*/python -u@#!/usr/bin/env python@g' html/makeqhp && " | ||
|
||
modextrapaths = {'PYTHONPATH': 'pylib'} | ||
|
||
modextravars = { | ||
'IMOD_DIR': "%(installdir)s", | ||
'IMOD_PLUGIN_DIR': '%(installdir)s/lib/imodplug', | ||
'IMOD_JAVADIR': '$JAVA_HOME', | ||
'FOR_DISABLE_STACK_TRACE': '1', | ||
} | ||
modloadmsg = 'Please set the environment variable $IMOD_CALIB_DIR if appropriate.' | ||
sanity_check_paths = { | ||
'files': ['VERSION', 'bin/subm'], | ||
'dirs': ['bin', 'lib', 'com', 'autodoc', 'pylib', 'Plugins', 'man', 'SystemTemplate'], | ||
} | ||
sanity_check_commands = [('xftoxg', '-h')] | ||
moduleclass = 'vis' |