|
|
|
This instruction assumes that the Toolkit was already installed, and `$WSLDA` system variable is exported. If not follow instructions from [here](Installing the toolkit).
|
|
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
# Step 1: Creating your project folder
|
|
# Step 1: Creating your project folder
|
|
W-SLDA codes execute calculations in specifically prepared folders for this, called *project folders*. In order to create a new *project folder* you need to make copy of the template folder. For example to create new project for static calculations (of name `st-mycalcs`) execute command:
|
|
W-SLDA codes execute calculations in specifically prepared folders for this, called *project folders*. In order to create a new *project folder* you need to make a copy of the template folder. For example to create new project for static calculations (of name `st-mycalcs`) execute the command:
|
|
```bash
|
|
```bash
|
|
cp -r $WSLDA/st-project-template st-mycalcs
|
|
cp -r $WSLDA/st-project-template st-mycalcs
|
|
```
|
|
```
|
|
Folder with project initially contains following files:
|
|
Folder with the project initially contains following files:
|
|
1. [Makefile](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/Makefile) - user must modify this file to be compatible with target system (for more see *Step 2*).
|
|
1. [Makefile](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/Makefile)
|
|
2. [input.txt](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/input.txt) - template of input file for W-SLDA codes, must be modified by the user.
|
|
2. [input.txt](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/input.txt) - template of the input file for W-SLDA codes, must be modified by the user.
|
|
3. [predefines.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/predefines.h) - here you set compilation parameters of the code.
|
|
3. [predefines.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/predefines.h) - here you set compilation parameters of the code.
|
|
4. [problem-definition.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/problem-definition.h) - here you specify your physical problem you want to solve. This is the most important file from user's perspective.
|
|
4. [problem-definition.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/problem-definition.h) - here you specify the physical problem you want to solve. This is the most important file from the user's perspective.
|
|
5. [logger.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/logger.h) - here you customize what information should be printed to *wlog* file (text file).
|
|
5. [logger.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/logger.h) - here you customize what information should be printed to *wlog* file (text file).
|
|
|
|
|
|
# Step 2: Updating Makefile (if not provided by admin)
|
|
# Step 2: Setting up compilation predefines.
|
|
[Makefile](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/Makefile) must be edited in order to be compatible with your target system. You can use one of existing [templates for Makefiles](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/Makefiles-templates) in order to speed up this process. For example, if your target system is `Piz Daint` then you can simply copy appropriate file:
|
|
Before compilation, you need to edit [predefines.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/predefines.h) file and set correctly hpc-engine compilation parameters. Specifically, at this stage, you need to specify the size of the computational lattice.
|
|
```bash
|
|
|
|
cp ../Makefiles-templates/Makefile.st.daint ./Makefile
|
|
|
|
```
|
|
|
|
Note that typically you need to set correctly environment before compilation. If you use [templates for Makefiles](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/Makefiles-templates), in the header of Makefile you will find information about modules that needs to be loaded.
|
|
|
|
|
|
|
|
# Step 3: Setting up compilation predefines.
|
|
|
|
Before compilation you need to edit [predefines.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/predefines.h) file and set correctly hpc-engine compilation parameters. Specifically, at this stage you need to specify size of computational lattice.
|
|
|
|
|
|
|
|
# Step 4: Compiling initial version of the code
|
|
# Step 3: Compiling the initial version of the code
|
|
Execute
|
|
Execute
|
|
```bash
|
|
```bash
|
|
|
|
# optionally load before modules, e.g
|
|
|
|
# source env.sh
|
|
|
|
|
|
make
|
|
make
|
|
```
|
|
```
|
|
to compile W-SLDA codes. Note `make` command will compile all available versions of the code, see [here](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/wikis/Types-of-codes) for more info. In order to compile only selected version of the code use:
|
|
to compile W-SLDA codes. Note `make` command will compile all available versions of the code, see [here](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/wikis/Types-of-codes) for more info. In order to compile only a selected version of the code use:
|
|
```bash
|
|
```bash
|
|
make 3d # to create 3D version of the code only
|
|
make 3d # to create 3D version of the code only
|
|
make 2d # to create 2D version of the code only
|
|
make 2d # to create 2D version of the code only
|
... | @@ -35,15 +35,15 @@ In order to remove files generated by compilation command use: |
... | @@ -35,15 +35,15 @@ In order to remove files generated by compilation command use: |
|
```bash
|
|
```bash
|
|
make clean
|
|
make clean
|
|
```
|
|
```
|
|
# Step 5: Define your problem
|
|
# Step 4: Define your problem
|
|
You need to edit [problem-definition.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/problem-definition.h) in order to define your problem. Update also [logger.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/logger.h) file if you need to report more refined quantities than only basic statistics (particle number, energy, etc.).
|
|
You need to edit [problem-definition.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/problem-definition.h) in order to define your problem. Update also [logger.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/logger.h) file if you need to report more refined quantities than only basic statistics (particle number, energy, etc.).
|
|
**Remember** to recompile the code after each modification of [problem-definition.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/problem-definition.h), [logger.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/logger.h), and [predefines.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/predefines.h).
|
|
**Remember** to recompile the code after each modification of [problem-definition.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/problem-definition.h), [logger.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/logger.h), and [predefines.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/predefines.h).
|
|
|
|
|
|
# Step 6: Edit input file
|
|
# Step 5: Edit input file
|
|
Prepare [input.txt](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/input.txt) file for computation. Meaning of each tag is provided in comments.
|
|
Prepare [input.txt](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/input.txt) file for computation. The meaning of each tag is provided in the comments.
|
|
|
|
|
|
# Step 7: Execute code
|
|
# Step 6: Execute code
|
|
This step is strongly dependent on the target system. General structure of execution command is (example for `st-wslda-2d` code):
|
|
This step is strongly dependent on the target system. Most likely content of the submission script will be provided by the admin. General structure of execution command is (example for `st-wslda-2d` code):
|
|
```bash
|
|
```bash
|
|
mpiexec-command resource-definition ./st-wslda-2d input.txt
|
|
mpiexec-command resource-definition ./st-wslda-2d input.txt
|
|
```
|
|
```
|
... | | ... | |