Multithreading in HM2017
Hi,
I am trying to implement Multi-threading in HM 2017 using TCL to compute faster results.
Is it possible with HM2017 after adding Thread package to its tcl.
Thanks in Advance, for help.
Regards
Piyush
Answers
-
which results do you want to calculate?
it is possible to create threads but i don't think they can access hm database
creating threads is simple, but dividing jobs may be tough
0 -
Are you speaking about Solver?
For Hypermesh (Pre-Post) I don't think you can do something about this: either works, either does not work, that's all.
0 -
Dear @tinh and @Q.Nguyen-Dai,
1. I need to import a model and then extract its geometry in threads. Like I need to extract Faces , Edges & Elements in parallel threads to save time.
2. I also wan't to display a GUI, which goes into 'not responding' loop while long calculations. So I want to display this GUI using one more parallel thread.
(P.S. : Not able to Display GUI in threads using HM. Whenever I source my GUI file, it does not display any GUI, but in Main Thread, its working fine.)
Is it possible with Hypermesh 2017 ?
Thanks for help.
Regards
Piyush
0 -
what do you mean by 'extract face, edge, elem' ?
could you give an example?
0 -
Dear @tinh
1. Import Geometry file in Hypermesh
2. This Step is Divided into 3 steps (using Multithreading)
2.1 eval *createmark elems 1 all; set 3d_elems [hm_getmark elems 1];
2.2 eval *createmark elems 1 all; *findfaces elems 1; eval *createmark elems 2 'by collector name' '^faces'; set 2d_elems [hm_getmark elems 1];
2.3 eval *createmark elems 1 $all ; *findedges elems 1 0; eval *createmark elems 1 'by collector name' '^edges'; set tempp [hm_getmark elems 1];
I need to complete this 2nd step using 3 child threads parallel.
This is just an example, via which I need to do computations simultaneously.
And I also wan't to display a GUI, which gets 'not responding forever' while long computation again & again.
I wan't the GUI to be active in this condition.
Best Regards
Piyush
0 -
It is impossible,
as I said, i am not sure how child threads can access hm database
they just load an tcl interp to perform calculations, i think so.
if you find a way to do that please tell me.
0 -
Good luck to Piyush /emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' />
0 -
Dear @tinh
I have tried hm_database access using threads, I am not able to access.
Then, Child Thread can display a GUI, which keeps updating even with Long Calculations in Hypermesh ?
I am not able to display GUI (eg. A button widget) using Child Thread in Hypermesh.
Is this also possible ?
Best Regards
Piyush
0 -
forget MT in hm, it just mess up your codes.
simply use update command to keep gui updating
0