Jump to content
Piyush4

Multithreading in HM2017

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...