Run a shape optimization

To run a shape optimization, you have to write a configurations file with the optimization (number of iterations, costs to use…)

The launcher script

Stellacode contain a python script called launcher in the root of Stellacode. It takes a config name as argument and run a simulation.

python launcher.py path_to_config_file

The script will save the following

  1. The config file given (under the name config.ini)

  2. A log file (log.txt)

  3. The intermediate results at the rate given in the config file (a new file each time)

  4. The final result (result)

Warning

the repository tmp/ has to be created before launching the script

Plot and compares the results

You can use the notebook show_simu.ipynb in the root folder of Stellacode to extract all the simulation folder generated by the execution of launcher.py. It provides plot examples and a latex array comparison.

Customize on your cluster

In order to ensure a reasonnable Parallelization, Stellacode uses Dask (only for the most costly part, it would be great to use it for everything). We refer to the Dask documentation for further details.

Warning

Several layers of parallelization takes place in Stellacode:
  • Dask will parallelize the Task graph generated (which increase for smaller chunks)

  • Numpy parallelize all linear algebra computations.

As a consequence, it is important to limit numpy cores usage (for a single thread). For example if numpy uses MKL, you can use the following line before importing numpy.

os.environ["MKL_NUM_THREADS"] = "4" # export MKL_NUM_THREADS=6