Cuda Mangement - multi-process, scheduled jobs, distributed processing
Project description
cudam
Cuda Mangement - multi-process, scheduled jobs, distributed processing
task manager
task template
#!/usr/bin/env bash
while getopts g: option;do
case "${option}" in
g) GPU_ID=${OPTARG};;
esac
done
print_help(){
printf "Parameter g(GPU ID) is mandatory\n"
printf "g values - GPU ID"
exit 1
}
if [ -z "${GPU_ID}" ];then
print_help
fi
echo "start task on GPU: $GPU_ID"
# the root directory of your python script
cd ~/code/psocnn/
# the main python script accepting the gpu ID in -g argument
python3 main.py -g ${GPU_ID}
task folder structure
task manager
# start task manager
nohup cudam_task_manager.py -n 2 -s 2 -i 60 -f 300 &
# snap gpu
cudam_snap_gpu.py -s 2 -l 60 -g 1
install cumdam for a specific user and can not add the local path into executable PATH
-
Switch to the root folder of your project
-
Install cudam package
pip install --user cudam
- Create a soft link of the executable file
ln -s /home/{YOURUSER}/.local/bin/cudam_task_manager.py cudam_task_manager.py
ln -s /home/{YOURUSER}/.local/bin/cudam_snap_gpu.py cudam_snap_gpu.py
- Run the task manager
# run interactively
python cudam_task_manager.py -n 2 -s 2 -i 60 -f 300
# run in background
nohup python cudam_task_manager.py -n 2 -s 2 -i 60 -f 300 &
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cudam-0.0.4.tar.gz
(7.5 kB
view details)
Built Distribution
cudam-0.0.4-py3-none-any.whl
(16.7 kB
view details)
File details
Details for the file cudam-0.0.4.tar.gz
.
File metadata
- Download URL: cudam-0.0.4.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d7f1ec3f74b98860b7c34e4eb76a5e4270a6cb33e029ef5da7f15fe7d042a0d6
|
|
MD5 |
a47f88d1d8c98a4c51eb32c5ba20fcc8
|
|
BLAKE2b-256 |
bb733f6af1e4062fcc4e716609c964b96bc03037380179d94107ac59eb385434
|
File details
Details for the file cudam-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: cudam-0.0.4-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d50680be5e3d3926e6339db707fabc1a6d5397e48f2256403b0ce5002d0245c8
|
|
MD5 |
e02344dccb3a4f85c19f9f3c08e950d3
|
|
BLAKE2b-256 |
ceeacc7eb569908683330d5d636b4bc7010c7a9281b8aa235c3e758f15d403cd
|