Closed ssolson closed 4 years ago
Looks like an @ssolson problem... jk, but passing on macOS ;)
>> !git rev-parse HEAD
1caa02b33d125424d28637fd757de4463479c937
>> runTests
All passed: test_results.pdf
Can you tell me what your raw
value is if you put a debug at read_NEMOH.m
line 48. E.g. I do not see the number of frequencies being read in from NEMOH.cal as shown in the screenshot below.
This looks like where the missing Nf should be defined (line 75).
With a dbstop
here: https://github.com/SNL-WaterPower/WecOptTool/blob/1caa02b33d125424d28637fd757de4463479c937/toolbox/%2BWecOptLib/%2Bvendor/%2BWEC_Sim/Read_NEMOH.m#L48
>> runTests
Running WecOptLib.tests.unit.AutoFolderTest
.....
Done WecOptLib.tests.unit.AutoFolderTest
__________
Running WecOptLib.tests.unit.PlotsTest
.Warning: Provided wave spectra have no weightings (field mu). Equal weighting presumed.
> In WecOptTool.types/SeaState/makeMu (line 364)
In WecOptTool.types/SeaState/validateArray (line 346)
In WecOptTool.types (line 63)
In WecOptLib.tests.unit/PlotsTest/testPowerPerFreqMultiSpectra (line 73)
.
Done WecOptLib.tests.unit.PlotsTest
__________
Running WecOptLib.tests.unit.SeaStateTest
Warning: Provided wave spectra have no weightings (field mu). Equal weighting presumed.
> In WecOptTool.types/SeaState/makeMu (line 364)
In WecOptTool.types/SeaState/validateArray (line 346)
In WecOptTool.types (line 63)
In WecOptLib.tests.unit/SeaStateTest/setup (line 18)
.......... ..........
Done WecOptLib.tests.unit.SeaStateTest
__________
Running WecOptLib.tests.unit.bisectionTest
.....
Done WecOptLib.tests.unit.bisectionTest
__________
Running WecOptLib.tests.unit.getFoldersTest
....
Done WecOptLib.tests.unit.getFoldersTest
__________
Running WecOptLib.tests.unit.getNemohCylinderTest
48 b = 0;
K>> raw
raw =
33×1 cell array
{'--- Environment --------------------------------------------------------------' }
{'1025.0000 ! RHO ! KG/M**3 ! Fluid specific volume ' }
{'9.8100 ! G ! M/S**2 ! Gravity ' }
{'0. ! DEPTH ! M ! Water depth' }
{'0. 0. ! XEFF YEFF ! M ! Wave measurement point' }
{'--- Description of floating bodies -------------------------------------------' }
{'1 ! Number of bodies' }
{'--- Body 1 ------------------------------------------------------------------' }
{''./mesh/axisym_1.dat' ! Name of mesh file' }
{'418 171 ! Number of points and number of panels' }
{'6 ! Number of degrees of freedom' }
{'1 1. 0. 0. 0. 0. 0. ! Surge' }
{'1 0. 1. 0. 0. 0. 0. ! Sway' }
{'1 0. 0. 1. 0. 0. 0. ! Heave' }
{'2 1. 0. 0. 0. 0. 0.0000 ! Roll about a point' }
{'2 0. 1. 0. 0. 0. 0.0000 ! Pitch about a point' }
{'2 0. 0. 1. 0. 0. 0.0000 ! Yaw about a point' }
{'6 ! Number of resulting generalised forces' }
{'1 1. 0. 0. 0. 0. 0. ! Force in x direction' }
{'1 0. 1. 0. 0. 0. 0. ! Force in y direction' }
{'1 0. 0. 1. 0. 0. 0. ! Force in z direction' }
{'2 1. 0. 0. 0. 0. 0.0000 ! Moment force in x direction about a point' }
{'2 0. 1. 0. 0. 0. 0.0000 ! Moment force in y direction about a point' }
{'2 0. 0. 1. 0. 0. 0.0000 ! Moment force in z direction about a point' }
{'0 ! Number of lines of additional information' }
{'--- Load cases to be solved --------------------------------------------------' }
{'10 0.1000 1.0000 ! Number of wave frequencies, Min, and Max (rad/s)' }
{'1 0. 0. ! Number of wave directions, Min and Max (degrees)' }
{'--- Post processing ----------------------------------------------------------' }
{'0 0.1 10. ! IRF ! IRF calculation (0 for no calculation), time step and duration' }
{'0 ! Show pressure' }
{'0 0. 180. ! Kochin function ! Number of directions of calculation (0 for no calculations), Min and Max (degrees)' }
{'0 50 400. 400. ! Free surface elevation ! Number of points in x direction (0 for no calcutions) and y direction and dimensions of domain in x and y direction'}
K>>
Can you checkout some of previous commits and see where you start having problems?
So It seems to break at the blueprint model. The last runTests I can get to avoid this error is 673e107af2052f393bab71252502bc0396b1d5d1.
I had run these tests (post blueprint model commit) previously and they were working but I cannot find where I posted those test results.
In the latest commit (origin master HEAD) when I dbstop
at 48. Call pwd
and open the Nemoh.cal file all the lines are there as they should be (e.g. the text file appears correct). But the textscan
is only pulling in the 8 rows I show in the screenshot above.
I will continue working on this tomorrow. Maybe @H0R5E has a better test/ debug suggestion?
Which version of MATLAB are you on Sterling? Could this be a regression with update 4?
I am currently running update 2 ('9.8.0.1380330 (R2020a) Update 2').
I updated to 4 ( '9.8.0.1417392 (R2020a) Update 4') and moved to the latest commit (1caa02b33d125424d28637fd757de4463479c937) All tests pass.
73 Passed, 0 Failed, 0 Incomplete.
149.8416 seconds testing time
I believe this was a version issue. Mat for reference before I close this did you have this running on Update 2?
MATLAB 2020a has been the most buggy release I've dealt with...
I think it was working on update 2, but I've currently got update 3 and it's fine. As I don't think you can get a particular update of a release, I think it's safe to close this one. Perhaps add "[2020a Update 2 Bug]" to the title so people can search it.
The errors seem to all be the same (example at bottom).
test_results.pdf
I believe I am even with WOT master