optimad / mimmo

Surface manipulation and mesh morphing library
http://optimad.github.io/mimmo
GNU Lesser General Public License v3.0
99 stars 21 forks source link

Installing MiMMO and runnig examples #176

Closed MiladHB closed 3 years ago

MiladHB commented 3 years ago

Hi,

I'm beginner in C++ and I need to use Mimmo in part of my project so the question may seem very naive. I have installed Mimmo and bitpit in recommended path and I'm trying to run its examples. However when I use g++ as follow: g++ -I/usr/local/include/mimmo -I/usr/local/include/bitpit core_example_00001.cpp I got the following errors: In file included from /usr/local/include/mimmo/BaseManipulation.hpp:28:0, from /usr/local/include/mimmo/mimmo_core.hpp:37, from core_example_00001.cpp:26: /usr/local/include/mimmo/MimmoObject.hpp:189:49: error: ‘MIMMO_ENABLE_MPI’ was not declared in this scope MimmoObject(int type = 1, bool isParallel = MIMMO_ENABLE_MPI); ^~~~ /usr/local/include/mimmo/MimmoObject.hpp:189:49: note: suggested alternative: ‘MIMMO_EXPERT’ MimmoObject(int type = 1, bool isParallel = MIMMO_ENABLE_MPI); ^~~~ MIMMO_EXPERT /usr/local/include/mimmo/MimmoObject.hpp:190:102: error: ‘MIMMO_ENABLE_MPI’ was not declared in this scope 3E & vertex, livector2D connectivity = nullptr, bool isParallel = MIMMO_ENABLE_MPI); ^~~~ /usr/local/include/mimmo/MimmoObject.hpp:190:102: note: suggested alternative: ‘MIMMO_EXPERT’ 3E & vertex, livector2D connectivity = nullptr, bool isParallel = MIMMO_ENABLE_MPI); ^~~~ MIMMO_EXPERT /usr/local/include/mimmo/MimmoObject.hpp:393:47: error: ‘MIMMO_ENABLE_MPI’ was not declared in this scope void reset(int type, bool isParallel = MIMMO_ENABLE_MPI); ^~~~ /usr/local/include/mimmo/MimmoObject.hpp:393:47: note: suggested alternative: ‘MIMMO_EXPERT’ void reset(int type, bool isParallel = MIMMO_ENABLE_MPI); ^~~~ MIMMO_EXPERT In file included from /usr/local/include/mimmo/mimmo_iogeneric.hpp:41:0, from core_example_00001.cpp:27: /usr/local/include/mimmo/MimmoGeometry.hpp:214:59: error: ‘MIMMO_ENABLE_MPI’ was not declared in this scope void setParallelRestore(bool parallelRestore = MIMMO_ENABLE_MPI); ^~~~ /usr/local/include/mimmo/MimmoGeometry.hpp:214:59: note: suggested alternative: ‘MIMMO_EXPERT’ void setParallelRestore(bool parallelRestore = MIMMO_ENABLE_MPI); ^~~~

I will appreciate if you can guide me how I can use Mimmo libraries and run its examples.

Thanks, Milo

edoardolombardi commented 3 years ago

Hi Milo,

the examples of mimmo can be compiled directly during mimmo's building. If you set to ON the BUILD_EXAMPLES variable during ccmake configuration the examples sources in mimmo/examples are compiled (see INSTALL.md for details on other configuration variables). The compiled examples are available at mimmo/build/examples/ after the building. I hope it helps you.

MiladHB commented 3 years ago

Thanks for your response. When I'm trying to see the result of examples which is created based on installation as follows: /usr/local/doc/mimmo-1.4.0-devel/examples$ ./core_example_00001 I'm receiving the following errors: error while loading shared libraries: libpetsc.so.3.15: cannot open shared object file: No such file or directory However, I have installed Petsc and checked the installation. Also, the mimmo test is completely passed in my work station: 100% tests passed, 0 tests failed out of 37

Total Test time (real) = 38.58 sec

edoardolombardi commented 3 years ago

Hi Milo,

did you add the PETSC library path to LD_LIBRARY_PATH environment variable or did you load the PETSC module if you are using them? An ldd command run on the example executable can you show the missing links to the required shared libraries.

From mimmo side we didn't notice such as behaviour.

MiladHB commented 3 years ago

Hi Edoardo, Thanks again for your reply. As you recommended I fixed the missing library problem. Even though, it did not fix run problem of the bitpit and mimio examples: Screenshot from 2021-08-27 23-25-59 I will appreciate it if you can help me.

Thanks again, Milo

edoardolombardi commented 3 years ago

Hi Milo, sorry for the delay. If I well understood this new prolem is the same of the bitpit issue https://github.com/optimad/bitpit/issues/217. If the MPI problem of the first message is solved I'll close the issue and leave this bitpit-related issue to the proper repository.

MiladHB commented 3 years ago

Thanks for your response. I'll close it.