Easyspin compile required for esfit version 6.0.0

General forum for EasySpin: questions, how to's, etc.
Post Reply
thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Easyspin compile required for esfit version 6.0.0

Post 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.

Stefan Stoll
EasySpin Creator
Posts: 1057
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Easyspin compile required for esfit version 6.0.0

Post 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?

thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Easyspin compile required for esfit version 6.0.0

Post 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]

thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Easyspin compile required for esfit version 6.0.0

Post 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

thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Easyspin compile required for esfit version 6.0.0

Post by thanasis »

And the solution this time was:

Code: Select all

sudo apt install g++-multilib
Stefan Stoll
EasySpin Creator
Posts: 1057
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Easyspin compile required for esfit version 6.0.0

Post 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.

thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Easyspin compile required for esfit version 6.0.0

Post 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.

Stefan Stoll
EasySpin Creator
Posts: 1057
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Easyspin compile required for esfit version 6.0.0

Post 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.

Post Reply