Search the Community
Showing results for tags 'threading'.
Found 4 results
python Updating / Recooking the UI while running a python loopHey Guys, I'm trying to update attributes with a python sop and seeing downstream results live. I'm using the executeInMainThreadWithResult() function that comes with hdefereval.py and I am able to print the values live in the python shell / console while maintaining an interactive viewport during runtime, but the attributes don't update until the script finished. Im running this code (HIP is also attached): node = hou.pwd() geo = node.geometry() import hou import hdefereval import threading import time points = geo.points() def houdini_command(): for i,point in enumerate(points): point.setAttribValue("move", float(n)) print("running") def updateUI(): hou.ui.triggerUpdate() def worker(): global n n = 0 while n < 5: hdefereval.executeInMainThreadWithResult(houdini_command) hdefereval.executeInMainThreadWithResult(updateUI) time.sleep(.5) print(n) n += 1 thread = threading.Thread(target=worker) thread.daemon = True thread.start() Is there a way to hack this together to be able to view the changes of each loop live without having to wait until the full script is processed? I also tried writing the attributes to a different node & piece of geometry but that didn't work because python sop only gets read access to geometry owned by other respective node. Any pointers would be much appreciated! Thanks in advance Best, j execInMain.hiplc
Dual Xeon Processors @2.2 GHZ vs core i7 4770HQ @2.2 GHZHello, I was recently testing a flip simulation on a workstation with dual xeon 2630 v4 processors 10 cores each clocked at 2.2 GHZ, to my astonishment my laptops quadcore 4770HQ @2.2GHZ delivered ,not the same, but better FLIP simulation times. Can anyone explain to me why this is. I heard someone tell me something about threading. Can someone give me some insight on which nodes are multithreaded. with the smoke solver its stranger when my division size is higher like 0.2 the quadcore processor absolutely destroys the dual xeon, flying past the simulation. but when I start reducing that division size the xeon processors start to catch up and eventually when I am at a final render division size the xeons are ahead of the quadcore. Also when I cache out a simulation and check task manager when the cache is somewhere in the middle of the simulation(presumably where the flip simulation has the most particles to solve), task manager shows the cpu hovering around 2-3 %.
larmannjan posted a topic in General Houdini Questions