-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initilization error and VTK outputs prevents a clean abort #250
Comments
I think that looks good. I'm not sure the warning is necessary, though. |
The pullrequest #257 solves this issue but I have now discovered a related bug: To reproduce it, set The issue is that |
I'm suggesting the following changes in
REAL(ReKi) :: DT_OUT_VTK ! Output rate for VTK animations
![...]
y_FAST%NOutSteps = 1 ! Initialization
![...]
IF (p_FAST%n_VTKTime>0) THEN
! VTK animation may required more OutSteps, so we take the max
DT_OUT_VTK = p_FAST%n_VTKTime * p_FAST%DT
y_FAST%NOutSteps = MAX ( y_FAST%NOutSteps, CEILING ( (p_FAST%TMax - p_FAST%TStart) / DT_OUT_VTK ) + 1 )
ENDIF I'll submit another pull request if you agree with these changes. NOTE: @jjonkman this also affects FAST.Farm |
I don't think In my version of the code, I use
This is actually what I had suggested in the first issue reported in #172, and which I thought had already been fixed. |
Thanks for pointing out #172, it is indeed related to this second issue I mentioned. Unfortunately, it seems the change you suggested are not included in the current dev branch. I agree that the rates are different, my solution was more of a quick fix. Probably the best would be to pass twidth as an argument to the write functions, but as long as these functions are only used for the visualization, it seems fine. I can submit a pull request that include your version of |
Zero padding of VTK names, and log10 of zero (see #250)
closed by pull request #257 |
Bug description
If an error occurs during the fast library initialization, the routine
ExitThisProgram
is called, which then attempts to write the mesh for debugging ifWrVTK>0
. The issue is thaty_FAST%NOutSteps
might be zero, and then the program will crash on the following statementTwidth = int(log10(real(y_FAST%NOutSteps))) + 1
.To Reproduce
Try to trigger an error at initialization (e.g. by reproducing #249), and set
WrVTK
to on.Expected behavior
The program should abort nicely.
Suggested solution
The calls to
log10
inFAST_Subs.f90
should be protected as follows:I'll send a pull request later that fixes this if people agree.
The text was updated successfully, but these errors were encountered: