xuance icon indicating copy to clipboard operation
xuance copied to clipboard

Failed building wheel for mpi4py

Open wenzhangliu opened this issue 1 year ago • 1 comments

When install xuance via pip install xuance from PyPI or pip install -e . from github, it raises the following errors:

o: undefined reference to `opal_bitmap_t_class'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_info_set_value_enum'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_hash_table_get_first_key_uint32'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `mca_base_component_list_item_t_class'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_infosubscribe_change_info'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `orte_info_register_framework_params'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `mca_base_framework_open'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `orte_session_dir_cleanup'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_info_show_opal_version'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_datatype_add'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_class_finalize'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `mca_base_var_group_get_count'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_datatype_resize'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_hash_table_set_value_uint64'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `MPIR_being_debugged'
      /home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_list_t_class'
      collect2: error: ld returned 1 exit status
      failure.
      removing: _configtest.c _configtest.o
      error: Cannot link MPI programs. Check your configuration!!!
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mpi4py
  Building wheel for pathtools (setup.py) ... done
  Created wheel for pathtools: filename=pathtools-0.1.2-py3-none-any.whl size=8791 sha256=8dadb41a5d290b4f741fe5ecb16f6cb7b6d0cc7686410acdae435ce4c66f92b6
  Stored in directory: /home/wzliu/.cache/pip/wheels/b7/0a/67/ada2a22079218c75a88361c0782855cc72aebc4d18d0289d05
Successfully built gym moviepy pathtools
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects

wenzhangliu avatar Jan 03 '24 11:01 wenzhangliu

If you also meet this issue when installing mpi4py for xuance, you can install it via the conda command:

conda install mpi4py

After that, you can continue the installation for xuance.

wenzhangliu avatar Jan 03 '24 11:01 wenzhangliu