PyCLiPSM: Harnessing heterogeneous computing resources on CPUs and GPUs for accelerated digital soil mapping. Find more detail about the code in this paper: https://onlinelibrary.wiley.com/doi/full/10.1111/tgis.12730 (an author's copy is included in this repository "2021 - TGIS - PyCLiPSM.pdf").
Zhang, G, Zhu, A‐X, Liu, J, Guo, S, Zhu, Y. PyCLiPSM: Harnessing heterogeneous computing resources on CPUs and GPUs for accelerated digital soil mapping. Transactions in GIS. 2021, 25(3): 1396-1418. https://doi.org/10.1111/tgis.12730
Linux/Windows/Mac
- Install GPU drivers. If you are using NVIDIA GPUs, OpenCL support is included in the driver (https://developer.nvidia.com/opencl). If you are using AMD GPU/CPU, install appropriate OpenCL drivers from AMD (This link provides helpful pointers microsoft/LightGBM#1342). If you are using Intel GPU/CPU, install appropriate OpenCL drivers from Intel (e.g., https://software.intel.com/en-us/articles/opencl-drivers).
- It's assumed that you already have Python (version 2.7) installed. Anaconda is recommended for installing Python https://www.anaconda.com/distribution/. Note: Although PyCLiPSM was written with Python 2.7 (which reached the "end of life" as of as of January 1st, 2020), it should be straightforward to upgrade the code to Python 3.x.
- Install Python GDAL (https://pypi.org/project/GDAL/).
- Once OpenCL drivers, Python and Python GDAL are properly installed, you can use pip to install the PyOpenCL package (https://pypi.org/project/pyopencl/).
- Run pyopencl_test.py to test if PyOpenCL is working properly: python pyopencl_test.py.
- Run pyopencl_test.py to see a list of available OpenCL computing platforms/devices on your computer: python pyopencl_test.py
- Change configurations in the OPENCL_CONFIG variable in utility/config.py accordingly, as well as the OPENCL_CONFIG variable in PyCLiPSM_main.py.
- Run PyCLiPSM_main.py to get a sense of how to use PyCLiPSM (using example data provided): python PyCLiPSM_main.py
- Prepare soil sample data and environmental covariate data following the example data in the "data" directory
- Change parameters (e.g., data directory, data file names, etc.) in PyCLiPSM_main.py or PyCLiPSM_tiled_main.py accordingly
- Run PyCLiPSM_main.py or PyCLiPSM_tiled_main.py: python PyCLiPSM_main.py or python PyCLiPSM_tiled_main.py
Copyright 2021 Guiming Zhang. Distributed under MIT license.