[Beowulf] fftw2, mpi, from 32 bit to 64 and fortran
Lombard, David N
dnlombar at ichips.intel.com
Wed Aug 6 14:56:01 PDT 2008
On Tue, Aug 05, 2008 at 02:57:42AM -0700, Ricardo Reis wrote:
> On Mon, 4 Aug 2008, Mark Kosmowski wrote:
> > So, why did the 32-bit test case work? Shouldn't the same problem
> > crash both systems if it is a code issue?
Not necessarily given the error described below.
> I asked the same question myself... The function interface is:
> call rfftwnd_f77_mpi(plan_c2r, &
> 1, local_data, work, use_work, FFTW_NORMAL_ORDER)
> where use_work is an integer, value 1 if you use the work temporary
> array, 0 otherwise. This was the variable I wasn't passing.
> The wrapper function for this is (from rfftw_f77_mpi.c):
> void F77_FUNC_(rfftwnd_f77_mpi,RFFTWND_F77_MPI)
> (rfftwnd_mpi_plan *p, int *n_fields, fftw_real *local_data,
> fftw_real *work, int *use_work, int *ioutput_order)
> .... So it must be a pointer issue revealed by the 64 bit, no? When I
> wasn't doing it "properly" the value of *ioutput_order wasn't set.
The value of the first element of local_data was used for the n_fields scalar.
The work array was being laid down starting at the location of the use_work scalar.
The FFTW_NORMAL_ORDER value was being interpreted as use_work scalar.
Finally, ioutput_order scalar was some random value.
So, a lot was going wrong there. It's just one of life's little, um, pleasures
that it looked like it was working for your 32-bit test case. Don't worry, you'll
likely do this again, as likely *every* one of us on this list has, too.
BTW, Fortran passes by reference; that's why all args are pointers.
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.
More information about the Beowulf