Closed felipefr closed 2 years ago
Hi @felipefr,
Thanks for your interest for mgis
.
I just tried on Ubuntu 20.10 and it works nicely with the default compiler.
I am downloading 20.04 just to give it a try. I'll let you informed.
Best,
Thanks for the quick answer. Indeed 20.04 is my version. I will check here later. If works for you I will try a virgin version tomorrow.
Hi @felipefr,
I had no problem to install mgis
on a fresh Ubuntu 20.04.
You may want to give spack
a try as it shall be as simple as:
$ spack install mgis@master + python
$ spack load mgis@master
Otherwise, you may want to try the attached script:
tfel-plot
and tfel-editor
Once install, you can run:
$ source $PREFIX/codes/mgis/master/install/env.sh
Concerning spack, there is a small issue fixed by this PR: spack/spack#28502
Should I also install tfel with too? like: spack install tfel+python_bindings ?
In spack, I makde tfel
a dependency of the mgis
package. So it will be automatically installed.
spack load mgis@master
will automatically load tfel@master
.
@felipefr The PR was merged. So installation shall work smoothly now.
Thanks. Indeed now I managed to install with the standard script using cmake. I took me some time to discover how to link mgis with my anaconda environment. But now is working the example with fenics by Bleyer.
I will give a try to spack later.
In my experience, anaconda
is very good at providing a ready-to-use environment, but a poor build environment upon which one can compile things. In particular, anaconda
can be a pain for coupling fenics, mfront and MGIS ( mostly because of boost-python
).
To build mgis.fenics
(don't know if you considered this module developped by Jérémy or his previous tutorials), I mostly use:
spack
when I want complete control on the compiler and dependency.As 2) is much easier, you truly shall consider it.
Yes, I experienced problems with boost-python. I compiled tfel and mgis in the native python. I only used anaconda to use my working environment with fenics and all the stuff. To recognise the libraries, I've run source env.sh with the desired environement activate. Temporary solution though.
I shall consider moving to spack, surely a better platform, at least opensource. Thanks again.
Even the CMakeLists requiring C++17, I'm facing the compilation problem below. Has anyone had a similar problem? (Using Ubuntu 20 btw)
[ 1%] Building CXX object src/CMakeFiles/MFrontGenericInterface.dir/ThreadPool.cxx.o In file included from /home/felipe/local/codes/mgis/include/MGIS/ThreadPool.hxx:32, from /home/felipe/local/codes/mgis/src/ThreadPool.cxx:17: /home/felipe/local/codes/mgis/include/MGIS/ThreadedTaskResult.hxx:90:10: error: ‘optional’ in namespace ‘std’ does not name a template type 90 | std::optional result;
| ^ result;
| ^~~
In file included from /home/felipe/local/codes/mgis/include/MGIS/ThreadedTaskResult.hxx:125,
from /home/felipe/local/codes/mgis/include/MGIS/ThreadPool.hxx:32,
from /home/felipe/local/codes/mgis/src/ThreadPool.cxx:17:
/home/felipe/local/codes/mgis/include/MGIS/ThreadedTaskResult.ixx: In constructor ‘mgis::ThreadedTaskResult::ThreadedTaskResult(Args&& ...)’:
/home/felipe/local/codes/mgis/include/MGIS/ThreadedTaskResult.ixx:29:9: error: class ‘mgis::ThreadedTaskResult’ does not have any field named ‘result’
29 | : result(args...) {} // end of ThreadedTaskResult
| ^
~~~ /home/felipe/local/codes/mgis/include/MGIS/ThreadedTaskResult.hxx:90:5: note: ‘std::optional’ is only available from C++17 onwards 90 | std::optional~make[2]: [src/CMakeFiles/MFrontGenericInterface.dir/build.make:76: src/CMakeFiles/MFrontGenericInterface.dir/ThreadPool.cxx.o] Error 1 make[1]: [CMakeFiles/Makefile2:517: src/CMakeFiles/MFrontGenericInterface.dir/all] Error 2 make: *** [Makefile:141: all] Error 2