Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Error: invalid ELF header - Trying to call a Matlab function from COMSOL

Please login with a confirmed email address before reporting spam

Steps to get the error:

  1. From Ubuntu, I do start COMSOL as:

comsol -mlroot /usr/local/MATLAB/R2019b -forcegcc

  1. Within COMSOL, under the "Global definitions" node,

Functions = "/home/miguel/Desktop/PCE proyecto/code/seedDispersal/seed_v_w.m".

Funtion name = seed_v_w

Arguments = v_e, beta_p, lambda_p, v_w_X0 -> (they are constants and they have all been declared as COMSOL Variables)

  1. basically the MATLAB function is : ( files attached for complete code)

function Xt = seedvw(ve, betap, lambdap, X0) ... ( stuff here) Xt = (....calculated value) end

  1. When I click on the COMSOL "Compute", the following error appears:
  • Feature: Compile Equations: Time Dependent (sol1/st1) Error in multiphysics compilation. Failed to load library.
  • Library: /home/miguel/Desktop/PCE proyecto/code/seedDispersal/seed_v_w.m
  • Error: /home/miguel/Desktop/PCE proyecto/code/seedDispersal/seed_v_w.m: invalid ELF header

Thank you in advance !



2 Replies Last Post 8 gen 2020, 14:17 GMT-5
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 7 gen 2020, 06:24 GMT-5

Hi Miguel

The most likely reason for seing this error message is that something went wrong with the installation of Comsol and some of the files were corrupted.

Another guess would be that you are using a combination of Ubuntu version, Matlab version and Comsol version that is not supported.

-------------------
Lars Gregersen
Comsol Denmark
Hi Miguel The most likely reason for seing this error message is that something went wrong with the installation of Comsol and some of the files were corrupted. Another guess would be that you are using a combination of Ubuntu version, Matlab version and Comsol version that is not supported.

Please login with a confirmed email address before reporting spam

Posted: 5 years ago 8 gen 2020, 14:17 GMT-5

Thank you very much, Lars ! Yes... the installation went wrong ... you got it

Thank you very much, Lars ! Yes... the installation went wrong ... you got it

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.