Skip to content
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

{bio}[foss/2018a] add MEGAHIT-1.1.2 #5748

Merged
merged 3 commits into from
Feb 8, 2018
Merged

{bio}[foss/2018a] add MEGAHIT-1.1.2 #5748

merged 3 commits into from
Feb 8, 2018

Conversation

michaelkarlcoleman
Copy link

New module. This version is cpu-only. It's also possible to compile
this with CUDA, but it seems useful to have two separate
versions. (Still working on getting a CUDA version to compile.)

@michaelkarlcoleman
Copy link
Author

A prior Travis check bombed with

AssertionError: Filename '/home/travis/build/easybuilders/easybuild-easyconfigs/easybuild/easyconfigs/m/MEGAHIT/MEGAHIT-1.1.2-Python-2.7.4-foss-2018a.eb' of parsed easyconfig matches expected filename 'MEGAHIT-1.1.2-foss-2018a.eb'

There are potentially two things wrong here. First, a typo--actually Python-2.7.14 is being used.

The other might be a complaint about using the -Python-2.7.4 string in the filename on stylistic grounds. I had considered leaving it out, but it wasn't clear to me that that was a better option. (Roughly, if that string is not present, users of this module are locked into that Python version, which might be a problem if it conflicts with a different version that they need. Putting the string in the filename leaves the door open for supporting several popular versions.)

Trying it out after fixing the first only, it still fails, so presumably the -Python is not allowed. What criterion is being used there, though? (That is, how can I tell myself, rather than being told by Travis?)

@verdurin
Copy link
Member

Test report by @verdurin
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
dell.lan - Linux fedora 27, Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz, Python 2.7.14
See https://gist.github.com/069cc6b080cf8329ea12eb3a04bbbb53 for a full test report.

@verdurin verdurin added the new label Jan 30, 2018
@verdurin verdurin added this to the next release (3.5.2 or 3.6.0) milestone Jan 30, 2018
@boegel
Copy link
Member

boegel commented Jan 30, 2018

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node2430.golett.os - Linux centos linux 7.4.1708, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, Python 2.7.5
See https://gist.github.com/b487ea6554086c3a38b6915148be18a6 for a full test report.

@boegel
Copy link
Member

boegel commented Jan 30, 2018

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node2040.delcatty.os - Linux centos linux 7.4.1708, Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz, Python 2.7.5
See https://gist.github.com/39c8927e66eaac515a11d5ba549af153 for a full test report.

@verdurin
Copy link
Member

@tutufan - normally you would use versionsuffix to indicate a specific language runtime dependency, such as Python, which would need to be reflected in the filename.

Does that clarify?

@michaelkarlcoleman
Copy link
Author

michaelkarlcoleman commented Jan 30, 2018

@verdurin Ah, derp. I get it. The calculated suffix is just coming from name, version, and versionsuffix, and the easyconfig filename has to match.

So, that mistake notwithstanding, I could have gone either way here. In this case, the package absolutely depends on Python 2, but probably doesn't care that much about the specific version. Should this be changed?

@boegel
Copy link
Member

boegel commented Jan 30, 2018

@tutufan The easyconfig filename must be <name>-<version>-<toolchain>-<versionsuffix>.eb (or without the -<versionsuffix> if versionsuffix is not specified), because that's how --robot hunts for easyconfig files to resolve dependencies with (which it has to, since the other option would be to open & parse every file it runs in to...).

easyblock = 'MakeCp'

name = 'MEGAHIT'
version = '1.1.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Python is a dependency, we usually make that clear via the versionsuffix (since Python is a very common dependency)

versionsuffix = '-Python-%(pyver)s`

Note that including this implies that you need to rename the easyconfig file to end with -Python-2.7.14.eb...

checksums = ['d0d3965dd49c6fdaea958ef66146cb6b30b7d51acbbfe94194c437f15a424cb5']

# This version is CPU-only. It's also possible to compile this with
# CUDA, but that isn't working yet (and requires libcuda.so!).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tutufan Hmm, not sure if it's worth keeping this comment in?

Not having CUDA as dependency, and the gpu=0 make it fairly clear this is a non-GPU build?

]

