Parallel computation Pyansys

Options
squaegeb
squaegeb Member Posts: 5
First Comment

Dear all,

I am trying to perform multiple independant static computation in PyAnsys.
So far i use 2 python "for loop" inside which I launch a static analysis.
Such procedure is quite long and not optimal (not parallel computation is done).
Is there a optimal solution?
So far I thought of launching the static procedure before the "for loop" of python. Do you know if it speeds up the process ?
Is using mapdl.run(*do) more efficient ?

Best regards,

Tagged:

Comments

  • Landon Mitchell Kanner
    Landon Mitchell Kanner Member, Employee Posts: 237
    First Answer First Comment 5 Likes First Anniversary
    Options

    Is this what you are looking for?:
    https://mapdl.docs.pyansys.com/version/0.68/api/_autosummary/ansys.mapdl.core.pool.MapdlPool.html

    If not, could you please give me details about what product(s) you are running and which PyAnsys module(s) you are using?

  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 308
    First Anniversary First Comment 5 Likes Ansys Employee
    Options

    I think you may also want asynchronous threading. You can google resources on the python threading module that can allow you to setup a thread and execute it asynchronously such that you can start an APDL solve but not lock up Python until it is done.
    This is general python info and not isolated to PyAnsys or MAPDL. It can be used for anything you want to run on concurrent asynchronous threads.