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

The Rosetta EasyBlock is broken with regards to --module-only #1072

Closed
tobbez opened this issue Dec 19, 2016 · 3 comments
Closed

The Rosetta EasyBlock is broken with regards to --module-only #1072

tobbez opened this issue Dec 19, 2016 · 3 comments
Milestone

Comments

@tobbez
Copy link
Contributor

tobbez commented Dec 19, 2016

When regenerating module files with --module-only, EasyBuild fails with (formatted for readability):

EasyBuild crashed with an error (at ?:124 in __init__):
Sanity check failed:
no file of ('bin/AbinitioRelax.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/backrub.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/cluster.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/combine_silent.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/extract_pdbs.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/idealize_jd2.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/packstat.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/relax.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/score_jd2.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20,
no file of ('bin/score.mpi.linuxNonerelease',) in .../software/Rosetta/3.7-goolf-PReSTO-1.7.20
(at easybuild/framework/easyblock.py:2062 in _sanity_check_step)

This is because of the use of self.cxx in the sanity check:

    def sanity_check_step(self):
        """Custom sanity check for Rosetta."""

        infix = ''
        if self.toolchain.options.get('usempi', None):
            infix = 'mpi.'

        binaries = ["AbinitioRelax", "backrub", "cluster", "combine_silent", "extract_pdbs",
                    "idealize_jd2", "packstat", "relax", "score_jd2", "score"]
        custom_paths = {
            'files':["bin/%s.%slinux%srelease" % (x, infix, self.cxx) for x in binaries],
            'dirs':[],
        }
        super(EB_Rosetta, self).sanity_check_step(custom_paths=custom_paths)

which is only set in the configure step (which is not executed when running with --module-only):

    def configure_step(self):
        """
        Configure build by creating tools/build/user.settings from configure options.
        """
        # construct build options
        defines = ['NDEBUG']
        self.cfg.update('buildopts', "mode=release")

        self.cxx = os.getenv('CC_SEQ')
        if self.cxx is None:
            self.cxx = os.getenv('CC')
        cxx_ver = None
        if self.toolchain.comp_family() in [toolchain.GCC]:  #@UndefinedVariable
            cxx_ver = '.'.join(get_software_version('GCC').split('.')[:2])
        elif self.toolchain.comp_family() in [toolchain.INTELCOMP]:  #@UndefinedVariable
            cxx_ver = '.'.join(get_icc_version().split('.')[:2])
        else:
            raise EasyBuildError("Don't know how to determine C++ compiler version.")
        self.cfg.update('buildopts', "cxx=%s cxx_ver=%s" % (self.cxx, cxx_ver))

        [...]
@boegel boegel added this to the 3.1.0 milestone Dec 19, 2016
@boegel
Copy link
Member

boegel commented Dec 19, 2016

Thanks for the bug report @tobbez!

Are you up for looking into a fix yourself for this?

The best way would probably be to put the code that defines self.cxx in a dedicated method, and check in sanity_check_step whether self.cxx is None; if it is, the method that defines self.cxx should be called first.

tobbez added a commit to tobbez/easybuild-easyblocks that referenced this issue Dec 19, 2016
Previously the sanity check would fail since None was inserted into the
paths of the files to be checked (rather than the actual compiler name).

Fixes easybuilders#1072
tobbez added a commit to tobbez/easybuild-easyblocks that referenced this issue Dec 19, 2016
Previously the sanity check would fail since None was inserted into the
paths of the files to be checked (rather than the actual compiler name).

Fixes easybuilders#1072.
@tobbez
Copy link
Contributor Author

tobbez commented Dec 19, 2016

#1073

@boegel
Copy link
Member

boegel commented Dec 20, 2016

@tobbez great, thanks, let's follow-up in #1073

@boegel boegel closed this as completed Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants