Skip to content
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

Damped GaussNewton minimizer with ties crashes on Crystal Field Example #31176

Closed
jfowkes opened this issue Apr 21, 2021 · 1 comment · Fixed by #31421
Closed

Damped GaussNewton minimizer with ties crashes on Crystal Field Example #31176

jfowkes opened this issue Apr 21, 2021 · 1 comment · Fixed by #31421
Assignees
Labels
ISIS Team: Excitations/Vesuvio Issue and pull requests managed by the Excitiations/Vesuvio subteam at ISIS Linux Only Only on Linux
Milestone

Comments

@jfowkes
Copy link

jfowkes commented Apr 21, 2021

Running the Crystal Field example from the docs on Mantid 6.0 as follows:

import mantid.simpleapi as mt

# Load crystal field data
data_ws1 = mt.Load('NdOs2Al10_5K35meV_Ecut_0to3ang_bp15V1.xye')

# Setup crystal field model
cf = mt.CrystalFieldSpectrum(Ion='Nd', Symmetry='C2v', Temperature=5., FWHM=1., B20=0.19, B22=0.11,
                             B40=-0.0004, B42=-0.002, B44=-0.012, B60=5.e-5, B62=0.00054, B64=-0.0006, 
                             B66=0.0008, PeakShape='Lorentzian', IntensityScaling=2.)

# Fix molecular and external magnetic fields
for magfieldPars in ['BmolX', 'BmolY', 'BmolZ', 'BextX', 'BextY', 'BextZ']:
    cf.function.tie(magfieldPars, '0')
# Fix B66 
cf.function.tie('B66','0.0008')

# Run fit
fit = mt.Fit(cf, InputWorkspace=data_ws1, Minimizer='Damped GaussNewton', MaxIterations=100, Output='fit')

crashes with the following traceback:

Fit-[Notice] Fit started

********* UNHANDLED EXCEPTION *********
  what(): GSLVector index = 26 is out of range = 26 in GSLVector.get()

Backtrace:
 /opt/Mantid/lib/mantid/api/../../../lib/libMantidAPI.so(+0x1ba5f9) [0x7feb468c15f9]
 /opt/Mantid/lib/mantid/api/../../../lib/libMantidAPI.so(+0x1ba7ca) [0x7feb468c17ca]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92ae6) [0x7febb0b67ae6]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x91b49) [0x7febb0b66b49]
 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(__gxx_personality_v0+0x2a8) [0x7febb0b674b8]
 /lib/x86_64-linux-gnu/libgcc_s.so.1(+0x10573) [0x7febb08cd573]
 /lib/x86_64-linux-gnu/libgcc_s.so.1(_Unwind_Resume+0x125) [0x7febb08cddf5]
 /opt/Mantid/plugins/libMantidCurveFitting.so(_ZNK6Mantid12CurveFitting9GSLVector3getEm+0x148) [0x7feb1409fd58]
 /opt/Mantid/plugins/libMantidCurveFitting.so(_ZNK6Mantid12CurveFitting13CostFunctions20CostFuncLeastSquares18addValDerivHessianESt10shared_ptrINS_3API9IFunctionEES3_INS4_14FunctionDomainEES3_INS4_14FunctionValuesEEbb+0x249) [0x7feb13f607c9]
 /opt/Mantid/plugins/libMantidCurveFitting.so(_ZNK6Mantid12CurveFitting13CostFunctions15CostFuncFitting15valDerivHessianEbb+0x3d1) [0x7feb13f5fb41]
 /opt/Mantid/plugins/libMantidCurveFitting.so(_ZN6Mantid12CurveFitting14FuncMinimisers26DampedGaussNewtonMinimizer7iterateEm+0x17e) [0x7feb13f6a6ee]
 /opt/Mantid/plugins/libMantidCurveFitting.so(_ZN6Mantid12CurveFitting10Algorithms3Fit12runMinimizerEv+0x1ac) [0x7feb13e711ec]
 /opt/Mantid/plugins/libMantidCurveFitting.so(_ZN6Mantid12CurveFitting10Algorithms3Fit12execConcreteEv+0x38) [0x7feb13e73948]
 /opt/Mantid/plugins/libMantidCurveFitting.so(_ZN6Mantid12CurveFitting17IFittingAlgorithm4execEv+0xad) [0x7feb140ab5dd]
 /opt/Mantid/lib/mantid/api/../../../lib/libMantidAPI.so(_ZN6Mantid3API9Algorithm4execENS_8Parallel13ExecutionModeE+0x43) [0x7feb46827313]
 /opt/Mantid/lib/mantid/api/../../../lib/libMantidAPI.so(_ZN6Mantid3API9Algorithm15executeInternalEv+0x39f) [0x7feb468284cf]
 /opt/Mantid/lib/mantid/api/_api.so(+0xc73ee) [0x7feb46d373ee]
 /opt/Mantid/lib/mantid/api/_api.so(+0xce07a) [0x7feb46d3e07a]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(_ZNK5boost6python7objects8function4callEP7_objectS4_+0x285) [0x7feb4debd855]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(+0x21a18) [0x7feb4debda18]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(_ZNK5boost6python6detail17exception_handlerclERKNS_9function0IvEE+0x6b) [0x7feb4dec45db]
 /opt/Mantid/lib/mantid/api/_api.so(+0xe7193) [0x7feb46d57193]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(_ZNK5boost6python6detail17exception_handlerclERKNS_9function0IvEE+0x3a) [0x7feb4dec45aa]
 /opt/Mantid/lib/mantid/api/_api.so(+0xe7193) [0x7feb46d57193]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(_ZNK5boost6python6detail17exception_handlerclERKNS_9function0IvEE+0x3a) [0x7feb4dec45aa]
 /opt/Mantid/lib/mantid/api/_api.so(+0xe7193) [0x7feb46d57193]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(_ZNK5boost6python6detail17exception_handlerclERKNS_9function0IvEE+0x3a) [0x7feb4dec45aa]
 /opt/Mantid/lib/mantid/api/_api.so(+0xe7193) [0x7feb46d57193]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(_ZN5boost6python21handle_exception_implENS_9function0IvEE+0x3f) [0x7feb4dec437f]
 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1(+0x1f119) [0x7feb4debb119]
 /usr/bin/python3(_PyObject_FastCallKeywords+0x19c) [0x5a9d2c]
 /usr/bin/python3() [0x50a533]``` 
@AnthonyLim23 AnthonyLim23 added the ISIS Team: Excitations/Vesuvio Issue and pull requests managed by the Excitiations/Vesuvio subteam at ISIS label Apr 27, 2021
@AnthonyLim23 AnthonyLim23 added this to the Release 6.1 milestone Apr 27, 2021
@martyngigg
Copy link
Member

@SilkeSchomann Would you be free to have a look into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISIS Team: Excitations/Vesuvio Issue and pull requests managed by the Excitiations/Vesuvio subteam at ISIS Linux Only Only on Linux
Projects
None yet
4 participants