[f2py] fortran and python threads
Mark Andrews <[email protected]> Wed, 1 Dec 2010 02:48:00 +0000
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all (I'm new to posting to the list, but have been subscribed for a while), Is it possible to run a f2py wrapped fortran subroutine alongside a regular old python thread and for them to access the same variables? I don't really know much about threading in python, but I've heard about some issues with an interpreter lock. In my porblem, I have a fortran gibbs sampler. I would like a python thread to regularly read its "state" (read the values of some arrays) as it runs and write it to a database. Does that sound like something easy or painful? More generally, I often use openmp inside fortran code, but never have wrapped these with f2py. I know it is possible, but is there is some hidden issues that make this difficult. thanks, mark