idaholab / raven

RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.
https://raven.inl.gov/
Apache License 2.0
219 stars 133 forks source link

Dymola Tests failing with new libraries #87

Closed joshua-cogliati-inl closed 7 years ago

joshua-cogliati-inl commented 7 years ago

With libraries:

numpy 1.12.1
h5py 2.7.0
scipy 0.19.0
sklearn 0.18.1
matplotlib 2.0.0 

The tests framework/CodeInterfaceTests.DymolaTestTimeDepNoExecutableEnsembleModel and framework/CodeInterfaceTests.DymolaTestNoExecutable fail.

framework/CodeInterfaceTests.DymolaTestTimeDepNoExecutableEnsembleModel FAILED (In DMInterfaceTestTimedep/testDummyStep/BouncingBall++1/out~dsin.csv: The values in column "e" don't match
    rel diff:  0 ~ 0.699999988079 = 1.0
In DMInterfaceTestTimedep/testDummyStep/BouncingBall++1/out~dsin.csv: The values in column "g" don't match
    rel diff:  9.0 ~ 9.81000041962 = 0.082568846582
In DMInterfaceTestTimedep/testDummyStep/BouncingBall++1/out~dsin.csv: The values in column "hstart" don't match
    rel diff:  3.0 ~ 3.53770232201 = 0.151991963445
In DMInterfaceTestTimedep/testDummyStep/BouncingBall++5/out~dsin.csv: The values in column "e" don't match
    rel diff:  0 ~ 0.699999988079 = 1.0
In DMInterfaceTestTimedep/testDummyStep/BouncingBall++5/out~dsin.csv: The values in column "g" don't match
    rel diff:  9.0 ~ 9.81000041962 = 0.082568846582
In DMInterfaceTestTimedep/testDummyStep/BouncingBall++5/out~dsin.csv: The values in column "hstart" don't match
    rel diff:  3.0 ~ 3.53770232201 = 0.151991963445
) (reprint)

From: https://hpcgitlab.inl.gov/idaholab/raven/issues/826
See also: https://hpcsc.inl.gov/ssl/raven_downloads/test_results/2017_Apr_05//log_Ubuntu_14.04_jjc-ubuntu-14-04-conda

alfoa commented 7 years ago

The problem is scipy. They changed the scipy.io.loadmat and I think it is related to that. I will check

alfoa commented 7 years ago

I have to correct my self.

Strange. I tried to update the libraries and I do not get any failure...

maljovec commented 7 years ago

See PR #232. I found the issue. The dtype of np.full is being set to integer in the following line in DymolaInterface.py:

Data1Array =  numpy.full((sizeParams,numOutputPts),1)

This can be avoided by suggesting the datatype more explicitly with:

Data1Array =  numpy.full((sizeParams,numOutputPts),1.)

Notice the period enforces that 1 will be treated as a float not an integer.

PaulTalbot-INL commented 7 years ago

Issue Closure

This review should occur when the issue is imminently going to be closed.

@bobkinl @maljovec does closing this issue warrant an announcement to the Dymola users, or can we push without additional notification?

PaulTalbot-INL commented 7 years ago

As @AaronEpiney says this change is not disruptive to the current dymola users, we can merge without notification.