Skip to content

Add get_array() capability to PetscVector #1056

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

Merged
merged 1 commit into from
Aug 10, 2016

Conversation

friedmud
Copy link
Member

@friedmud friedmud commented Aug 4, 2016

Ads a new interface PetscVector to allow getting the raw array.

There are two ways to retrieve the array: get_array() and get_array_read() associated with whether or not you want read/write or just read only. There is also restore_array() for when you're finished.

One important thing is that the state of that array is now stored... and error checking is done to make sure the new API interoperates with the existing API. In particular, if you use get_array() and then attempt to use one of the other API functions that needs to restore the array... it will produce an error (i.e. a manual "getting" of the array requires a manual "restore").

closes #1050

@friedmud friedmud force-pushed the petsc_vector_array branch 2 times, most recently from a365189 to 0ef76b2 Compare August 4, 2016 21:48
@roystgnr
Copy link
Member

roystgnr commented Aug 4, 2016

👍

I still wish we had a better way to benchmark performance changes with edits to critical code. But "time make check" is worthless unless you have a dedicated benchmarking server. "LIBMESH_RUN='valgrind --foo'" is immune to server load but is ridiculously slow. Even perf/oprofile/PAPI probably aren't trustworthy enough unless you're running on a mostly-quiescent computer; we could get reliable numbers for operation counts but not for cache misses.

@permcody
Copy link
Member

permcody commented Aug 6, 2016

We do have a dedicated benchmarking server. I suppose we could start with
the libMesh suite before developing the MOOSE testing suite. Our regression
test suite has too many tests and runs too fast for good timing
information. I'll see about getting something up and running soon. We could
go back a few commits to pick some of these changes up for our first
baseline.

On Thu, Aug 4, 2016 at 4:25 PM roystgnr notifications@github.com wrote:

👍

I still wish we had a better way to benchmark performance changes with
edits to critical code. But "time make check" is worthless unless you have
a dedicated benchmarking server. "LIBMESH_RUN='valgrind --foo'" is immune
to server load but is ridiculously slow. Even perf/oprofile/PAPI probably
aren't trustworthy enough unless you're running on a mostly-quiescent
computer; we could get reliable numbers for operation counts but not for
cache misses.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1056 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AC5XIKEv6aQm8pnWlRekDfkiUT05Zabyks5qcmbFgaJpZM4Jc_Ny
.

@jwpeterson
Copy link
Member

@friedmud are you OK with this being merged? @snschune wants to do a libmesh update soonish, and I assume you'd like this in upstream before that happens?

@friedmud
Copy link
Member Author

Yep - go ahead. I'm already using it pretty successfully. I'm sure there
will be some tweaks to it going forward though...
On Wed, Aug 10, 2016 at 11:38 AM John W. Peterson notifications@github.com
wrote:

@friedmud https://github.com/friedmud are you OK with this being
merged? @snschune https://github.com/snschune wants to do a libmesh
update soonish, and I assume you'd like this in upstream before that
happens?


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#1056 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA1JMdz1RL2vhNsvfjL8gKLyFIIJpjukks5qefCLgaJpZM4Jc_Ny
.

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

Successfully merging this pull request may close these issues.

API additions for PetscVector
4 participants