Structure of output_ls and output_base_ls for transient simulation

57 views
Skip to first unread message

Julian B.

unread,
Jul 12, 2022, 12:08:36 PM7/12/22
to xyce-users

Hi guys,

for a custom solver case, I am currently trying to utilize the output_ls or output_base_ls functions. However, for the transient case i am not sure of the used structure within the solver.
Particularly, the arrangement of the RHS entries does not seem to correspond with the sorting I obtained with the -namesfile command. I assume there are some modifications made when the system is stored as an equation system with a single system matrix in transient simulations.

Is there a straight forward way to print the system in a structure such as
dFdx * x + dQdx * x_dot = RHS,
Where dFd,  dQdx and RHS could be stored as a .mm file or similar?

Thank you in advance.

Regards,
Julian

xyce-users

unread,
Jul 12, 2022, 12:35:46 PM7/12/22
to xyce-users
Hi Julian,

So, the output_base_ls option will output the assembled linear problem before any reorderings are performed on the matrix/RHS for the linear solver.  The output_ls option will output the reordered matrix/RHS (if any reorderings are enabled) that is passed to the linear solver.  The namesfile will give you the variables that are related to the linear system provided by the output_base_ls options.  

We do not provide an unassembled linear system because the assembly of it is determined by the time integration method, so it cannot be expressed in the structure above.  

All of this advice is relevant to transient simulation, if another analysis type is being used (AC,HB) then the structure and orderings will be different.  Can you give more details on what you are trying to do?  Maybe that will allow us to provide a little more help.

Thanks,
Heidi

Julian B.

unread,
Jul 14, 2022, 5:19:54 AM7/14/22
to xyce-users
Hi Heidi,

thanks for the quick response. I am currently working on an adjoint solver for special cases, which would require a deeper knowledge of the equation system containing the original assembled matrices. Do you have further technical reports on the exact quantities which are returned from the output_base_ls / output_ls functions?
From what I understand from the mathematical formulation report (http://dx.doi.org/10.2172/919137) and your answer, the rhs which is returned by output_base_ls / output_ls is not in fact the "pure" right hand side but rather the final rhs of the completely assembled linear system, which would be (alpha *B*x + rhs).
This would then mean, I am not able to use the function to obtain data structures which I could use in a separate solver?
For static and AC/HB cases this worked fine, since I could obtain the "raw" data with the output function.

Thanks
Julian

xyce-users

unread,
Jul 20, 2022, 1:58:39 PM7/20/22
to xyce-users


Hi Julian,

I was traveling so I wasn't following this discussion, and I am chiming in a bit late.

It sound like from your initial question that you're interested in the DAE components.  If you want to output the separate DAE components there are output functions in Xyce that can do this.  They are debug functions, so you'd have to compile Xyce differently to use them.  At the moment, the only way to use them is to compile Xyce with debug nonlin enabled.  If Xyce is compiled with that option, then they can be invoked from the netlist using ".options nonlin debuglevel=2".

With that option invoked, Xyce will output the f,q and b vectors, as well as the dFdx and dQdx matrices to files.  They do this pre-assembly, so the time-differentiated q vector (i.e. dqdt) isn't included.  The ordering will match that of the names vector.  These functions were set up mostly to debug device models.  They produce a LOT of output so they should be used carefully.

Also, I am curious about what you are doing with adjoints.  I implemented the adjoint methods that are currently in Xyce a while ago.  I've been aware of at least 2 external (i.e. non-Sandia) groups that have added their own adjoint methods to Xyce.  There are certainly many ways in which they could be extended and/or improved that I'm aware of, but haven't had the bandwidth to pursue.

thanks,
Eric

Julian B.

unread,
Aug 3, 2022, 4:54:29 AM8/3/22
to xyce-users
Hi Eric,

sorry for the late response, but I kind of overlooked your question here. I am trying to implement a recursive/snapshot adjoint sensitivity analysis (i.e.  as introduced in 10.1080/10556789208805505). As an extension, I would like to couple this with a parallel in time method, which (in theory) speeds up the analysis if the nonlinearities and are not too strong and the damping in the network is strong enough, especially if the quantity of interest is a voltage or current at many points in time rather than the integral over the entire time frame.

Thank you for the help so far.
Julian

xyce-users

unread,
Aug 3, 2022, 7:43:06 PM8/3/22
to xyce-users
Julian,

Very interesting. I am kind of familiar with this paper so I'll be very curious to hear about how it goes for you.     There is at least one other group (outside Sandia) that has modified Xyce to handle multi-point objectives more efficiently.  They had a paper about it at ICCAD, and the idea was pretty straightforward.  I've been meaning to work on this issue myself, but haven't had the time.

Regarding parallel-in-time methods, I remember there being several papers on this subject in the EDA literature about 10 years ago.  We considered implementing it (not with adjoints, just regular forward simulation), but (like with multi-point objects) didn't find the time.  My impression at the time was that these methods would require a pretty substantial refactor of the Xyce time integrator and I think that was enough of a barrier that we didn't do it. 

I could imagine if you were  applying parallel-in-time to the adjoint solve (backward integration), rather than the forward simulation, that might be a much more manageable coding job, as the transient adjoint code (while it is spread over multiple files) isn't as big.

thanks,
Eric
Reply all
Reply to author
Forward
0 new messages