~pouillon/wannier90/trunk

« back to all changes in this revision

Viewing changes to config/m4/optimizations.m4

  • Committer: Yann Pouillon (Rigel)
  • Date: 2015-05-04 14:18:23 UTC
  • Revision ID: yann.pouillon@ehu.es-20150504141823-ngsh5n9iao39f3tb
Upgraded build system to the standards of 2015

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- Autoconf -*-
2
 
#
3
 
# M4 macros for Wannier90
4
 
#
5
 
# Copyright (C) 2010 Yann Pouillon
6
 
#
7
 
# This file is part of the Wannier90 software package. For license information,
8
 
# please see the COPYING file in the top-level directory of the source
9
 
# distribution.
10
 
#
11
 
 
12
 
#
13
 
# Optimizations
14
 
#
15
 
 
16
 
 
17
 
 
18
 
# W90_FC_OPTFLAGS()
19
 
# -----------------
20
 
#
21
 
# Sets optimization flags for the Fortran compiler.
22
 
#
23
 
AC_DEFUN([W90_FC_OPTFLAGS],[
24
 
  W90_FCOPTS=""
25
 
  W90_LDOPTS=""
26
 
  W90_LIBS=""
27
 
 
28
 
  case "${w90_fc_vendor}" in
29
 
 
30
 
    compaq)
31
 
      W90_FCOPTS="-fast"
32
 
      W90_LDOPTS="-fast"
33
 
      W90_LIBS="-lcxml"
34
 
      ;;
35
 
 
36
 
    g95)
37
 
      W90_FCOPTS="-O2"
38
 
      W90_LDOPTS="-O2"
39
 
      case "${with_linalg_flavor}" in
40
 
        atlas)
41
 
          W90_LIBS="-llapack -lf77blas -lcblas -latlas"
42
 
          ;;
43
 
        netlib)
44
 
          W90_LIBS="-llapack -lblas"
45
 
          ;;
46
 
      esac
47
 
      ;;
48
 
 
49
 
    gnu)
50
 
      W90_FCOPTS="-O2"
51
 
      W90_LDOPTS="-O2"
52
 
      case "${with_linalg_flavor}" in
53
 
        atlas)
54
 
          W90_LIBS="-llapack -lf77blas -lcblas -latlas"
55
 
          ;;
56
 
        netlib)
57
 
          W90_LIBS="-llapack -lblas"
58
 
          ;;
59
 
      esac
60
 
      ;;
61
 
 
62
 
    intel)
63
 
      W90_FCOPTS="-O2"
64
 
      W90_LDOPTS="-O2 -Vaxlib"
65
 
      case "${with_linalg_flavor}" in
66
 
        atlas)
67
 
          W90_LIBS="-llapack -lf77blas -lcblas -latlas"
68
 
          ;;
69
 
        mkl)
70
 
          W90_LIBS="-lmkl_lapack -lmkl_ia32 -lguide -lpthread"
71
 
          ;;
72
 
      esac
73
 
      ;;
74
 
 
75
 
    nag)
76
 
      W90_FCOPTS="-DNAG"
77
 
      W90_LDOPTS=""
78
 
      case "${with_linalg_flavor}" in
79
 
        atlas)
80
 
          W90_LIBS="-llapack -lf77blas -lcblas -latlas"
81
 
          ;;
82
 
        netlib)
83
 
          W90_LIBS="-llapack -lblas"
84
 
          ;;
85
 
      esac
86
 
      ;;
87
 
 
88
 
    pathscale)
89
 
      W90_FCOPTS="-O3"
90
 
      W90_LDOPTS=""
91
 
      W90_LIBS="-lacml"
92
 
      ;;
93
 
 
94
 
    pgi)
95
 
      W90_FCOPTS="-fast"
96
 
      W90_LDOPTS=""
97
 
      W90_LIBS="-llapack -lblas"
98
 
      ;;
99
 
 
100
 
    sun)
101
 
      W90_FCOPTS="-fast -xO3 -xlic_lib=sunperf"
102
 
      W90_LDOPTS="-fast -xO3 -xlic_lib=sunperf"
103
 
      W90_LIBS=""
104
 
      ;;
105
 
 
106
 
    ibm)
107
 
      W90_FCOPTS="-qfree=f90 -qsuffix=f=f90:cpp=F90 -qarch=auto -O3"
108
 
      W90_LDOPTS="-qfree=f90 -qsuffix=f=f90:cpp=F90 -qarch=auto"
109
 
      W90_LIBS="-llapack -lessl"
110
 
      ;;
111
 
 
112
 
    *)
113
 
      W90_FCOPTS="-O2"
114
 
      W90_LDOPTS=""
115
 
      W90_LIBS=""
116
 
      ;;
117
 
 
118
 
  esac
119
 
 
120
 
  AC_SUBST(W90_FCOPTS)
121
 
  AC_SUBST(W90_LDOPTS)
122
 
  AC_SUBST(W90_LIBS)
123
 
]) # W90_FC_OPTFLAGS