spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
118 stars 52 forks source link

CMake: default build mode and compiler flags for optimisation #440

Closed GPMueller closed 6 years ago

GPMueller commented 6 years ago

If no mode is specified, it should default to release mode.

The core library should probably have it's own compiler flags and adequately use optimisation flags (note: also add nvcc flags)! Their absence might well be contributing to #385.

It appears that the optimization flags can make a significant difference in startup time of the code, as well as for example setting spin configurations - it seems this may be responsible for or contributing to #144.

GPMueller commented 6 years ago

Fixed the placement of the default build type with dd01b55cb1c0e2af488f2199c70e3a4a6f8307fb. This fixes the regular compiler flags, as well as the nvcc flags.

This also significantly improves the situation of #144.