SuperLU handle both lib and lib64 subdirectories#1479
SuperLU handle both lib and lib64 subdirectories#1479damianam merged 3 commits intoeasybuilders:developfrom
Conversation
There was a problem hiding this comment.
I think we can simplify the code a bit. If we assume self.libbits = "lib", check for the path existence, and re-set self.libbits = "lib64" if it doesn't, then we can get rid of a few lines (the loop and the error raising). The failure would be caught in the sanity check anyway, no need to double check it before IMO.
|
@damianam Since EasyBuild v3.6.1, see easybuilders/easybuild-framework#2477 Not sure if it's a good idea to rely on that here though, since we know where stuff is installed... The fallback can be disabled by configuring EasyBuild with The fallback is sort of intended as a stop gap to avoid having to go hunt for |
| actual_libpath = os.path.join(self.installdir, "lib", "libsuperlu_%s.%s" % (self.cfg['version'], self.lib_ext)) | ||
| libbit = "lib" | ||
| if not os.path.exists(os.path.join(self.installdir, libbit)): | ||
| libbit = "lib64" |
There was a problem hiding this comment.
@hajgato please fix indent here (4 spaces)
Also, what if the lib64 dir doesn't exist either? Don't we want a clean error message then?
| self.libbits = libnames | ||
|
|
||
| if not self.libbits: | ||
| raise EasyBuildError("No lib or lib64 directory exist in installdir '%s'" % self.installdir) |
There was a problem hiding this comment.
@hajgato Using a for loop is a bit weird here imho, since there are only two options:
self.libbits = 'lib'
if not os.path.exists(os.path.join(self.installdir, self.libbits)):
self.libbits = 'lib64'
if not os.path.exists(os.path.join(self.installdir, self.libbits)):
raise EasyBuildError("No lib or lib64 subdirectory exist in %s", self.installdir)| """ | ||
| custom_paths = { | ||
| 'files': ["include/supermatrix.h", "lib/libsuperlu.%s" % self.lib_ext], | ||
| 'files': ["include/supermatrix.h", "%s/libsuperlu.%s" % (self.libbits, self.lib_ext)], |
There was a problem hiding this comment.
@hajgato Please use os.path.join(self.libbits, 'libsuperlu.%s' % self.lib_ext)
|
Good to go for me, still works like a charm with all existing @damianam Yours to merge? |
No description provided.