jabbaqin / p3dfft

Automatically exported from code.google.com/p/p3dfft
GNU General Public License v3.0
0 stars 0 forks source link

Make sure timers work with C examples #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently I think timers are broken when used with C examples, 
that's why they're commented out. Please investigate and fix 
if necessary. 

Original issue reported on code.google.com by dmitry...@gmail.com on 15 Jun 2010 at 12:36

GoogleCodeExporter commented 9 years ago
Timers are all zeros, so something doesn't work in Fortran/C 
interface. 

Original comment by dmitry...@gmail.com on 15 Jun 2010 at 8:14

GoogleCodeExporter commented 9 years ago

Original comment by dmitry...@gmail.com on 21 Jun 2010 at 9:51

GoogleCodeExporter commented 9 years ago
According the documentation:
http://mpi.deino.net/mpi_functions/MPI_Reduce.html

We need to give MPI_Reduce pointers. This will require a fair amount of change 
if I'm correct.

Original comment by dan.djc...@gmail.com on 2 Jul 2010 at 9:04

GoogleCodeExporter commented 9 years ago
1. Why is it a lot of work?
2. Don't we do this already?

Original comment by dmitry...@gmail.com on 6 Jul 2010 at 7:33

GoogleCodeExporter commented 9 years ago
I don't believe we already do this.
We currently declare the int as simply "int timer" instead of "int * timer" and 
if we make this change, then other parts of the script need to be changed to 
use *timer to get the timer values.

Unfortunately my knowledge of C pointers is limited, so please correct me if 
I'm wrong.

Original comment by dan.djc...@gmail.com on 6 Jul 2010 at 8:11

GoogleCodeExporter commented 9 years ago
An error I noticed while poking around at the timers was the driver_sine C test 
was not printing out the results of the forward transform correctly:

$ mpirun -np 4 test_sine_c.x
Double precision
 (128 128 128) grid
 2 proc. dimensions
1 repetitions
Reading proc. grid from file dims
Using processor grid 2 x 2
Iteration 0
Result of forward transform
(2,2,2) 0.000000 262144.000000
(2,128,2) -0.000000 -262144.000000
(2,2,128) -0.000000 -262144.000000
(2,128,128) -0.000000 262144.000000
max diff =8.88178e-16
Time per loop=0.0514901

This is now fixed:
Double precision
 (128 128 128) grid
 2 proc. dimensions
1 repetitions
Reading proc. grid from file dims
Using processor grid 2 x 2
Iteration 0
Result of forward transform
(2,2,2) 9.2742163e-11 262144.000000
(2,128,2) -3.5131982e-11 -262144.000000
(2,2,128) -3.2430068e-11 -262144.000000
(2,128,128) -3.0061954e-11 262144.000000
max diff =8.88178e-16
Time per loop=0.0517139

Original comment by dan.djc...@gmail.com on 7 Jul 2010 at 5:55

GoogleCodeExporter commented 9 years ago
Same with sine_inplace C, corrected:
Double precision
 (128 128 128) grid
 2 proc. dimensions
1 repetitions
Reading proc. grid from file dims
Using processor grid 2 x 2
Iteration 0
Result of forward transform
(2,2,2) 9.2742163e-11 262144.000000
(2,128,2) -3.5131982e-11 -262144.000000
(2,2,128) -3.2430068e-11 -262144.000000
(2,128,128) -3.0061954e-11 262144.000000
max diff =8.88178e-16
Time per loop=0.0573323

Original comment by dan.djc...@gmail.com on 7 Jul 2010 at 6:08

GoogleCodeExporter commented 9 years ago
Daniel:
Does the configure program copy over the p3dfft.h from the .original file or 
something?

Original comment by dan.djc...@gmail.com on 19 Jul 2010 at 3:14

GoogleCodeExporter commented 9 years ago

Original comment by dan.djc...@gmail.com on 31 Jul 2010 at 8:30