Commit 7d901fe1 authored by Joubert, Wayne's avatar Joubert, Wayne
Browse files

scalapack pgi support.

parent 03d9f52c
......@@ -142,8 +142,11 @@ def compiler_type(test):
def get_module_command(module_command_args):
"""Helper: et the shell code to do a module request."""
modules_home = os.environ['MODULESHOME']
module_cmd = modules_home + '/bin/modulecmd'
if is_cray():
modules_home = os.environ['MODULESHOME']
module_cmd = modules_home + '/bin/modulecmd'
else:
module_cmd = '/usr/bin/modulecmd'
return 'eval `' + module_cmd + ' sh ' + module_command_args + '`'
#------------------------------------------------------------------------------
......@@ -191,15 +194,27 @@ def make_lapack():
[r'LOADOPTS =', r'LOADOPTS ='],
[r'TIMER = INT_ETIME', r'TIMER = INT_ETIME'],
]
elif compiler_type(test) == 'PGI':
replacements = [
[r'FORTRAN = gfortran', r'FORTRAN = pgf90'],
[r'CC = gcc', r'CC = pgcc'],
[r'OPTS = -O2 -frecursive', r'OPTS = -O3 -Kieee'],
[r'NOOPT = -O0 -frecursive', r'NOOPT = -O0 -Kieee'],
[r'LOADER = gfortran', r'LOADER = $(FORTRAN)'],
[r'LOADOPTS =', r'LOADOPTS ='],
[r'TIMER = INT_ETIME', r'TIMER = INT_CPU_TIME'],
]
make_command += ';' + get_module_command('load pgi')
elif compiler_type(test) == 'LLVM':
replacements = [
]
elif compiler_type(test) == 'XL':
replacements = [
]
else:
assert False, 'Compiler type not recognized. ' + compiler_type(test)
......@@ -299,14 +314,66 @@ def make_binary():
elif compiler_type(test) == COMPILER_PGI:
replacements = [
[r'CDEFS = -DAdd_', r'CDEFS = -DAdd_'],
[r'FC = mpif90', r'FC = mpfort'],
[r'CC = mpicc', r'CC = mpcc'],
[r'FCFLAGS = -compiler pgif90 -O3'],
[r'CCFLAGS = -O3',
r'CCFLAGS = -compiler pgcc -O3'],
[r'NOOPT = -compiler pgif90 -O0'],
[r'FCLOADFLAGS = ..FCFLAGS.',
r'FCLOADFLAGS = $(FCFLAGS) -L' +
os.path.join(build_dir_path, 'lapack')],
[r'CCLOADFLAGS = ..CCFLAGS.',
r'CCLOADFLAGS = $(CCFLAGS) -L' +
os.path.join(build_dir_path, 'lapack')],
]
# Workarounds.
ccflags = ('-m64 -D__64BIT__ '
'-I/opt/ibmhpc/pecurrent/mpich/gnu/include64 '
'-I/opt/ibmhpc/pecurrent/base/include')
ldflags = ('-m64 -rpath /opt/ibmhpc/pecurrent/mpich/gnu/lib64 -rpath /opt/ibmhpc/pecurrent/ppe.poe/gnu/lib64 -I/opt/ibmhpc/pecurrent/mpich/gnu/include64 -I/opt/ibmhpc/pecurrent/base/include64 -L/opt/ibmhpc/pecurrent/mpich/gnu/lib64 -lmpi -lmpigf -ldl -L/opt/ibmhpc/pecurrent/ppe.poe/gnu/lib64 -lpoe')
replacements = [
[r'CDEFS = -DAdd_', r'CDEFS = -DAdd_'],
[r'FC = mpif90', r'FC = pgf90'],
[r'CC = mpicc', r'CC = pgcc'],
[r'FCFLAGS = -O3', r'FCFLAGS = -O3 ' + ccflags],
[r'CCFLAGS = -O3', r'CCFLAGS = -O3 ' + ccflags],
[r'NOOPT = -O0',
r'NOOPT = -O0 ' + ccflags],
[r'FCLOADER = ..FC.',
r'FCLOADER = pgf90'],
[r'FCLOADFLAGS = ..FCFLAGS.',
r'FCLOADFLAGS = $(FCFLAGS) ' + ldflags + ' -L' +
os.path.join(build_dir_path, 'lapack')],
[r'CCLOADFLAGS = ..CCFLAGS.',
r'CCLOADFLAGS = $(CCFLAGS) ' + ldflags + ' -L' +
os.path.join(build_dir_path, 'lapack')],
]
make_command += ';' + get_module_command('load pgi')
elif compiler_type(test) == COMPILER_LLVM:
replacements = [
]
elif compiler_type(test) == COMPILER_XL:
replacements = [
# FIX
[r'CDEFS = -DAdd_', r'CDEFS = -DAdd_'],
[r'FC = mpif90', r'FC = mpfort'],
[r'CC = mpicc', r'CC = mpcc'],
[r'FCFLAGS = -O3',
r'FCFLAGS = -O3 -compiler pgif90'],
[r'CCFLAGS = -O3', r'CCFLAGS = -O3 -compiler pgi'],
[r'NOOPT = -O0',
r'NOOPT = -O0 -compiler pgif90'],
[r'FCLOADFLAGS = ..FCFLAGS.',
r'FCLOADFLAGS = $(FCFLAGS) -L' +
os.path.join(build_dir_path, 'lapack')],
[r'CCLOADFLAGS = ..CCFLAGS.',
r'CCLOADFLAGS = $(CCFLAGS) -L' +
os.path.join(build_dir_path, 'lapack')],
]
else:
......
../../Source/Common_Scripts/build_executable.x
\ No newline at end of file
../../Source/Common_Scripts/check_executable.x
\ No newline at end of file
../../Source/Common_Scripts/lsf.template.x
\ No newline at end of file
../../Source/Common_Scripts/pbs.template.x
\ No newline at end of file
../../Source/Common_Scripts/submit_executable.x
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment