mdolab / baseclasses

Other
6 stars 26 forks source link

Implement a general method for stdout separation #57

Open A-CGray opened 3 years ago

A-CGray commented 3 years ago

Description of feature

Often if you want to be able to read the iteration printout of the pyAeroStructure MDA you have to suppress the iteration printing of the aero and structural solvers which can make it hard to diagnose problems. To help with this we should implement the ability to redirect the output from the 3 different solvers to 3 different files.

Previously, I implemented this in pyAeroStructure using multipoint's redirectIO method, but it was bespoke and not extensible to other combinations of solvers. You can see the implementation here

Potential solution

Instead we should add redirectIO functionality to our 3 solver types so they each can take a stdoutFile argument.

We should aim to implement something like _setSTDOut in the BaseSolver class so it can be inherited by each solver and then add in calls to it in the right places (e.g in __call__, evalFunctions etc) in each solver.

marcomangano commented 3 years ago

Just bumping it up because we should take care of this some time soon

A-CGray commented 3 years ago

I very much agree, however I have quite a lot of TACS PR's on my plate at the moment, the nonlinear solver stuff in particular is gonna take a while. Can we assign someone else to this? It doesn't really require any prior knowledge of any of our code

marcomangano commented 3 years ago

Yeah sure, I think you self-assigned just because of your previous attempt but I am not sure if we can use that branch, no worries