Code Monkey home page Code Monkey logo

Comments (3)

briantoby avatar briantoby commented on June 12, 2024 1

This is excellent 👍 and we can talk more on all this on Wednesday, but let me respond to as much of this as I can.

I really don't know much about Cython, but I understand it is compiled. The problem will be in how to distribute the platform-specific code. The way things work now is that anything platform-specific for GSAS-II is built in the Scons process and are placed in the binary directory. For distribution for folks who do not build themselves, binaries taken from the .tgz files here: https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/releases/latest. It would be great if we can create and relocate binaries to those locations. If not, we will have to think about how to do this. FWIW, I expect we will "soon" move away Scons to meson. Some work will be needed for Python 3.12 in any case.

If not overly cumbersome, I'd like to keep the all-Python version of your code to be called in try/except block. That way if someone does not have the Cython version installed/configured/... they still have access to the functionality, albeit slow.

Documentation comes in a few flavors. Mostly we show functionality via tutorials. For this you could add a k-vector search to the existing magnetism tutorials or create new one(s). When it comes to explaining how the code works, I tend to put that into either the module or an accompanying .rst file that gets read by SphinxDocs, so either way it ends up in the Code Developer's Manual on ReadTheDocs. We now also have the GSAS-II web pages (here: https://gsasii.github.io/, also generated by Sphinx from .rst and .md files in https://github.com/AdvancedPhotonSource/GSAS-II-tutorials/tree/main/webdocs) but I look at that as for more general stuff like installation notes.

from gsas-ii.

Kvieta1990 avatar Kvieta1990 commented on June 12, 2024

Thanks a lot Brian for your comments! Really appreciate it! For sure, on Wednesday we can talk more on this.

I have already got those compiled Cython modules in the .pyd format and I do see some .pyd files in the bindist directory and I suppose if I put my compiled .pyd files in the bindist directory, it should work just like whatever other binary files for GSAS-II. Though, I need to do some testing on this and we can discuss. Concerning the try/except process you suggested, for sure I can wrap that around the k-search part. The only thing is that without the Cython modules, the computational time is unacceptably long so I would throw an error message window in case of any exception, telling users to grab those compiled modules. As for how-to, we can discuss and decide.

For the documentation, I will look into the .rst files and will create one for the k-vector search and for sure I can also create a tutorial for it once we make sure everything is working as expected -- as you may already see in my email to people, they can grab the version in the 'develop' branch to test it out and we should get some feedback hopefully soon.

Thank you!

from gsas-ii.

Kvieta1990 avatar Kvieta1990 commented on June 12, 2024

Just a quick update. I have added in the try/except for the kvec_general module. If the option is 2 (indicating we are going to search over the general k points, which requires heavy computation) and the kvec_general module is not available, we will throw out a message telling users that the module is not available, in which case only option-0 (high symmetry points) and option-1 (high symmetry path) are available.

I already got the compiled binaries for Windows and MacOS with ARM architecture. I will compile on all the other platforms including MacOS with intel chips, Linux OS with intel and ARM chips. We can talk about this on Wednesday about adding them in to the binary release for all the platforms.

from gsas-ii.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.