View previous topic :: View next topic |
Author |
Message |
dlaroche-ca
Joined: 03 Jul 2013 Posts: 32 Location: Montréal, Québec, Canada
|
Posted: Thu Oct 23, 2014 10:17 pm Post subject: multi-threading question |
|
|
Hello list members!
I have a fairly big Python application running on VMS that creates threads. The threads work fine, except that they're confined to only one CPU/core. A colleague of mine modified one of his applications written in C to make it multi-threaded, and he had to link with qualifier Quote: | /threads_enable=(MULTIPLE_KERNEL_THREADS,UPCALLS) |
Would you know how easy (or difficult) it would be to build the interpreter using this qualifier?
Thanks in advance. |
|
Back to top |
|
 |
jfp
Joined: 12 Jul 2004 Posts: 636
|
|
Back to top |
|
 |
dlaroche-ca
Joined: 03 Jul 2013 Posts: 32 Location: Montréal, Québec, Canada
|
Posted: Mon Mar 09, 2015 7:36 pm Post subject: |
|
|
I just tried the set image command and it is an improvement. I'm running a test script on an rx2800 i2 with one 4-core CPU; VMS version is 8.4. The script starts 8 threads, each computing logarithms in a tight loop. Each thread prints a status line once in a while and I can see that all threads are running.
What's surprising though is that I don't see all 4 cores being busy. Command monitor process/topcpu shows that the process doesn't go over 200%, and this is confirmed with command show system/full/multithread that shows only two cores being active, the other two being in hibernate state.
Would you see a reason why the python executable is not using all the cores?
Thanks! |
|
Back to top |
|
 |
dlaroche-ca
Joined: 03 Jul 2013 Posts: 32 Location: Montréal, Québec, Canada
|
Posted: Tue Mar 10, 2015 8:13 am Post subject: |
|
|
I found the answer to my last question after posting it. The VMS license installed on the server is for two units only.
But I have a more general question. Would you know if VMS system services are thread safe? For example I can imagine that issuing a QIO on the same mailbox from two different threads could be problematic, but would QIOs to different mailboxes be safe?
Thanks again. |
|
Back to top |
|
 |
EisW
Joined: 07 Dec 2016 Posts: 4
|
Posted: Thu Dec 08, 2016 2:20 pm Post subject: Reason for disabling /threads_enable=upcalls |
|
|
Thank you for the helpful information in this topic, this saved me a lot of time!
I would like to have more info about possible problems with the /threads_enable=upcalls flag on python.exe:
We require to use the link flag /threads_enable=upcalls. With help of this forum topic I found, that our python.exe does not have it. Setting the flag as suggestet with
Code: |
set image /flags=upcalls python_root:[vms.bin]python.exe
|
works fine (until now tested only on OpenVMS8.4, but we have 8.3 too, I will test it)
We use successfully c++ code (no python) with this flag enabled in production environment on OpenVMS 8.3 and 8.4 and had never problems...
My Question: Are there any further infos regarding these problems with python?
Best regards
Tino |
|
Back to top |
|
 |
jfp
Joined: 12 Jul 2004 Posts: 636
|
Posted: Wed Dec 14, 2016 8:33 am Post subject: |
|
|
Hello Tino,
Unfortunately I don't remember what was the problem.
But if enable upcall work for you that's a good new.
I know others sites which have also enable upcall without any known problem.
JF |
|
Back to top |
|
 |
|