gmarkall/manycore_form_compiler — pull request #61 by gmarkall (2012-03-12 09:02:23+00:00)
Title: Only transfer data back to the host when necessary

Presently we transfer the fields from the GPU back to the host at the end of every timestep. This is inefficent. Instead, these changes only transfer the fields back to the host when a call to output_state occurs.

A summary of the changes are:

* The run_model_ function in generated code no longer incorporates calls to returnFieldToHost
* The generated code contains a new function, return_fields, that has all the returnFieldToHost calls
* In the main UFL program, output_state first calls return_fields, to update the host-side fields with the correct data to write to disk.

These changes have passed the tests on the fluidity-dev queue on the buildbot.