Open tecodrive opened 1 year ago
@tecodrive Thanks for reporting! Want to submit a PR ?
@tecodrive here is the source:
Specifically:
if system() != "Windows":
args.extend(["mpirun"])
else:
args.extend(["mpiexec"])
Edit: Why doesn't the FEM code reference the file extension?
Edit2: Maybe it has to do with the code comments in line 116
# if ELMER_HOME is not set, set it.
# Needed if elmer is compiled but not installed on Linux
# http://www.elmerfem.org/forum/viewtopic.php?f=2&t=7119
# https://stackoverflow.com/questions/1506010/how-to-use-export-with-python-on-linux
# TODO move retrieving the param to solver settings module
mpirun without extension is a standard program in most distros. Snap package contain two files mpirun.mpich and mpirun.openmpi - conflict. FreeCAD (not snap) have not include elmer, mpi an other externals. People must install Elmer.
solution would be not so good
# args.extend(["mpirun"])
args.extend(["mpirun.openmpi"])
or better rename file in snap package mpirun.openmpi => mpirun
Question is: A) make the change in init.py per the documentation[1]. OR B) make the change in snapcraft.yaml
Thoughts ?
Edit: snapcraft.yml shows:
Edit2: Looks like we should use Snap Layouts https://snapcraft.io/docs/snap-layouts in snapcraft.yaml:
https://github.com/FreeCAD/FreeCAD-snap/blob/0e20f526da108e538a004719d3fbed26d33658db/snap/snapcraft.yaml#L33-L61
yes, Edit2, use Snap Layouts and add a symlink
usr/bin/mpirun.openmpi: # ElmerSolver_mpi
symlink: $SNAP/usr/bin/mpirun
@tecodrive can you review #101 please ?
@tecodrive you mentioned 2 files missing, do i need to make one for /snap/freecad/current/usr/bin/mpirun.mpich
as well ?
there are 2 files for the same thing
/snap/freecad/current/usr/bin/mpirun.mpich /snap/freecad/current/usr/bin/mpirun.openmpi
i have change mpirun.openmpi to mpirun and check FreeCAD Modul FEM ElmerSolver_mpi run correct.
when i change mpirun.mpich -> mpirun the FEM Solution needs more time. I do not know why.
Thanks for the feedback. Can you please review #101 ?
in snap package mpirun.openmpi is a symlink to orterun*
/snap/freecad/current/usr/bin lrwxrwxrwx 1 root root 7 Apr 15 2020 mpirun.openmpi -> orterun*
i thing no need to use bind
using ElmerSolver_mpi
/snap/freecad/current/usr/Mod/Fem/femsolver/elmer/tasks.py
line 135: args.extend(["mpirun"])
file not found because in snap package for linux only two files exist with wrong filenames
/snap/freecad/current/usr/bin/mpirun.mpich /snap/freecad/current/usr/bin/mpirun.openmpi
solution would be rename or create a additional symlink
mpirun.openmpi => mpirun