Re: [Gfs-devel] [Gfs-users] fft module

48 views
Skip to first unread message

Stephane Popinet

unread,
Sep 27, 2012, 1:50:30 PM9/27/12
to GFS developper discussion list
Hi Daniel,

I got the code using

% darcs get http://patch-tag.com/r/dfuster/gerris-fft-particles

installed fftw from

% wget http://www.fftw.org/fftw-3.3.2.tar.gz

and compiled etc... (I didn't try to merge with stable)

When I run the attach example (slightly modified from yours):

% gerris2D -DMAXLEVEL=4 spectra2D.gfs

I get a power spectrum looking like:

% more spectra--1-0.dat
# Total energy = -nan
# 1:k 2:Ek
6.48587 1.26006e-06
9.1724 2.18055e-05
11.2339 2.9074e-05
12.9717 3.67857e-34
14.5028 0.238211
15.8871 inf
17.16 0
18.3448 3.72854e-09
19.4576 -nan
...

Not good, is it?

Also if I change 4 to 5 in OutputSpectra and OutputEnergySpectra (to
match the refinement level), I get:

% gerris2D -DMAXLEVEL=5 spectra2D.gfs
[popinet-laptop:07085] *** Process received signal ***
[popinet-laptop:07085] Signal: Segmentation fault (11)
[popinet-laptop:07085] Signal code: Address not mapped (1)
[popinet-laptop:07085] Failing at address: 0x88b9000
[popinet-laptop:07085] [ 0] [0xb77cf40c]
[popinet-laptop:07085] [ 1]
/home/popinet/local/lib/libgfs2D-1.3.so.2(gfs_event_do+0x52)
[0xb77702b2]
...

% gdb gerris2D core
Core was generated by `gerris2D spectra2D.gfs'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7286096 in output_energy_spectra_event (event=0x880d2f0, sim=0x880a118)
at fft.c:1222
1222 Ek[index1] += (pow(d.out[index2][0],2) +
pow(d.out[index2][1],2));
...
spectra2D.gfs

Daniel Fuster

unread,
Sep 27, 2012, 2:36:47 PM9/27/12
to GFS developper discussion list
Hi Stephane

As I told you I did not check the power spectrum tool in 2D. It should
not be too hard to include the case for 2D spectra. I feel we should
only change the loop in lines 1206-1228 for the 2D case

I will try to do it tomorrow

best
Daniel




2012/9/27 Stephane Popinet <s.po...@gmail.com>:
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://ad.doubleclick.net/clk;258768047;13503038;j?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Gfs-devel mailing list
> Gfs-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gfs-devel
>



--
www.danielfuster.com

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Gfs-devel mailing list
Gfs-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gfs-devel

Daniel Fuster

unread,
Sep 27, 2012, 4:30:38 PM9/27/12
to GFS developper discussion list
>> Not good, is it?

I think the attached patch solves this problem. If you confirm so I
will push the patch into my repository

Thanks
Daniel
outputenergyspectra2D

Stephane Popinet

unread,
Sep 27, 2012, 5:03:31 PM9/27/12
to GFS developper discussion list
Hi Daniel,

> I think the attached patch solves this problem. If you confirm so I
> will push the patch into my repository

Thanks a lot for the patch. It seems to work OK on my system too.

cheers

Stephane

Vladimir Kolobov

unread,
Oct 10, 2012, 4:14:12 PM10/10/12
to GFS developper discussion list
Hi Daniel,

We looked into your implementation of parallel capabilities in the particulates module
(particulates.c in dfuster/gerris-fft-particles repository). It seems we understand it.

However, it is not clear if this implementation will work with: 1) GfsEventBalance and 2) with restart.

Could you please clarify if your implementation will work with GfsEventBalance and restart ?

If not, will it require (substantial) changes in the core gerris src files ?

Thank you,
Vladimir

Daniel Fuster

unread,
Oct 10, 2012, 5:16:48 PM10/10/12
to GFS developper discussion list
Hi Vladimir

The implementation should work with GfsEventBalance and restart. The
redistribution of the data is indeed independent of the box structure
and it is done everytime the fft is needed. This is a little bit
annoying but the fftw in parallel only allows to split the domain in
one coordinate.... The algorithm to redistribute the data is also
something I am not especially proud. I am sure there is a better way
to do it.

best
Daniel

2012/10/10 Vladimir Kolobov <v...@cfdrc.com>:
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Gfs-devel mailing list
> Gfs-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gfs-devel
>



--
www.danielfuster.com

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev

Vladimir Kolobov

unread,
Oct 11, 2012, 6:56:24 PM10/11/12
to GFS developper discussion list
Daniel,

Thanks for your reply. Looks like we have nor expressed our question well.

We understand that fftw parallelization will work with GfsEventBalance
and restart.

Our question was about the particulates module (particulates.c): will
parallel implementation
in particulates.c work with GfsEventBalance and restart ? If not, how
difficult is to implement
it in gerris in your opinion ?

Sorry for not making it clear from the beginning. Maybe the question
belongs to
another thread.

Regards,

Vladimir

Daniel Fuster

unread,
Oct 12, 2012, 3:44:42 AM10/12/12
to GFS developper discussion list
Hi Vladimir

As you know, it is Gaurav who wrote most of the code. I think it works
with GfsEventBalance (90% sure but you should try). Regarding restart,
there are some "issues" regarding the time accuracy that Geordie
started discussing. How important these issues are may depend on your
specific problem. Finally, there may be some bugs.

In any case, I feel that most of the ingredients to have proper
simulations are already there. Indeed I did quite complex simulations
and Gaurav some test cases included in his paper in CAF that worked
fine. If you do more tests and you find problems, it should be
relatively easy to correct them. If that is the case, I would be very
glad if you could send me the patches so that I can maintain my
version updated

Thanks
Daniel

2012/10/12 Vladimir Kolobov <v...@cfdrc.com>:
--
www.danielfuster.com
Reply all
Reply to author
Forward
0 new messages