Skip to content

Multi thread Python support for user functions #281

@dmcarmen

Description

@dmcarmen

Hi! I am trying to run the program in parallel using pylime. In the model I am preparing I read once at the beggining the data (velocity, density...) from a text file and then I interpolate the data looking for the nearest points. Looking for these points in all the list for each grid point takes a lot of time in comparison to normal running with equations.

One of the possible solutions I had in mind was running the program in parallel for it to be faster. As far as I understand, the only part that can be run in parallel is the iterations part, but not the part where the velocity, density, etc. values are calculated for each point. Am I right? If so, there would be any easy way to make this run in parallel? Also, I'd rather do it with pylime but I can try to do it on C. Does the same happen there?

Also, when running pylime with the -p nThreads option I get this warning: You cannot call a python velocity function when multi-threaded. I think this is the same problem as above, but I would like to know for sure what this warning exactly refers to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions