Skip to content

Commit a41ede8

Browse files
author
Mark Wieczorek
committed
Remove -m64 compiler flag that is no longer necessary
1 parent f0cd606 commit a41ede8

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ FLAKE8_FILES = pyshtools examples/python
172172
# if the short name of the compiler is in $(F95).
173173
ifeq ($(findstring gfortran,$(F95)),gfortran)
174174
# Default gfortran flags
175-
F95FLAGS ?= -m64 -fPIC -O3 -std=gnu -ffast-math
175+
F95FLAGS ?= -fPIC -O3 -std=gnu -ffast-math
176176
# -march=native
177177
MODFLAG = -I$(MODPATH)
178178
SYSMODFLAG = -I$(SYSMODPATH)
@@ -181,7 +181,7 @@ ifeq ($(findstring gfortran,$(F95)),gfortran)
181181
LAPACK ?= -llapack
182182
else ifeq ($(findstring f95,$(F95)),f95)
183183
# Default Absoft f95 flags
184-
F95FLAGS ?= -m64 -O3 -YEXT_NAMES=LCS -YEXT_SFX=_ -fpic -speed_math=10
184+
F95FLAGS ?= -O3 -YEXT_NAMES=LCS -YEXT_SFX=_ -fpic -speed_math=10
185185
#-march=host
186186
MODFLAG = -p $(MODPATH)
187187
SYSMODFLAG = -p $(SYSMODPATH)
@@ -190,15 +190,15 @@ else ifeq ($(findstring f95,$(F95)),f95)
190190
LAPACK ?= -llapack
191191
else ifeq ($(findstring ifort,$(F95)),ifort)
192192
# Default intel fortran flags
193-
F95FLAGS ?= -m64 -fpp -free -O3 -Tf
193+
F95FLAGS ?= -fpp -free -O3 -Tf
194194
MODFLAG = -I$(MODPATH)
195195
SYSMODFLAG = -I$(SYSMODPATH)
196196
OPENMPFLAGS ?= -qopenmp
197197
LAPACK ?= -mkl
198198
BLAS ?=
199199
else ifeq ($(findstring ifx,$(F95)),ifx)
200200
# Default intel fortran flags
201-
F95FLAGS ?= -m64 -fpp -free -O3 -Tf
201+
F95FLAGS ?= -fpp -free -O3 -Tf
202202
MODFLAG = -I$(MODPATH)
203203
SYSMODFLAG = -I$(SYSMODPATH)
204204
OPENMPFLAGS ?= -qopenmp
@@ -221,7 +221,7 @@ else ifeq ($(findstring pgf90,$(F95)),pgf90)
221221
BLAS ?= -lblas
222222
LAPACK ?= -llapack
223223
else ifeq ($(origin F95FLAGS), undefined)
224-
F95FLAGS = -m64 -O3
224+
F95FLAGS = -O3
225225
MODFLAG = -I$(MODPATH)
226226
SYSMODFLAG = -I$(SYSMODPATH)
227227
OPENMPFLAGS ?=

docs/pages/fortran/fortran-95-problems.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Fortran 95 problems"
33
keywords: spherical harmonics software package, spherical harmonic transform, legendre functions, multitaper spectral analysis, fortran, Python, gravity, magnetic field
44
sidebar: fortran_sidebar
55
permalink: fortran-95-problems.html
6-
summary:
6+
summary:
77
toc: true
88
folder: fortran
99
---
@@ -71,7 +71,7 @@ where the find command searches the directory `/usr`. This pathname can then be
7171

