diff --git a/Make.inc.gfortran.openblas b/Make.inc.gfortran.openblas new file mode 100644 index 0000000..8aac63f --- /dev/null +++ b/Make.inc.gfortran.openblas @@ -0,0 +1,295 @@ + +# IMPORTANT : +# Variable BTREE must have been set to the build directory +# ( export BTREE=/home/daniau/plpmx/svn/build ) +# It is possible to build with the same sources under win32 with PGI Compiler +# For Windows : use a cygwin bash shell and set BTREE using cygwin path ex: +# export BTREE=/c/dev/build + +# Location of qmake utility for qt3 and qt4, this is specific to each linux distribution +QMAKE3=/usr/lib/qt3/bin/qmake +QMAKE4=/usr/bin/qmake + +# How many thread for Make Qt programs +#NBTHREAD=2 + +############################################################################### +# +# Extensions +# +# This define the extension names for : +# + static libraries : libext +# + dynamic libraries : soext +# + executable : exext +# +# Uncomment the following according to your platform + + +# Windows +#libext=.lib +#exext=.exe + + +# Linux +# +libext=.a +soext=.so +exext= + +############################################################################### +# +# Dynamic libraries +# +# Set BUILDSO to y to build dynamic versions of libraries if available +# +# This has been only tested with gfortran under linux for now +############################################################################### +BUILDSO=n + +############################################################################### +# +# OpenMP setup +# +# The variable OMP contains either nothing, either the compiler switch to +# enable OpenMP +# +# If you want to build a pure serial version leave OMP empty +# OMP = +# for PGI : +# OMP = -mp +# for gfortran : +# OMP = -fopenmp +############################################################################### +OMP = -fopenmp + +############################################################################### +# +# C Compiler Configuration +# +############################################################################### +# +# CC = C compiler +# CFLAGS = flags that are used for compiling C files +# +# Debug setting : +# CC = gcc +# CFLAGS = -g -fpic -m64 +# +# Production setting : +# CC = gcc +# CFLAGS = -O2 -fpic -m64 +# +# Or for pgcc : +# CC = pgcc +# CFLAGS = -g -fpic +# or CFLAGS = -O2 -fpic + +# For Compiling under Windows 32bits with PGI add -DPGIW32 to CFLAGS +#CC = pgcc +#CFLAGS = -O2 -Bstatic -DPGIW32 + +CC = gcc +CFLAGS = -O2 -fpic -m64 + + +############################################################################### +# +# Fortran 95 Compiler Configuration +# +############################################################################### +# +# F95 = fortran 95 compiler +# F95FLAGS = flags to be used when building objects +# +# Debug settings +# F95 = pgf95 +# F95FLAGS = -g -fpic -I$(BTREE)/modules +# +# Production settings +# F95 = pgf95 +# F95FLAGS = -fastsse -Mipa=fast -fpic -I$(BTREE)/modules +# +# Note that .mod files will be put in $(BTREE)/modules by makefiles +# this is the reason for -I$(BTREE)/modules +# +# An other note for portland compiler at least : by default the compiler will use +# all possible optimisations for the current processor, so the binaries may or may not +# work on another one. For example a binary compiled on an Opteron64 may not work +# on an Intel x86_64. If you plan to use your binaries on different platforms, +# you should use the -tp option +# +# -tp k8-64 => produce a binary optimized for AMD Opteron family +# -tp p7-64 => produce a binary optimized for Intel x64 processors +# -tp x64 => produce an unified binary which will run on both AMD and Intel +# no -tp option => produce a binary optimized for the running processor + +#F95 = pgf95 +#F95FLAGS = -g -fpic -I$(BTREE)/modules +#F95FLAGS = -fastsse -fpic -I$(BTREE)/modules +F95 = gfortran +F95FLAGS = -ffree-line-length-none -O2 -fexternal-blas -fpic -I$(BTREE)/modules + +# For Compiling under Windows 32bits with PGI +# Paths for -I must be specified in a windows way (not cygwin way) +# that is -I"c:\dev\build\modules" and not -I/c/dev/build/modules +#F95 = pgf95 +#F95FLAGS = -g -Munix -Bstatic -I"c:\dev\build\modules" + +# Win32 production setting : +#F95FLAGS = -fastsse -Munix -Bstatic -I"c:\dev\build\modules" + +############################################################################### +# +# Linking Configuration +# +############################################################################### +# +# LINK = linker program, usually same as compiler +# LINKFLAGS = flags to be used when linking programs +# +# Debug settings +# LINK = pgf95 +# LINKFLAGS = -g -L$(BTREE)/lib +# +# Production settings +# LINK = pgf95 +# LINKFLAGS = -fastsse -Mipa=fast -L$(BTREE)/lib +# +# Note that .a files will be put in $(BTREE)/lib by makefiles +# this is the reason for -L$(BTREE)/lib +#LINK = pgf95 +#LINKFLAGS = -g -L$(BTREE)/lib +#LINKFLAGS = -fastsse -L$(BTREE)/lib + +LINK = gfortran +LINKFLAGS = -ffree-line-length-none -O2 -L$(BTREE)/lib + +# For Compiling under Windows 32bits with PGI +# Paths for -I must be specified in a windows way (not cygwin way) +# that is -L"c:\dev\build\lib" and not -I/c/dev/build/lib +#LINK = pgf95 +#LINKFLAGS = -g -Munix -Bstatic -L"c:\dev\build\lib" + +# Win32 production setting : +#LINKFLAGS = -fastsse -Munix -Bstatic -L"c:\dev\build\lib" + + +############################################################################### +# +# BLAS/LAPACK/ACML Configuration +# +############################################################################### +# +# Location of blas and lapack +# +# Commercial fortran compilers comes with their own optimized versions of blas +# and lapack. If you're running on an AMD processor, you should use acml +# http://developer.amd.com/acml.jsp , which is an optimized version of both +# blas and lapack (and also some more functionnalities). +# +# Our Portland Fortran compiler comes with the 3 libraries. As we're running +# AMD processors, we use acml. +# +# EXTERNALLIBPATH may contain a -Ldirectory directive +# LAPACK = directive for lapack +# BLAS = directive for blas +# ACML = directive for acml +# +# Example 1: +# EXTERNALLIBPATH = -L/usr/local/pgi/linux86-64/6.1/lib/ +# LAPACK = -llapack +# BLAS = -lblas +# ACML = +# +# Example 2: +# EXTERNALLIBPATH = +# LAPACK = /usr/local/pgi/linux86-64/6.1/lib/liblapack.a +# BLAS = /usr/local/pgi/linux86-64/6.1/lib/libblas.a +# ACML = +# +# Example 3: +# EXTERNALLIBPATH = -L/usr/local/pgi/linux86-64/6.1/lib/ +# LAPACK = +# BLAS = +# ACML = -lacml +# +# Example 4: +# EXTERNALLIBPATH = +# LAPACK = +# BLAS = +# ACML = /usr/local/pgi/linux86-64/6.1/lib/libacml.a +# +# Simple rule is that if you set ACML then leave BLAS and LAPACK empty. +# +# + +#EXTERNALLIBPATH = +#LAPACK = +#BLAS = +#ACML = /usr/local/pgi/linux86-64/7.0/lib/libacml.a + +# With gfortran and reference implementation +#EXTERNALLIBPATH = +#LAPACK = $(BTREE)/lib/lapack_LINUX.a +#BLAS = $(BTREE)/lib/blas_LINUX.a /usr/lib64/libgfortran.so.2 +#ACML = + +# With gfortran and acml +#EXTERNALLIBPATH = +#LAPACK = +#BLAS = +#ACML = /usr/local/acml4.1.0/gfortran64/lib/libacml.a /usr/lib64/libgfortran.so.2 + +# With atlas compiled with gfortran and gcc +# EXTERNALLIBPATH = +# LAPACK = $(BTREE)/lib/liblapack.a +# BLAS = $(BTREE)/lib/libf77blas.a $(BTREE)/lib/libcblas.a $(BTREE)/lib/libatlas.a +# ACML = + +# With dynamic versions of atlas compiled with gfortran and gcc +#EXTERNALLIBPATH = +#LAPACK = $(BTREE)/lib/liblapack.so +#BLAS = $(BTREE)/lib/libf77blas.so $(BTREE)/lib/libcblas.so $(BTREE)/lib/libatlas.so +#ACML = + +# With dynamic version of openblas +EXTERNALLIBPATH = +LAPACK = +BLAS = +ACML = -lopenblas_lxsd + + +# Libs that may be necessary for compiling umfpack, for exemple +# EXTRALIBS = -lm -L/usr/local/pgi/linux86-64/7.0/lib -lpgftnrtl -lpgc -lrt +# is necessary for using portland fortran blas +# +#EXTRALIBS = -lm -L/usr/local/pgi/linux86-64/7.0/lib -lpgftnrtl -lpgc -lrt +#EXTRALIBS = -lm + +# Win32 settings +#EXTERNALLIBPATH = +#LAPACK = -llapack +#BLAS = -lblas +#ACML = +#EXTRALIBS = -llapack -lpgftnrtl + + +############################################################################### +# +# FVN Configuration +# +############################################################################### +# +# LINKFVN should not be changed, it defines the linking directives to link +# with fvn as it needs both blas and lapack, and also umfpack and amd +# which are both compiled within fvn +# +#LINKFVN = -lfvn -lfvn_fnlib -lumfpack -lamd $(EXTERNALLIBPATH) $(LAPACK) $(BLAS) $(ACML) +LINKFVN = -lfvn $(EXTERNALLIBPATH) $(LAPACK) $(BLAS) $(ACML) + + +# +# AR = archive utility +# +AR = ar +RANLIB = ranlib