Update Nek5000 package to Version 17 (#7178)

and minor polishing
This commit is contained in:
Thilina Rathnayake 2018-02-03 17:05:14 -06:00 committed by Adam J. Stewart
parent 927af929f4
commit 970a4b2815

View file

@ -46,8 +46,8 @@ class Nek5000(Package):
tags = ['cfd', 'flow', 'hpc', 'solver', 'navier-stokes',
'spectral-elements', 'fluid']
version('17.0.0-beta2', git='https://github.com/Nek5000/Nek5000.git',
commit='b95f46c59f017fff2fc19b66aa65a881085a7572')
version('17.0', git='https://github.com/Nek5000/Nek5000.git',
commit='469daf94d3f9aa3ba9d258d8eee9ebde6893a702')
version('develop', git='https://github.com/Nek5000/Nek5000.git',
branch='master')
@ -88,18 +88,15 @@ def install(self, spec, prefix):
toolsDir = 'tools'
binDir = 'bin'
F77 = self.compiler.fc
FC = self.compiler.fc
CC = self.compiler.cc
# Build the tools, maketools copy them to Nek5000/bin by default.
# We will then install Nek5000/bin under prefix after that.
with working_dir(toolsDir):
# Update the maketools script to use correct compilers
if self.version == Version('17.0.0-beta2'): # Old release
filter_file(r'^F77\s*=.*', 'F77=\"' + F77 + '\"', 'maketools')
else:
filter_file(r'^FC\s*=.*', 'FC=\"' + F77 + '\"', 'maketools')
filter_file(r'^CC\s*=.*', 'CC=\"' + CC + '\"', 'maketools')
filter_file(r'^FC\s*=.*', 'FC="{0}"'.format(FC), 'maketools')
filter_file(r'^CC\s*=.*', 'CC="{0}"'.format(CC), 'maketools')
maxnel = self.spec.variants['MAXNEL'].value
filter_file(r'^#MAXNEL\s*=.*', 'MAXNEL=' + maxnel, 'maketools')
@ -126,7 +123,7 @@ def install(self, spec, prefix):
with working_dir(binDir):
if '+mpi' in spec:
F77 = spec['mpi'].mpif77
FC = spec['mpi'].mpif77
CC = spec['mpi'].mpicc
else:
filter_file(r'^#MPI=0', 'MPI=0', 'makenek')
@ -141,9 +138,10 @@ def install(self, spec, prefix):
# Update the makenek to use correct compilers and
# Nek5000 source.
filter_file(r'^F77\s*=.*', 'F77=\"' + F77 + '\"', 'makenek')
filter_file(r'^CC\s*=.*', 'CC=\"' + CC + '\"', 'makenek')
filter_file(r'SOURCE_ROOT\s*=\"\$H.*', 'SOURCE_ROOT=\"' +
if self.version >= Version('17.0'):
filter_file(r'^#FC\s*=.*', 'FC="{0}"'.format(FC), 'makenek')
filter_file(r'^#CC\s*=.*', 'CC="{0}"'.format(CC), 'makenek')
filter_file(r'^#SOURCE_ROOT\s*=\"\$H.*', 'SOURCE_ROOT=\"' +
prefix.bin.Nek5000 + '\"', 'makenek')
# Install Nek5000/bin in prefix/bin