top of page

Installation

Instructions for using the schedGPU framework
Step 0. Requirements

 

The schedGPU software makes use of the BOOST library version 1.56.0.

Step 1. Create configuration file

Run the following commands:
   $ cd schedGPU/bin
   $ sudo ./schedGPU configure

Memory allocation policies:
   - "FIFO": First-In, First-Out (default)
   - "MMU": Maximum Memory Utilization
   - "PriorityFIFO": 
   - "PriorityMMU":
   
Default policy can be changed by editing field "NotificationPolicy" in the configuration file ("/etc/schedGPU/schedGPU.ini").

Step 2. Two options for using schedGPU:

- Option A: implicit memory management (no source modification required)
- Option B: explicit memory management (source modification required; more control on memory management)

Step 2.A. Implicit memory management (no source modification required)

Just preload schedGPU implicit library before running your program:

    $> LD_PRELOAD=/path/to/schedGPU/lib/libschedGPU_implicit.so ./your_program

Optionally set "SCHEDGPU_TIMEOUT_IN_SECONDS" and "SCHEDGPU_PRIORITY" with the desired values for schedGPUInit() function:

    $> SCHEDGPU_TIMEOUT_IN_SECONDS=60 SCHEDGPU_PRIORITY=99 LD_PRELOAD=/path/to/schedGPU/lib/libschedGPU_implicit.so ./your_program

New!

Step 2.B. Explicit memory management (source modification required)

Adapt your CUDA code as in the following snippet:

int main(int argc, char **argv) {
      // Call schedGPUInit() at the begining of your program
      schedGPUInit();

      int device = 0;
      size_t bytes = 1024;
      float *mem_device = 0;

      cudaSetDevice(device);
      // Call preCudaMalloc() before allocating GPU memory
      preCudaMalloc(device, bytes);

      cudaMalloc((void**)&mem_device, bytes);

      ...

      cudaFree(mem_device);
      // Call postCudaFree() after freeing GPU memory
      postCudaFree(device, bytes);

    }

Further information

For further information, please, refer to the API Reference or contact us.

© 2021 by Universitat Politècnica de València

bottom of page