0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ADDA > make seq > Error > ../memory.c:30:101: fatal error: fftw3.h: No such file or directory

Last updated at Posted at 2016-11-23
My_Environment
Ubuntu 14.04 LTS Japanese Remix
on VMWare Fusion v8.5.2 (4635224)
on OS X El Captian v10.11.4

GNU bash, version 4.3.11(1)-release

gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 
(also for g++)

This article is related to ADDA (light scattering simulator based on the discrete dipole approximation).

make seq at src/

According to the above page, I tried to make seq. Then, I received the following error.

$ make seq
--- Compilation options: ---
Release mode
FFTW3
Compiler set 'gnu'
----------------------------
Compiling sequential version of ADDA
make -C seq
make[1]: Entering directory `/home/yasokada/ADDA/WORK_161123/adda/src/seq'
gcc -c -O3 -ffast-math -funroll-loops -w  -std=c99  -MD ../memory.c
../memory.c:30:101: fatal error: fftw3.h: No such file or directory
 # include <fftw3.h> // for fftw_malloc; types.h should be defined before (to match C99 complex type)
                                                                                                     ^
compilation terminated.
make[1]: *** [memory.o] Error 1
make[1]: Leaving directory `/home/yasokada/ADDA/WORK_161123/adda/src/seq'
make: *** [seq] Error 2

This is because the FFTW3 package is not installed.

Installation of FFTW3

see http://qiita.com/7of9/items/0123202cec8b9a903910

After the installation, as shown in https://github.com/adda-team/adda/blob/wiki/InstallingFFTW3.md ,
we need to set following variables:

FFTW3_INC_PATH ~/include
FFTW3_LIB_PATH ~/lib

I added followings to ~/.bashrc

.bashrc
### FFTW3 for ADDA (Nov. 23, 2016)
export FFTW3_INC_PATH=~/include
export FFTW3_LIB_PATH=~/lib

make seq at src/

I tried make seq at src/ again.

...
gfortran -c -O3 -ffast-math -funroll-loops -w  ../fort/propaesplibreintadda.f
Linking needs to be redone
echo -n "gcc -L/home/yasokada/lib -w -lm -lfftw3  -lgfortran" > .ldopts
Building adda
gcc -o adda ADDAmain.o CalculateE.o calculator.o chebyshev.o comm.o crosssec.o GenerateB.o interaction.o io.o iterative.o linalg.o make_particle.o memory.o mt19937ar.o param.o Romberg.o sinint.o somnec.o timing.o vars.o fft.o matvec.o d07hre.o d09hre.o d113re.o d132re.o dadhre.o dchhre.o dcuhre.o dfshre.o dinhre.o drlhre.o dtrhre.o propaesplibreintadda.o   -L/home/yasokada/lib -w -lm -lfftw3  -lgfortran
make[1]: Leaving directory `/home/yasokada/ADDA/WORK_161123/adda/src/seq'

make seq finished without error.

Now, we can find the execution file named adda under src/seq/.

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?