Commit 2952f3c6608dcdae52e0a3b6173cb4349ffdba02

Authored by William Daniau
1 parent f10a8fbdfd
Exists in master

Added template for gfortran+openblas

Showing 1 changed file with 295 additions and 0 deletions Side-by-side Diff

Make.inc.gfortran.openblas
  1 +
  2 +# IMPORTANT :
  3 +# Variable BTREE must have been set to the build directory
  4 +# ( export BTREE=/home/daniau/plpmx/svn/build )
  5 +# It is possible to build with the same sources under win32 with PGI Compiler
  6 +# For Windows : use a cygwin bash shell and set BTREE using cygwin path ex:
  7 +# export BTREE=/c/dev/build
  8 +
  9 +# Location of qmake utility for qt3 and qt4, this is specific to each linux distribution
  10 +QMAKE3=/usr/lib/qt3/bin/qmake
  11 +QMAKE4=/usr/bin/qmake
  12 +
  13 +# How many thread for Make Qt programs
  14 +#NBTHREAD=2
  15 +
  16 +###############################################################################
  17 +#
  18 +# Extensions
  19 +#
  20 +# This define the extension names for :
  21 +# + static libraries : libext
  22 +# + dynamic libraries : soext
  23 +# + executable : exext
  24 +#
  25 +# Uncomment the following according to your platform
  26 +
  27 +
  28 +# Windows
  29 +#libext=.lib
  30 +#exext=.exe
  31 +
  32 +
  33 +# Linux
  34 +#
  35 +libext=.a
  36 +soext=.so
  37 +exext=
  38 +
  39 +###############################################################################
  40 +#
  41 +# Dynamic libraries
  42 +#
  43 +# Set BUILDSO to y to build dynamic versions of libraries if available
  44 +#
  45 +# This has been only tested with gfortran under linux for now
  46 +###############################################################################
  47 +BUILDSO=n
  48 +
  49 +###############################################################################
  50 +#
  51 +# OpenMP setup
  52 +#
  53 +# The variable OMP contains either nothing, either the compiler switch to
  54 +# enable OpenMP
  55 +#
  56 +# If you want to build a pure serial version leave OMP empty
  57 +# OMP =
  58 +# for PGI :
  59 +# OMP = -mp
  60 +# for gfortran :
  61 +# OMP = -fopenmp
  62 +###############################################################################
  63 +OMP = -fopenmp
  64 +
  65 +###############################################################################
  66 +#
  67 +# C Compiler Configuration
  68 +#
  69 +###############################################################################
  70 +#
  71 +# CC = C compiler
  72 +# CFLAGS = flags that are used for compiling C files
  73 +#
  74 +# Debug setting :
  75 +# CC = gcc
  76 +# CFLAGS = -g -fpic -m64
  77 +#
  78 +# Production setting :
  79 +# CC = gcc
  80 +# CFLAGS = -O2 -fpic -m64
  81 +#
  82 +# Or for pgcc :
  83 +# CC = pgcc
  84 +# CFLAGS = -g -fpic
  85 +# or CFLAGS = -O2 -fpic
  86 +
  87 +# For Compiling under Windows 32bits with PGI add -DPGIW32 to CFLAGS
  88 +#CC = pgcc
  89 +#CFLAGS = -O2 -Bstatic -DPGIW32
  90 +
  91 +CC = gcc
  92 +CFLAGS = -O2 -fpic -m64
  93 +
  94 +
  95 +###############################################################################
  96 +#
  97 +# Fortran 95 Compiler Configuration
  98 +#
  99 +###############################################################################
  100 +#
  101 +# F95 = fortran 95 compiler
  102 +# F95FLAGS = flags to be used when building objects
  103 +#
  104 +# Debug settings
  105 +# F95 = pgf95
  106 +# F95FLAGS = -g -fpic -I$(BTREE)/modules
  107 +#
  108 +# Production settings
  109 +# F95 = pgf95
  110 +# F95FLAGS = -fastsse -Mipa=fast -fpic -I$(BTREE)/modules
  111 +#
  112 +# Note that .mod files will be put in $(BTREE)/modules by makefiles
  113 +# this is the reason for -I$(BTREE)/modules
  114 +#
  115 +# An other note for portland compiler at least : by default the compiler will use
  116 +# all possible optimisations for the current processor, so the binaries may or may not
  117 +# work on another one. For example a binary compiled on an Opteron64 may not work
  118 +# on an Intel x86_64. If you plan to use your binaries on different platforms,
  119 +# you should use the -tp option
  120 +#
  121 +# -tp k8-64 => produce a binary optimized for AMD Opteron family
  122 +# -tp p7-64 => produce a binary optimized for Intel x64 processors
  123 +# -tp x64 => produce an unified binary which will run on both AMD and Intel
  124 +# no -tp option => produce a binary optimized for the running processor
  125 +
  126 +#F95 = pgf95
  127 +#F95FLAGS = -g -fpic -I$(BTREE)/modules
  128 +#F95FLAGS = -fastsse -fpic -I$(BTREE)/modules
  129 +F95 = gfortran
  130 +F95FLAGS = -ffree-line-length-none -O2 -fexternal-blas -fpic -I$(BTREE)/modules
  131 +
  132 +# For Compiling under Windows 32bits with PGI
  133 +# Paths for -I must be specified in a windows way (not cygwin way)
  134 +# that is -I"c:\dev\build\modules" and not -I/c/dev/build/modules
  135 +#F95 = pgf95
  136 +#F95FLAGS = -g -Munix -Bstatic -I"c:\dev\build\modules"
  137 +
  138 +# Win32 production setting :
  139 +#F95FLAGS = -fastsse -Munix -Bstatic -I"c:\dev\build\modules"
  140 +
  141 +###############################################################################
  142 +#
  143 +# Linking Configuration
  144 +#
  145 +###############################################################################
  146 +#
  147 +# LINK = linker program, usually same as compiler
  148 +# LINKFLAGS = flags to be used when linking programs
  149 +#
  150 +# Debug settings
  151 +# LINK = pgf95
  152 +# LINKFLAGS = -g -L$(BTREE)/lib
  153 +#
  154 +# Production settings
  155 +# LINK = pgf95
  156 +# LINKFLAGS = -fastsse -Mipa=fast -L$(BTREE)/lib
  157 +#
  158 +# Note that .a files will be put in $(BTREE)/lib by makefiles
  159 +# this is the reason for -L$(BTREE)/lib
  160 +#LINK = pgf95
  161 +#LINKFLAGS = -g -L$(BTREE)/lib
  162 +#LINKFLAGS = -fastsse -L$(BTREE)/lib
  163 +
  164 +LINK = gfortran
  165 +LINKFLAGS = -ffree-line-length-none -O2 -L$(BTREE)/lib
  166 +
  167 +# For Compiling under Windows 32bits with PGI
  168 +# Paths for -I must be specified in a windows way (not cygwin way)
  169 +# that is -L"c:\dev\build\lib" and not -I/c/dev/build/lib
  170 +#LINK = pgf95
  171 +#LINKFLAGS = -g -Munix -Bstatic -L"c:\dev\build\lib"
  172 +
  173 +# Win32 production setting :
  174 +#LINKFLAGS = -fastsse -Munix -Bstatic -L"c:\dev\build\lib"
  175 +
  176 +
  177 +###############################################################################
  178 +#
  179 +# BLAS/LAPACK/ACML Configuration
  180 +#
  181 +###############################################################################
  182 +#
  183 +# Location of blas and lapack
  184 +#
  185 +# Commercial fortran compilers comes with their own optimized versions of blas
  186 +# and lapack. If you're running on an AMD processor, you should use acml
  187 +# http://developer.amd.com/acml.jsp , which is an optimized version of both
  188 +# blas and lapack (and also some more functionnalities).
  189 +#
  190 +# Our Portland Fortran compiler comes with the 3 libraries. As we're running
  191 +# AMD processors, we use acml.
  192 +#
  193 +# EXTERNALLIBPATH may contain a -Ldirectory directive
  194 +# LAPACK = directive for lapack
  195 +# BLAS = directive for blas
  196 +# ACML = directive for acml
  197 +#
  198 +# Example 1:
  199 +# EXTERNALLIBPATH = -L/usr/local/pgi/linux86-64/6.1/lib/
  200 +# LAPACK = -llapack
  201 +# BLAS = -lblas
  202 +# ACML =
  203 +#
  204 +# Example 2:
  205 +# EXTERNALLIBPATH =
  206 +# LAPACK = /usr/local/pgi/linux86-64/6.1/lib/liblapack.a
  207 +# BLAS = /usr/local/pgi/linux86-64/6.1/lib/libblas.a
  208 +# ACML =
  209 +#
  210 +# Example 3:
  211 +# EXTERNALLIBPATH = -L/usr/local/pgi/linux86-64/6.1/lib/
  212 +# LAPACK =
  213 +# BLAS =
  214 +# ACML = -lacml
  215 +#
  216 +# Example 4:
  217 +# EXTERNALLIBPATH =
  218 +# LAPACK =
  219 +# BLAS =
  220 +# ACML = /usr/local/pgi/linux86-64/6.1/lib/libacml.a
  221 +#
  222 +# Simple rule is that if you set ACML then leave BLAS and LAPACK empty.
  223 +#
  224 +#
  225 +
  226 +#EXTERNALLIBPATH =
  227 +#LAPACK =
  228 +#BLAS =
  229 +#ACML = /usr/local/pgi/linux86-64/7.0/lib/libacml.a
  230 +
  231 +# With gfortran and reference implementation
  232 +#EXTERNALLIBPATH =
  233 +#LAPACK = $(BTREE)/lib/lapack_LINUX.a
  234 +#BLAS = $(BTREE)/lib/blas_LINUX.a /usr/lib64/libgfortran.so.2
  235 +#ACML =
  236 +
  237 +# With gfortran and acml
  238 +#EXTERNALLIBPATH =
  239 +#LAPACK =
  240 +#BLAS =
  241 +#ACML = /usr/local/acml4.1.0/gfortran64/lib/libacml.a /usr/lib64/libgfortran.so.2
  242 +
  243 +# With atlas compiled with gfortran and gcc
  244 +# EXTERNALLIBPATH =
  245 +# LAPACK = $(BTREE)/lib/liblapack.a
  246 +# BLAS = $(BTREE)/lib/libf77blas.a $(BTREE)/lib/libcblas.a $(BTREE)/lib/libatlas.a
  247 +# ACML =
  248 +
  249 +# With dynamic versions of atlas compiled with gfortran and gcc
  250 +#EXTERNALLIBPATH =
  251 +#LAPACK = $(BTREE)/lib/liblapack.so
  252 +#BLAS = $(BTREE)/lib/libf77blas.so $(BTREE)/lib/libcblas.so $(BTREE)/lib/libatlas.so
  253 +#ACML =
  254 +
  255 +# With dynamic version of openblas
  256 +EXTERNALLIBPATH =
  257 +LAPACK =
  258 +BLAS =
  259 +ACML = -lopenblas_lxsd
  260 +
  261 +
  262 +# Libs that may be necessary for compiling umfpack, for exemple
  263 +# EXTRALIBS = -lm -L/usr/local/pgi/linux86-64/7.0/lib -lpgftnrtl -lpgc -lrt
  264 +# is necessary for using portland fortran blas
  265 +#
  266 +#EXTRALIBS = -lm -L/usr/local/pgi/linux86-64/7.0/lib -lpgftnrtl -lpgc -lrt
  267 +#EXTRALIBS = -lm
  268 +
  269 +# Win32 settings
  270 +#EXTERNALLIBPATH =
  271 +#LAPACK = -llapack
  272 +#BLAS = -lblas
  273 +#ACML =
  274 +#EXTRALIBS = -llapack -lpgftnrtl
  275 +
  276 +
  277 +###############################################################################
  278 +#
  279 +# FVN Configuration
  280 +#
  281 +###############################################################################
  282 +#
  283 +# LINKFVN should not be changed, it defines the linking directives to link
  284 +# with fvn as it needs both blas and lapack, and also umfpack and amd
  285 +# which are both compiled within fvn
  286 +#
  287 +#LINKFVN = -lfvn -lfvn_fnlib -lumfpack -lamd $(EXTERNALLIBPATH) $(LAPACK) $(BLAS) $(ACML)
  288 +LINKFVN = -lfvn $(EXTERNALLIBPATH) $(LAPACK) $(BLAS) $(ACML)
  289 +
  290 +
  291 +#
  292 +# AR = archive utility
  293 +#
  294 +AR = ar
  295 +RANLIB = ranlib