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

Add cuFFT code to spectral solver #96

Closed
RemiLehe opened this issue Apr 24, 2019 · 0 comments
Closed

Add cuFFT code to spectral solver #96

RemiLehe opened this issue Apr 24, 2019 · 0 comments

Comments

@RemiLehe
Copy link
Member

While PR #95 implements the spectral solver, it does not link the code to cuFFT. It would be great to add the corresponding code for cuFFT.

Here are a few resources that may help:

  • Compiling the code with the spectral solver + GPU:
    This link explains how to compile the code with the spectral solver (on CPU).
    The documentation also explains how to compile the code for GPU on a local machine and on Summit
    Currently, there is of course no documentation on how to do both (spectral+GPU), since WarpX is not currently able to do so. One would probably have to add a variable CUFFT_HOME in Make.WarpX, similar to FFTW_HOME for CPU.

  • Implementation: There are placeholders for cuFFT code in PR Implement PSATD solver in C++ #95, in Source/FieldSolver/SpectralSovler/SpectralFieldData.cpp

  • Testing the code: One possibility is to use the files inputs.multi.rt (to test the 3D implementation) and inputs.multi.2d.rt (to test the 2D implementation), in Examples/Tests/Langmuir:

./warpx3Dexecutable inputs.multi.rt
./langmuir_multi_analysis.py diags/plotfiles/plt00040
./warpx2Dexecutable inputs.multi.2d.rt
./langmuir_multi_2d_analysis.py diags/plotfiles/plt00040

where warpxXXexecutable should be replaced by the proper executable name (in the Bin folder). In each case, the second line checks the validity of the results (the Python script will raise an AssertionError if the results are not physically valid.)

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

1 participant