First time here? Checkout the FAQ!
x
0 votes
by (250 points)
edited by

Hi all,

I am trying the Reentry Induction Example through PSD pacing protocol i.e. placing phase singularity in the center of the slab mesh. However when ever i try to run the example i get the following error.:-


Writing elements in text CARP format:                  [============] 00h:00m:00s FIN

Writing points in text CARP format:                    [============] 00h:00m:00s FIN

Writing fibers (1 direction) in text CARP format:      [============] 00h:00m:00s FIN

Done in 0.09293 sec

Traceback (most recent call last):

  File "/home/ovais/reentry_induction/./run.py", line 735, in <module>

    run()

  File "/usr/local/lib/python3.10/dist-packages/carputils/tools.py", line 542, in wrapped

    ret = run(args, job)

  File "/home/ovais/reentry_induction/./run.py", line 563, in run

    model.induceReentry.PSD(args, job, cmd, meshname, xyz, triangles, centre)

  File "/usr/local/lib/python3.10/dist-packages/carputils/model/induceReentry.py", line 1351, in PSD

    plane_info = planeInfo(coordinates, xyz, triangles)

  File "/usr/local/lib/python3.10/dist-packages/carputils/model/induceReentry.py", line 1040, in planeInfo

    distance,index_node = spatial.cKDTree(nodes).query(coordinate, n_jobs=-1)

  File "_ckdtree.pyx", line 783, in scipy.spatial._ckdtree.cKDTree.query

  File "_ckdtree.pyx", line 387, in scipy.spatial._ckdtree.get_num_workers

TypeError: Unexpected keyword argument {'n_jobs': -1}


The rest of the examples are working fine how ever i am getting this error when every i try running the example ( python run.py --np 2 --protocol PSD). 

Moreover is it possible to use the same phase singularity in another simulation which i may construct my self (using the same geometry).

I would be thankful for guidance.   

Best Regards,

Ovais 

1 Answer

0 votes
by (610 points)
selected by
 
Best answer

I have updated carputils. Please try to reinstall carputils (don't forget `git pull` in your local version of the repository) and try to run the script again.

Details:

The problem arises due to the deprecated argument `n_jobs` which removed since scipy v1.8.0. and is now renamed to `workers`. You probably run a more recent version of scipy (you can find out by running `pip list | grep scipy` in your terminal).

by (250 points)
Thanks Tomas ! Grateful for your kind and prompt reply
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], config: ["MMLorHTML.js"], jax: ["input/TeX"], processEscapes: true } }); MathJax.Hub.Config({ "HTML-CSS": { linebreaks: { automatic: true } } });
...