Accéder au contenu.
Menu Sympa

starpu-devel - Re: [starpu-devel] Subject: Feedback on ImportError when importing "starpu" in Python

Objet : Developers list for StarPU

Archives de la liste

Re: [starpu-devel] Subject: Feedback on ImportError when importing "starpu" in Python


Chronologique Discussions 
  • From: Nathalie Furmento <nathalie.furmento@labri.fr>
  • To: 高家隆 <gaojialong@nudt.edu.cn>, starpu-devel@inria.fr
  • Subject: Re: [starpu-devel] Subject: Feedback on ImportError when importing "starpu" in Python
  • Date: Mon, 6 Nov 2023 09:31:26 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=nathalie.furmento@labri.fr; spf=Pass smtp.mailfrom=nathalie.furmento@labri.fr; spf=None smtp.helo=postmaster@v-zimmta03.u-bordeaux.fr
  • Ironport-sdr: 6548a460_X1FrBn+kGTDh59JjNai8MYP1eDTdU6JwmN2+CkIPtTyPpLX 6s5Bygiyjas5JM8yYuBEHcH2Sc6UFHZ8CC2PCoA==

Hello,

you may be missing some environment variables,

$ . /usr/local/bin/starpu_env
before calling python may help

Cheers,

Nathalie


Le 06/11/2023 à 07:51, 高家隆 a écrit :

Dear StarPU Support Team, I hope this email finds you well.I am writing to provide feedback regarding an issue I encountered when trying to import the "starpu" module in Python.

Here is the error message I received after compiling and generating "starpupy":

Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits", or "license" for more information.
>>> import starpupy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'starpupy'
>>> import starpu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/site-packages/starpu/__init__.py", line 17, in <module>
    from . import starpupy
ImportError: /usr/local/lib/python3.10/site-packages/starpu/starpupy.cpython-310-x86_64-linux-gnu.so: undefined symbol: starpu_save_history_based_model
>>> import starpupy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'starpupy'
>>> import starpu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/site-packages/starpu/__init__.py", line 17, in <module>
    from . import starpupy
ImportError: /usr/local/lib/python3.10/site-packages/starpu/starpupy.cpython-310-x86_64-linux-gnu.so: undefined symbol: starpu_save_history_based_model
>>> exit()






It appears that the "starpu" module is not properly linked, resulting in the import errors mentioned above. Could you please advise on how to resolve this issue?

I would greatly appreciate any assistance or guidance you can provide to help me successfully import and utilize the "starpu" module in my Python environment.

In addition, here is the procedure how I compile the source from git,


pip3 install joblib
pip3 install cloudpickle
pip3 install numpy

../configure --enable-simgrid --enable-starpupy --enable-blocking-drivers --prefix=/usr/local
# Some special segment I noticed

...

checking for hierarchical dags - a.k.a bubble - support... no
checking whether bubble debug messages should be displayed... no
checking for SIMGRID... yes
checking for main in -lsimgrid... yes
checking for simgrid/msg.h... no
checking for msg/msg.h... no
checking for simgrid/host.h... yes
checking for simgrid/link.h... yes
checking for xbt/base.h... yes
checking for simgrid/version.h... yes
checking for simgrid/simdag.h... no
checking for xbt/synchro.h... no
checking for xbt/config.h... yes
checking for simgrid/actor.h... yes
checking for simgrid/engine.h... yes
checking for simgrid/semaphore.h... yes
checking for simgrid/mutex.h... yes
checking for simgrid/cond.h... yes
checking for simgrid/barrier.h... yes
checking for simgrid/engine.h... (cached) yes
checking for simgrid/zone.h... yes
checking for smx_actor_t... no
checking for MSG_process_attach... no
checking for sg_actor_attach... yes
checking for sg_actor_init... yes
checking for sg_actor_set_stacksize... yes
checking for sg_actor_on_exit... yes
checking for MSG_zone_get_hosts... no
checking for sg_zone_get_hosts... yes
checking for MSG_process_self_name... no
checking for MSG_process_userdata_init... no
checking for sg_actor_get_data... yes
checking for sg_actor_set_data... yes
checking for sg_actor_data... no
checking for xbt_mutex_try_acquire... no
checking for smpi_process_set_user_data... yes
checking for SMPI_thread_create... yes
checking for sg_zone_get_by_name... yes
checking for sg_link_get_name... yes
checking for sg_link_name... no
checking for sg_link_set_bandwidth... yes
checking for sg_link_bandwidth_set... no
checking for sg_host_get_route... yes
checking for sg_host_route... no
checking for sg_host_self... yes
checking for sg_host_list... yes
checking for sg_host_get_speed... yes
checking for sg_host_speed... no
checking for simcall_process_create... no
checking for sg_config_continue_after_help... yes
checking for simgrid_set_maestro... yes
checking for simgrid_init... yes
checking for xbt_barrier_init... no
checking for sg_actor_sleep_for... yes
checking for sg_actor_self... yes
checking for sg_actor_ref... yes
checking for sg_host_get_properties... yes
checking for sg_host_send_to... no
checking for sg_host_sendto... yes
checking for sg_cfg_set_int... yes
checking for sg_actor_self_execute... no
checking for sg_actor_execute... yes
checking for simgrid_get_clock... yes
checking for gcc options needed to detect all undeclared functions... none needed
checking whether smpi_process_set_user_data is declared... yes
checking for MSG_get_as_by_name... no
checking for MSG_zone_get_by_name... no
checking for MSG_environment_get_routing_root... no
checking for MSG_host_get_speed... no
checking whether SimGrid is enabled... yes
checking whether blocking drivers should be enabled... yes
checking whether worker callbacks should be enabled... no
checking whether g++ supports C++11 features by default... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop

...

# By the way, my SimGrid's version is 3.34.1

make
make install


Thank you for your attention to this matter. I look forward to your prompt response.

Best regards,

Geolone


-- 
Dr Nathalie Furmento               Ingénieure de recherche CNRS
http://www.labri.fr/~furmento/     LaBRI - Université Bordeaux



Archives gérées par MHonArc 2.6.19+.

Haut de le page