7272
For some compilers, the location of the source file following the compiler name is important. When this is the case, if the source file is not in its correct position, you could receive link errors that resemble the following:
7373
```
74-
gfortran -L../lib -lSHTOOLS TimingAccuracy/TimingAccuracyGLQC.f95 -I../modules/ -L../lib -lfftw3 -lm -m64 -O3 -o TimingAccuracy/TimingAccuracyGLQC
74+
gfortran -L../lib -lSHTOOLS TimingAccuracy/TimingAccuracyGLQC.f95 -I../modules/ -L../lib -lfftw3 -lm -O3 -o TimingAccuracy/TimingAccuracyGLQC
7575
/tmp/cchgdOpg.o: In function `MAIN__':
7676
TimingAccuracyGLQC.f95:(.text+0x5b3): undefined reference to `randomgaussian_'
7777
TimingAccuracyGLQC.f95:(.text+0xb9b): undefined reference to `shglq_'
@@ -81,7 +81,7 @@ collect2: error: ld returned 1 exit status
8181
```
8282
For this example, successful compilation can be achieved by placing the source file before the library calls:
8383
```
84-
gfortran TimingAccuracy/TimingAccuracyGLQC.f95 -L../lib -lSHTOOLS -I../modules/ -L../lib -lfftw3 -lm -m64 -O3 -o TimingAccuracy/TimingAccuracyGLQC
84+
gfortran TimingAccuracy/TimingAccuracyGLQC.f95 -L../lib -lSHTOOLS -I../modules/ -L../lib -lfftw3 -lm -O3 -o TimingAccuracy/TimingAccuracyGLQC
8585
```
8686

8787
## The linker can't seem to find either the LAPACK, BLAS, or FFTW libraries

docs/pages/fortran/fortran-installing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ LAPACK_UNDERSCORE=1 # add an extra underscore to the LAPACK routine names
150150
```
151151
For this case, compiler flags should probably be set so that underscores are not appended to routine names. See [Fortran 95 problems](fortran-95-problems.html) for further information.
152152

153-
To generate 64 bit code, use the compiler option
153+
To generate 64 bit code (which is usually the default), use the compiler option
154154
```bash
155155
-m64
156156
```

docs/pages/fortran/using-with-f95.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ Typical examples of compiling and linking a program `MyProgram.f95` to the neces
3434

3535
### gfortran
3636
```bash
37-
gfortran MyProgram.f95 -I$SHTOOLSMODPATH -L$SHTOOLSLIBPATH -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -m64 -o MyProgram
37+
gfortran MyProgram.f95 -I$SHTOOLSMODPATH -L$SHTOOLSLIBPATH -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -o MyProgram
3838
```
3939

4040
### Absoft Pro Fortran (f95)
4141
```bash
42-
f95 MyProgram.f95 -p $SHTOOLSMODPATH -L$SHTOOLSLIBPATH -YEXT_NAMES=LCS -YEXT_SFX=_ -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -m64 -o MyProgram
42+
f95 MyProgram.f95 -p $SHTOOLSMODPATH -L$SHTOOLSLIBPATH -YEXT_NAMES=LCS -YEXT_SFX=_ -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -o MyProgram
4343
```
4444

4545
### g95
4646
```bash
47-
g95 MyProgram.f95 -I$SHTOOLSMODPATH -L$SHTOOLSLIBPATH -fno-second-underscore -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -m64 -o MyProgram
47+
g95 MyProgram.f95 -I$SHTOOLSMODPATH -L$SHTOOLSLIBPATH -fno-second-underscore -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -o MyProgram
4848
```
4949

5050
### Intel Fortran (ifort)
5151
```bash
52-
ifort -fpp -free -I$SHTOOLSMODPATH -L$SHTOOLSLIBPATH -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -m64 -Tf MyProgram.f95 -o MyProgram
52+
ifort -fpp -free -I$SHTOOLSMODPATH -L$SHTOOLSLIBPATH -lSHTOOLS -lfftw3 -lm -llapack -lblas -O3 -Tf MyProgram.f95 -o MyProgram
5353
```
5454
Note that the position of the source file in the above examples might be important for some compilers. Note also that on macOS, linking to the preinstalled LAPACK and BLAS libraries can be accomplished using `-framework Accelerate`. (See [installing SHTOOLS](installing-fortran.html) for more details).
5555

0 commit comments

Comments
 (0)