Changes
Page history
Update faq
authored
May 27, 2025
by
Rémy Mozul
Hide whitespace changes
Inline
Side-by-side
faq.markdown
View page @
a68f46af
# Frequently Asked Question #
# Frequently Asked Question #
## <a name=general_questions> General questions </a> ##
## <a name=general_questions> General questions </a> ##
###### What is the license of this software ? ######
###### What is the license of this software ? ######
This software is distributed under the
[
Free Software CECILL License
](
)
This software is distributed under the
[
Free Software CECILL License
](
)
###### On which OS does it work ? ######
###### On which OS does it work ? ######
Currently it works on UNIX OS (Linux, Solaris, MacOSX, etc).
Currently it works on UNIX OS (Linux, Solaris, MacOSX, etc).
Concerning Windows, a pre-compiled version is available for a specific version of Anaconda Python Distribution.
Concerning Windows, a pre-compiled version is available for a specific version of Anaconda Python Distribution.
Check the
[
prerequisites
](
https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/prerequisites
)
section
Check the
[
prerequisites
](
https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/prerequisites
)
section
of the wiki.
of the wiki.
###### What is needed to install ? ######
###### What is needed to install ? ######
Check the
[
prerequisites
](
https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/prerequisites
)
section
Check the
[
prerequisites
](
https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/prerequisites
)
section
of the wiki.
of the wiki.
###### I get the message "ImportError: No module named pylmgc90" when running an example, what is wrong ? ######
###### I get the message "ImportError: No module named pylmgc90" when running an example, what is wrong ? ######
Python did not find the module with lmgc90. If the path to your build directory is
*my_build_path*
,
Python did not find the module with lmgc90. If the path to your build directory is
*my_build_path*
,
then make sure your
```PYTHONPATH```
environment variable is correctly set with:
then make sure your
```PYTHONPATH```
environment variable is correctly set with:
```
shell
```
shell
export
PYTHONPATH
=
my_build_path
export
PYTHONPATH
=
my_build_path
```
```
or that you add the path inside your command script with the two lines:
or that you add the path inside your command script with the two lines:
```
python
```
python
import
sys
import
sys
sys
.
path
.
append
(
"
my_build_path
"
)
sys
.
path
.
append
(
"
my_build_path
"
)
```
```
###### How to use multi-threaded version ? ####
###### How to use multi-threaded version ? ####
First the code must be re-compiled (unavailable on Windows).
First the code must be re-compiled (unavailable on Windows).
Go to your build directory (if you followed the instruction of the wiki it should be
*lmgc90_user/build*
), then type the
Go to your build directory (if you followed the instruction of the wiki it should be
*lmgc90_user/build*
), then type the
following command in your terminal:
following command in your terminal:
```
shell
```
shell
cmake
.
-DWITH_OPENMP
=
True
cmake
.
-DWITH_OPENMP
=
True
```
```
Finally before running a computation, you must set two environment variables which are:
Finally before running a computation, you must set two environment variables which are:
```
shell
```
shell
export
OMP_SCHEDULE
=
STATIC
export
OMP_SCHEDULE
=
STATIC
export
OMP_NUM_THREADS
=
n
export
OMP_NUM_THREADS
=
n
export
OPENBLAS_NUM_THREADS
=
1
export
OPENBLAS_NUM_THREADS
=
1
```
```
where
**n**
is the number of threads you want to use (usually no more than the number of core available).
where
**n**
is the number of threads you want to use (usually no more than the number of core available).
Additional informations in: examples/Ateliers/Performance/directions/index.html
Additional informations in: examples/Ateliers/Performance/directions/index.html
## <a name=compile_error> Known compilation errors </a> ##
## <a name=compile_error> Known compilation errors </a> ##
##### An error arise at the very beginning when running `cmake` command ####
##### An error arise at the very beginning when running `cmake` command ####
*
if the error message is something like:
*
if the error message is something like:
```
Text
```
Text
CMake generation for this library is not allowed within the source
CMake generation for this library is not allowed within the source
directory!
directory!
Remove the CMakeCache.txt file and try again from another folder, e.g.:
Remove the CMakeCache.txt file and try again from another folder, e.g.:
rm -r CMakeCache.txt CMakeFiles
rm -r CMakeCache.txt CMakeFiles
cd <somewhere (preferably a local place on your computer and not a network folder)>
cd <somewhere (preferably a local place on your computer and not a network folder)>
cmake <source directory of LMGC90>
cmake <source directory of LMGC90>
If you really need an in source build, then run : cmake
If you really need an in source build, then run : cmake
-DIN_SOURCE_BUILD=ON
-DIN_SOURCE_BUILD=ON
Call Stack (most recent call first):
Call Stack (most recent call first):
CMakeLists.txt:21 (include)
CMakeLists.txt:21 (include)
-- Configuring incomplete, errors occurred!
-- Configuring incomplete, errors occurred!
```
```
Then it means you issued the
`cmake`
command within the base of your source
Then it means you issued the
`cmake`
command within the base of your source
directory. In this case, following the recommendation of the error message
directory. In this case, following the recommendation of the error message
you have to remove, in the source directory the
`CMakeCache.txt`
file and
you have to remove, in the source directory the
`CMakeCache.txt`
file and
the
`CMakeFiles`
directory. Then you can go back to step where you change of
the
`CMakeFiles`
directory. Then you can go back to step where you change of
directory (
`cd build`
) before continuing the installation process.
directory (
`cd build`
) before continuing the installation process.
##### An error arise when building the `matlib` on Mac OS Yosemite ####
##### An error arise when building on Mac OS ####
*
if the error is something like:
On MacOS, at the time of writing (May 27th 2025) there may be an error during the
`make`
step:
```
```
shell
from /Users/mozul/WORK/LMGC90/sources/lmgc90_dev/src/contribs/clipper2-1.4.0/CPP/Clipper2Lib/src/clipper.engine.cpp:10:
/usr/include/dispatch/object.h:143:15: error: expected
')'
before
'^'
token
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/arm/_structs.h:627:35: error: expected primary-expression before 'unsigned'
/usr/include/dispatch/object.h:362:3: error:
'dispatch_block_t'
has not been declared
627 | } __attribute__((aligned(_Alignof(unsigned int))));
dispatch_block_t notification_block
)
;
| ^~~~~~~~
^
```
make[5]:
***
[
CMakeFiles/matlib.dir/src/math/eigmat.cpp.o] Error 1
make[4]:
***
[
CMakeFiles/matlib.dir/all] Error 2
In this case, following these instructions https://fluka-forum.web.cern.ch/t/geoviewer-compilation-error-on-macbook-pro-m4-macos-15-4/7246, you must:
make[3]:
***
[
all] Error 2
*
Check that you are using the Command Line Tools (CLT) 16.3
make[2]:
***
[
src/contribs/matlib-prefix/src/matlib-stamp/matlib-build] Error 2
*
`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables`
make[1]:
***
[
src/contribs/CMakeFiles/matlib.dir/all] Error 2
*
Uninstall Xcode if installed
make:
***
[
all] Error 2
*
Remove the command line tools:
```
*
`sudo rm -rf /Library/Developer/CommandLineTools`
*
Download and install CLT 16.2 from
[
Apple Developer website
](
https://developer.apple.com/download/all/
)
Then you can:
*
Clean your build directory and start over...
*
shut down the MatLib if you do not need it:
```
shell
|
[
back
](
./Documentation
)
|
[
home
](
./Home
)
|
cmake
.
-DMATLIB_VERSION
=
none
make
```
*
or modifiy the file
*src/contribs/MatLib4-LMGC-2015-1/src/math/lapack.h*
so that it looks like this:
```
#ifndef ZORGLIB_MATH_LAPACK_H
#define ZORGLIB_MATH_LAPACK_H
#ifndef __has_extension
#define __has_extension(x) 0
#endif
#define vImage_Utilities_h
#define vImage_CVUtilities_h
// config
#include <matlib_macros.h>
```
Then run
`make`
again.
****
|
[
back
](
./Documentation
)
|
[
home
](
./Home
)
|
|:---------------------|---------------:|
|:---------------------|---------------:|
\ No newline at end of file