[f2py] Problem in calling MPI subroutine
Razibul Islam <tamal105-/[email protected]> Mon, 11 Feb 2013 04:45:56 -0800 (PST)
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
--===============6897228278285918444==
Content-Type: multipart/alternative; boundary="-2114765872-609411721-1360586756=:24059"
---2114765872-609411721-1360586756=:24059
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hello, =0A=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 Hope everyone is doing fine. I am =
trying to use a MPI fortran code to call it from python.=A0 First I have co=
nverted MPI code using f2py and then tried to use that one to call from pyt=
hon.=A0 Konsole output is also added below. =0A=0AI am using openSUSE 12.2 =
and installed openMPI 1.5.4-4.1.4 from the software management in opensuse.=
Any help or suggestions in this regard would be very helpful.=0A=0ABR=0ARa=
zibul =0A=0A------------------------ MPI------------------------ subroutine=
simple() include 'mpif.h' integer numtasks, ranks, ierr, rc call MPI_INIT(=
ierr) if (ierr .ne. MPI_SUCCESS) then print *, 'Error starting MPI program.=
Terminating.' call MPI_ABORT(MPI_COMM_WORLD, rc, ierr) end if call MPI_COM=
M_RANK(MPI_COMM_WORLD, rank, ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD, numta=
sks, ierr) print *, 'Number of tasks =3D ', numtasks, ' My Rank =3D', rank =
call MPI_FINALIZE(ierr) end subroutine=0A------------------------ END of MP=
I ------------------------ ------------------------ F2PY Command ----------=
--------------=0Af2py --fcompiler=3Dgnu95 --f77exec=3Dmpif90 -m simplesub -=
c simple.f90=0A-I/usr/lib/mpi/gcc/openmpi/include -L/usr/lib/mpi/gcc/openmp=
i/lib=0A-lmpi_f77 ------------------------ Python Code --------------------=
----=0A#File Name : ptest.py=0A#!/usr/bin/env python=0A#-*- cpding: utf-8 -=
*-=0Aimport simplesub=0Aprint dir(simplesub)=0Asimplesub.simple()=0A-------=
----------------- End of Python Code ------------------------ -------------=
----------- Error Text in Console ------------------------ tamal@linux-p7k6=
:~/Dropbox/Thesis/2012/20130210/simple> mpiexec -n 4=0Apython ptest.py=0Ata=
mal@linux-p7k6:~/Dropbox/Thesis/2012/20130207> mpiexec -n 2 python=0Apartes=
t.py=0Apython: symbol lookup error:=0A/usr/lib/mpi/gcc/openmpi/lib/openmpi/=
mca_paffinity_hwloc.so: undefined=0Asymbol: mca_base_param_reg_int=0Apython=
: symbol lookup error:=0A/usr/lib/mpi/gcc/openmpi/lib/openmpi/mca_paffinity=
_hwloc.so: undefined=0Asymbol: mca_base_param_reg_int=0A-------------------=
-------------------------------------------------------=0Ampiexec noticed t=
hat the job aborted, but has no info as to the process=0Athat caused that s=
ituation.=0A---------------------------------------------------------------=
-----------
---2114765872-609411721-1360586756=:24059
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"color:#000; background-color:#fff; font-family:ti=
mes new roman, new york, times, serif;font-size:10pt"><div><span><span><spa=
n style=3D"font-size: 16px;"><span>Hello, <br></span></span></span></span><=
/div><div style=3D"color: rgb(0, 0, 0); font-size: 13.3333px; background-co=
lor: transparent; font-style: normal;"><span style=3D"font-size: 16px;"><sp=
an> Hope everyone is =
doing fine. I am trying to use a MPI fortran code to call it from python.&n=
bsp; First I have converted MPI code using f2py and then tried to use that =
one to call from python. Konsole output is also added below. </span><=
/span><br></div><pre><span style=3D"font-family: times new roman,new york,t=
imes,serif;"><span><span style=3D"font-size: 16px;">I am using openSUSE 12.=
2 and installed openMPI 1.5.4-4.1.4 from the software management in opensus=
e. Any help or suggestions in this regard would be very
helpful.<br><br>BR<br>Razibul</span> </span></span><br></pre><pre>--------=
---------------- MPI------------------------=0A subroutine simple()=0A=
include 'mpif.h'=0A integer numtasks, ranks, ierr, rc=0A ca=
ll MPI_INIT(ierr)=0A if (ierr .ne. MPI_SUCCESS) then=0A print=
*, 'Error starting MPI program. Terminating.'=0A call MPI_ABORT(M=
PI_COMM_WORLD, rc, ierr)=0A end if=0A=0A call MPI_COMM_RANK(MPI_C=
OMM_WORLD, rank, ierr)=0A call MPI_COMM_SIZE(MPI_COMM_WORLD, numtasks,=
ierr)=0A print *, 'Number of tasks =3D ', numtasks, ' My Rank =3D', r=
ank=0A=0A call MPI_FINALIZE(ierr)=0A=0A end subroutine=0A--------=
---------------- END of MPI ------------------------=0A=0A-----------------=
------- F2PY Command ------------------------=0Af2py --fcompiler=3Dgnu95 --=
f77exec=3Dmpif90 -m simplesub -c simple.f90=0A-I/usr/lib/mpi/gcc/openmpi/in=
clude -L/usr/lib/mpi/gcc/openmpi/lib=0A-lmpi_f77=0A=0A---------------------=
--- Python Code ------------------------=0A#File Name : ptest.py=0A#!/usr/b=
in/env python=0A#-*- cpding: utf-8 -*-=0Aimport simplesub=0Aprint dir(simpl=
esub)=0Asimplesub.simple()=0A------------------------ End of Python Code --=
----------------------=0A=0A------------------------ Error Text in Console =
------------------------=0A=0Atamal@linux-p7k6:~/Dropbox/Thesis/2012/201302=
10/simple> mpiexec -n 4=0Apython ptest.py<br>=0Atamal@linux-p7k6:~/Dropb=
ox/Thesis/2012/20130207> mpiexec -n 2 python=0Apartest.py=0Apython: symb=
ol lookup error:=0A/usr/lib/mpi/gcc/openmpi/lib/openmpi/mca_paffinity_hwloc=
.so: undefined=0Asymbol: mca_base_param_reg_int=0Apython: symbol lookup err=
or:=0A/usr/lib/mpi/gcc/openmpi/lib/openmpi/mca_paffinity_hwloc.so: undefine=
d=0Asymbol: mca_base_param_reg_int=0A--------------------------------------=
------------------------------------=0Ampiexec noticed that the job aborted=
, but has no info as to the process=0Athat caused that situation.=0A-------=
-------------------------------------------------------------------=0A=0A=
=0A<br><br><br></pre><div></div></div></body></html>
---2114765872-609411721-1360586756=:24059--
--===============6897228278285918444==
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
--===============6897228278285918444==--