Skip to content

Update SuiteSparse easyblock for version >= 4.5#863

Merged
boegel merged 21 commits intoeasybuilders:developfrom
besserox:suitesparse-fix
May 13, 2016
Merged

Update SuiteSparse easyblock for version >= 4.5#863
boegel merged 21 commits intoeasybuilders:developfrom
besserox:suitesparse-fix

Conversation

@besserox
Copy link
Copy Markdown
Contributor

@besserox besserox commented Mar 9, 2016

The lastest version of SuiteSparse is build shared libray.

This PR

  • Set the LD_LIBRARY_PATH to the new directory where the libraries are located
  • Add these new libraries to the sanity check

@hpcugentbot
Copy link
Copy Markdown

Automatic reply from Jenkins: Can I test this?

@boegel boegel added this to the v2.8.0 milestone Mar 9, 2016
@boegel
Copy link
Copy Markdown
Member

boegel commented Mar 9, 2016

@besserox how does this relate to #862?

cc @hajgato

@boegel
Copy link
Copy Markdown
Member

boegel commented Mar 9, 2016

Jenkins: ok to test

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1794/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hajgato
Copy link
Copy Markdown
Collaborator

hajgato commented Mar 9, 2016

@besserox @boegel This seems basically better than mine (which does not work at all), but you have to make sure that MY_METIS_LIB environmental variable is pointing to libmetis.so during the configure, build, and install steps; otherwise the bunded one will be built and used. (from SuiteSparse version 4.5.0)

@hajgato
Copy link
Copy Markdown
Collaborator

hajgato commented Mar 9, 2016

plus add the locaton of include directory to CPATH

@boegel
Copy link
Copy Markdown
Member

boegel commented Mar 9, 2016

@besserox Are you up for merging what @hajgato was working on in #862 in here?

@besserox
Copy link
Copy Markdown
Contributor Author

besserox commented Mar 9, 2016

@boegel Yes, I can do this tomorrow

@besserox
Copy link
Copy Markdown
Contributor Author

@hajgato This appears to work for me. Do you want review and test?

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1806/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Copy Markdown

Easyblocks unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-easyblocks-pr-builder/1807/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@besserox besserox changed the title Update SuiteSparse easyblock to take in account shared libraries Update SuiteSparse easyblock for version >= 4.5 Mar 10, 2016
@hajgato
Copy link
Copy Markdown
Collaborator

hajgato commented Mar 10, 2016

@besserox For me it is fine, if it works. (The bundled METIS does not build.)

@besserox
Copy link
Copy Markdown
Contributor Author

@hajgato Yes, apparently the bundled METIS does not build:

  • the metis-5.1.0/build sub-directory is empty
  • there is no libmetis.so in lib (as there was before)

@besserox
Copy link
Copy Markdown
Contributor Author

@boegel Can we make sure a file does not exist during the sanity check?

Here we would like to make sure that there is no libmetis.so in the lib directory.

@boegel
Copy link
Copy Markdown
Member

boegel commented Apr 27, 2016

@besserox not in a generic way, but you can just check that yourself when overriding sanity_check_step?

def sanity_check_step(self):
    """Custom sanity check for SuiteSparse."""
    if os.path.exists(os.path.join(self.installdir, 'lib', 'libmetis.so')):
        raise EasyBuildError("<some meaningful error message>")

    ...

Comment thread easybuild/easyblocks/s/suitesparse.py Outdated
'CPATH': [self.config_name],
'LD_LIBRARY_PATH': ['UMFPACK/Lib', 'AMD/Lib'],
'CPATH': include_dirs,
'LD_LIBRARY_PATH': ld_library_path,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@besserox also update 'LIBRARY_PATH'? cfr. #885

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@besserox please also consider the change request in #882 when tackling the remark above

@boegel
Copy link
Copy Markdown
Member

boegel commented May 10, 2016

@besserox the window for EasyBuild v2.8.0 is closing this week, any updates on this?

@besserox
Copy link
Copy Markdown
Contributor Author

@boegel I have included your last comments

Comment thread easybuild/easyblocks/s/suitesparse.py Outdated
include_dirs = [self.config_name]
ld_library_path = ['AMD/lib', 'BTF/lib', 'CAMD/lib', 'CCOLAMD/lib', 'CHOLAMD/lib', 'CHOLMOD/lib',
'COLAMD/lib/', 'CSparse/lib', 'CXSparse/lib', 'KLU/lib', 'LDL/lib', 'RBio/lib',
'UMFPACK/lib', 'SuiteSparse_config']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@besserox use self.config_name rather than hardcoding SuiteSparse_config?

@boegel
Copy link
Copy Markdown
Member

boegel commented May 12, 2016

@besserox fixes for style remarks in besserox#7

One open question on libparmetis.a though...

@besserox
Copy link
Copy Markdown
Contributor Author

@boegel Updated to set BLAS and LAPACK properly on the build command line (cf easybuilders/easybuild-easyconfigs#2766)

I found another bug at the same time.

Comment thread easybuild/easyblocks/s/suitesparse.py Outdated
f.write("# lines below added automatically by EasyBuild\n")
for (var, val) in cfgvars.items():
f.write("%s = %s\n" % (var, val))
f.close()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this whole block could be cleaned up quite a bit with:

cfgtxt = '\n'.join(["%s = %s" % (var, val) for (var, val) in cfgvars.items()])
write_file(fp, cfgtxt, append=True)

You can also move it out of the try/except, since write_file already takes care catching IOError

@boegel
Copy link
Copy Markdown
Member

boegel commented May 13, 2016

retested latest version of this both with all existing SuiteSparse easyconfigs and easybuilders/easybuild-easyconfigs#3050, works like a charm

going in, thanks a lot for your efforts @besserox!

@boegel boegel merged commit af8386a into easybuilders:develop May 13, 2016
@besserox besserox deleted the suitesparse-fix branch May 24, 2016 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants