Giter VIP home page Giter VIP logo

xtb-win-build's Introduction

GitHub All Releases

xtb-win-build

Aims to provide precompiled Windows binaries for xTB, xtb4stda and stda softwares developed by Grimme group. The zip files provided are completely self sufficient i.e. there is no need to install anything else. The built executables are found in the release section.

Compilation method:

The softwares are natively compiled with Intel C/C++ and Intel Fortran v2021.4 compilers. You also need meson for building xTB4sTDA and sTDA softwares. CMake is also required, it is provided by the Visual Studio or Visual Studio build tools, when they are installed.

Method to build xTB

First download or clone xtb repository: git clone https://github.com/grimme-lab/xtb.git. Then go into the xtb directory, find the subprojects directory, go into it and download or clone the mctc-lib and test-drive projects (in case you don't have access to git on the compiler command line). So essentially, you need to run git clone https://github.com/grimme-lab/mctc-lib and git clone https://github.com/fortran-lang/test-drive from git bash or maybe from Cygwin. OR, download from github webpage and extract the archive. Then return to the root xtb directory (i.e. where your source files are.)

  1. Only CMake compile with NMake generator works, nothing else works so far
  2. (optional) The compiler flags are set in xtb/cmake/CMakeLists.txt. You can modify the flags for static/dynamic compile or for various SIMD vectorization options. Leaving it unmodified will also work, but the default flags are for Linux only so they are not recognized, and ignored by ifort. If compiler flags are unmodified, dynamic linking with Fortran and C/C++ RTL occurs
  3. (optional) For static linking, change from line 56 of xtb/cmake/CMakeLists.txt like this (also follow step 6 or compilation will fail):
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
  set(dialect "-QaxAVX,CORE-AVX2 -4R8 -traceback -MT")
  set(bounds "-check:bounds")
endif()
  1. Run :
set FC=ifort
set CC=icl
cmake -S. -B./build_intel -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DBLA_STATIC=ON
  1. (optional) For static linking find xtb/build_intel/CMakeCache.txt and replace all instances of /MD with /MT
  2. (optional) For high performance build, also find and change /O2 to /O3 as following in the same CMakeCache.txt file:
//Flags used by the Fortran compiler during RELEASE builds.
CMAKE_Fortran_FLAGS_RELEASE:STRING=/O3 /DNDEBUG
  1. Then run cd build_intel, and finally nmake

The full build (including test modules) will not finish, but the xTB compilation will finish. This means the xtb.exe will be available. Simply copy that to the directory you want, and also copy the parameter files, which have the name param at the beginning. The above is a very hacky way of compiling, but unfortunately this is the best I can write for now.

One issue with the xTB binary is that it writes greek letters (UTF-8) which can not be displayed by the Windows console unless its code page is changed. I have made an experimental fix in the source code which solves this problem, but it has only been tested in Windows 10 and might show unusual behaviour in Windows XP, 7 or 8. The modified source code can be found in https://github.com/shoubhikraj/xtb. The experimental executables are also available in the release section.

Method to build xtb4stda

At present, the modified source code for Windows build of xtb4stda can be found at https://github.com/shoubhikraj/xtb4stda-win. Download or clone the repo and then from the source code folder, run:

meson setup build_intel --buildtype release -Dstatic
ninja -C build_intel

The xtb4stda executable should be compiled successfully.

Method to build stda

At present, the modified source code for Windows build of stda can be found at https://github.com/shoubhikraj/stda-win. Download and clone, and run:

meson setup build_intel --buildtype release
ninja -C build_intel

This should build the stda executable.

xtb-win-build's People

Contributors

shoubhikraj avatar

Stargazers

Geoff Hutchison avatar Sebastian Ehlert avatar

Watchers

 avatar Sebastian Ehlert avatar

xtb-win-build's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.