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?
Programming new solver
-
- Site Admin
- Posts: 4828
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Programming new solver
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).
-Peter
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"
-
- Posts: 2312
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Programming new solver
I resolved it by compiling Elmer on my machine and then the new solver so it must have been a consistent compiler issues
Kevin
Kevin