VMEC to spdata Conversion

1. Introduction

This document outlines the steps to convert VMEC data to spdata using the STELLOPT repository for Debian-based machines like Ubuntu etc.

To download STELLOPT on other machines, visit the following link: click here.

2. Steps to install STELLOPT

  1. Download the STELLOPT repository from GitHub: click here to visit the repository.
  2. Extract the zip file: After downloading, extract the contents of the zip file into a directory of your choice.
  3. STELLOPT Compilation on Debian:
    • Verify that your version of Debian is up to date.
    • Use apt-get to install the necessary packages. Required packages:
    sudo apt-get install git sudo apt-get install gcc sudo apt-get install gfortran sudo apt-get install openmpi-bin sudo apt-get install libopenmpi-dev sudo apt-get install libopenblas-dev sudo apt-get install libscalapack-openmpi-dev sudo apt-get install libnetcdf-dev sudo apt-get install libnetcdff-dev sudo apt-get install libhdf5-openmpi-dev sudo apt-get install hdf5-tools sudo apt-get install python3 pip
    • Set the environment variable STELLOPT_PATH: Set the STELLOPT_PATH environment variable to the path of the repository. Follow the steps below to set the environment variable:

      Find the path to your repository. For example: /home/yourusername/stellopt

      Run the following commands in your terminal (after replacing the path with your own):

      echo 'export STELLOPT_PATH=/home/yourusername/stellopt' >> ~/.bashrc source ~/.bashrc
    • Set the MACHINE variable: Some clusters or devices may require the MACHINE variable to be set. To do this, run the following commands:
      echo 'export MACHINE="debian"' >> ~/.bashrc source ~/.bashrc
  4. Build the code: Issue the following command to build all the codes:
    ./build_all

3. Steps to Convert VMEC Input Data to spata

  • Follow the website instructions: For converting VMEC input data to spdata only after installing STELLOPT packages, visit the PTG website: click here.
  • Note: You will need Don's script mentioned in step 8 on the above website. Please contact your supervisor to obtain this script.

Troubleshooting: If Don's script provided by your supervisor gives an error, follow the steps below to install the Silo development library:

sudo apt-get install libsilo-dev

If the above doesn't work (i.e., running Don's script still gives an error), install Silo manually from the website. Download the latest .tar.gz source package (e.g., silo-4.11.tar.gz). Once downloaded, run the following commands in the terminal:

tar -xzf silo-4.11.tar.gz cd silo-4.11 ./configure --prefix=/opt/silo --enable-fortran make -j$(nproc) sudo make install