Skip to content

Commit

Permalink
added nag compiler, to be tested
Browse files Browse the repository at this point in the history
  • Loading branch information
szaghi committed May 10, 2018
1 parent d59e40a commit 8eda0cf
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/main/python/fobis/Compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Compiler(object):
list of supported compilers
"""

supported = ['gnu', 'intel', 'g95', 'opencoarrays-gnu', 'pgi', 'ibm']
supported = ['gnu', 'intel', 'g95', 'opencoarrays-gnu', 'pgi', 'ibm', 'nag']

def __init__(self, cliargs, print_w=None):
"""
Expand Down Expand Up @@ -101,6 +101,8 @@ def __init__(self, cliargs, print_w=None):
self._pgi()
elif self.compiler.lower() == 'ibm':
self._ibm()
elif self.compiler.lower() == 'nag':
self._nag()
elif self.compiler.lower() == 'custom':
self._custom()
else:
Expand Down Expand Up @@ -219,6 +221,21 @@ def _ibm(self):
self._profile = ['-pg', '-pg']
return

def _nag(self):
"""Set compiler defaults to the NAG fortran compiler options."""
self.compiler = 'gnu'
self.fcs = 'nagfor'
self.cflags = '-c'
self.lflags = ''
self.preproc = ''
self.modsw = '-mdir '
self._mpi = 'mpif90'
self._openmp = ['-openmp', '-openmp']
self._coarray = ['-num_images=1', '']
self._coverage = ['', '']
self._profile = ['-pg', '-pg']
return

def _custom(self):
"""Set compiler defaults to be empty."""
self.compiler = ''
Expand Down

0 comments on commit 8eda0cf

Please sign in to comment.