[f2py] - Multiple instance from a single so file
Cedric TAVE <[email protected]> Thu, 1 Dec 2011 14:03:09 +0100
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <OFB64429CC.D882D1CC-ONC1257959.0037191C-C1257959.0047B31D@notes.edfgdf.fr> |
Message en plusieurs parties au format MIME --===============6137579261417129483== Content-Type: multipart/alternative; boundary="=_alternative 0047B2B6C1257959_=" Message en plusieurs parties au format MIME --=_alternative 0047B2B6C1257959_= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Hello, first of all, I would like to thank you from the great work you have done=20 on f2py. It is of prime interest for me and the software I currently=20 developping. However, it has a limitative behavior that I can't solve or bypass. I hope=20 you could help me... I use f2py to build a python-API to a huge F90 scientific software. The tests I a am running now produce good results and I really want to=20 propose this API to my users. --------------------- Description --------------------- But for the needs of the end-users, I need to create multiple instances of=20 the program in the same python script (allowing sensitivity studies for=20 example). The expected behavior could be : >> import program as program1 # I know this can't be the final=20 solution, but I found it useful >> import program as program2 # to write it like that (--> to=20 improve understanding) >> program1.init( 10 ) >> program2.init( 1000 ) >> program1.run() >> program2.run() where program1 and program2 defines 2 different instances from the same=20 .so file. --------------------- Investigation --------------------- I found a thread on your mailing list (from 2003 !) which seems to deal=20 with this ( thread =3D " [f2py] multiple instances of same pyd file " ). But I understand from it that no good solution had been identified (I may=20 be wrong). I'm wondering if, 8 years after, some new developpement (on=20 f2py or Python itself) could help doing this. Thank you in advance if you can help me. I can give more information if=20 needed. Regards, C=E9dric TAVE. Ce message et toutes les pi=E8ces jointes (ci-apr=E8s le 'Message') sont = =E9tablis =E0 l'intention exclusive des destinataires et les informations q= ui y figurent sont strictement confidentielles. Toute utilisation de ce Mes= sage non conforme =E0 sa destination, toute diffusion ou toute publication = totale ou partielle, est interdite sauf autorisation expresse. Si vous n'=EAtes pas le destinataire de ce Message, il vous est interdit de= le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou pa= rtie. Si vous avez re=E7u ce Message par erreur, merci de le supprimer de v= otre syst=E8me, ainsi que toutes ses copies, et de n'en garder aucune trace= sur quelque support que ce soit. Nous vous remercions =E9galement d'en ave= rtir imm=E9diatement l'exp=E9diteur par retour du message. Il est impossible de garantir que les communications par messagerie =E9lect= ronique arrivent en temps utile, sont s=E9curis=E9es ou d=E9nu=E9es de tout= e erreur ou virus. ____________________________________________________ This message and any attachments (the 'Message') are intended solely for th= e addressees. The information contained in this Message is confidential. An= y use of information contained in this Message not in accord with its purpo= se, any dissemination or disclosure, either whole or partial, is prohibited= except formal approval. If you are not the addressee, you may not copy, forward, disclose or use an= y part of it. If you have received this message in error, please delete it = and all copies from your system and notify the sender immediately by return= message. E-mail communication cannot be guaranteed to be timely secure, error or vir= us-free. --=_alternative 0047B2B6C1257959_= Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="iso-8859-1" <font size=3D2 face=3D"sans-serif"><br> </font> <br><font size=3D2 face=3D"sans-serif">Hello,</font> <br> <br> <br><font size=3D2 face=3D"sans-serif">first of all, I would like to thank you from the great work you have done on f2py. It is of prime interest for me and the software I currently developping.</font> <br><font size=3D2 face=3D"sans-serif">However, it has a limitative behavior that I can't solve or bypass. I hope you could help me...</font> <br> <br><font size=3D2 face=3D"sans-serif">I use f2py to build a python-API to a huge F90 scientific software.</font> <br><font size=3D2 face=3D"sans-serif">The tests I a am running now produce good results and I really want to propose this API to my users.</font> <br> <br> <br><font size=3D2 face=3D"sans-serif">--------------------- Description --= -------------------</font> <br> <br><font size=3D2 face=3D"sans-serif">But for the needs of the end-users, I need to create multiple instances of the program in the same python script (allowing sensitivity studies for example).</font> <br> <br><font size=3D2 face=3D"sans-serif">The expected behavior could be :</fo= nt> <br> <br><font size=3D2 face=3D"sans-serif">>> import program as program1 # I know this can't be the final solution, but I found it useful</font> <br><font size=3D2 face=3D"sans-serif">>> import program as program2 # to write it like that (--> to improve understandi= ng)</font> <br> <br><font size=3D2 face=3D"sans-serif">>> program1.init( 10 )</font> <br><font size=3D2 face=3D"sans-serif">>> program2.init( 1000 )</font> <br> <br><font size=3D2 face=3D"sans-serif">>> program1.run()</font> <br><font size=3D2 face=3D"sans-serif">>> program2.run()</font> <br> <br><font size=3D2 face=3D"sans-serif">where program1 and program2 defines 2 different instances from the same .so file.</font> <br> <br> <br><font size=3D2 face=3D"sans-serif">--------------------- Investigation ---------------------</font> <br> <br><font size=3D2 face=3D"sans-serif">I found a thread on your mailing list (from 2003 !) which seems to deal with this ( thread =3D " [f2py] mult= iple instances of same pyd file " ).</font> <br><font size=3D2 face=3D"sans-serif">But I understand from it that no good solution had been identified (I may be wrong). I'm wondering if, 8 years after, some new developpement (on f2py or Python itself) could help doing this.</font> <br> <br> <br><font size=3D2 face=3D"sans-serif">Thank you in advance if you can help me. I can give more information if needed.</font> <br> <br><font size=3D2 face=3D"sans-serif">Regards,</font> <br> <br><font size=3D2 face=3D"sans-serif">C=E9dric TAVE.</font> <br><font size=3D2 face=3D"sans-serif"><br> </font><font face=3D"monospace"><br> <br> <br> Ce message et toutes les pi=E8ces jointes (ci-apr=E8s le 'Message') sont = =E9tablis =E0 l'intention exclusive des destinataires et les informations q= ui y figurent sont strictement confidentielles. Toute utilisation de ce Mes= sage non conforme =E0 sa destination, toute diffusion ou toute publication = totale ou partielle, est interdite sauf autorisation expresse.<br> <br> Si vous n'=EAtes pas le destinataire de ce Message, il vous est interdit de= le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou pa= rtie. Si vous avez re=E7u ce Message par erreur, merci de le supprimer de v= otre syst=E8me, ainsi que toutes ses copies, et de n'en garder aucune trace= sur quelque support que ce soit. Nous vous remercions =E9galement d'en ave= rtir imm=E9diatement l'exp=E9diteur par retour du message.<br> <br> Il est impossible de garantir que les communications par messagerie =E9lect= ronique arrivent en temps utile, sont s=E9curis=E9es ou d=E9nu=E9es de tout= e erreur ou virus.<br> ____________________________________________________<br> <br> This message and any attachments (the 'Message') are intended solely for th= e addressees. The information contained in this Message is confidential. An= y use of information contained in this Message not in accord with its purpo= se, any dissemination or disclosure, either whole or partial, is prohibited= except formal approval.<br> <br> If you are not the addressee, you may not copy, forward, disclose or use an= y part of it. If you have received this message in error, please delete it = and all copies from your system and notify the sender immediately by return= message.<br> <br> E-mail communication cannot be guaranteed to be timely secure, error or vir= us-free.</font> --=_alternative 0047B2B6C1257959_=-- --===============6137579261417129483== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ f2py-users mailing list f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] http://cens.ioc.ee/mailman/listinfo/f2py-users --===============6137579261417129483==--