# for GPU, 'use_gpu=1 abi=1' at least, plus CUDA dep above
buildopts = 'version=v%(version)s verbose=1 use_gpu=0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit strange, what would happen if you don't include the version=v%(version)s part?
Maybe it's worth clarifying that with a comment above this line?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Makefile, version will be set to git describe --tag. I'm not sure that even works for release tarballs. Even if it does, though, it potentially fails badly if the commit that has a release tag also has other tags. Since we know the version (since we're using it to pull the same tag from github), it seems safest to specify it explicitly. Will add a comment.

runtest = 'test'

sanity_check_paths = {
'files': ['bin/%(namelower)s'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check all binaries here

'%(namelower)s_asm_core',
'%(namelower)s_sdbg_build',
'%(namelower)s_toolkit'],
'bin'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor style suggestion:

files_to_copy = [
    (['%(namelower)s', '%(namelower)s_asm_core', '%(namelower)s_sdbg_build', '%(namelower)s_toolkit'], 'bin'),
    'LICENSE',
    'README.md',
]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered this, but had the idea that multi-element lists were to be one-per-line. (In fact, you requested that in #5698.) Is there an easy rule-of-thumb to remember?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The format I suggested makes it clearer that there's basically 3 things being copied: binaries, LICENSE & README.

There's no clear rule for this, it's mostly intuition (and potential a bike-shedding opportunity).

New module.  This version is cpu-only.  It's also possible to compile
this with CUDA, but it seems useful to have two separate
versions.  (Still working on getting a CUDA version to compile.)
@michaelkarlcoleman
Copy link
Author

@boegel This latest version addresses your comments, I believe. Some of the comments were breadcrumbs to me or to whomever follows, pointing out a bit of how to proceed for a CUDA built. Anyway, those are mostly zapped.

I tried the "all on one line" approach in sanity_check_paths, and that's now failing the style check because the line is too long. Not sure exactly how to proceed. I can just fill it to 80 or 120 chars, but it seems like in some cases you want elements to be one per line?

@verdurin
Copy link
Member

verdurin commented Feb 1, 2018

@tutufan - the simple workaround here would be to remove one of the sanity check entries. It's acceptable not to check for every single binary, as long as a meaningful number are covered.

@michaelkarlcoleman
Copy link
Author

@verdurin That would be my thought as well, but @boegel requested above that all binaries be checked.

My personal thought would be that list formatting is mostly a matter of taste, though I'd prefer respecting PEP8 with respect to the 80-column limit. I don't really care, though, as long as the rule is spelled out in enough detail that it's possible to hit the target without iterating.

@michaelkarlcoleman
Copy link
Author

Updated with @verdurin 's suggestion, in hopes of getting this in.

@michaelkarlcoleman
Copy link
Author

Kicking Travis, which failed on one of eight runs due to a timeout/etc during download of the source. (It would be nice if the downloader would try a bit harder before giving up.)

@boegel
Copy link
Member

boegel commented Feb 8, 2018

@tutufan If the line becomes too long, just wrap to the next line. Dropping one if fine too, since the binaries are being copied it actually can't go wrong undetected in this case, either the copying works and the binaries are there, or the copying fails and then it never gets to the sanity check (copying won't fail silently).

Looks good as is now, thanks for your persistence. We try to be consistent (in places where Travis isn't on our behalf), but we're only human. ;-)

@boegel
Copy link
Member

boegel commented Feb 8, 2018

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node2504.golett.os - Linux centos linux 7.4.1708, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz, Python 2.7.5
See https://gist.github.com/d5d0dff9844a36922725f113d915e420 for a full test report.

@boegel
Copy link
Member

boegel commented Feb 8, 2018

Test report by @boegel
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in this PR)
node2005.delcatty.os - Linux centos linux 7.4.1708, Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz, Python 2.7.5
See https://gist.github.com/e017512f547a4c465e5317b7a6764d68 for a full test report.

@easybuilders easybuilders deleted a comment from boegelbot Feb 8, 2018
@boegel
Copy link
Member

boegel commented Feb 8, 2018

Thanks @tutufan!

@boegel boegel merged commit 3bd4b54 into easybuilders:develop Feb 8, 2018
@michaelkarlcoleman michaelkarlcoleman deleted the add-MEGAHIT-1.1.2 branch February 8, 2018 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants