Standalone compilation of Spinach

Topics related to Spinach package
Post Reply
faq_user
Posts: 49
Joined: Tue Jul 13, 2021 8:33 am

Standalone compilation of Spinach

Post by faq_user »

We are using Spinach to perform DNP simulations and we need to compile short scripts. We are encountering several problems compiling these Spinach Matlab scripts. These errors only appear when compiling the code, and they seem to be linked to a missing “scratch directory”. We wonder if it's possible or not to make an executable from Spinach script or if some special tricks are required to avoid these problems.
kuprov
Posts: 202
Joined: Mon Mar 29, 2021 4:26 pm

Re: Standalone compilation of Spinach

Post by kuprov »

The "scratch" folder is where Spinach kernel stores intermediate results, like components of the relaxation superoperator – this folder must exist. I would suggest specifying its location explicitly as described here:

http://spindynamics.org/wiki/index.php? ... el_options

and making sure that location exists in the file system.

Incidentally, why compilation? Modern versions of Matlab use JIT anyway – the code would not get any faster when it’s compiled.
faq_user
Posts: 49
Joined: Tue Jul 13, 2021 8:33 am

Re: Standalone compilation of Spinach

Post by faq_user »

We need to run the script on a machine that doesn't have a Matlab License and we had the idea to compile to avoid the license issue.
kuprov
Posts: 202
Joined: Mon Mar 29, 2021 4:26 pm

Re: Standalone compilation of Spinach

Post by kuprov »

Hmmmm, Matlab compiler was never really intended for multi-gigabyte packages like Spinach… let me know if you encounter further compilation errors, I should be able to make workarounds quickly. As you can imagine, we never really planned for such an exotic use case.
Post Reply