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

testing custom models - issues? (Trac #706) #832

Closed
RichardHeenan opened this issue Mar 30, 2019 · 6 comments
Closed

testing custom models - issues? (Trac #706) #832

RichardHeenan opened this issue Mar 30, 2019 · 6 comments
Assignees
Labels
Defect Bug or undesirable behaviour Minor Small job
Milestone

Comments

@RichardHeenan
Copy link
Contributor

RichardHeenan commented Mar 30, 2019

Trying to follow manual "Writing a plugin model" to add a model (actually a needed reparametrisation of hollow_cylinder, see #806)

Please make the "info" box on "check model" results larger, as I had to copy & paste the output elsewhere to make sense of it.

After successful compile, is there a bug in:

run_one("c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\stfc\sasview4\sasmodels\sasmodels\model_test.py", line 293, in run_one
    if not suite._tests[0].info.tests:
IndexError: list index out of range

or was it an issue with my new model?

If you don't have openCL then the default "main()" test fails, could say how to get around this. I can get it to work with the openMP version:

main("-single!","-double!", "c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py")

Would be useful if manual said that ctrl/uparrow gets previous line back in python shell.

Migrated from http://trac.sasview.org/ticket/706

{
    "status": "closed",
    "changetime": "2016-10-10T15:17:43",
    "_ts": "2016-10-10 15:17:43.162022+00:00",
    "description": "Trying to follow manual \"Writing a plugin model\" to add a model (actually a needed reparametrisation of hollow_cylinder, see #675)\n\nPlease make the \"info\" box on \"check model\" results larger, as I had to copy & paste the output elsewhere to make sense of it.\n\nAfter successful compile, is there a bug in:\n\n{{{\nrun_one(\"c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py\")\nTraceback (most recent call last):\n  File \"<input>\", line 1, in <module>\n  File \"C:\\stfc\\sasview4\\sasmodels\\sasmodels\\model_test.py\", line 293, in run_one\n    if not suite._tests[0].info.tests:\nIndexError: list index out of range\n}}}\nor was it an issue with my new model?\n\nIf you don't have openCL then the default \"main()\" test fails, could say how to get around this. I can get it to work with the openMP version:\n\n{{{\nmain(\"-single!\",\"-double!\", \"c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py\")\n}}}\n\nWould be useful if manual said that ctrl/uparrow gets previous line back in python shell.\n",
    "reporter": "richardh",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-10-05T20:09:39",
    "component": "SasView",
    "summary": "testing custom models - issues?",
    "priority": "minor",
    "keywords": "",
    "milestone": "SasView 4.1.0",
    "owner": "pkienzle",
    "type": "defect"
}
@RichardHeenan RichardHeenan added this to the SasView 4.1.0 milestone Mar 30, 2019
@RichardHeenan RichardHeenan added Defect Bug or undesirable behaviour Incomplete Migration Minor Small job and removed Incomplete Migration labels Mar 30, 2019
@butlerpd
Copy link
Member

Trac update at 2016/10/06 11:44:20: butler changed description from:

Trying to follow manual "Writing a plugin model" to add a model (actually a needed reparametrisation of hollow_cylinder, see #675)

Please make the "info" box on "check model" results larger, as I had to copy & paste the output elsewhere to make sense of it.

After successful compile, is there a bug in:

run_one("c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py")
Traceback (most recent call last):
File "", line 1, in
File "C:\stfc\sasview4\sasmodels\sasmodels\model_test.py", line 293, in run_one
if not suite._tests[0].info.tests:
IndexError: list index out of range

or was it an issue with my new model?

If you don't have openCL then the default "main()" test fails, could say how to get around this. I can get it to work with the openMP version:

main("-single!","-double!", "c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py")

Would be useful if manual said that ctrl/uparrow gets previous line back in python shell.

to:

Trying to follow manual "Writing a plugin model" to add a model (actually a needed reparametrisation of hollow_cylinder, see #675)

Please make the "info" box on "check model" results larger, as I had to copy & paste the output elsewhere to make sense of it.

After successful compile, is there a bug in:

{{{
run_one("c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py")
Traceback (most recent call last):
File "", line 1, in
File "C:\stfc\sasview4\sasmodels\sasmodels\model_test.py", line 293, in run_one
if not suite._tests[0].info.tests:
IndexError: list index out of range
}}}
or was it an issue with my new model?

If you don't have openCL then the default "main()" test fails, could say how to get around this. I can get it to work with the openMP version:

{{{
main("-single!","-double!", "c:/users/rkh98/.sasview/plugin_models/hollow_cylinder_new.py")
}}}

Would be useful if manual said that ctrl/uparrow gets previous line back in python shell.

@sasview-bot
Copy link

Trac update at 2016/10/10 13:30:05: Paul Kienzle [email protected] commented:

In changeset 3c852d4604cf51f0fd434203b6ffb125dc07e927:

#!CommitTicketReference repository="sasmodels" revision="3c852d4604cf51f0fd434203b6ffb125dc07e927"
use public api to access test suite (#832)

@pkienzle
Copy link
Contributor

Trac update at 2016/10/10 13:34:35: pkienzle commented:

I couldn't reproduce the error, but I posted a change that should fix it.

Please try again, and attach the file that was causing problems.

I'm leaving the ticket open until it is tested, and until the second part of the ticket (the request to update the docs) has been addressed.

@pkienzle
Copy link
Contributor

Trac update at 2016/10/10 14:51:54: pkienzle commented:

See #864 for attached models.

@pkienzle
Copy link
Contributor

Trac update at 2016/10/10 14:54:11: pkienzle commented:

No longer fails, but claims there are no tests if sasmodels.core.HAVE_OPENCL = False

@sasview-bot
Copy link

Trac update at 2016/10/10 15:17:43:

In changeset 479d0f3037754800fa16a1958b2bdbe5fe7b20b8:

#!CommitTicketReference repository="sasmodels" revision="479d0f3037754800fa16a1958b2bdbe5fe7b20b8"
run_one() uses dll if OpenCL is not available.  Fixes #832.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Minor Small job
Projects
None yet
Development

No branches or pull requests

4 participants