jasonlarkin / p3dfft

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

Recent Change Broke Single Precision driver_sine test #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ mpirun -np 4 test_sine_c.x
Single 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
[not printed out because not big enough]
max diff =1
Time per loop=0.0266109

$ mpirun -np 4 test_sine_f.x
 Mytype=            4
 Mytype=            4
 Mytype=            4
 Mytype=            4
  Reading from input file stdin
 procs=            4  nx=          128  ny=          128  nz=          128
 ndim=            2  repeat=            1
 Single precision version
 Reading proc. grid from file dims
 Using processor grid             2  x             2
 Iteration             1
 Result of forward transform:
 max diff =    1.000000
 proc_id, cpu time per loop            0   3.0454874038696289E-002
 timer            1  (avg/max/min):    1.5639662742614746E-003
   1.6770362854003906E-003   1.4920234680175781E-003
 timer            2  (avg/max/min):    2.5759339332580566E-003
   3.1158924102783203E-003   1.9919872283935547E-003
 timer            3  (avg/max/min):    1.4914870262145996E-003
   1.7330646514892578E-003   1.3329982757568359E-003
 timer            4  (avg/max/min):    1.1692643165588379E-003
   1.7662048339843750E-003   7.7605247497558594E-004
 timer            5  (avg/max/min):    7.7486038208007812E-007
   1.1920928955078125E-006    0.000000000000000
 timer            6  (avg/max/min):    2.5728940963745117E-003
   3.0128955841064453E-003   2.3908615112304688E-003
 timer            7  (avg/max/min):    3.2851099967956543E-003
   3.7181377410888672E-003   2.9931068420410156E-003
 timer            8  (avg/max/min):    3.9629936218261719E-003
   4.4589042663574219E-003   3.6861896514892578E-003
 timer            9  (avg/max/min):    3.6092996597290039E-003
   3.6690235137939453E-003   3.4799575805664062E-003
 timer           10  (avg/max/min):    3.0774474143981934E-003
   3.2908916473388672E-003   2.9988288879394531E-003
 Total comm (avg/max/min):    6.8006515502929688E-003   7.8921318054199219E-003
    6.0198307037353516E-003

Original issue reported on code.google.com by dan.djc...@gmail.com on 7 Jul 2010 at 6:00

GoogleCodeExporter commented 9 years ago
Results from testing most recent revision of p3dfft-f90 branch:

$ mpirun -np 4 FORTRAN/test_sine_f.x
Mytype=            4
Mytype=            4
Mytype=            4
Mytype=            4
 Reading from input file stdin
procs=            4  nx=          128  ny=          128  nz=          128
ndim=            2  repeat=            1
Single precision version
Reading proc. grid from file dims
Using processor grid             2  x             2
Iteration             1
Result of forward transform:
Results are correct
max diff =    1.000000
proc_id, cpu time per loop            0   2.9881954193115234E-002
timer            1  (avg/max/min):    2.1302700042724609E-003
  2.2318363189697266E-003   2.0420551300048828E-003
timer            2  (avg/max/min):    2.2702217102050781E-003
  2.8231143951416016E-003   1.9679069519042969E-003
timer            3  (avg/max/min):    1.4344453811645508E-003
  1.5978813171386719E-003   1.3039112091064453E-003
timer            4  (avg/max/min):    1.6595125198364258E-003
  2.3009777069091797E-003   1.2779235839843750E-003
timer            5  (avg/max/min):    9.5367431640625000E-007
  9.5367431640625000E-007   9.5367431640625000E-007
timer            6  (avg/max/min):    2.2944211959838867E-003
  2.3839473724365234E-003   2.1860599517822266E-003
timer            7  (avg/max/min):    3.0284523963928223E-003
  3.1599998474121094E-003   2.8929710388183594E-003
timer            8  (avg/max/min):    3.7983059883117676E-003
  4.0171146392822266E-003   3.6690235137939453E-003
timer            9  (avg/max/min):    3.5800337791442871E-003
  3.6830902099609375E-003   3.4439563751220703E-003
timer           10  (avg/max/min):    2.9439926147460938E-003
  3.1008720397949219E-003   2.8841495513916016E-003
timer           11  (avg/max/min):    1.4250278472900391E-003
  1.6019344329833984E-003   1.2140274047851562E-003
timer           12  (avg/max/min):    2.9899477958679199E-003
  3.1549930572509766E-003   2.8779506683349609E-003
Total comm (avg/max/min):    7.4944496154785156E-003   7.8191757202148438E-003
   7.0278644561767578E-003

Original comment by masta.p...@gmail.com on 12 Jul 2010 at 11:56

GoogleCodeExporter commented 9 years ago
Per Dmitry:
I found the bug that caused the single-precision error.
A simple misprint on line 250 in fft_init.F90.

Original comment by dan.djc...@gmail.com on 19 Jul 2010 at 12:48