Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions easybuild/easyblocks/c/cp2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ def configure_common(self):
options['LIBINTLIB'] = '%s/lib' % libint
options['LIBS'] += ' %s -lstdc++ %s' % (libint_libs, libint_wrapper)

# add Libint include dir to $FCFLAGS
options['FCFLAGS'] += ' -I' + os.path.join(libint, 'include')

else:
# throw a warning, since CP2K without Libint doesn't make much sense
self.log.warning("Libint module not loaded, so building without Libint support")
Expand Down Expand Up @@ -618,19 +621,20 @@ def build_step(self):
-build_and_install
"""

makefiles = os.path.join(self.cfg['start_dir'], 'makefiles')
change_dir(makefiles)
if LooseVersion(self.version) < LooseVersion('7.0'):
makefiles = os.path.join(self.cfg['start_dir'], 'makefiles')
change_dir(makefiles)

# modify makefile for parallel build
parallel = self.cfg['parallel']
if parallel:
# modify makefile for parallel build
parallel = self.cfg['parallel']
if parallel:

try:
for line in fileinput.input('Makefile', inplace=1, backup='.orig.patchictce'):
line = re.sub(r"^PMAKE\s*=.*$", "PMAKE\t= $(SMAKE) -j %s" % parallel, line)
sys.stdout.write(line)
except IOError as err:
raise EasyBuildError("Can't modify/write Makefile in %s: %s", makefiles, err)
try:
for line in fileinput.input('Makefile', inplace=1, backup='.orig.patchictce'):
line = re.sub(r"^PMAKE\s*=.*$", "PMAKE\t= $(SMAKE) -j %s" % parallel, line)
sys.stdout.write(line)
except IOError as err:
raise EasyBuildError("Can't modify/write Makefile in %s: %s", makefiles, err)

# update make options with MAKE
self.cfg.update('buildopts', 'MAKE="make -j %s"' % self.cfg['parallel'])
Expand Down