-
Notifications
You must be signed in to change notification settings - Fork 2
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
problem compiling marketplace models (Trac #1043) #11
Comments
Trac update at Yes, this will be a problem during the transition to the new sasview. I don't think you want to maintain both old and new ways of calling the kernel in the code. Doing a correct code transformation automatically would be much too hard. (1) Could strip out old style Iqxy in the new version: check if source contains the string ORIENT_A?SYMMETRIC. If so, look for “Iqxy”, scan forward to the next “{“, set nesting_level = 1 and scan the text, adding 1 for each ‘{‘ and subtracting 1 for each ‘}’ until nesting_level is 0. Replace the substring with “return NAN;”. Something like:
2D models will be broken for this model, but arguably they were anyway. Maybe spit something out through logger. This does not cover the case of the trivial Iqxy = Iq(sqrt(qxqx + qyqy)). (2) Could change API for the new models to use Iqac or Iqabc instead of Iqxy. Then strip any Iqxy function from the source with code similar to the above. (3) Could document that old-style Iqxy models no longer work and give instructions on updating them. |
Trac update at I am confused here. At this point there is only a handful of models in the marketplace that are different from the built in models ... including the cylinder model mentioned here. These models are supposed to be automatically updated if changed in sasmodels so they should just work. Is the real problem that the script to update marketplace models is not working? |
Trac update at No, Lewis put all the built-ins on the Marketplace, remember. |
Trac update at That is not what he said or documented on the wiki at |
Trac update at Interestingly models have not in fact been automatically updating since sep 7, 2017 it seems. This may be related to ticket #12. I note that a python only model was successfully uploaded to the marketplace on Dec 5, 2017. Probably need to check the server log files and file permissions as noted by Lewis in his notes. |
Trac update at Sep 7 is when Lewis finished off upload script: c5d579a and it was probably last time it was triggered. |
Trac update at [ To further clarify Paul K's comment above, I include below extracts of emails exchanged with him after I noticed that he had changed the way 2d intensity is calculated, less arguments to Iqxy and no longer any call to orient_symmetric or orient_assymmetric, as part of the massive http://trac.sasview.org/ticket/776 orientation_776 ticket.] [ There seem to be three submitted marketplace models (2 in cylinder, 1 in ellipsoid) that are actually affected, and as Paul B says could be edited by hand by us. BUT we would then have a backwards comaptibility issue if older versions of sasview are still to be supported by the marketplace, so there would need to be old and new versions.] [ This does raise a more general issue about the marketplace, how do we maintain backwards compatibility or flag which version of sasview][ (or at least for the current and previous saview releases?)][ a marketplace model will work with if we change the way the sasview kernel calculates things.] [ The marketplace could tell users where to find source code for built in sasview models in either their install directories (which would at least mean they have a version that works for them) or else perhaps on github? - though this would not be as elegant as the current links to download the code for models.] [ Richard] [ From: Paul Kienzle []mailto:paul.kienzle@nist.gov] Sent: 02 November 2017 16:51 To: Heenan, Richard (STFC,RAL,ISIS) Subject: Re: when did orient_asymmetric go? No longer need the theta, phi, psi arguments in Iqxy. - Paul
From: Paul Kienzle [mailto:paul.kienzle@nist.gov]
[more likely I was not looking in the correct branch?]
|
Trac update at
As agreed at the Tuesday fortnightly meeting, the first part of the answer will be option 2 given above. The issue with the marketplace not updating is now in ticket #15 while the need to add a "flag" to the marketplace so that the version of the API supported is documented with each model is in ticket #13. Finally the need to change the handful of custom models in the marketplace that use 2D to use the new API is documented in ticket #14. |
Trac update at Yet another issue: It could be useful to have arbitrary 2D calculations without orientation parameters converting We can fake it by including theta, phi, psi fixed at 0 and hidden so that So, do we need to continue to support |
Trac update at [https://github.com/SasView/sasmodels/pull/57 PR 57] supports Iqabc and Iqxy. |
Trac update at
In changeset 924a1196ee9fb4427c5f4eb32a3f0b8655184576:
|
When trying to compile models from marketplce numerous erros pop up related orientation/magnetism. This probably has something to do with recent orientation branch pushed to sasmodels. I've basically downloaded cylinder model from marketplace changed its name to marketplace_cylinder (also in python file where its pointing to c file) and run it from sasview as plugin model. One can probably do the same with sascomp.
Error message is long, so posting just a part of it
It probably also applies to old plugin models. It also seems that dummy Iqxy shouldn't be included in models as they fail to compile too.
We probably need to provide a patch for old/marketplace models.
Migrated from http://trac.sasview.org/ticket/1043
The text was updated successfully, but these errors were encountered: