Loading...
  OR  Zero-K Name:    Password:   

OMP_WAIT_POLICY=ACTIVE

13 posts, 1222 views
Post comment
Filter:    Player:  
sort
9 years ago
Looks like ZKL forces OMP_WAIT_POLICY=ACTIVE.
How do I stop/override this and use what I prefer ?
+0 / -0
9 years ago
We (lamer) found it:
https://github.com/ZeroK-RTS/Zero-K-Infrastructure/blob/master/Shared/LobbyClient/Spring.cs#L347
Let's change this so it do not set it if it is already set.
+0 / -0
FIrankFFC
9 years ago
wat. explain
+0 / -0

9 years ago
It means that inactive threads of ZKLobby consume some processing power. I assume there's a legitimate reason for this - you don't set something like that unless it fixes something.
+0 / -0
9 years ago
I talked about it with Licho, looks like this have no effect on Windows but on Linux it makes spring 91.0 spin all cores. This will be corrected soon.
+1 / -0


9 years ago
You can use OMP_THREAD_LIMIT meanwhile.
+0 / -0
9 years ago
Possibility to avoid spinning has been commited, use environment variable OMP_WAIT_POLICY=PASSIVE.
It seems the latest ZKL do not contain this change yet though.
+0 / -0
9 years ago
Because update was not released yet SErankcleanrock
This is not so game breaking so I suppose we can all wait for it :)
+0 / -0
Yes, yes, 100% all(8) cores is no game breaking, just hardware frying.
And waiting is good: one can explore the outer environment.

Also i kinda don't understand how the fix should work. Should i run something like:
$ OMP_WAIT_POLICY=PASSIVE mono Zero-K.exe

Also there is third state "undefined", should it be taken under consideration?
OMP_WAIT_POLICY "Specifies whether waiting threads should be active or passive. If the value is PASSIVE, waiting threads should not consume CPU power while waiting; while the value is ACTIVE specifies that they should. If undefined, threads wait actively for a short time before waiting passively."

Also seems 99.0 engine doesn't use OMP, lets just wait for 99 switch... Or switch to Xonotic, who needs zk anyway?
+0 / -0


9 years ago
quote:
You can use OMP_THREAD_LIMIT meanwhile.
+0 / -0
quote:

quote:
You can use OMP_THREAD_LIMIT meanwhile.

Worksaround. Ehh, no outer environment then.

Edit. I should refrain from writing those speeches. Short version: "Works"
+0 / -0


9 years ago
quote:
Ehh, no outer environment then.

Unsure what you mean? Being unable to run ZKL with same environment as everything else until the fix is deployed?

For the reference, here's what my current zkl.sh looks like:
quote:
#!/bin/bash
export OPTIRUN="/usr/bin/primusrun"
export OMP_THREAD_LIMIT=2
cd /home/anarchid/Games/Zero-K/
mono Zero-K.exe > zkl.log
+0 / -0
9 years ago
Licho did the right thing and removed setting OMP_WAIT_POLICY=ACTIVE:
https://github.com/ZeroK-RTS/Zero-K-Infrastructure/commit/763067d
I think a new zkl release should be done with this fix asap.
+0 / -0