Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation using fftw #2

Open
Luispain opened this issue Apr 28, 2021 · 4 comments
Open

compilation using fftw #2

Luispain opened this issue Apr 28, 2021 · 4 comments

Comments

@Luispain
Copy link

Hello everyone !

I am trying to make a fresh compilation of PBBFMM3D linking with a local installation of fftw-3.3.9 .

I have just cloned the PBBFMM3D sources today (28th april '21).

The only modification I have made to Makefile is the adjustment of variable FFTW_ROOT (which now points towards fftw-3.3.9).

Running make binary_file_mykernel produces the following error :

examples/binary_file_mykernel.cpp:64:14: error: cannot declare variable ‘Atree’ to be of abstract type ‘myKernel’
     myKernel Atree(L, tree_level, interpolation_order, eps, use_chebyshev);
              ^
examples/binary_file_mykernel.cpp:4:7: note:   because the following virtual functions are pure within ‘myKernel’:
 class myKernel: public H2_3D_Tree {
       ^
In file included from ./include/kernel_Types.hpp:7:0,
                 from ./include/compute.hpp:9,
                 from ./include/test.hpp:9,
                 from ./include/bbfmm3d.hpp:9,
                 from examples/binary_file_mykernel.cpp:2:
./include/H2_3D_Tree.hpp:94:20: note: 	virtual double H2_3D_Tree::EvaluateKernel(const vector3&, const vector3&)
     virtual double EvaluateKernel(const vector3& targetpos, const vector3& sourcepos) = 0;
                    ^
In file included from ./include/bbfmm3d.hpp:9:0,
                 from examples/binary_file_mykernel.cpp:2:
./include/test.hpp: In instantiation of ‘void DirectCalc3D(T*, const std::vector<_vector3>&, const std::vector<_vector3>&, std::vector<double>&, int, std::vector<double>&, int) [with T = myKernel]’:
examples/binary_file_mykernel.cpp:90:77:   required from here
./include/test.hpp:28:74: error: no matching function for call to ‘myKernel::EvaluateKernel(const _vector3&, const _vector3&)’
                 double val = FMMtree->EvaluateKernel(target[i], source[j]);
                                                                          ^
./include/test.hpp:28:74: note: candidate is:
examples/binary_file_mykernel.cpp:12:20: note: virtual double myKernel::EvaluateKernel(vector3&, vector3&)
     virtual double EvaluateKernel(vector3& targetpos, vector3& sourcepos) {
                    ^
examples/binary_file_mykernel.cpp:12:20: note:   no known conversion for argument 1 from ‘const _vector3’ to ‘vector3& {aka _vector3&}’
make: *** [examples/binary_file_mykernel.o] Error 1

I may be doing something wrong.

Any help would be greatly appreciated,

Thank you very much in advance !
Luis

@Charles-Chao-Chen
Copy link
Collaborator

Hello Luis,

Thanks for letting us know. It seems we accidentally pushed some developing codes to the main branch. We should be able to fix it quickly.

@Charles-Chao-Chen
Copy link
Collaborator

Hi Luis,

Can you pull and try it again?

@Luispain
Copy link
Author

Hi Charles,

Thank you for your help !

Yes, it works now ! I git pulled last version and recompiled (using fftw 3.3.4, because fftw 3.3.9 gives a different error message, perhaps I messed up the installation of fftw 3.3.9).

I compiled binary_file_mykernel and binary_file_standard_kernel and run the executables with the following results :

for binary_file_mykernel :

Precompute files exist.
 Distribute points = 0.00113201 Interaction list = 0.00171781
 FMM distribute = 0.00296497
upward time = 0.00696611 interaction time = 0.012738 downward time = 0.00111008
 neartargetCompute = 0.00329685
Relative Error for first 5000 : 2.06614e-05
Pre-computation time: 0.00694799
FMM computing time:   0.0974002
Exact computing time: 0.299929

And for binary_file_standard_kernel :

Precompute files exist.
 Distribute points = 0.00115013 Interaction list = 0.001894
 FMM distribute = 0.00318193
upward time = 0.00530887 interaction time = 0.00829697 downward time = 0.00281096
 neartargetCompute = 0.00388002
Relative Error for first 5000 : 2.06454e-05
Pre-computation time: 0.012223
FMM computing time:   0.0740399
Exact computing time: 0.329635

I guess everything is running good now.
My next step will consist in installing a Python wrap. I see you have a boost-based solution. I will try that.

Thank you again and have a nice day !
Luis

@Charles-Chao-Chen
Copy link
Collaborator

Hi Luis,

Glad to know it is working now. The outputs look good. We have tested the code with fftw3 3.3.8. Please don't hesitate to contact us if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants