-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add easyblock for RAxML #2180
base: develop
Are you sure you want to change the base?
add easyblock for RAxML #2180
Conversation
Test reports |
Test report by @lexming Overview of tested easyconfigs (in order)
Build succeeded for 2 out of 2 (2 easyconfigs in total) |
@lexming Some existing |
from easybuild.tools.systemtools import get_cpu_features, HAVE_ARCHSPEC | ||
from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC | ||
|
||
RAXML_BINARY_NAME = "raxmlHPC" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure RAXML_BINARY_NAME
is useful, since it's only used in one place currently?
|
||
RAXML_BINARY_NAME = "raxmlHPC" | ||
# Supported instruction sets ordered by priority (high to low) and related CPU features | ||
RAXML_INSTRUCT_SETS = ["AVX2", "AVX", "SSE3"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about AVX-512? If there's a reason no to include that, add a comment on it?
Where can the list of supported instruction sets be found (docs link? README?)
Also, out of curiosity, does it also support NEON (for aarch64
)?
If someone cares enough the easyblock can be updated later to also cover that, doesn't need to be done here.
# Supported instruction sets ordered by priority (high to low) and related CPU features | ||
RAXML_INSTRUCT_SETS = ["AVX2", "AVX", "SSE3"] | ||
RAXML_CPU_FEATURES = { | ||
"SSE3": ["sse3", "see4_1", "sse4_2"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo:
"SSE3": ["sse3", "see4_1", "sse4_2"], | |
"SSE3": ["sse3", "sse4_1", "sse4_2"], |
"""RAxML easyblock constructor, define class variables.""" | ||
super(EB_RAxML, self).__init__(*args, **kwargs) | ||
|
||
def filter_optarch_features(support_features): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a function outside of the easyblock? Same for others below.
Advantage is that tests can be added easily to CI for these, and code becomes quite a bit easier to parse for humans
return feature.lower() in host | ||
|
||
try: | ||
return any(f in get_cpu_features() for f in RAXML_CPU_FEATURES[feature]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nicer with a single return
as the end, I'm not a big fan of inline returns, see also https://realpython.com/python-return-statement/#remembering-the-return-value (but that's partially personal, I guess)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this function should be moved into framework, it's pretty generic... Same for filter_optarch_features
# unrestricted optimization settings, set optimization level for host micro-architecture | ||
cpu_features = [feat for feat in cpu_features if has_cpu_feature(feat)] | ||
dbg_msg = "Enabling the following CPU optimizations for RAxML by autodetection: %s" | ||
self.log.debug(dbg_msg, ", ".join(cpu_features)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this info
log message?
dbg_msg = "Enabling the following CPU optimizations for RAxML by autodetection: %s" | ||
self.log.debug(dbg_msg, ", ".join(cpu_features)) | ||
# add generic build | ||
cpu_features.append(None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify (in the comment) why this is done?
parallel_features.extend(RAXML_PARALLEL_FEATURES["mpi"]) | ||
|
||
# List of builds to carry out | ||
self.target_makefiles = list_filename_variants(cpu_features, parallel_features, "Makefile", "gcc", ".") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is always using gcc
OK? What if we're installing RAxML
with Intel compilers?
if not any(feature in mf for feature in RAXML_PARALLEL_FEATURES["mpi"]): | ||
cc_opt = compiler_nompi | ||
self.cfg["buildopts"] = '-f %s CC="%s" %s' % (mf, cc_opt, user_buildopts) | ||
self.log.debug("Building RAxML makefile with %s: %s", cc_opt, mf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.info
?
"files": [os.path.join("bin", x) for x in self.target_bins], | ||
"dirs": ["share/manual", "share/usefulScripts"], | ||
} | ||
super(EB_RAxML, self).sanity_check_step(custom_paths=custom_paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also include a custom sanity check command like raxmlHPC -h
?
@lexming this easyblock needs some attention... |
This easyblock automatically builds those binaries of RAxML that
optarch
settings)Current easyconfigs of RAxML build one arbitrary binary of RAxML and create a symlink with the name
raxmlHPC
. This is a bad approach because the different binaries of RAxML have different requirements and features. For instance, binaries using MPI have a minimum number of trees to process