How to use the server to run programs

Due to the large depth study parameters, the amount of data, often need to run the program on the server. This article describes how to use terminal emulation software Mobaxter (other terminal software basically the same) connect to the server and run the code.

Connection to the server process using the Mobaxter see blog link below (in the blog also provides a common linux command).
Disclaimer: This article is the original article CSDN bloggers "Muzi Wei", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/qq_43774897/article/details/88878007

Next, run the program commonly used linux commands explained.
The first step:
LS : View the current file and directory folder
cd : switch the working directory (the first to switch to the working directory you want to run the code when you run the code, note that there is a space between cd and the directory use) in the following figure.

Step Two:
NVIDIA-SMI : See GPU usage, as shown below. Wherein the number of yellow circle portion GPU currently owned by the server, 0,1,2 front. . . The GPU number. The red circle is occupied by the GPU part is numbered. Yellow circle in the number minus the red circle in the number of idle GPU is now the number is that you can the GPU.
Here Insert Picture Description
Here Insert Picture Description
The third step:
CUDA_VISIBLE_DEVICES = : Specifies the GPU (be sure to specify the use of GPU servers, or else will occupy the whole GPU, influence others to use), enter the number after the equal sign, such as the image above all GPU numbered 0-7, are occupied by the GPU number is 0,1,2,3,6. So after the equals sign may be 4,5,7.
Run .py file : python space you want to run a file name
such as I want to run purge_ckpt.py file, enter the command as shown below
Here Insert Picture Description
to run .sh file : ./ filename
For example, I want to run run_segan + _train.sh file, enter the command as shown below
Here Insert Picture Description
the X-+ chmod : first run .sh file, often will complain that there is no authority, chmod + x command is used to .sh file permissions.
For example, I give run_segan + _train.sh permission, enter the command as shown below:
Here Insert Picture Description
then you can normally run .sh files.

Released two original articles · won praise 1 · views 66

Guess you like

Origin blog.csdn.net/weixin_43936357/article/details/105166522