Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • wslda wslda
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wtools
  • wsldawslda
  • Wiki
  • Setting up calculations

Setting up calculations · Changes

Page history
Update Setting up calculations authored Feb 19, 2026 by Gabriel Wlazłowski's avatar Gabriel Wlazłowski
Hide whitespace changes
Inline Side-by-side
Setting-up-calculations.md
View page @ baa3ddf9
This instruction assumes that the Toolkit was already installed, and `$WSLDA` system variable is exported. If not follow instructions from [here](Installing the toolkit). This instruction assumes that the Toolkit was already installed, and `$WSLDA` system variable is exported. If not, follow the instructions from [here](Installing-the-toolkit).
[[_TOC_]] [[_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 a copy of the template folder. For example to create new project for static calculations (of name `st-mycalcs`) execute the command: W-SLDA codes execute calculations in specifically prepared folders for this, called *project folders*. To create a new *project folder*, make a copy of the template folder. For example, to create a 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 the project initially contains following files: The folder with the project initially contains the following files:
1. [Makefile](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/Makefile) 1. [Makefile](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/Makefile) - instructions on how to compile the code.
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. 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 the physical problem you want to solve. This is the most important file from the 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).
6. [machine.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/machine.h) - here you define settings that are machine-dependent. 6. [machine.h](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/machine.h) - here you define settings that are machine-dependent.
7. [env.sh](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/blob/public/st-project-template/env.sh) - list of systems variables that need to be set before the compilation. (*optionally*) 7. [env.(https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/blob/public/st-project-template/env.sh) - list of commands that need to be executed before compilation or execution. Usually, it contains exports of system variables or loads appropriate modules. (*optionally*)
7. [README.md](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/blob/public/st-project-template/README.md) - further instructions to users that are provided by admin of a computing system. (*optionally*) 7. [README.md](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/blob/public/st-project-template/README.md) - further instructions to users that are provided by the admin of a computing system. (*optionally*)
# Step 2: Setting up compilation predefines. # Step 2: 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 the size of the computational lattice. 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 generic parameters of your simulation. Specifically, at this stage, you need to specify the size of the computational lattice.
# Step 3: Compiling the initial version of the code # Step 3: Compiling the initial version of the code
Execute Execute
...@@ -28,26 +28,26 @@ Execute ...@@ -28,26 +28,26 @@ Execute
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 a 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
make 1d # to create 1D version of the code only make 1d # to create 1D version of the code only
``` ```
In order to remove files generated by compilation command use: In order to remove files generated by the compilation command, use:
```bash ```bash
make clean make clean
``` ```
# Step 4: 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. In particular, in this file, you define the external potential. Update also [logger.h (https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/logger.h) file if you want to customize the output format, and add new observables that are not included in the default form of the logger.
**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 5: 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. The meaning of each tag is provided in the comments. Prepare [input.txt](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/st-project-template/input.txt) file for your computation. The meaning of each tag is provided in the comments.
# Step 6: Execute code # Step 6: Execute 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): 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
``` ```
See folder [templates](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/templates) for examples of submission scrips. See folder [templates](https://gitlab.fizyka.pw.edu.pl/wtools/wslda/-/tree/public/templates) for examples of submission scripts.
Clone repository

Content of Documentation
Official webpage
W-BSK Toolkit