Programming new solver

Numerical methods and mathematical models of Elmer
Post Reply
kevinarden
Posts: 2312
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Programming new solver

Post by kevinarden »

I programmed and new solver with a user function and compiled it into my own library with

elmerf90 -o testlibrary.so NewSolver.F90 U_func.F90

no errors and testlibrary.so created, I moved testlibrary into shared libraries

I use this to call the solver

Procedure = "testlibrary.so" "NewSolver"

but I get this error

/usr/share/elmersolver/lib/testlibrary.so: invalid ELF header

I installed Elmer from a PPA, do I have to compile ElmerSolver completely on my machine?
raback
Site Admin
Posts: 4828
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Programming new solver

Post by raback »

Hi

PPA should be fine. Did you perhaps install a newer gfortran version? The compiler should be compatible with the version Elmer uses.

Nor should you tamper with the solver API. Its fixed.

You could perhaps test this by compiling some working modules from fem/src/modules.

You don't have to place them under shared libraries. Also having them in working directory works. Just add the "." for working directory (if WD not in search path).

Code: Select all

  Procedure = "./testlibrary.so" "NewSolver"
-Peter
kevinarden
Posts: 2312
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Programming new solver

Post by kevinarden »

I resolved it by compiling Elmer on my machine and then the new solver so it must have been a consistent compiler issues

Kevin
Post Reply