potfit wiki

open source force-matching

User Tools

Site Tools


compiling:main

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
compiling:main [2018/09/16 10:20] danielcompiling:main [2020/10/12 15:51] (current) – [Advanced options] print -- as --, not ndash pbro
Line 5: Line 5:
 //potfit// uses the [[https://waf.io/|waf]] build system, which is fast, easy to use and very flexible. It is written in Python and requires a Python runtime to be available on the system.  //potfit// uses the [[https://waf.io/|waf]] build system, which is fast, easy to use and very flexible. It is written in Python and requires a Python runtime to be available on the system. 
  
-The old [[compiling:make|Makefile-based build system]] is still available for compatibility reasons. It may not support all features and will be removed at some point.+The old [[compiling:make|Makefile-based build system]] is still available for compatibility reasons. It may not support all features and will be removed eventually.
  
 ===== Basics ===== ===== Basics =====
Line 12: Line 12:
 <code>./waf --help</code> <code>./waf --help</code>
  
-Building potfit is split up into two stages: first a configuration stage and then a build stage. The configuration stage checks if all requirements for building a binary with the requested options is possible and the build stage then invokes the compiler to create the binary.+Building //potfit// is split up into two stages: first a configuration stage and then a build stage. The configuration stage checks if all requirements for building a //potfit// binary with the requested options is possible and the build stage then invokes the compiler to create the binary.
  
 === 1. Configuration === === 1. Configuration ===
Line 20: Line 20:
 <code>./waf configure <additional arguments></code> <code>./waf configure <additional arguments></code>
  
-A minimal configuration needs to specify at least the interaction (-i) and maybe the potential model (-m):+A minimal configuration needs to specify at least the interaction (-i) and the potential model (-m):
  
 <code>./waf configure -i pair -m apot</code> <code>./waf configure -i pair -m apot</code>
Line 63: Line 63:
 options              = stress options              = stress
 </code> </code>
 +
 +Some examples for compiling //potfit// with the waf build system are shown [[compiling:examples|here]].
  
 ===== Advanced options ===== ===== Advanced options =====
Line 93: Line 95:
 Depending on the selected compiler the following debug options are available: Depending on the selected compiler the following debug options are available:
  
-  * ''--debug'' Adds debug information to the potfit binary for debugging potfit +  * ''%%--debug%%'' Adds debug information to the potfit binary for debugging potfit 
-  * ''--asan'' Enable the [[https://github.com/google/sanitizers/wiki/AddressSanitizer|address sanitizer]] +  * ''%%--asan%%'' Enable the [[https://github.com/google/sanitizers/wiki/AddressSanitizer|address sanitizer]] 
-  * ''--profile'' Add profiling information to the //potfit// binary+  * ''%%--profile%%'' Add profiling information to the //potfit// binary
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
compiling/main.1537086044.txt.gz · Last modified: 2018/09/16 10:20 by daniel