[petsc-users] PetscBagView issues with SAWs
Barry Smith
bsmith at petsc.dev
Sat Dec 5 21:40:22 CST 2020
Zane,
I'm sorry I didn't answer this sooner. We simply don't have the code for PetscBagView() with SAWS at this time. Unfortunately I don't have the time to write it now, basically you can extend PetscBagView() with a new else if () for the SAWs viewer and then publish the Bag items with the SAWS API. Basically it would be a combination of the code in PetscBagView for ASCII and code like in PetscOptionsSAWsInput()
Barry
> On Nov 23, 2020, at 10:19 AM, Zane Charles Jakobs <Zane.Jakobs at colorado.edu> wrote:
>
> Hi PETSc devs,
>
> I'm writing a program that needs to send information that I have stored in a PetscBag to SAWs. I'm calling SAWs_Initialize() (and SAWs_Get_FullURL()), then PetscViewerSAWsOpen(PETSC_COMM_WORLD,&viewer) to get a PetscViewer, then later calling PetscBagView(bag,viewer) to publish to SAWs (and then PetscSAWsBlock() for debugging purposes). For what it's worth, I have registered all the PetscBag variables, and PetscBagView(bag,PETSC_VIEWER_STDOUT_WORLD) works as expected.
>
> However, when I go to the SAWs website and click on the "update all variables from server" or "update server with changes below", nothing happens. I do know that the app and server can communicate, since clicking "continue" lets the program continue through a PetscSAWsBlock() call, but for some reason, the PetscBags I'm View()-ing are not making it over to the server. Is the workflow I'm using (PetscBagView() after SAWs_Initialize() and PetscViewerSAWsOpen()) correct? If so, what else might I be doing incorrectly so that SAWs doesn't see the data I publish? And if not, what should I do differently? Thank you!
>
> -Zane Jakobs
More information about the petsc-users
mailing list