windows10に 「Windows Subsystem for Linux」が用意された。
昔あった「Microsoft Windows Services for UNIX」の後継みたい。
「Windows Subsystem for Linux」がLinuxエミュレーターの如く仕事して、ubuntuディス鳥のアプリを動かしている。
現状はubuntuのみのようだが、rhel系も乗せられるのでは?とも思う。
さて、この「Windows Subsystem for Linux」で稼動する「ubuntu」であるが、インストールすると
「Bash on Ubuntu on Windows」の名称で「bash」が使える。
ubuntuディス鳥が下地なのでアプリのインストールには「apt-get」がそのまま使える。
Xなアプリは駄目みたい。別途windows10にXサーバを入れる必要がある
この「apt-get」でインストール可能なアプリに「TORQUE qsub」があるか調べてみた。
「Windows Subsystem for Linux」、「Bash on Ubuntu on Windows」の導入方法は他をご覧下さい
でもなんで、各ユーザ毎にbash環境というかUbuntu環境を構築するのか、、、共通でいいような気がするのだが、、
左下の「スタートメニュー」から「Bash on Ubuntu on Windows」を選択して、bashシェルを立ち上げます。

使っているバージョンは
root@WIN:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
root@WIN:~#14.04 LTSだから kernel 3.13.
最新にするには「apt update && apt upgrade」で
bashシェルから、apt-cache search torque」を叩く
root@WIN:~# apt-cache search torque
libtorque2 - shared library for Torque client and server
libtorque2-dev - header files for libtorque2
pbs-drmaa-dev - DRMAA for Torque/PBS Pro - devel
pbs-drmaa1 - DRMAA for Torque/PBS Pro - runtime
slurm-llnl-torque - Torque compatibility wrappers for SLURM
torque-client - command line interface to Torque server
torque-client-x11 - GUI for torque clients
torque-common - Torque Queueing System shared files
torque-mom - job execution engine for Torque batch system
torque-pam - PAM module for PBS MOM nodes
torque-scheduler - scheduler part of Torque
torque-server - PBS-derived batch processing server
ttf-aenigma - 465 free TrueType fonts by Brian Kent
units-filter - Parser for expressions concerning physical values
root@WIN:~#とtorqueは存在していた。
っで詳しく調べると「apt-cache show torque-client」
root@WIN:~# apt-cache show torque-client
Package: torque-client
Priority: optional
Section: universe/utils
Installed-Size: 880
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Morten Kjeldgaard <mok@bioxray.au.dk>
Architecture: amd64
Source: torque
Version: 2.4.16+dfsg-1.3ubuntu1
Depends: libc6 (>= 2.15), libreadline6 (>= 6.0), libtorque2 (>= 2.4.16+dfsg), perl, libcurses-perl, gawk, torque-common
Conflicts: gridengine-client, qterm
Filename: pool/universe/t/torque/torque-client_2.4.16+dfsg-1.3ubuntu1_amd64.deb
Size: 302292
MD5sum: 7ccadc45f511616b10dfa7bb102bec5c
SHA1: 97b14925e9fdbc227cab036fe7cefa94f4400dcd
SHA256: 42e9bbd8e72b9cb3e4df79fddde908d1ab4d64d0c2123e16f9a4e45a405e9115
Description-en: command line interface to Torque server
The TORQUE server dispatches jobs across physically separated
machines. It may also be beneficial for single machines to organise
the sequential execution of multiple jobs.
.
This package contains the command-line client programs. These should
be installed on all hosts that should be able to submit jobs,
query for their status or cancel their execution. The client
contacts the server directly.
Description-md5: bdfcf3b42675ab705e1a030683f97224
Homepage: http://www.clusterresources.com/pages/products/torque/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
root@WIN:~#とバージョンは 2.4.16 であった。
CentOS7で提供されているTorqeuは4.2.10系なので、それに合わせたい。そうなるとソースから作ることになる。
まずは 開発環境をインストールする
root@WIN:~# apt-get install build-essentialrhelで言うところの「yum groupinstall "Development Tools"」でしょうか
root@WIN:~# apt-get install libssl-dev libxml2-dev libmunge-dev
root@WIN:~# mkdir src && cd $_
root@WIN:~/src# gzip -cd torque-4.2.10.tar.gz | tar xf - && cd torque-4.2.10
root@WIN:~/src/torque-4.2.10# ./configure \
--disable-server --disable-mom --disable-gui \
--with-server-home=/var/lib/torque --without-tcl --without-tk --disable-unixsockets --enable-munge-auth
:
(中略)
Building components: server=no mom=no clients=yes
gui=no drmaa=no pam=no
PBS Machine type : linux
Remote copy : /usr/bin/scp -rpB
PBS home : /var/lib/torque
Default server : win
Unix Domain sockets : no
Linux cpusets : no
Tcl : disabled
Tk : disabled
Authentication : munge library (NEW)
Ready for 'make'.
root@win:~/src/torque-4.2.10# make && make install
root@win:~/src/torque-4.2.10# cp contrib/init.d/debian.trqauthd /etc/init.d/trqauthdtrqauthdを起動させる
root@WIN:~# apt-get install sysv-r-conf
root@win:~# sysv-rc-conf --list
acpid
apparmor S:on
apport
atd
console-setu
cron
cryptdisks
cryptdisks-e 0:on 6:on S:on
dbus
dns-clean 1:on 2:on 3:on 4:on 5:on
friendly-rec
halt 0:on
irqbalance
killprocs 1:on
kmod
landscape-cl 0:off 1:off 2:on 3:on 4:on 5:on 6:off
networking
ondemand 2:on 3:on 4:on 5:on
open-vm-tool 0:off 1:off 2:on 3:on 4:on 5:on 6:off
pppd-dns 1:on 2:on 3:on 4:on 5:on
procps
rc.local 2:on 3:on 4:on 5:on
reboot 6:on
resolvconf
rsync 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rsyslog
screen-clean 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sendsigs 0:on 6:on
single 1:on
ssh
sudo
trqauthd
udev
umountfs 0:on 6:on
umountroot 0:on 6:on
unattended-u 0:off 6:off
urandom 0:on 6:on S:on
root@win:~#
root@win:~# sysv-rc-conf trqauthd on
root@win:~# sysv-rc-conf --list trqauthd
trqauthd 2:on 3:on 4:on 5:on
root@win:~#
root@win:~#はて?bowのrunlevelは?
root@win:~# apt-get install munge
root@win:~# mkdir /etc/munge && chmod 700 /etc/munge
(torque管理サーバからmunge.keyファイルを取得して、/etc/mungeに配置する)
root@win:~# /etc/init.d/munge startqmgrにて通信テスト
root@win:~# qmgr
Max open servers: 9
Qmgr: p s
#
# Create queues and set their attributes.
#
#
# Create and define queue bio
#
create queue bio
set queue bio queue_type = Execution
set queue bio resources_default.nodes = 1
set queue bio enabled = True
set queue bio started = True
#
# Set server attributes.
#
set server acl_hosts = c.sybyl.local
set server log_events = 511
set server mail_from = adm
set server scheduler_iteration = 600
set server node_check_rate = 150
set server tcp_timeout = 300
set server job_stat_rate = 45
set server poll_jobs = True
set server mom_job_sync = True
set server next_job_number = 7
set server moab_array_compatible = True
set server nppcu = 1
Qmgr: q
root@win:~#と通信は出来た。っが実際にqueueを投げるには、、、nfsで共有とかuid/gidを揃えるとかが必要....
nfsは「windows insider program」に加入してbuild番号をあげないと利用できないみたい。
uid/gidについては、
cmd
> lxrun /setdefaultuser <user>でユーザを作って、/etc/passwd,/etc/groupを修正してuid/gidを変更するしか無いみたい....