ElmerCSC / elmer-elmag

Development repository for electromagnetics tutorial and verification cases
50 stars 20 forks source link

Cannot run BandpassFilter example #19

Closed dan-gies closed 6 months ago

dan-gies commented 6 months ago

System: Windows 11 ElmerSolver version: v 9.0

I'm attempting to run the Elmer BandpassFilter example found here: https://github.com/ElmerCSC/elmer-elmag/tree/main/BandpassFilter

When I run ElmerSolver.exe in the BandpassFilter directory of the repo, I get the following:

PS D:\repos\elmer-elmag\BandpassFilter> ElmerSolver.exe .\Filter_Zhai.sif
ELMER SOLVER (v 9.0) STARTED AT: 2024/03/15 15:48:19
ParCommInit:  Initialize #PEs:            1
MAIN:
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Version: 9.0 (Rev: Release, Compiled: 2023-03-05)
MAIN:  Running one task without MPI parallelization.
MAIN:  Running with just one thread per task.
MAIN:  Lua interpreter linked in.
MAIN:  External optimization routines linked in.
MAIN: =============================================================
MAIN:
MAIN:
MAIN: -------------------------------------
MAIN: Reading Model: .\Filter_Zhai.sif
 Caught LUA error:...0-Release/share/elmersolver/lua-scripts/defaults.lua:58: r
LoadInputFile: Scanning input file: .\Filter_Zhai.sif
LoadInputFile: Scanning only size info
LoadInputFile: First time visiting
LoadInputFile: Reading base load of sif file
LoadInputFile: Loading input file: .\Filter_Zhai.sif
LoadInputFile: Reading base load of sif file
Loading user function library: [EMParam_WR28]...[omega]
Can not find EMParam_WR28.
Can not find EMParam_WR28.dll.
Can not find .\EMParam_WR28.
Can not find .\EMParam_WR28.dll.
Can not find C:\Program Files\Elmer 9.0-Release/share/elmersolver/lib\EMParam_WR28.
Can not find C:\Program Files\Elmer 9.0-Release/share/elmersolver/lib\EMParam_WR28.dll.

I've created a post on the Elmer forum - not sure which gets more traffic between this GitHub repo and the forum. Any help would be greatly appreciated.

Cheers, Daniel

dan-gies commented 6 months ago

I tested this with an Ubuntu 24 VM and got the same error message.

dan-gies commented 6 months ago

Thanks to a generous user on the Elmer forum, I now know it was an error between 🧑/⌨️. EMParam_WR28.F90 needs to be compiled separately:

On Windows: elmerf90 EMParam_WR28.F90 -o EMParam_WR28.dll

On Linux: elmerf90 EMParam_WR28.F90 -o EMParam_WR28.so