This module is licensed under a
CC BY-NC-SA 4.0 License.
A module to calculate Q Factor with GPU, FastQSL
The idea is to do the most computational intensive work in GPU with compiled code (TraceBline.cu), and do the rest of the complex but not computational intensive work in Python.
A CPU version is also provided https://github.com/el2718/FastQSL.
- CUDA >= 11
- PyCuda
- cupy
module load for cluster computing (CUDA/11.7.0 Xvfb/1.20.13-GCCcore-11.2.0 GCCcore/11.3.0 xorg-macros/1.19.3-GCCcore-11.3.0 X11/20220504-GCCcore-11.3.0 LLVM/14.0.3-GCCcore-11.3.0 Mesa/22.0.3-GCCcore-11.3.0)
Buy a computer with Nvidia GPU
- Install GPU driver, https://www.nvidia.com/Download/index.aspx, for 'apt' based Linux, try
sudo ubuntu-drivers autoinstall
. - https://developer.nvidia.com/Cuda-downloads Download cuda v10.2! (don't install the newest)
- Install anaconda https://docs.anaconda.com/anaconda/install/windows/
- Install git
- Install c/c++ compiler, for Windows https://visualstudio.microsoft.com/visual-cpp-build-tools, for linux
sudo apt install gcc
Start a 'Anaconda Powershell prompt' (in Windows), a terminal (in Linux). Type command:
conda --version
You should get "conda x.x.x", which means conda is successfully installed.
Create a new env named 'fastqsl' and use 3.8.2 version of python:
conda create -n fastqsl python=3.9
conda activate fastqsl
after this you should be able to see a '(fastqsl)' in your command line.
conda install numpy matplotlib scipy jupyterlab tqdm
python -m pip install cupy-cuda117 ipython-autotime pyvista
git clone https://github.com/Pjer-zhang/FastQSL.git
In the env created last section, type command
cd FastQSL
python -m jupyterlab --port 9999
Normally it will pop up a browser automatically, if it didn't, you need to it manually by copy the url in the output of the command to a browser (Chrome recomended)
Enjoy.
@ARTICLE{2022ApJ...937...26Z,
author = {{Zhang}, PeiJin and {Chen}, Jun and {Liu}, Rui and {Wang}, ChuanBing},
title = "{FastQSL: A Fast Computation Method for Quasi-separatrix Layers}",
journal = {\apj},
keywords = {Solar magnetic fields, GPU computing, 1503, 1969},
year = 2022,
month = sep,
volume = {937},
number = {1},
eid = {26},
pages = {26},
doi = {10.3847/1538-4357/ac8d61},
adsurl = {https://ui.adsabs.harvard.edu/abs/2022ApJ...937...26Z},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}