Skip to content

Commit

Permalink
Merge branch 'release/2.2.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
szaghi committed Aug 1, 2017
2 parents e756e08 + de7c88b commit 8e27008
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
30 changes: 27 additions & 3 deletions src/main/python/fobis/Compiler.py
@@ -1,3 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: src/main/python/fobis/Compiler.py
# Author: Stefano Zaghi <stefano.zaghi@gmail.com>
# Date: 01.08.2017
# Last Modified Date: 01.08.2017
# Last Modified By: Stefano Zaghi <stefano.zaghi@gmail.com>
"""
Compiler.py, module definition of Compiler class.
This is a class designed for handling compilers default support.
Expand Down Expand Up @@ -29,11 +36,11 @@ class Compiler(object):
Attributes
----------
supported : {['gnu', 'intel', 'g95', 'opencoarrays-gnu']}
supported : {['gnu', 'intel', 'g95', 'opencoarrays-gnu', 'pgi', ibm']}
list of supported compilers
"""

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

def __init__(self, cliargs, print_w=None):
"""
Expand Down Expand Up @@ -92,6 +99,8 @@ def __init__(self, cliargs, print_w=None):
self._opencoarrays_gnu()
elif self.compiler.lower() == 'pgi':
self._pgi()
elif self.compiler.lower() == 'ibm':
self._ibm()
elif self.compiler.lower() == 'custom':
self._custom()
else:
Expand Down Expand Up @@ -195,6 +204,21 @@ def _pgi(self):
self._profile = ['-pg', '-pg']
return

def _ibm(self):
"""Set compiler defaults to the IBM XL Fortran compiler options."""
self.compiler = 'ibm'
self.fcs = 'xlf2008_r'
self.cflags = '-c'
self.lflags = ''
self.preproc = ''
self.modsw = '-qmoddir='
self._mpi = 'mpif90'
self._openmp = ['-qsmp=omp', '-qsmp=omp']
self._coarray = ['', '']
self._coverage = ['', '']
self._profile = ['-pg', '-pg']
return

def _custom(self):
"""Set compiler defaults to be empty."""
self.compiler = ''
Expand Down Expand Up @@ -271,7 +295,7 @@ def compile_cmd(self, mod_dir):
mod_dir : str
path of the modules directory
"""
return self.fcs + ' ' + self.cflags + ' ' + self.modsw + mod_dir
return self.fcs + ' ' + self.cflags + ' ' + self.modsw + mod_dir + ' -I' + mod_dir

def link_cmd(self, mod_dir):
"""
Expand Down
9 changes: 8 additions & 1 deletion src/main/python/fobis/FoBiSConfig.py
@@ -1,3 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: src/main/python/fobis/FoBiSConfig.py
# Author: Stefano Zaghi <stefano.zaghi@gmail.com>
# Date: 01.08.2017
# Last Modified Date: 01.08.2017
# Last Modified By: Stefano Zaghi <stefano.zaghi@gmail.com>
"""
FoBiSConfig.py, module definition of FoBiS.py configuration.
"""
Expand Down Expand Up @@ -28,7 +35,7 @@
from .utils import syswork

__appname__ = "FoBiS.py"
__version__ = "2.2.5"
__version__ = "2.2.6"
__author__ = "Stefano Zaghi"
__author_email__ = "stefano.zaghi@gmail.com"
__license__ = "GNU General Public License v3 (GPLv3)"
Expand Down

0 comments on commit 8e27008

Please sign in to comment.