Crystals – building made easy

Crystals is fully open source since a few years but building from source was always a tedious task. After many years, improvements have been made.

The old Linux Makefiles and windows bat files have been replaced with cmake. The same cmake files are used on Linux, Windows and mac. Simple switches allows for different options (OpenMP, gui, debug…). Compilation is also much faster as the files can be build in parallel. Cmake will check that the compiler is suitable and all the dependencies are present.

The supported compiler at the moment is gcc, the GNU Compiler Collection for the 3 platforms. It is free and open source as well as all the dependencies required for crystals. It does not cost a single penny to get the source code of crystals, to study it, to modify it, to build it and to use it. It is perfect choice for understanding how refinement works. Although the old fortran 77 remains a strong limitation for understanding.

On Linux, dependencies are installed via your package manager. Once done, you can build crystals via:

$ cmake ../
$ make -jx

On windows, you need MSYS2. It includes a shell and a packet manager for getting extra software. Once setup, the build is as easy as on linux:

$ cmake ../
$ make -jx

The improvement, especially on windows, hopefully will attract more developers on the project. Alongside those improvements, doxygen is slowly introduced on new code for a better documentation.

Leave a Reply