Page 1 of 1

Easyspin compile required for esfit version 6.0.0

Posted: Wed Apr 10, 2024 12:08 pm
by thanasis

One issue I came across and how it can be solved:

The esfit function in the 6.0.0 version apparently makes a call to a new function called esfit_algdefaults, which caused an error:

Unrecognized function or variable 'esfit_algdefaults'.

This is located in the easyspin/private folder, which Easyspin cannot add to the path. Making a copy of the esfit_algdefaults.p to the parent directory (/easyspin) solves the problem and the fitting window launches.

However, upon pressing the "Start Fitting" button, a new error appears:

Undefined function 'compisoloop' for input arguments of type 'function_handle'.

Doing the same with file compisoloop.p, also solves the problem and the fit launches.

Also a number of warnings for missing png files appears in orange.

Issuing the easyspin compile command apparently is needed to solve those issues.


Re: Easyspin compile required for esfit version 6.0.0

Posted: Thu Apr 11, 2024 8:57 am
by Stefan Stoll

Thanks for reporting this. Unclear what it going on. Can you please type easyspin in the Command Window and post the output here?


Re: Easyspin compile required for esfit version 6.0.0

Posted: Thu Apr 11, 2024 3:27 pm
by thanasis

Sure, here goes:

[quote]Information about the installed EasySpin version

Version: 6.0.0 (2024-04-01)
Expiration date: 2026-04-01
Root folder: /home/...

mex files: mexa64, all present

MATLAB version: 9.12.0.2170939 (R2022a) Update 6
Platform: Linux 6.3.13-060313-generic
System date: 240412
Temp dir: /tmp/
[/quote]


Re: Easyspin compile required for esfit version 6.0.0

Posted: Wed Apr 17, 2024 12:54 pm
by thanasis

Another iteration from another computer (also running Linux Mint Mate):
Once the fitting starts from the gui window:

Simulation function error:
EasySpin: Generation of mex files failed.

Trying easyspin compile again produced a series of errors:

EasySpin compilation
directory: /home/...
version: 9.12.0.2170939 (R2022a) Update 6
mex extension: mexa64, 64-bit
mex C compiler: gcc
compiling 9 c-files...
(1/9) chili_lm.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(2/9) cubicsolve.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(3/9) lisum1i.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(4/9) mdhmm_lbfgsb_wrapper.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(5/9) multimatmult_.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(6/9) multinucstick.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(7/9) projecttriangles.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(8/9) projectzones.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status

(9/9) sf_peaks.c failed
Error using mex
/usr/bin/ld: cannot find -lstdc++: No such file or directory
collect2: error: ld returned 1 exit status


Re: Easyspin compile required for esfit version 6.0.0

Posted: Wed Apr 17, 2024 4:06 pm
by thanasis

And the solution this time was:

Code: Select all

sudo apt install g++-multilib

Re: Easyspin compile required for esfit version 6.0.0

Posted: Mon Apr 22, 2024 8:53 am
by Stefan Stoll

There seem to be two unrelated issues here:

  1. MATLAB can't find (some) p-files in the private folder. Unclear what is going on here.

  2. The C/C++ compilation environment was not set up on your machine. Have you run mex -setup? See here.


Re: Easyspin compile required for esfit version 6.0.0

Posted: Tue Apr 23, 2024 1:42 am
by thanasis

In both machines, mex -setup identified gcc as compiler, though I don't know why I had to manually install the extra library on the second machine.

But in both cases the errors disappeared once the compilation was successfully done.


Re: Easyspin compile required for esfit version 6.0.0

Posted: Tue May 07, 2024 2:40 pm
by Stefan Stoll

Thanks for reporting back. Your initial issue, where MATLAB could not locate some of the files from the private subfolder, is still puzzling. It seems to be unrelated to the compilation issues.