[petsc-dev] Fwd: Arm DDT feature questions

Zhang, Junchao jczhang at mcs.anl.gov
Tue Mar 5 14:14:07 CST 2019


In an Arm training class, I requested a DDT feature from John Linford from Arm Inc, which now owns Allinea DDT.  Basically, I want DDT to correctly display petsc variable-lengthed arrays and void* pointers.  From John's feedback, it looks DDT could support it.
Does anyone already have custom pretty-printers in gdb for petsc?  Otherwise, I think we should make one and perhaps let Arm ship with its product.

--Junchao Zhang

---------- Forwarded message ---------
From: John Linford <John.Linford at arm.com<mailto:John.Linford at arm.com>>
Date: Tue, Mar 5, 2019 at 1:16 PM
Subject: Re: Arm DDT feature questions
To: Zhang, Junchao <jczhang at mcs.anl.gov<mailto:jczhang at mcs.anl.gov>>



Hi Junchao,


The Forge developers came back with some answers.  Please see below.  Thanks,


Sorry for the delay. Please find answer to your questions:



Does Arm DDT support user-defined array length and user-defined pointer casting from a custom file, which sets the rules and is provided by users?



Yes, DDT does support this through the user of GDB pretty printers. The best example is the support of STL vectors in DDT. There is also a simple example in /path/to/forge/example/fruit* and explanations in the UG.

I have been trying to fiddle with pretty printers and PETSC (this could make a nice blog article) but I only managed to make it work in GDB, not in DDT for some reason. I’ll let you know if I manage to get anything interesting.

We could possibly make a feature request to support PETSC datatypes. If PETSC developers maintain GDB pretty printers between versions, I think this is something we could look at.







John C. Linford | Principal Applications Engineer | Development Solutions
john.linford at arm.com<mailto:john.linford at arm.com> | LinkedIn<https://www.linkedin.com/in/jlinford/>

Direct/Mobile: +1-737-218-3529
Arm HPC Ecosystem<https://developer.arm.com/HPC> | www.arm.com<https://www.arm.com/>






________________________________
From: John Linford
Sent: Tuesday, February 19, 2019 12:31:56 PM
To: Zhang, Junchao
Subject: Re: Arm DDT feature questions


Hi Junchao,


Thanks for the follow-up and glad you could attend the workshop.  I've sent this over to the tools group and should have an answer for you soon.  Thanks,




John C. Linford | Principal Applications Engineer | Development Solutions
john.linford at arm.com<mailto:john.linford at arm.com> | LinkedIn<https://www.linkedin.com/in/jlinford/>

Direct/Mobile: +1-737-218-3529
Arm HPC Ecosystem<https://developer.arm.com/HPC> | www.arm.com<https://www.arm.com/>






________________________________
From: Zhang, Junchao <jczhang at mcs.anl.gov<mailto:jczhang at mcs.anl.gov>>
Sent: Friday, February 15, 2019 5:28:59 PM
To: John Linford
Subject: Arm DDT feature questions

Hi, John,
  Does Arm DDT support user-defined array length and user-defined pointer casting from a custom file, which sets the rules and is provided by users?  Suppose I have a struct
typedef struct {
  int type;
  int len;
  double *p;
  void *data;
} Vec;

Currently, to display a Vec variable, I have to manually tell DDT length of array p[] is given by len, and type of void *data is Vec_MPI* if type==1, is Vec_Seq* if type==2, so on so forth. I have to do the manual work every time when I display variables of type Vec. It is not convenient.
Structures with void pointers is heavily used by PETSc, which is a numerical library widely used in HPC. It would be nice if DDT supports PETSc objects display natively.
Thank you
--Junchao Zhang
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20190305/90b2e257/attachment.html>


More information about the petsc-dev mailing list