|
|
|
This page explains how to build the examples on your personal laptop or on the CECI supercomputers (nic5).
|
|
|
|
This page explains how to build the examples on your personal laptop or on the [CECI](https://www.ceci-hpc.be/) supercomputers (e.g. [nic5](https://www.ceci-hpc.be/clusters.html#nic5) at ULiège).
|
|
|
|
|
|
|
|
As prerequisite, you must have verified that [git](Git), [a C++ compiler](C++ Compiler) and [CMake](CMake) are correctly installed on your system. Using [VS Code](Visual-Studio-Code) is recommended by not mandatory.
|
|
|
|
|
| ... | ... | @@ -8,8 +8,9 @@ As prerequisite, you must have verified that [git](Git), [a C++ compiler](C++ Co |
|
|
|
git clone git@gitlab.uliege.be:rboman/math0471.git
|
|
|
|
```
|
|
|
|
* Open VS Code and load the `math0471` folder.
|
|
|
|
* In the terminal of VS Code, go to the `lib` folder and install gmsh-sdk and Eigen using the scripts `get_gmsh.cmd` and `get_eigen.cmd` (this should be done only once per working copy of the repository):
|
|
|
|
* In the terminal of VS Code, go to the `lib` folder and install "gmsh-sdk" and "Eigen" using the scripts `get_gmsh.cmd` and `get_eigen.cmd` (this should be done only once per working copy of the repository):
|
|
|
|
```
|
|
|
|
cd math0471
|
|
|
|
cd lib
|
|
|
|
get_gmsh.cmd
|
|
|
|
get_eigen.cmd
|
| ... | ... | @@ -45,6 +46,10 @@ make -j 4 |
|
|
|
code1_loadgeo.exe ..\rectangle.geo
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## CECI clusters / Linux / macOS
|
|
|
|
|
|
|
|
* Clone the repository:
|
| ... | ... | @@ -87,6 +92,26 @@ make -j 4 |
|
|
|
```
|
|
|
|
./code1_loadgeo ../rectangle.geo
|
|
|
|
```
|
|
|
|
# "Debug" mode vs "Release" mode
|
|
|
|
|
|
|
|
The code is built in "*debug mode*" by default. It means that the compiler makes no optimisations at all. It also enables many runtime checks and makes debugging possible by embedding all the debug symbols (the name of your variables and functions) into the executable.
|
|
|
|
|
|
|
|
In debug mode, assertions (`assert()` command) are also enabled so that you can perform many verifications of the input and output of your functions while you code.
|
|
|
|
|
|
|
|
You should keep working in this mode as long as you implement your numerical method.
|
|
|
|
|
|
|
|
As soon as you want to run a large simulation, you should build your code in "*release mode*", which produces the fastest executable. In this mode, all the assertions are ignored and your code is optimised by the compiler. This is achieved by configuring your code with the following cmake command:
|
|
|
|
```
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
```
|
|
|
|
instead of
|
|
|
|
```
|
|
|
|
cmake ..
|
|
|
|
```
|
|
|
|
which is equivalent to
|
|
|
|
```
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
|
|
|
```
|
|
|
|
|
|
|
|
# Note about the environment scripts
|
|
|
|
|
| ... | ... | @@ -99,4 +124,5 @@ Instead of using these scripts which should be loaded each time you start a new |
|
|
|
|
|
|
|
This is done by going to "Settings" on Windows, and typing "env" in the search bar. Then choose the appropriate menu ("modify environment variables").
|
|
|
|
|
|
|
|
On Linux/macOS, you can add/modify environment variables by editing `~/.bashrc` (just copy & paste the contents of `envs/linux-macos.sh`). |
|
|
|
On Linux/macOS, you can add/modify environment variables by editing `~/.bashrc` or `~/.profile` (just copy & paste the contents of `envs/linux-macos.sh` at the end of the file).
|
|
|
|
|