|
|
Up |
|
|
  |
Author: FatemehFatemeh Date: Jul 18, 2008 02:39
Dear all;
I'm gonig to use FFTW libraries in order to calculate the 3D-FFT of a
step function.
I defined the 3D step function on a 100*100*100 mesh.
then I installed fftw-3.1.2 package ( fftw-3.1.2.tar.gz), but I don't
know how can I use it?
Please let me know if there is anyone that can help me.
I'm anxiously looking forward your reply and guidelines.
With my best regards,
Fatemeh
|
| |
|
| | 7 Comments |
|
  |
Author: JayBeeJayBee Date: Jul 18, 2008 07:12
On 2008-07-18, Fatemeh gmail.com> wrote:
> I'm gonig to use FFTW libraries in order to calculate the 3D-FFT of a
> step function.
> I defined the 3D step function on a 100*100*100 mesh.
> then I installed fftw-3.1.2 package ( fftw-3.1.2.tar.gz), but I don't
> know how can I use it?
> Please let me know if there is anyone that can help me.
Have you tried the documentation? It contains a tutorial explaining
how to, among other things, do 3D FFT:s.
If you still have problems after reading the fine manual, please post
your code here as a self-contained example, and I'm sure someone will
help you.
--
JayBee
|
| |
|
| | no comments |
|
  |
Author: FatemehFatemeh Date: Jul 18, 2008 22:41
I have read the Tutorial of FFTW, then I wrote a simple program to
test the FFT libraries,
I have some questions:
Consider that this is a test program:
--------------------------------------
program test
implicit none
include "fftw3.f"
integer::u,jatom,nat,h,functn,pp,m,n,y,nx,ny,nz
real::i,j,k,rx,ry,rz,originx,originy,originz,te,tee
real,allocatable::struct(:,:),tau(:,:),r0(:,:)
integer,dimension(100,100,100)::dat
INTEGER*8 plan
read(88,*)nat
allocate(struct(nat,6),tau(4,3),r0(nat,3))
do pp=1,4
read(55,*)(tau(pp,h),h=1,3)
end do
originx=tau(3,1)
originy=tau(3,2) ...
|
| Show full article (2.20Kb) |
| no comments |
|
  |
Author: DamianDamian Date: Jul 19, 2008 09:03
On Jul 18, 10:41 pm, Fatemeh gmail.com> wrote:
> I have read the Tutorial of FFTW, then I wrote a simple program to
> test the FFT libraries,
> I have some questions:
> Consider that this is a test program:
> --------------------------------------
> program test
> implicit none
> include "fftw3.f"
> integer::u,jatom,nat,h,functn,pp,m,n,y,nx,ny,nz
> real::i,j,k,rx,ry,rz,originx,originy,originz,te,tee
> real,allocatable::struct(:,:),tau(:,:),r0(:,:)
> integer,dimension(100,100,100)::dat
> INTEGER*8 plan
> read(88,*)nat
> allocate(struct(nat,6),tau(4,3),r0(nat,3))
> do pp=1,4
> read(55,*)(tau(pp,h),h=1,3)
> end do
> originx=tau(3,1) ...
|
| Show full article (2.52Kb) |
| no comments |
|
  |
Author: FatemehFatemeh Date: Jul 20, 2008 00:16
On Jul 19, 8:03 pm, Damian rouson.net> wrote:
> On Jul 18, 10:41 pm, Fatemeh gmail.com> wrote:
>
>
>
>> I have read the Tutorial of FFTW, then I wrote a simple program to
>> test the FFT libraries,
>> I have some questions:
>> Consider that this is a test program:
>> --------------------------------------
>> program test
>> implicit none
>> include "fftw3.f"
>> integer::u,jatom,nat,h,functn,pp,m,n,y,nx,ny,nz
>> real::i,j,k,rx,ry,rz,originx,originy,originz,te,tee
>> real,allocatable::struct(:,:),tau(:,:),r0(:,:)
>> integer,dimension(100,100,100)::dat
>> INTEGER*8 plan
>> read(88,*)nat
>> allocate(struct(nat,6),tau(4,3),r0(nat,3)) ...
|
| Show full article (2.80Kb) |
| no comments |
|
  |
Author: Steven G. JohnsonSteven G. Johnson Date: Jul 21, 2008 09:48
On Jul 19, 1:41 am, Fatemeh gmail.com> wrote:
> CALL
> dfftw_plan_dft_3d(plan,nx,ny,nz,dat,derr,FFTW_BACKWARD,FFTW_ESTIMATE)
> CALL dfftw_execute(plan)
> CALL dfftw_destroy_plan(plan)
> ..........
> --------------------------------------------
> 1-Is derr an output? what should I define for derr? complex? how
> dimension?
As the FFTW manual clearly states ( http://www.fftw.org/doc/Complex-
DFTs.html), the argument you are calling "derr" is the array where the
FFT output will be stored, and must be the same size as the input
array. The FFT can be peformed in-place, i.e. you can pass dat for
both the input and output arrays if you want. See also the Fortran
examples ( http://www.fftw.org/doc/Fortran-Examples.html) in the
manual.
> 2-About makefile, at the Tutorial chapter, page 3, is written I must
> link with the fftw3 library, e.g. -lfftw3 -lm on the Unix system. But
> I don’t know how I should enter the FFT in the makefile?
|
| Show full article (1.44Kb) |
| no comments |
|
  |
Author: FatemehFatemeh Date: Jul 21, 2008 23:08
Would you please guide me in linking the FFTW with my program?
I know I should put -I/home/FFTW/include/ -L/home/FFTW/lib -lfftw3
but I don't know where I should write it?
at terminal I write this command, but I see:
bash: -I/home/FFTW/include: No such file or directory
(but the given address is correct.)
where I have made a mistake? should I write it at Makefile? how?
Any help is appreciated.
With best regards,
Fatemeh
|
| |
| no comments |
|
  |
|
|
  |
Author: Steven G. JohnsonSteven G. Johnson Date: Jul 22, 2008 11:04
On Jul 22, 2:08 am, Fatemeh gmail.com> wrote:
> Would you please guide me in linking the FFTW with my program?
> I know I should put -I/home/FFTW/include/ -L/home/FFTW/lib -lfftw3
> but I don't know where I should write it?
> at terminal I write this command, but I see:
> bash: -I/home/FFTW/include: No such file or directory
> (but the given address is correct.)
> where I have made a mistake? should I write it at Makefile? how?
These are basic Unix questions and have nothing to do with FFTW or
with Fortran specifically. Anyone familiar with Unix at your
institution should be able to help you. If you Google "compiling and
linking on Unix" you will also find some tutorials. There are also
many books on Unix programming that you can find at any decent used-
book store.
It is not helpful for people on forums like this to tell you what to
type; you need to learn what the commands mean and not enter them
blindly.
Regards,
Steven G. Johnson
|
| |
| no comments |
|
|