Closed jljs closed 6 years ago
The CPUS environment variable is only used by the pyq executable and the jupyter kernel calls q directly. In order to set the CPU affinity for the kernel process, you will have to replace "/opt/kx/3.4/l64/q" with a script that calls taskset.
Hi Abalkin,
Thank you for your reply. How would this change my installation? Could you please provide an example and a bit more detail on the installation instruction? Really appreciate this.
Thanks
Jeffrey
Please try to change "argv" in your kernel.json file to
"argv": [
"taskset", "-c", "0",
"/opt/kx/3.4/l64/q",
"pyq-kernel.p",
"1024",
"65535",
"{connection_file}"
],
You can change "0" above to the desired list of processors.
Questions
[x] Which operating system are you using (if Linux, please provide flavour of it, i.e RedHat, CentOS or Ubuntu), is it 32-bit, or 64-bit? Red Hat Enterprise Linux Server release 6.9 (Santiago)
[x] Which version of PyQ are you running? You can use
pyq --versions
orpip list | grep pyq
. PyQ 4.1.3[x] Which version of kdb+ are you using, is it 32-bit or 64-bit? KDB+ 3.4 (2016.10.10) l64
[x] If on 64-bit, is your
QLIC
set? Please provide outputenv | grep QLIC
on linux/macOS, orset|grep QLIC
on Windows. QLIC=/opt/kx/3.4[x] Did you use virtual environment to install PyQ? If not, why? Yes with Anaconda
[x] Where is your
QHOME
? Please provide outputenv | grep QHOME
on linux/macOS, orset|grep QHOME
on Windows. QHOME=/opt/kx/3.4[x] Do you use Conda? If so, what version? Yes. conda 3.14.1
Steps to reproduce the issue
1) install pyq 3 as a kernel in Jupyter 2) set environment variable CPUS=3 in jupyter kernel.json (i.e. /home/dev/.local/share/jupyter/kernels/pyq_3/kernel.json) See http://jupyter-client.readthedocs.io/en/stable/kernels.html for more detail
This is what I have set
Expected result
Confirm that the variable has been picked up by starting a new notebook in Jupyter with PyQ 3 kernel. The new notebook should start successfully with kernel ready
Actual result
kernel error with the following error message from Jupyter
Workaround
no workaround If you know workaround, please provide it here.