potfit wiki

open source force-matching

User Tools

Site Tools


compiling:waf

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:waf [2018/09/09 12:20] danielcompiling:waf [2018/09/16 10:21] (current) – removed daniel
Line 1: Line 1:
-~~NOTOC~~ 
-====== Compiling potfit using waf ====== 
----- 
  
-//potfit// uses the [[https://waf.io/|waf]] build system. It is fast, easy to use and written in Python, which makes a Python runtime mandatory.  
- 
-===== Basics ===== 
- 
-The //potfit// source tree contains the waf binary in its root folder. It is used for all build related operations like configuration, building and cleanup. It provides an exhaustive help page when called with the --help argument: 
-<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 a building a binary with the requested options is possible and the build stage then invokes the compiler to create the binary. 
- 
-=== 1. Configuration === 
- 
-The configuration uses the ''configure'' command from waf: 
- 
-<code>./waf configure <additional arguments></code> 
- 
-A minimal configuration needs to specify at least the interaction (-i) and maybe the potential model (-m): 
- 
-<code>./waf configure -i pair -m apot</code> 
- 
-After the configuration stage is complete a summary of selected options will be shown: 
-<code> 
-potfit has been configured with the following options: 
-potential model      = apot 
-interaction          = pair 
-math library         = mkl 
-</code> 
- 
-=== 2. Build === 
- 
-The build process can be start with the ''build'' command from waf: 
- 
-<code>./waf build</code> 
- 
-Since ''build'' is the default command it can also be omitted for brevity. 
- 
-Once the build process is complete, there will be a line indicating the name of the created binary: 
- 
-<code> 
----> Successfully moved potfit_apot_pair_mkl to bin/ folder <--- 
-</code> 
- 
-===== Setting options ===== 
- 
-Special options when compiling //potfit// can be set using the ''--enable-'' command line options during the configure stage. All available options are listed in the ''--help'' page from waf. 
- 
-To enable support from stress, provide the ''--enable-stress'' option like this: 
- 
-<code>./waf configure -i pair -m apot --enable-stress</code> 
- 
-All enabled options will also be listed on the summary of the configuration stage: 
- 
-<code> 
-potfit has been configured with the following options: 
-potential model      = apot 
-interaction          = pair 
-math library         = mkl 
-options              = stress 
-</code> 
- 
-===== Advanced options ===== 
- 
-  * Setting MKL path 
-  * Setting compiler 
-  * Setting debug options 
- 
-===== Troubleshooting ===== 
- 
-??? 
- 
-===== Developer guide ===== 
- 
-How to edit wscript file, maybe create new subpage 
compiling/waf.1536488459.txt.gz · Last modified: 2018/09/09 12:20 by daniel