This routine describes how to setup your system in order to compile LIGGGHTS(R)-PUBLIC for Windows.
All mentioned programs are available for free.
LIGGGHTS(R)-PUBLIC is a highly parallelized simulation engine. If you want to run simulations in parallel you have to install MPI (Message Passing Interface standard). We suggest to use the implementation of Microsoft, which is available here. You need the binaries and the header files (included in the SDK). Please follow the instructions of the installer.
GIT is an open-source version control system. We provide LIGGGHTS(R)-PUBLIC via github. It is to your advantage to use any git program to keep your LIGGGHTS(R)-PUBLIC version up-to-date. We recommend to use git-scm as it provides a minimum bash environment too.
You can set up your GIT environment to use the SSH-Keys thus you don't have to enter your user and password multiple times. Check the GIT GUI documentation for more details.
Important: Git-scm will ask during installation how it should handle newlines; please use "Checkout as-is, commit Unix-style line endings".
A python script updates the VS-project, thus you have to install either python or cygwin. In case of cygwin you can use another GIT program, because cygwin provides also a bash environment. The description of the procedure assumes that you have installed cygwin.
To compile LIGGGHTS(R)-PUBLIC you need a development environment. You can download Microsoft Visual Studio Express (current version: Express 2013 with Update 4 for Windows Desktop) for free from www.visualstudio.com. Therefore, you have to create an Microsoft account.
A detailed description how to compile LIGGGHTS(R)-PUBLIC with VTK support will follow here.
Basically the following steps have to be performed:
In this tutorial we use the suggested git-scm. You can use either the Git GUI or the Git Bash. In case of a bash you can follow the instructions in the documentation githubAccess_non-public. Otherwise copy the link to your repository, for instance https://github.com/CFDEMproject/LIGGGHTS-COMPANY.git, into the Git GUI and save the repository at your computer, e.g. C:/repositories/LIGGGHTS-COMPANY.
In the directory LIGGGHTS-COMPANY/src/WINDOWS you find an README, which describes the following steps in detail.
Start cygwin and change your current directory to the src-directory inside of your repository, for instance
cd /cygdrive/c/repositories/LIGGGHTS-COMPANY/src
Update the header files by
sh Make.sh styles sh Make.sh models
You can check the files by
ls style_*
which should output a list of style file headers.
In order to update the Visual Studio project in die WINDOWS directory run following commands (still in cygwin):
cd WINDOWS python update_project.py LIGGGHTS.vcxproj
Finally to compile your LIGGGHTS(R)-PUBLIC version open the file LIGGGHTS_VS2013.sln with Visual Studio.
To compile with MPI:
To compile without MPI:
You have now generated the executable LIGGGHTS.exe in the sub-directory LIGGGHTS-COMPANY\src\WINDOWS\Release. You can add this directory to your PATH environment variable to shorten the call command.
You can start a LIGGGHTS(R)-PUBLIC simulation inside of cygwin or a command prompt (search for cmd.exe). Assuming you use your cygwin, change to one example in your repository.
cd /cygdrive/c/repositories/LIGGGHTS-COMPANY/examples/LIGGGHTS/Tutorials_public/chute_wear
and start the simulation by
/cygdrive/c/repositories/LIGGGHTS-COMPANY/src/WINDOWS/Release/LIGGGHTS.exe -in in.chute_wear
If you added the Release-folder to your PATH variable the command shortens to
LIGGGHTS.exe -in in.chute_wear
If any questions remain, contact us.