{"id":1047,"date":"2024-07-03T14:08:36","date_gmt":"2024-07-03T06:08:36","guid":{"rendered":"http:\/\/zkeeer.space\/?p=1047"},"modified":"2024-07-03T14:08:36","modified_gmt":"2024-07-03T06:08:36","slug":"sge-on-centos","status":"publish","type":"post","link":"http:\/\/zkeeer.space\/?p=1047","title":{"rendered":"SGE-On-CentOS"},"content":{"rendered":"<h1>SGE-On-CentOS<\/h1>\n<p>\u672c\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5\u5e76\u4f7f\u7528SGE\uff08Sun Grid Engine\uff09\u3002\u4f7f\u7528\u914d\u5408\u4f7f\u7528NFS\u7684SGE\u642d\u5efa\u8ba1\u7b97\u96c6\u7fa4\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4efb\u52a1\u591a\u673a\u5668\u5e76\u884c\u8fd0\u884c\u3002<\/p>\n<h2>\u4e00. \u5b89\u88c5<\/h2>\n<p>\u672c\u6b21\u5b89\u88c5<br \/>\nSGE\u5b89\u88c5\u5305\u4e0b\u8f7d\u5730\u5740\uff1a \u00a0https:\/\/arc.liv.ac.uk\/downloads\/SGE\/releases\/8.1.9\/sge-8.1.9.tar.gz<\/p>\n<h4>1. \u4e3b\u63a7\u8282\u70b9\u5b89\u88c5<\/h4>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u4fee\u6539hostname<\/p>\n<pre><code>hostnamectl set-hostname qmaster.local\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u4fee\u6539hosts\u6587\u4ef6\uff0c\u6dfb\u52a0\u4e3b\u63a7\u8282\u70b9\u548c\u4e24\u4e2a\u8ba1\u7b97\u8282\u70b9\u4fe1\u606f<\/p>\n<pre><code>vi \/etc\/hosts\r\n192.168.98.134 qmaster.local qmaster\r\n192.168.98.135 compute01.local compute01\r\n192.168.98.136 compute02.local compute02\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u521b\u5efa\u5171\u4eab\u76ee\u5f55<\/p>\n<pre><code>mkdir -p \/sge\/src\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5b89\u88c5epel\u6e90<\/p>\n<pre><code>yum -y install epel-release\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5b89\u88c5\u4f9d\u8d56\u5e93<\/p>\n<pre><code>yum -y install jemalloc-devel openssl-devel ncurses-devel pam-devel libXmu-devel hwloc-devel hwloc hwloc-libs java-devel javacc ant-junit ant libdb-devel motif-devel csh ksh xterm db4-utils perl-XML-Simple perl-Env xrog-x11-fonts-ISO8859-1-100dpi xrog-x11-fonts-ISO8859-1-75dpi\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u6dfb\u52a0sgeadmin\u7528\u6237\u7ec4\uff0c\u53casgeadmin\u7528\u6237<\/p>\n<pre><code>groupadd -g 490 sgeadmin\r\nuseradd -u 495 -g 490 -m -d \/home\/sgeadmin -s \/bin\/bash -c \"SGE Admin\" sgeadmin\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u4fee\u6539sudo\u6587\u4ef6\uff0c\u6dfb\u52a0\u4e00\u884c\u914d\u7f6e<\/p>\n<pre><code>visudo\r\n%sgeadmin ALL=(ALL) NOPASSWD: ALL\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u4e0b\u8f7d\u5e76\u7f16\u8bd1SGE\u3002\uff08\u5982\u679c\u60a8\u4e0b\u8f7d\u4e0d\u4e86SGE\u5b89\u88c5\u5305\uff0c\u8bf7\u5230\u672c\u5de5\u7a0b\/softwares\u76ee\u5f55\u4e0b\u83b7\u53d6\uff09<\/p>\n<pre><code>cd \/sge\/src\r\nwget https:\/\/arc.liv.ac.uk\/downloads\/SGE\/releases\/8.1.9\/sge-8.1.9.tar.gz\r\ntar -zxvf sge-8.1.9.tar.gz\r\ncd sge-8.1.9\/source\/\r\nsh scripts\/bootstrap.sh -no-java -no-jni -no-secure -no-herd -parallel 6\r\n.\/aimk -no-java -no-jni -no-secure -no-herd -parallel 6\r\n.\/aimk -man\r\nexport SGE_ROOT=\/sge\/sge819 &amp;&amp; mkdir $SGE_ROOT\r\necho Y | .\/scripts\/distinst -local -allall -bin -libs -noexit\r\nchown -R sgeadmin:sgeadmin \/sge\/sge819\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5b89\u88c5SGE qmaster\u8282\u70b9<\/p>\n<pre><code>cd $SGE_ROOT\r\n.\/install_qmaster\r\n<\/code><\/pre>\n<p>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u540c\u610f\u4e00\u4e9b\u9ed8\u8ba4\u914d\u7f6e\u3002<\/p>\n<blockquote style=\"line-height: 160%; margin: 15px 0; border-left: 4px solid #ddd; padding: 0 15px; color: #777;\"><p>press enter at the intro screen<br \/>\npress &#8220;y&#8221; and then specify sgeadmin as the user id<br \/>\nleave the install dir as \/sge\/sge819<br \/>\nYou will now be asked about port configuration for the master, normally you would choose the default (2) which uses the \/etc\/services file<br \/>\nAccept the sge_qmaster info<br \/>\nYou will now be asked about port configuration for the master, normally you would choose the default (2) which uses the \/etc\/services file<br \/>\nAccept the sge_execd info<br \/>\nLeave the cell name as &#8220;default&#8221;<br \/>\nEnter an appropriate cluster name when requested<br \/>\nLeave the spool dir as is<br \/>\nPress &#8220;n&#8221; for no windows hosts!<br \/>\nPress &#8220;y&#8221; (permissions are set correctly)<br \/>\nPress &#8220;y&#8221; for all hosts in one domain<br \/>\nIf you have Java available on your Qmaster and wish to use SGE Inspect or SDM then enable the JMX MBean server and provide the requested information &#8211; probably answer &#8220;n&#8221; at this point!<br \/>\nPress enter to accept the directory creation notification<br \/>\nE nter &#8220;classic&#8221; for classic spooling (berkeleydb may be more appropriate for large clusters)<br \/>\nPress enter to accept the next notice<br \/>\nEnter &#8220;20000-20100&#8221; as the GID range (increase this range if you have execution nodes capable of running more than 100 concurrent jobs)<br \/>\nAccept the default spool dir or specify a different folder (for example if you wish to use a shared or local folder outside of SGE_ROOT<br \/>\nEnter an email address that will be sent problem reports<br \/>\nPress &#8220;n&#8221; to refuse to change the parameters you have just configured<br \/>\nPress enter to accept the next notice<br \/>\nPress &#8220;y&#8221; to install the startup scripts<br \/>\nPress enter twice to confirm the following messages<br \/>\nPress &#8220;n&#8221; for a file with a list of hosts<br \/>\nEnter the names of your hosts who will be able to administer and submit jobs (enter alone to finish adding hosts)<br \/>\nSkip shadow hosts for now (press &#8220;n&#8221;)<br \/>\nChoose &#8220;1&#8221; for normal configuration and agree with &#8220;y&#8221;<br \/>\nPress enter to accept the next message and &#8220;n&#8221; to refuse to see the previous screen again and then finally enter to exit the installer<br \/>\n\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5b89\u88c5NFS\uff0c\u5c06\u4e3b\u63a7\u8282\u70b9\u76ee\u5f55\u5171\u4eab<\/p><\/blockquote>\n<pre><code>yum -y install nfs-utils\r\nvi \/etc\/exports\r\n\/sge 192.168.0.0\/16(rw,sync,no_root_squash)\r\nexportfs -ra\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c<\/p>\n<pre><code>systemctl start rpcbind nfs-server\r\nsystemctl enable rpcbind nfs-server\r\n# \u9632\u706b\u5899\u653e\u884cnfs\u670d\u52a1\r\nfirewall-cmd --add-service=nfs\r\nfirewall-cmd --add-service=mountd\r\nfirewall-cmd --add-service=rpc-bind\r\nfirewall-cmd --add-port=992\/udp --permanent\r\nfirewall-cmd --add-port=6444\/tcp --permanent\r\nfirewall-cmd --add-port=6445\/tcp --permanent\r\nsystemctl restart firewalld\r\n<\/code><\/pre>\n<p>\u81f3\u6b64qmaster\u4e3b\u63a7\u8282\u70b9\u5b89\u88c5\u914d\u7f6e\u5b8c\u6bd5\uff01<\/p>\n<h4>2. \u8ba1\u7b97\u8282\u70b9\u5b89\u88c5\uff08\u4ee5compute01\u4e3a\u4f8b\uff09<\/h4>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5b89\u88c5\u4f9d\u8d56\u5e93<\/p>\n<pre><code>yum -y install hwloc-devel\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u4fee\u6539hostname<\/p>\n<pre><code>hostnamectl set-hostname compute01.local\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u4fee\u6539hosts\u6587\u4ef6\uff0c\u6dfb\u52a0\u4e3b\u63a7\u8282\u70b9\u548c\u4e24\u4e2a\u8ba1\u7b97\u8282\u70b9\u4fe1\u606f<\/p>\n<pre><code>vi \/etc\/hosts\r\n192.168.98.134 qmaster.local qmaster\r\n192.168.98.135 compute01.local compute01\r\n192.168.98.136 compute02.local compute02\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u6dfb\u52a0sgeadmin\u7528\u6237\u7ec4\uff0c\u6dfb\u52a0sgeadmin\u7528\u6237<\/p>\n<pre><code>groupadd -g 490 sgeadmin\r\nuseradd -u 495 -g 490 -r -m -d \/home\/sgeadmin -s \/bin\/bash -c \"SGE Admin\" sgeadmin\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5b89\u88c5NFS\uff0c\u5e76\u542f\u52a8\u670d\u52a1<\/p>\n<pre><code>yum -y install nfs-utils\r\nsystemctl start rpcbind\r\nsystemctl enable rpcbind\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u521b\u5efa\u5171\u4eab\u76ee\u5f55\uff0c\u5c06\u4e3b\u63a7\u8282\u70b9\u76ee\u5f55\u5171\u4eab\u81f3\u8ba1\u7b97\u8282\u70b9<\/p>\n<pre><code>mkdir \/sge\r\nmount -t nfs 192.168.56.101:\/sge \/sge\r\n# \u5982\u679c\u6302\u8f7d\u8d85\u65f6\uff0c\u68c0\u67e5nfs server\u548cclient\u673a\u5668\u7684firewalld\u662f\u4e0d\u662f\u5728\u8fd0\u884c\r\nsystemctl status firewalld\r\n# \u5982\u679c\u9632\u706b\u5899\u5728\u8fd0\u884c\uff0c\u9700\u8981\u5728nfs server\u548cclient\u673a\u5668\u7684\u9632\u706b\u5899\u4e0a\u90fd\u653e\u884cnfs\u76f8\u5173\u670d\u52a1\r\nfirewall-cmd --add-service=nfs\r\nfirewall-cmd --add-service=mountd\r\nfirewall-cmd --add-service=rpc-bind\r\nsystemctl restart firewalld\r\nvi \/etc\/fstab\r\n192.168.98.134:\/sge \/sge nfs defaults 0 0\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5b89\u88c5\u8ba1\u7b97\u8282\u70b9<\/p>\n<pre><code>export SGE_ROOT=\/sge\/sge819\r\nexport SGE_CELL=default\r\ncd $SGE_ROOT\r\n.\/install_execd\r\ncp \/sge\/sge819\/default\/common\/settings.sh \/etc\/profile.d\/\r\n<\/code><\/pre>\n<h2>\u4e8c. \u6d4b\u8bd5<\/h2>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u5728qmaster\u6216\u4e24\u53f0compute01\u3001compute02\u5747\u53ef\u6267\u884cqhost\uff0c\u67e5\u770b\u96c6\u7fa4\u4e3b\u673a\u5217\u8868<\/p>\n<pre><code>qhost\r\nHOSTNAME \u00a0 \u00a0 \u00a0 \u00a0ARCH \u00a0 \u00a0 \u00a0 NCPU NSOC NCOR NTHR \u00a0LOAD \u00a0MEMOUT \u00a0MEMUSE \u00a0SWAPTO \u00a0 SWPUS\r\n------------------------------------------------------------------------------------\r\nglobal \u00a0 \u00a0 \u00a0 \u00a0 \u00a0- \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 - \u00a0 \u00a0- \u00a0 \u00a0- \u00a0 \u00a0- \u00a0 \u00a0 - \u00a0 \u00a0 \u00a0 - \u00a0 \u00a0 \u00a0 - \u00a0 \u00a0 \u00a0 - \u00a0 \u00a0 \u00a0 -\r\ncompute01 \u00a0 \u00a0 \u00a0 lx-amd64 \u00a0 \u00a0 32 \u00a0 \u00a02 \u00a0 16 \u00a0 32 \u00a02.07 \u00a0377.7G \u00a0 42.4G \u00a0 \u00a04.0G \u00a0 82.5M\r\ncompute02 \u00a0 \u00a0 \u00a0 lx-amd64 \u00a0 \u00a0 32 \u00a0 \u00a02 \u00a0 16 \u00a0 32 \u00a00.04 \u00a0377.7G \u00a0 \u00a02.8G \u00a0 \u00a04.0G \u00a0 77.2M\r\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u901a\u8fc7\u63d0\u4ea4\u4e00\u4e2a\u7b80\u5355\u7684\u4efb\u52a1\uff08job\uff09\uff0c\u6d4b\u8bd5SGE\u7684\u529f\u80fd\u3002<br \/>\n\u8fd9\u4e2a\u4efb\u52a1\u662f\u6253\u5370\u5f53\u524d\u6267\u884c\u53ca\u5176\u7684Linux\u5185\u6838\u7248\u672c\u53f7\u3002\u5728\u4efb\u610f\u4e00\u4e2a\u8ba1\u7b97\u8282\u70b9\uff08\u5982compute01\uff09\uff0c\u547d\u4ee4\u884c\u6267\u884c\uff0cvi\u7f16\u8f91\u4efb\u52a1\u6267\u884c\u811a\u672c<\/p>\n<pre><code>vi name.sge\r\n#!\/bin\/bash\r\nuname -a\r\n<\/code><\/pre>\n<p>\u547d\u4ee4\u884c\u6267\u884c\uff0c\u4f7f\u7528qsub\u63d0\u4ea4\u4efb\u52a1\u5e76\u6267\u884c<\/p>\n<pre><code>qsub uname.age\r\nYou job 1(\"uname.age\") has been submitted\r\n<\/code><\/pre>\n<p>\u6267\u884c\u5b8c\u6bd5\u540e\uff0c\u60a8\u53ef\u4ee5\u5728\u6267\u884c\u4efb\u52a1\u7684\u8def\u5f84\u4e0b\u770b\u5230\u4efb\u52a1\u8fd0\u884c\u5f97\u5230\u7684\u65e5\u5fd7\u8f93\u51fa\uff08\u5305\u62ec\u9519\u8bef\u65e5\u5fd7\uff09<\/p>\n<pre><code>ls\r\nuname.sge.e1 \u00a0uname.sge.o1\r\ncat uname.sge.o1\r\nLinux compute01.local 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 GUN\/Linux\r\n<\/code><\/pre>\n<h2>\u4e09. SGE\u64cd\u4f5c<\/h2>\n<p>\u90e8\u7f72\u5b8c\u6bd5SGE\u540e\uff0c\u4f1a\u751f\u6210\u4e00\u4e2a\u9ed8\u8ba4\u4e3b\u673a\u7528\u6237\u7ec4@allhosts\uff0c\u5b83\u5305\u542b\u6240\u6709\u7684\u6267\u884c\u8282\u70b9\uff1b\u751f\u6210\u4e00\u4e2a\u9ed8\u8ba4\u7684all.q\u961f\u5217\u540d\uff0c\u5b83\u5305\u542b\u6240\u6709\u8282\u70b9\u6240\u6709\u8ba1\u7b97\u8d44\u6e90\u3002\u9ed8\u8ba4\u7684\u961f\u5217\u5305\u542b\u7684\u8ba1\u7b97\u8d44\u6e90\u662f\u6700\u5927\u7684\u3002 \u901a\u8fc7\u4f7f\u7528\u547d\u4ee4qconf -mq queuename\u6765\u5bf9\u961f\u5217\u8fdb\u884c\u914d\u7f6e\u3002\u4fee\u6539hostlist\u6765\u914d\u7f6e\u8be5\u961f\u5217\u53ef\u4ee5\u4f7f\u7528\u6267\u884c\u4e3b\u673a\uff1b\u4fee\u6539slots\u6765\u914d\u7f6e\u5404\u53f0\u6267\u884c\u4e3b\u673a\u53ef\u4f7f\u7528\u7684\u7ebf\u7a0b\u6570\u3002\u4ece\u800c\u5bf9\u961f\u5217\u7684\u8ba1\u7b97\u8d44\u6e90\u8fdb\u884c\u8bbe\u7f6e\u3002<br \/>\n<strong style=\"line-height: 160%; font-weight: bold;\">\u4f7f\u7528qconf\u547d\u4ee4\u5bf9SGE\u8fdb\u884c\u914d\u7f6e\uff1a<\/strong><\/p>\n<pre><code>qconf -ae hostname \u00a0 \u00a0 \u6dfb\u52a0\u6267\u884c\u4e3b\u673a \u00a0\r\nqconf -de hostname \u00a0 \u00a0 \u5220\u9664\u6267\u884c\u4e3b\u673a \u00a0\r\nqconf -sel \u00a0 \u00a0 \u663e\u793a\u6267\u884c\u4e3b\u673a\u5217\u8868 \u00a0\r\nqconf -ah hostname \u00a0 \u00a0 \u6dfb\u52a0\u7ba1\u7406\u4e3b\u673a \u00a0\r\nqconf -dh hostname \u00a0 \u00a0 \u5220\u9664\u7ba1\u7406\u4e3b\u673a \u00a0\r\nqconf -sh \u00a0 \u00a0 \u663e\u793a\u7ba1\u7406\u4e3b\u673a\u5217\u8868 \u00a0\r\nqconf -as hostname \u00a0 \u00a0 \u6dfb\u52a0\u63d0\u4ea4\u4e3b\u673a \u00a0\r\nqconf -ds hostname \u00a0 \u00a0 \u5220\u9664\u63d0\u4ea4\u4e3b\u673a \u00a0\r\nqconf -ss \u00a0 \u00a0 \u663e\u793a\u63d0\u4ea4\u4e3b\u673a\u5217\u8868 \u00a0\r\nqconf -ahgrp groupname \u00a0 \u00a0 \u6dfb\u52a0\u4e3b\u673a\u7528\u6237\u7ec4 \u00a0\r\nqconf -mhgrp groupname \u00a0 \u00a0 \u4fee\u6539\u4e3b\u673a\u7528\u6237\u7ec4 \u00a0\r\nqconf -shgrp groupname \u00a0 \u00a0 \u663e\u793a\u4e3b\u673a\u7528\u6237\u7ec4\u6210\u5458 \u00a0\r\nqconf -shgrpl \u00a0 \u00a0 \u663e\u793a\u4e3b\u673a\u7528\u6237\u7ec4\u5217\u8868 \u00a0\r\nqconf -aq queuename \u00a0 \u00a0 \u6dfb\u52a0\u96c6\u7fa4\u961f\u5217 \u00a0\r\nqconf -dq queuename \u00a0 \u00a0 \u5220\u9664\u96c6\u7fa4\u961f\u5217 \u00a0\r\nqconf -mq queuename \u00a0 \u00a0 \u4fee\u6539\u96c6\u7fa4\u961f\u5217\u914d\u7f6e \u00a0\r\nqconf -sq queuename \u00a0 \u00a0 \u663e\u793a\u96c6\u7fa4\u961f\u5217\u914d\u7f6e \u00a0\r\nqconf -sql \u00a0 \u00a0 \u663e\u793a\u96c6\u7fa4\u961f\u5217\u5217\u8868 \u00a0\r\nqconf -ap PE_name \u00a0 \u00a0 \u6dfb\u52a0\u5e76\u884c\u5316\u73af\u5883 \u00a0\r\nqconf -mp PE_name \u00a0 \u00a0 \u4fee\u6539\u5e76\u884c\u5316\u73af\u5883 \u00a0\r\nqconf -dp PE_name \u00a0 \u00a0 \u5220\u9664\u5e76\u884c\u5316\u73af\u5883 \u00a0\r\nqconf -sp PE_name \u00a0 \u00a0 \u663e\u793a\u5e76\u884c\u5316\u73af\u5883 \u00a0\r\nqconf -spl \u00a0 \u00a0 \u663e\u793a\u5e76\u884c\u5316\u73af\u5883\u540d\u79f0\u5217\u8868 \u00a0\r\nqstat -f \u00a0 \u00a0 \u663e\u793a\u6267\u884c\u4e3b\u673a\u72b6\u6001 \u00a0\r\nqstat -u user \u00a0 \u00a0 \u67e5\u770b\u7528\u6237\u7684\u4f5c\u4e1a \u00a0\r\nqhost \u00a0 \u00a0 \u663e\u793a\u6267\u884c\u4e3b\u673a\u8d44\u6e90\u4fe1\u606f \u00a0\r\n<\/code><\/pre>\n<p><strong style=\"line-height: 160%; font-weight: bold;\">\u4f7f\u7528qsub\u63d0\u4ea4\u4f5c\u4e1a<\/strong><br \/>\nqsub\u7b80\u5355\u793a\u4f8b\uff1a<\/p>\n<pre><code>$ qsub -V -cwd -o stdout.txt -e stderr.txt run.sh\r\n<\/code><\/pre>\n<p>\u5176\u4e2drun.sh\u4e2d\u5305\u542b\u9700\u8981\u8fd0\u884c\u7684\u7a0b\u5e8f\uff0c\u5176\u5185\u5bb9\u793a\u4f8b\u4e3a\u5982\u4e0b\u4e09\u884c\uff1a<\/p>\n<pre><code>#!\/bin\/bash\r\n#$ -S \/bin\/bash\r\nperl -e 'print \"abc\\n\";print STDERR \"123\\n\";'\r\n<\/code><\/pre>\n<p>qsub\u7684\u5e38\u7528\u53c2\u6570\uff1a<br \/>\n-V<br \/>\n\u5c06\u5f53\u524dshell\u4e2d\u7684\u73af\u5883\u53d8\u91cf\u8f93\u51fa\u5230\u672c\u6b21\u63d0\u4ea4\u7684\u4efb\u52a1\u4e2d\u3002<br \/>\n-cwd<br \/>\n\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e0b\u8fd0\u884c\u7a0b\u5e8f\u3002\u9ed8\u8ba4\u8bbe\u7f6e\u4e0b\uff0c\u7a0b\u5e8f\u7684\u8fd0\u884c\u76ee\u5f55\u662f\u5f53\u524d\u7528\u6237\u5728\u5176\u8ba1\u7b97\u8282\u70b9\u7684\u5bb6\u76ee\u5f55\u3002<br \/>\n-o<br \/>\n\u5c06\u6807\u51c6\u8f93\u51fa\u6dfb\u52a0\u5230\u6307\u5b9a\u6587\u4ef6\u5c3e\u90e8\u3002\u9ed8\u8ba4\u8f93\u51fa\u6587\u4ef6\u540d\u662f$job_name.o$job_id\u3002<br \/>\n-e<br \/>\n\u5c06\u6807\u51c6\u9519\u8bef\u8f93\u51fa\u6dfb\u52a0\u5230\u6307\u5b9a\u6587\u4ef6\u5c3e\u90e8\u3002\u9ed8\u8ba4\u8f93\u51fa\u6587\u4ef6\u540d\u662f$job_name.e$job_id\u3002<br \/>\n-q<br \/>\n\u6307\u5b9a\u6295\u9012\u7684\u961f\u5217\uff0c\u82e5\u4e0d\u6307\u5b9a\uff0c\u5219\u4f1a\u5c1d\u8bd5\u5bfb\u627e\u6700\u5c0f\u8d1f\u8377\u4e14\u6709\u6743\u9650\u7684\u961f\u5217\u5f00\u59cb\u4efb\u52a1\u3002<br \/>\n-S<br \/>\n\u6307\u5b9a\u8fd0\u884crun.sh\u4e2d\u547d\u4ee4\u884c\u7684\u8f6f\u4ef6\uff0c\u9ed8\u8ba4\u662ftcsh\u3002\u63a8\u8350\u4f7f\u7528bash\uff0c\u8bbe\u7f6e\u8be5\u53c2\u6570\u7684\u503c\u4e3a \/bin\/bash \u5373\u53ef\uff0c\u6216\u8005\u5728run.sh\u6587\u4ef6\u9996\u90e8\u6dfb\u52a0\u4e00\u884c#$ -S \/bin\/bash\u3002\u82e5\u4e0d\u8bbe\u7f6e\u4e3abash\uff0c\u5219\u4f1a\u5728\u6807\u51c6\u8f93\u51fa\u4e2d\u7ed9\u51fa\u8b66\u544a\u4fe1\u606f\uff1aWarning: no access to tty (Bad file descriptor)\u3002<br \/>\n-hold_jid<br \/>\n\u540e\u63a5\u591a\u4e2a\u4f7f\u7528\u9017\u53f7\u5206\u9694\u7684job_id\uff0c\u8868\u793a\u53ea\u6709\u5728\u8fd9\u4e9bjob\u8fd0\u884c\u5b8c\u6bd5\u540e\uff0c\u624d\u5f00\u59cb\u8fd0\u884c\u6b64\u4efb\u52a1\u3002<br \/>\n-N<br \/>\n\u8bbe\u7f6e\u4efb\u52a1\u540d\u79f0\u3002\u9ed8\u8ba4\u7684job name\u4e3aqsub\u7684\u8f93\u5165\u6587\u4ef6\u540d\u3002<br \/>\n-p<br \/>\n\u8bbe\u7f6e\u4efb\u52a1\u4f18\u5148\u7ea7\u3002\u5176\u53c2\u6570\u503c\u8303\u56f4\u4e3a -1023 ~ 1024 \uff0c\u8be5\u503c\u8d8a\u9ad8\uff0c\u8d8a\u4f18\u5148\u8fd0\u884c\u3002\u4f46\u662f\u8be5\u53c2\u6570\u8bbe\u7f6e\u4e3a\u6b63\u6570\u9700\u8981\u8f83\u9ad8\u7684\u6743\u9650\uff0c\u7cfb\u7edf\u666e\u901a\u7528\u6237\u4e0d\u80fd\u8bbe\u7f6e\u4e3a\u6b63\u6570\u3002<br \/>\n-j y|n<br \/>\n\u8bbe\u7f6e\u662f\u5426\u5c06\u6807\u51c6\u8f93\u51fa\u548c\u6807\u51c6\u9519\u8bef\u8f93\u51fa\u6d41\u5408\u5e76\u5230 -o \u53c2\u6570\u7ed3\u679c\u4e2d\u3002<br \/>\n-pe<br \/>\n\u8bbe\u7f6e\u5e76\u884c\u5316\u73af\u5883\u3002<br \/>\n<strong style=\"line-height: 160%; font-weight: bold;\">\u4efb\u52a1\u63d0\u4ea4\u540e\u7684\u7ba1\u7406\uff1a<\/strong><br \/>\n$ qstat -f<br \/>\n\u67e5\u770b\u5f53\u524d\u7528\u6237\u5728\u5f53\u524d\u8282\u70b9\u63d0\u4ea4\u7684\u6240\u6709\u4efb\u52a1\uff0c\u4efb\u52a1\u7684\u72b6\u6001\u67094\u4e2d\u60c5\u51b5\uff1a<br \/>\n&#8211; qw\uff0c\u7b49\u5f85\u72b6\u6001\uff0c\u521a\u63d0\u4ea4\u4efb\u52a1\u7684\u65f6\u5019\u662f\u8be5\u72b6\u6001\uff0c\u4e00\u65e6\u6709\u8ba1\u7b97\u8d44\u6e90\u4e86\u4f1a\u9a6c\u4e0a\u8fd0\u884c\uff1b<br \/>\n&#8211; hqw\uff0c\u8be5\u4efb\u52a1\u4f9d\u8d56\u4e8e\u5176\u5b83\u6b63\u5728\u8fd0\u884c\u7684job\uff0c\u5f85\u524d\u9762\u7684job\u6267\u884c\u5b8c\u6bd5\u540e\u518d\u5f00\u59cb\u8fd0\u884c\uff0cqsub\u63d0\u4ea4\u4efb\u52a1\u7684\u65f6\u5019\u4f7f\u7528-hold_jid\u53c2\u6570\u5219\u4f1a\u662f\u8be5\u72b6\u6001\uff1b<br \/>\n&#8211; Eqw\uff0c\u6295\u9012\u4efb\u52a1\u51fa\u9519\uff1b<br \/>\n&#8211; r\uff0c\u4efb\u52a1\u6b63\u5728\u8fd0\u884c\uff1b<br \/>\n&#8211; s\uff0c\u88ab\u6682\u65f6\u6302\u8d77\uff0c\u5f80\u5f80\u662f\u7531\u4e8e\u4f18\u5148\u7ea7\u66f4\u9ad8\u7684\u4efb\u52a1\u62a2\u5360\u4e86\u8d44\u6e90\uff1b<br \/>\n&#8211; dr\uff0c\u8282\u70b9\u6302\u6389\u540e\uff0c\u5220\u9664\u4efb\u52a1\u5c31\u4f1a\u51fa\u73b0\u8fd9\u4e2a\u72b6\u6001\uff0c\u53ea\u6709\u8282\u70b9\u91cd\u542f\u540e\uff0c\u4efb\u52a1\u624d\u4f1a\u6d88\u5931\u3002<br \/>\n$ qstat -j jobID<br \/>\n\u6309\u7167\u4efb\u52a1id\u67e5\u770b<br \/>\n$ qstat -u user<br \/>\n\u6309\u7167\u7528\u6237\u67e5\u770b<br \/>\n$ qdel -j jobID<br \/>\n\u5220\u9664\u4efb\u52a1<br \/>\n<strong style=\"line-height: 160%; font-weight: bold;\">\u521b\u5efasge\u961f\u5217<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SGE-On-CentOS<br \/>\n\u672c\u6587\u6863\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5\u5e76\u4f7f\u7528SGE\uff08Sun Grid Engine\uff09\u3002\u4f7f\u7528\u914d\u5408\u4f7f\u7528NFS\u7684SGE\u642d\u5efa\u8ba1\u7b97\u96c6\u7fa4\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4efb\u52a1\u591a\u673a\u5668\u5e76\u884c\u8fd0\u884c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,77],"tags":[99,98],"_links":{"self":[{"href":"http:\/\/zkeeer.space\/index.php?rest_route=\/wp\/v2\/posts\/1047"}],"collection":[{"href":"http:\/\/zkeeer.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zkeeer.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zkeeer.space\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zkeeer.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1047"}],"version-history":[{"count":1,"href":"http:\/\/zkeeer.space\/index.php?rest_route=\/wp\/v2\/posts\/1047\/revisions"}],"predecessor-version":[{"id":1055,"href":"http:\/\/zkeeer.space\/index.php?rest_route=\/wp\/v2\/posts\/1047\/revisions\/1055"}],"wp:attachment":[{"href":"http:\/\/zkeeer.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zkeeer.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zkeeer.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}