-
Notifications
You must be signed in to change notification settings - Fork 66
[WIP][DISCUSS] Single source QFunction proposal #288
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
Conversation
Rescaled NS example
…/libCEED into rescaled-ns-example Conflicts: examples/navier-stokes/navierstokes.c
… into rescaled-ns-example
Restriction Block
* Add all backends to Doxygen * alphabetize * alphabetize
Brief description of the cuda-shared backend in README.md
Offsetof fix
Also use CPPFLAGS in case -I/path/to/valgrind is needed.
Update CUDA/OCCA CEED_COPY_VALUES logic
Add ElemRestrGetMultiplicity and Tests
BugFix - Resource strcmp in LIBXSMM backends
[Jed] Commit revised to leave derivatives intact.
* valeria/fix-ns-derivatives: examples/navier-stokes: formatting cleanup navier-stokes: use du[3][3] to clean up indexing Fix derivatives order in du
examples/petsc: fix max reduction type and address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this approach is good for both CPU and GPU. I'd like to use this to build the QF gallery.
We do need to update to the new PETSc BPs though.
jeremylt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to update to the new PETSc BPs.
Fix typo in t209-f
Fix ref backend priorities
* Update nek5000 examples to use NEKTOOLS_DIR * Remove +x * Nek: Fix a bug in generate-boxes.sh script * Use one script for nek exaamples * Update make-nek-tests.sh * Update nek-examples.sh * Change permissions of make-nek-tests.sh * Update examples Makefile to use new nek script * Update nek5000 examples build process * Trying to make travis happy * Polishing the script * This should make Travis happy * Polish nek-examples.sh * Update examples/Makefile * Update top-level makefile * Delete make-nek-tests.sh & update nek-examples.sh * Update Makefile and examples/Makefile * Update nek-examples.sh * Update TESTARGS in bp .usr files * Update Makefile * Update .travis.yml * Update nek-examples.sh * Add CEED_DIR to tap.sh * Uncomment OCCA_DIR in Makefile * Fix make prove and update tap.sh * Pass NEK5K_DIR and CEED_DIR in prove-all * Set MPI=0 default for Nek examples/tests * Nek5K make updates * Make prove update * Update make-prove to make all ex except Nek5K in parallel * Set Nek5K examples to use MPI by default * Makefile: Improved Nek5k handling * Makefile: build Nek bps in separate directories * Nek: rename dir for f77 file length * debugging * Nek: use single source * Makefile: fix Nek mpif.h issue * Nek: Clean up build proces, improve documentation * Makefile: enable building single Nek example in parallel with other examples * Nek: Fix CC/FC and TESTARGS
README: Update corectness for examples
* First steps toward cuda-gen backend! * Closer to real code generation. * Generated code should be ready for nvrtc. * The code generation skeleton is ready. * Hack with the qfunction to make the operator kernel compile. * Some tweaks in the makefile + Input fields structure change. * Remove using cout. * 1d interp and grad device functions. * 1d readDofs, readQuads, writeDofs, writeQuads. * Remove dead code. * readDofs, readQuads, writeDofs, writeQuads for 2d and 3d * 2d interp and grad * 3d interp and grad * - weight functions for 1d,2d,3d - link the indices to the kernel - link the fields to the kernel - link the basis to the kernel * Add the qFunction reader + inlining * Add qf files for the tests. * Add qf file for ceed/ex1 * Add qf file for mfem/bp1 * All tests pass. * Add qFunction for mfem/bp3, petsc/bp1, and petsc/bp3. * mfem/bp1 passes + remove dead code * Fix a bug in n_quads_out for writeQuads * mfem/bp3 passes. * All tests all examples pass. * Temporary tweaks for mfem benchmarking * Add Context management. * Modify .qf files to take into account the context. * Enable optimizations. * First set of optimization for 2D and 3D. * Makefile tweaks and destructor code. * make style. * Add -MP flag. * Fix linking issues with the tests. * Update .qf files for the tests. * Add .qf files for nek5000 examples. * Use shared memory for B and G matrices. * Fix bug introduced in previous commit.
|
Now that CUDA Gen has been merged, can we make this into a PR to master? I believe that we all generally agree on this approach and it's just a matter of ironing out details. |
Conflicts: Makefile backends/cuda-gen/ceed-cuda-gen-operator-build.cpp backends/cuda-gen/ceed-cuda-gen-operator.c backends/cuda-gen/ceed-cuda-gen-qfunction.c backends/cuda-gen/ceed-cuda-gen.c backends/cuda-gen/ceed-cuda-gen.h backends/cuda/ceed-cuda-qfunction.c backends/cuda/ceed-cuda.c examples/ceed/ex1.qf examples/mfem/bp1.qf examples/mfem/bp3.qf examples/nek5000/bp1.qf examples/petsc/bp1.c examples/petsc/bp1.qf examples/petsc/bp3.qf examples/petsc/bps.c tests/t400-qfunction-f.qf tests/t400-qfunction.qf tests/t401-qfunction-f.qf tests/t401-qfunction.qf tests/t500-operator-f.qf tests/t500-operator.qf tests/t501-operator-f.qf tests/t501-operator.qf tests/t502-operator-f.qf tests/t502-operator.qf
| #endif | ||
| #ifndef CEED_QFUNCTION | ||
| # define CEED_QFUNCTION static | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd change this to @jedbrown's suggestion of
#define CEED_QFUNCTION(name) \
static const char name ## _loc[] = __FILE__ ":" #name; \
static int name
so that we can use
CeedQFunctionCreateInterior(ceed, 1, mass, mass_loc, &qf_mass);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lets us have qfunction files name differently than the base file without my crazy machinations it the PETSc unified BP code.
|
Closed in favour of #304 |
This PR proposes a
qFunctionformat that would allow the same code to be used on host and on device.The
qFunctionis in the.qffiles, but could be moved to.hfiles. That would require cpu backends to define the macroCEED_QFUNCTION.