Re: [petsc-dev] nested timers transfers and reductions
Thanks Barry, that looks good! Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/New-correction-procedure-for-shallowwater-effects-in-ship-speed-trials.htm From: Smith, Barry F. <bsm...@mcs.anl.gov> Sent: Monday, April 09, 2018 11:51 PM To: Klaij, Christiaan Cc: petsc-dev@mcs.anl.gov; Koos Huijssen Subject: Re: nested timers transfers and reductions Hopefully all these problems are resolved with https://bitbucket.org/petsc/petsc/pull-requests/925/fix-some-missing-functionality-for-nested/diff Barry > On Apr 9, 2018, at 4:37 AM, Klaij, Christiaan <c.kl...@marin.nl> wrote: > > Hi Barry, > > I've put the functions and fortran bindings in the attached > files. In our code, we use them as follows: > > CALL mpi_bcast(value,1,MPI_LOGICAL,iproc,MPI_COMM_WORLD,ier) > IF(ier/=0) CALL tracing_abort('ERROR in bcast logical root !') > > IF (iproc==thisprocess) THEN > ier = PetscAdminSend(1*(nprocesses-1),MPI_LOGICAL) > ELSE > ier = PetscAdminRecv(1,MPI_LOGICAL) > END IF > > I also noted that you changed the treshold from 0.1% to 0.01%, so > I tried to change it as a user with PetscLogSetThreshold, but > this function seems not accessible to users (and there's no > fortran version or manual page). > > Chris > > > dr. ir. Christiaan Klaij | Senior Researcher | Research & Development > MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl > > MARIN news: > http://www.marin.nl/web/News/News-items/Kom-zaterdag-10-november-naar-de-open-dag-in-Wageningen.htm > > ________ > From: Smith, Barry F. <bsm...@mcs.anl.gov> > Sent: Saturday, April 07, 2018 5:36 PM > To: Klaij, Christiaan > Cc: petsc-dev@mcs.anl.gov; Koos Huijssen > Subject: Re: nested timers transfers and reductions > >> On Apr 6, 2018, at 5:22 AM, Klaij, Christiaan <c.kl...@marin.nl> wrote: >> >> Hi Barry, >> >> In our version of the nested timers, we had the functions >> PetscAdminSend, PetscAdminRecv and PetscAdminReduce. So I was >> expecting to find them at the end of the file >> petsc-3.8.4/src/sys/logging/xmllogevent.c but apparently >> you (re)moved them? > > I do not remember why I would have removed these functions. If you can send > a patch that would return them I would gladly try to get them working with > PETSc again. > >Barry > >> >> We basically used these functions to fill the transfer(GiB/s) and >> reductions/s columns of the log just like we use PetscLogFlops to >> fill the compute(Mflops) column for our registered events. >> >> How should I do this with the petsc version of the nested timers? >> >> Chris >> >> >> dr. ir. Christiaan Klaij | Senior Researcher | Research & Development >> MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl >> >> MARIN news: >> http://www.marin.nl/web/News/News-items/Application-of-potential-flow-methods-to-fast-displacement-ships-at-transcritical-speeds-in-shallow-water-1.htm >> > >
Re: [petsc-dev] nested timers transfers and reductions
Hi Barry, I've put the functions and fortran bindings in the attached files. In our code, we use them as follows: CALL mpi_bcast(value,1,MPI_LOGICAL,iproc,MPI_COMM_WORLD,ier) IF(ier/=0) CALL tracing_abort('ERROR in bcast logical root !') IF (iproc==thisprocess) THEN ier = PetscAdminSend(1*(nprocesses-1),MPI_LOGICAL) ELSE ier = PetscAdminRecv(1,MPI_LOGICAL) END IF I also noted that you changed the treshold from 0.1% to 0.01%, so I tried to change it as a user with PetscLogSetThreshold, but this function seems not accessible to users (and there's no fortran version or manual page). Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/Kom-zaterdag-10-november-naar-de-open-dag-in-Wageningen.htm From: Smith, Barry F. <bsm...@mcs.anl.gov> Sent: Saturday, April 07, 2018 5:36 PM To: Klaij, Christiaan Cc: petsc-dev@mcs.anl.gov; Koos Huijssen Subject: Re: nested timers transfers and reductions > On Apr 6, 2018, at 5:22 AM, Klaij, Christiaan <c.kl...@marin.nl> wrote: > > Hi Barry, > > In our version of the nested timers, we had the functions > PetscAdminSend, PetscAdminRecv and PetscAdminReduce. So I was > expecting to find them at the end of the file > petsc-3.8.4/src/sys/logging/xmllogevent.c but apparently > you (re)moved them? I do not remember why I would have removed these functions. If you can send a patch that would return them I would gladly try to get them working with PETSc again. Barry > > We basically used these functions to fill the transfer(GiB/s) and > reductions/s columns of the log just like we use PetscLogFlops to > fill the compute(Mflops) column for our registered events. > > How should I do this with the petsc version of the nested timers? > > Chris > > > dr. ir. Christiaan Klaij | Senior Researcher | Research & Development > MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl > > MARIN news: > http://www.marin.nl/web/News/News-items/Application-of-potential-flow-methods-to-fast-displacement-ships-at-transcritical-speeds-in-shallow-water-1.htm > !* !*M A R I T I M E R E S E A R C H I N S T I T U T E N E T H E R L A N D S * !* !*authors: Bas van 't Hof, Koos Huijssen, Christiaan M. Klaij* !* !*content: Support for nested PetscTimers* !* module petsc_MPIadminF use iso_c_binding interface function PetscAdminSend(count, datatype) bind(c,name='PetscAdminSend') result(ierr) use iso_c_binding implicit none integer(c_int), value :: count integer(c_int), value :: datatype integer(c_int):: ierr end function PetscAdminSend function PetscAdminRecv(count, datatype) bind(c,name='PetscAdminRecv') result(ierr) use iso_c_binding implicit none integer(c_int), value :: count integer(c_int), value :: datatype integer(c_int):: ierr end function PetscAdminRecv function PetscAdminReduce() bind(c,name='PetscAdminReduce') result(ierr) use iso_c_binding implicit none integer(c_int):: ierr end function PetscAdminReduce end interface end module petsc_MPIadminF /* *M A R I T I M E R E S E A R C H I N S T I T U T E N E T H E R L A N D S * * *authors: Bas van 't Hof, Koos Huijssen, Christiaan M. Klaij* * *content: Support for nested PetscTimers* */ #include /*/ #undef __FUNCT__ #define __FUNCT__ "PetscAdminSend" PetscErrorCode PetscAdminSend(int count, int datatype) { PetscErrorCodeierr; PetscFunctionBegin; petsc_send_ct++; ierr = PetscMPITypeSize(_send_len,count, MPI_Type_f2c((MPI_Fint) datatype)); CHKERRQ(ierr); PetscFunctionReturn(0); } /*/ #undef __FUNCT__ #define __FUNCT__ "PetscAdminRecv" PetscErrorCode PetscAdminRecv(int count, int datatype) { Petsc
[petsc-dev] nested timers transfers and reductions
Hi Barry, In our version of the nested timers, we had the functions PetscAdminSend, PetscAdminRecv and PetscAdminReduce. So I was expecting to find them at the end of the file petsc-3.8.4/src/sys/logging/xmllogevent.c but apparently you (re)moved them? We basically used these functions to fill the transfer(GiB/s) and reductions/s columns of the log just like we use PetscLogFlops to fill the compute(Mflops) column for our registered events. How should I do this with the petsc version of the nested timers? Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/Application-of-potential-flow-methods-to-fast-displacement-ships-at-transcritical-speeds-in-shallow-water-1.htm
Re: [petsc-dev] getting on with the nested timers
??? In my original email I mention that page and state that the command line option is working. Were you expecting me to understand from your reply that the option :ascii_xml somehow translates to PetscViewerPushFormat(viewer,"PETSC_VIEWER_ASCII_XML")? Chris From: Matthew Knepley <knep...@gmail.com> Sent: Thursday, April 05, 2018 1:35 PM To: Klaij, Christiaan Cc: Smith, Barry F.; petsc-dev@mcs.anl.gov; Koos Huijssen Subject: Re: [petsc-dev] getting on with the nested timers On Thu, Apr 5, 2018 at 7:31 AM, Klaij, Christiaan <c.kl...@marin.nl<mailto:c.kl...@marin.nl>> wrote: Matt, I guess you meant to send this link: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Viewer/PetscViewerPushFormat.html No, I meant to send the link I sent. In the section Options Database Keys, it gives you the format. Matt If so, it doesn't say anything on XML either. But after some trial and error I found the format to be "PETSC_VIEWER_ASCII_XML", so problem solved. Summarizing the problem from a user perspective: 1) The manual page of PetscLogView mentions PetscViewerASCIIOpen, which mentions PetscViewerPushFormat, I should have figured that out by myself, sorry. 2) The manual page of PetscLogView mentions PetscLogNestedBegin, which doesn't have a manual entry. 3) The manual page of PetscViewerPushFormat doesn't mention the format PETSC_VIEWER_ASCII_XML, although it is available. Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | c.kl...@marin.nl<mailto:c.kl...@marin.nl> | www.marin.nl<http://www.marin.nl> [LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia> [Twitter] <https://twitter.com/MARIN_nieuws> [Facebook] <https://www.facebook.com/marin.wageningen> MARIN news: Comfort draft for semi-submersible yachts<http://www.marin.nl/web/News/News-items/Comfort-draft-for-semisubmersible-yachts.htm> From: Matthew Knepley <knep...@gmail.com<mailto:knep...@gmail.com>> Sent: Thursday, April 05, 2018 12:50 PM To: Klaij, Christiaan Cc: Smith, Barry F.; petsc-dev@mcs.anl.gov<mailto:petsc-dev@mcs.anl.gov>; Koos Huijssen Subject: Re: [petsc-dev] getting on with the nested timers On Thu, Apr 5, 2018 at 6:15 AM, Klaij, Christiaan <c.kl...@marin.nl<mailto:c.kl...@marin.nl>> wrote: Barry, I'm still trying to use petsc's nested logging with our code. I have it working for 3.8.3 with the command line option, for example: mpirun -n 3 ./refresco -log_view :performance.xml:ascii_xml This gives the expected performance.xml file. How to get the same without command line options? So far I have: CALL PetscLogDefaultBegin(ierr) ... CALL PetscViewerASCIIOpen(MPI_COMM_WORLD,'performance.xml',viewer,ierr) CALL PetscLogView(viewer,ierr) which gives the regular log in the performance.xml file. I guess I should replace PetscLogDefaultBegin by PetscLogNestedBegin as stated in the manual page of PetscLogView. But there's no manual page for PetscLogNestedBegin and I didn't find anything like PetscViewerASCIIOpenXML either. http://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Profiling/PetscLogView.html You need to push the ASCII_XML format before viewing. Thanks, Matt Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl<mailto:c.kl...@marin.nl> | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/Kom-zaterdag-10-november-naar-de-open-dag-in-Wageningen.htm -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/<http://www.caam.rice.edu/~mk51/> -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/<http://www.caam.rice.edu/~mk51/>
Re: [petsc-dev] getting on with the nested timers
Matt, I guess you meant to send this link: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Viewer/PetscViewerPushFormat.html If so, it doesn't say anything on XML either. But after some trial and error I found the format to be "PETSC_VIEWER_ASCII_XML", so problem solved. Summarizing the problem from a user perspective: 1) The manual page of PetscLogView mentions PetscViewerASCIIOpen, which mentions PetscViewerPushFormat, I should have figured that out by myself, sorry. 2) The manual page of PetscLogView mentions PetscLogNestedBegin, which doesn't have a manual entry. 3) The manual page of PetscViewerPushFormat doesn't mention the format PETSC_VIEWER_ASCII_XML, although it is available. Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | c.kl...@marin.nl<mailto:c.kl...@marin.nl> | www.marin.nl<http://www.marin.nl> [LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia> [Twitter] <https://twitter.com/MARIN_nieuws> [Facebook] <https://www.facebook.com/marin.wageningen> MARIN news: Comfort draft for semi-submersible yachts<http://www.marin.nl/web/News/News-items/Comfort-draft-for-semisubmersible-yachts.htm> From: Matthew Knepley <knep...@gmail.com> Sent: Thursday, April 05, 2018 12:50 PM To: Klaij, Christiaan Cc: Smith, Barry F.; petsc-dev@mcs.anl.gov; Koos Huijssen Subject: Re: [petsc-dev] getting on with the nested timers On Thu, Apr 5, 2018 at 6:15 AM, Klaij, Christiaan <c.kl...@marin.nl<mailto:c.kl...@marin.nl>> wrote: Barry, I'm still trying to use petsc's nested logging with our code. I have it working for 3.8.3 with the command line option, for example: mpirun -n 3 ./refresco -log_view :performance.xml:ascii_xml This gives the expected performance.xml file. How to get the same without command line options? So far I have: CALL PetscLogDefaultBegin(ierr) ... CALL PetscViewerASCIIOpen(MPI_COMM_WORLD,'performance.xml',viewer,ierr) CALL PetscLogView(viewer,ierr) which gives the regular log in the performance.xml file. I guess I should replace PetscLogDefaultBegin by PetscLogNestedBegin as stated in the manual page of PetscLogView. But there's no manual page for PetscLogNestedBegin and I didn't find anything like PetscViewerASCIIOpenXML either. http://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Profiling/PetscLogView.html You need to push the ASCII_XML format before viewing. Thanks, Matt Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl<mailto:c.kl...@marin.nl> | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/Kom-zaterdag-10-november-naar-de-open-dag-in-Wageningen.htm -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/<http://www.caam.rice.edu/~mk51/>
[petsc-dev] getting on with the nested timers
Barry, I'm still trying to use petsc's nested logging with our code. I have it working for 3.8.3 with the command line option, for example: mpirun -n 3 ./refresco -log_view :performance.xml:ascii_xml This gives the expected performance.xml file. How to get the same without command line options? So far I have: CALL PetscLogDefaultBegin(ierr) ... CALL PetscViewerASCIIOpen(MPI_COMM_WORLD,'performance.xml',viewer,ierr) CALL PetscLogView(viewer,ierr) which gives the regular log in the performance.xml file. I guess I should replace PetscLogDefaultBegin by PetscLogNestedBegin as stated in the manual page of PetscLogView. But there's no manual page for PetscLogNestedBegin and I didn't find anything like PetscViewerASCIIOpenXML either. Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/Kom-zaterdag-10-november-naar-de-open-dag-in-Wageningen.htm
Re: [petsc-dev] Nested event logging and human friendly output
Good idea! But not for our production clusters which do not have internet access. Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | c.kl...@marin.nl<mailto:c.kl...@marin.nl> | www.marin.nl<http://www.marin.nl> [LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia> [Twitter] <https://twitter.com/MARIN_nieuws> [Facebook] <https://www.facebook.com/marin.wageningen> MARIN news: SSSRI-MARIN seminar, May 18, 2018, Shanghai<http://www.marin.nl/web/News/News-items/SSSRIMARIN-seminar-May-18-2018-Shanghai.htm> From: Koos Huijssen <koos.huijs...@vortech.nl> Sent: Friday, March 16, 2018 12:06 PM To: Klaij, Christiaan; Smith, Barry F. Cc: petsc-dev@mcs.anl.gov Subject: Re: [petsc-dev] Nested event logging and human friendly output A solution seems to be that the style sheet is present on a public server, so that it can be retrieved using http. This should be fine for all browsers. Maybe somewhere on https://www.mcs.anl.gov/petsc ...? Regards, Koos On 03/16/2018 12:04 PM, Klaij, Christiaan wrote: Thanks Koos! We have the same problem on microsoft internet explorer. Safari does some magic for sure. Chris dr. ir.Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | c.kl...@marin.nl<mailto:c.kl...@marin.nl> | www.marin.nl<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.marin.nl=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cfacd8d7d62774fbd849808d58b2da691%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567950566401050=NjVrv%2FmosOc05tQIwym5aFTIc2247xiqZN7Z%2FRY0mGw%3D=0> [LinkedIn]<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fmarin=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cfacd8d7d62774fbd849808d58b2da691%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567950566401050=XUEA%2ByAjIK7zkn200VKGqPtvKxYLP1tSBpbD2DzjW4U%3D=0> [YouTube] <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.youtube.com%2Fmarinmultimedia=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cfacd8d7d62774fbd849808d58b2da691%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567950566401050=htguXyp5gngXlzIEX1EYh79nbm64v9dl0UeCXQvni9w%3D=0> [Twitter] <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FMARIN_nieuws=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cfacd8d7d62774fbd849808d58b2da691%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567950566401050=ff636Ec1T901oV5LY0V88u2b6nYygxMd2aCLMZRBiyU%3D=0> [Facebook] <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2Fmarin.wageningen=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cfacd8d7d62774fbd849808d58b2da691%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567950566401050=FIDDBNdEJ82%2BdxGcaRK1dKsQyUV15CaLdIpAt36RH1k%3D=0> MARIN news: Putting a new spin on propeller design<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.marin.nl%2Fweb%2FNews%2FNews-items%2FPutting-a-new-spin-on-propeller-design-1.htm=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cfacd8d7d62774fbd849808d58b2da691%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567950566401050=jHNUEXItIWAEBfeoVPdwakIcg2ZMxCuppakg0MvyZso%3D=0> From: Koos Huijssen <koos.huijs...@vortech.nl><mailto:koos.huijs...@vortech.nl> Sent: Friday, March 16, 2018 12:02 PM To: Klaij, Christiaan; Smith, Barry F. Cc: petsc-dev@mcs.anl.gov<mailto:petsc-dev@mcs.anl.gov> Subject: Re: [petsc-dev] Nested event logging and human friendly output Hi Chris, Indeed, this is exactly the issue. When we investigated this it seemed to work on Barry's system, but it has never worked on mine either. The browsers do not allow hard paths to be used for the xml style sheet. For Chrome there is an extra thing. If you launch Chrome with the flag '--allow-file-access-from-files' it should give the desired result (see here<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F39174013%2Fwhy-isnt-my-xml-and-xslt-stylesheet-not-loading-in-chrome=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cfacd8d7d62774fbd849808d58b2da691%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567950566401050=YAtZ97%2FldyOzIjkpZDjCGhA%2BB8W6stmyCLIB5xO9Qy0%3D=0>). A note in the manual would surely be a good thing. With kind regards, Koos On 03/16/2018 11:54 AM, Klaij, Christiaan wrote: Barry, I've tried it quickly with petsc-3.8.3 and snes/examples/tutorials/ex70.c and it seems to work except for the stylesheet. The xml log has this header in my case: Even though the path is correct, both Firefox and Chrome on linux do not load the stylesheet. I have to 1) copy "performance_xml2html.xsl" to the directory which contains the xml log (a symlink won't do), 2) then edit
Re: [petsc-dev] Nested event logging and human friendly output
Thanks Koos! We have the same problem on microsoft internet explorer. Safari does some magic for sure. Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | c.kl...@marin.nl<mailto:c.kl...@marin.nl> | www.marin.nl<http://www.marin.nl> [LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia> [Twitter] <https://twitter.com/MARIN_nieuws> [Facebook] <https://www.facebook.com/marin.wageningen> MARIN news: Putting a new spin on propeller design<http://www.marin.nl/web/News/News-items/Putting-a-new-spin-on-propeller-design-1.htm> From: Koos Huijssen <koos.huijs...@vortech.nl> Sent: Friday, March 16, 2018 12:02 PM To: Klaij, Christiaan; Smith, Barry F. Cc: petsc-dev@mcs.anl.gov Subject: Re: [petsc-dev] Nested event logging and human friendly output Hi Chris, Indeed, this is exactly the issue. When we investigated this it seemed to work on Barry's system, but it has never worked on mine either. The browsers do not allow hard paths to be used for the xml style sheet. For Chrome there is an extra thing. If you launch Chrome with the flag '--allow-file-access-from-files' it should give the desired result (see here<https://stackoverflow.com/questions/39174013/why-isnt-my-xml-and-xslt-stylesheet-not-loading-in-chrome>). A note in the manual would surely be a good thing. With kind regards, Koos On 03/16/2018 11:54 AM, Klaij, Christiaan wrote: Barry, I've tried it quickly with petsc-3.8.3 and snes/examples/tutorials/ex70.c and it seems to work except for the stylesheet. The xml log has this header in my case: Even though the path is correct, both Firefox and Chrome on linux do not load the stylesheet. I have to 1) copy "performance_xml2html.xsl" to the directory which contains the xml log (a symlink won't do), 2) then edit the header to href="performance_xml2html.xsl". These steps work for Firefox, but not for Chrome (it just shows a blank page). If I remember correctly (Koos?) then this problem was due to some browser safety stuff which can't be avoided. If this is still true and not fixable, we should probably add a note in the manual explaining both steps? Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.marin.nl=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cf467bc9cbee84636730208d58b2c45c1%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567944636671153=wf%2BYdEvdpvMh9aK7D51yBDHFQvlziBS9U3ArOA85etE%3D=0 MARIN news: https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.marin.nl%2Fweb%2FNews%2FNews-items%2FFrequency-of-spill-model-for-area-risk-assessment-of-shipsource-oil-spills-in-Canadian-waters-1.htm=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cf467bc9cbee84636730208d58b2c45c1%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567944636671153=2TVwn1x5EZuNHzVHCMO1BLNNRMv%2BrSe4eOJ3tQ7vhJg%3D=0 From: Smith, Barry F. <bsm...@mcs.anl.gov><mailto:bsm...@mcs.anl.gov> Sent: Thursday, March 15, 2018 3:00 PM To: Klaij, Christiaan Cc: Koos Huijssen; petsc-dev@mcs.anl.gov<mailto:petsc-dev@mcs.anl.gov>; Bas van 't Hof Subject: Re: [petsc-dev] Nested event logging and human friendly output It is in 3.8 please let us know if you have any trouble with it. Barry On Mar 15, 2018, at 3:03 AM, Klaij, Christiaan <c.kl...@marin.nl><mailto:c.kl...@marin.nl> wrote: Hi Barry, It's been a while and I'll soon be upgrading our production software from petsc-3.7.5 to petsc-3.8.3. Can you tell me if the nested event logging made it into 3.8? If so, I would probably remove our own version in favor of the petsc maintained version. Best regards, Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | c.kl...@marin.nl<mailto:c.kl...@marin.nl> | https://emea01.safelinks.protection.outlook.com/?url=www.marin.nl=02%7C01%7Ckoos.huijssen%40vortech.nl%7Cf467bc9cbee84636730208d58b2c45c1%7C5fe8f8070fe44cdf8dc636475a0b8555%7C0%7C0%7C636567944636671153=GPHrId893OZ0dHpzLHEHgjmQHBOsest1JEl6sZ6wef4%3D=0 MARIN news: Numerical study of cavitation on a NACA0015 hydrofoil: solution verification From: Koos Huijssen <koos.huijs...@vortech.nl><mailto:koos.huijs...@vortech.nl> Sent: Friday, August 12, 2016 8:07 AM To: Barry Smith Cc: petsc-dev@mcs.anl.gov<mailto:petsc-dev@mcs.anl.gov>; Klaij, Christiaan; Bas van 't Hof Subject: Re: [petsc-dev] Nested event logging and human friendly output Hi Barry, Looking forward to that! Koos From: Barry Smith <bsm...@mcs.anl.gov><mailto:bsm...@mcs.anl.gov> Sent: Friday, August 12, 2016 4:02:42 AM To: Koos Huijssen Cc: petsc-dev@mcs.anl.
Re: [petsc-dev] Nested event logging and human friendly output
Barry, I've tried it quickly with petsc-3.8.3 and snes/examples/tutorials/ex70.c and it seems to work except for the stylesheet. The xml log has this header in my case: Even though the path is correct, both Firefox and Chrome on linux do not load the stylesheet. I have to 1) copy "performance_xml2html.xsl" to the directory which contains the xml log (a symlink won't do), 2) then edit the header to href="performance_xml2html.xsl". These steps work for Firefox, but not for Chrome (it just shows a blank page). If I remember correctly (Koos?) then this problem was due to some browser safety stuff which can't be avoided. If this is still true and not fixable, we should probably add a note in the manual explaining both steps? Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/Frequency-of-spill-model-for-area-risk-assessment-of-shipsource-oil-spills-in-Canadian-waters-1.htm From: Smith, Barry F. <bsm...@mcs.anl.gov> Sent: Thursday, March 15, 2018 3:00 PM To: Klaij, Christiaan Cc: Koos Huijssen; petsc-dev@mcs.anl.gov; Bas van 't Hof Subject: Re: [petsc-dev] Nested event logging and human friendly output It is in 3.8 please let us know if you have any trouble with it. Barry > On Mar 15, 2018, at 3:03 AM, Klaij, Christiaan <c.kl...@marin.nl> wrote: > > Hi Barry, > > It's been a while and I'll soon be upgrading our production > software from petsc-3.7.5 to petsc-3.8.3. Can you tell me if the > nested event logging made it into 3.8? If so, I would probably > remove our own version in favor of the petsc maintained > version. > > Best regards, > Chris > > dr. ir. Christiaan Klaij | Senior Researcher | Research & Development > MARIN | T +31 317 49 33 44 | c.kl...@marin.nl | www.marin.nl > > > MARIN news: Numerical study of cavitation on a NACA0015 hydrofoil: solution > verification > From: Koos Huijssen <koos.huijs...@vortech.nl> > Sent: Friday, August 12, 2016 8:07 AM > To: Barry Smith > Cc: petsc-dev@mcs.anl.gov; Klaij, Christiaan; Bas van 't Hof > Subject: Re: [petsc-dev] Nested event logging and human friendly output > > Hi Barry, > > Looking forward to that! > > Koos > From: Barry Smith <bsm...@mcs.anl.gov> > Sent: Friday, August 12, 2016 4:02:42 AM > To: Koos Huijssen > Cc: petsc-dev@mcs.anl.gov; Klaij, Christiaan; Bas van 't Hof > Subject: Re: [petsc-dev] Nested event logging and human friendly output > > > Thanks. This will be in master soon. > >Barry > > > On Aug 8, 2016, at 5:15 AM, Koos Huijssen <koos.huijs...@vortech.nl> wrote: > > > > Hi Barry, > > > > The fix is to replace the "j<=depth" on line 736 with "j<depth". So it > > should read > > > > for (j=0; same && j<depth; j++) { same = (same && nstMyPath[j] == > > nstPath[j]) ? PETSC_TRUE : PETSC_FALSE;} > > > > That should resolve the valgrind issue. > > > > With kind regards, > > > > Koos > > > > > > -Original Message- > > From: Barry Smith [mailto:bsm...@mcs.anl.gov] > > Sent: vrijdag 5 augustus 2016 22:39 > > To: Koos Huijssen <koos.huijs...@vortech.nl> > > Cc: petsc-dev@mcs.anl.gov; Klaij, Christiaan <c.kl...@marin.nl>; Bas van 't > > Hof <bas.vant...@vortech.nl> > > Subject: Re: [petsc-dev] Nested event logging and human friendly output > > > > > >There appears to be an error indicated by valgrind at: > > ftp://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2016/08/04/examples_master_arch-linux-pkgs-valgrind_grind.log > > > > Note that the nstPath[] arrays only seem to filled up to but not including > > depth but the "same" loop has j<=depth. Could you please clarify how I > > should fix this? > > > > > > if (i<nTimers) { > >for (j=0; j<tree[i].depth; j++) nstMyPath[j] = > > tree[i].nstPath[j]; > >for (j=tree[i].depth; j<depth; j++) nstMyPath[j] = > > illegalEvent; > > } else { > >for (j=0; j<depth; j++) nstMyPath[j] = > > illegalEvent; > > } > > > > /* Communicate with other processes to obtain the next path and its > > depth */ > > ierr = MPIU_Allreduce(nstMyPath, nstPath, depth, MPI_INT, MPI_MIN, > > comm);CHKERRQ(ierr); > > for (j=depth-1; (int) j>=0; j--) { > >if (nstPath[j]==illegalEvent) depth=j; > > } > &g
Re: [petsc-dev] Nested event logging and human friendly output
Hi Barry, It's been a while and I'll soon be upgrading our production software from petsc-3.7.5 to petsc-3.8.3. Can you tell me if the nested event logging made it into 3.8? If so, I would probably remove our own version in favor of the petsc maintained version. Best regards, Chris dr. ir. Christiaan Klaij | Senior Researcher | Research & Development MARIN | T +31 317 49 33 44 | c.kl...@marin.nl<mailto:c.kl...@marin.nl> | www.marin.nl<http://www.marin.nl> [LinkedIn]<https://www.linkedin.com/company/marin> [YouTube] <http://www.youtube.com/marinmultimedia> [Twitter] <https://twitter.com/MARIN_nieuws> [Facebook] <https://www.facebook.com/marin.wageningen> MARIN news: Numerical study of cavitation on a NACA0015 hydrofoil: solution verification<http://www.marin.nl/web/News/News-items/Numerical-study-of-cavitation-on-a-NACA0015-hydrofoil-solution-verification-1.htm> From: Koos Huijssen <koos.huijs...@vortech.nl> Sent: Friday, August 12, 2016 8:07 AM To: Barry Smith Cc: petsc-dev@mcs.anl.gov; Klaij, Christiaan; Bas van 't Hof Subject: Re: [petsc-dev] Nested event logging and human friendly output Hi Barry, Looking forward to that! Koos From: Barry Smith <bsm...@mcs.anl.gov> Sent: Friday, August 12, 2016 4:02:42 AM To: Koos Huijssen Cc: petsc-dev@mcs.anl.gov; Klaij, Christiaan; Bas van 't Hof Subject: Re: [petsc-dev] Nested event logging and human friendly output Thanks. This will be in master soon. Barry > On Aug 8, 2016, at 5:15 AM, Koos Huijssen <koos.huijs...@vortech.nl> wrote: > > Hi Barry, > > The fix is to replace the "j<=depth" on line 736 with "j<depth". So it should > read > > for (j=0; same && j<depth; j++) { same = (same && nstMyPath[j] == > nstPath[j]) ? PETSC_TRUE : PETSC_FALSE;} > > That should resolve the valgrind issue. > > With kind regards, > > Koos > > > -Original Message- > From: Barry Smith [mailto:bsm...@mcs.anl.gov] > Sent: vrijdag 5 augustus 2016 22:39 > To: Koos Huijssen <koos.huijs...@vortech.nl> > Cc: petsc-dev@mcs.anl.gov; Klaij, Christiaan <c.kl...@marin.nl>; Bas van 't > Hof <bas.vant...@vortech.nl> > Subject: Re: [petsc-dev] Nested event logging and human friendly output > > >There appears to be an error indicated by valgrind at: > ftp://ftp.mcs.anl.gov/pub/petsc/nightlylogs/archive/2016/08/04/examples_master_arch-linux-pkgs-valgrind_grind.log > > Note that the nstPath[] arrays only seem to filled up to but not including > depth but the "same" loop has j<=depth. Could you please clarify how I > should fix this? > > > if (i<nTimers) { >for (j=0; j<tree[i].depth; j++) nstMyPath[j] = > tree[i].nstPath[j]; >for (j=tree[i].depth; j<depth; j++) nstMyPath[j] = > illegalEvent; > } else { >for (j=0; j<depth; j++) nstMyPath[j] = > illegalEvent; > } > > /* Communicate with other processes to obtain the next path and its > depth */ > ierr = MPIU_Allreduce(nstMyPath, nstPath, depth, MPI_INT, MPI_MIN, > comm);CHKERRQ(ierr); > for (j=depth-1; (int) j>=0; j--) { >if (nstPath[j]==illegalEvent) depth=j; > } > > if (depth>0) { >/* If the path exists */ > >/* check whether the next path is the same as this process's next path > */ >same = PETSC_TRUE; >for (j=0; same && j<=depth; j++) { same = (same && nstMyPath[j] == > nstPath[j]) ? PETSC_TRUE : PETSC_FALSE;} > > > >> On Aug 4, 2016, at 5:01 PM, Koos Huijssen <koos.huijs...@vortech.nl> wrote: >> >> Hi Barry, >> >> I did some analysis on the results, but I see nothing strange. The missing >> MatAssemblyBegin could be because its time falls under the threshold of >> 0.01% of the total runtime, in which case it is left out of the tree. I ran >> the same case, and I got both Begin/End operations, but both at 0% (so >> probably both dwindling around the 0.01% threshold). The >> MatAssemblyBegin/MatAssemblyEnd pair are part of the SNESSolve routine, but >> they are not located within the SNES_Solve log event. This event only >> registers the time spent in the solve routine in snes->ops->solve. If I set >> an event around the call to SNESSolve in ex19.c, they do appear within that >> event. Maybe something to do with MatInterpolate or DMInterpolate? >> >> Since the log events have never been used in a nested logging before, it >> could be that this type of misunderstanding will occur more often whenever a >
Re: [petsc-dev] Nested event logging and human friendly output
Barry, Thanks for testing! Koos is on holiday now, we'll come back to this later. Chris dr. ir. Christiaan Klaij | CFD Researcher | Research & Development MARIN | T +31 317 49 33 44 | mailto:c.kl...@marin.nl | http://www.marin.nl MARIN news: http://www.marin.nl/web/News/News-items/Van-VTS-naar-VPC-15-september-2016.htm From: Barry Smith <bsm...@mcs.anl.gov> Sent: Sunday, July 17, 2016 4:44 AM To: Koos Huijssen Cc: Richard Mills; petsc-dev@mcs.anl.gov; Klaij, Christiaan; Bas van 't Hof Subject: Re: [petsc-dev] Nested event logging and human friendly output Thank you very much for fixing the errors I introduced and improving the code. I have put it into branch barry/fix-xml-logging and merged to next for testing. I do have one concern, when I run on src/snes/examples/tutorials/ex19.c with no options (see attached result)