Dhondtguido / PaStiX4CalculiX

Other
16 stars 7 forks source link

PaStiX - Linux: undefined reference to symbol 'hwloc_bitmap_iszero' #2

Closed 3rav closed 4 years ago

3rav commented 4 years ago

Hi,

I have this error during compiling calculix with pastix (version without CUDA)

ccx_2.17.c:72:39: note: ‘ne0’ was declared here
     iprestr,kode,isolver,nslavs,nkon_,ne0,nkon0,mortar,
                                       ^
ccx_2.17.c:811:45: warning: ‘nxstate’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  for(i=nxstate;i<nstate_*mi[0]*(ne+nslavs);i++){xstate[i]=0.;}
                                             ^
/usr/bin/ld: ../../../PaStiX/pastix_i8/lib/libpastix.a(isched_hwloc.c.o): undefined reference to symbol 'hwloc_bitmap_iszero'
//usr/local/PaStiX/hwloc_i8/lib/libhwloc.so.15: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Dependent (all i8 only spooles i4): hwloc 2.1 compilation OK parsec (Mathieu Faverge) compilation OK scotch 6.0.9 compilation OK OpenBLAS 0.3.10 compilation OK ARPACK compilation OK SPOOLES 2.2 compilation OK

Update: If I replace in Makefiel_i8: ../../../PaStiX/hwloc_i8/lib64/libhwloc.so with -lhwloc

     $(PASTIX_LIBS) \
     -lpthread -lm -lc -lhwloc

then there is no above error, for hwloc I used make_hwloc.sh from ccx source code.

PS. sudo apt-get install -y hwloc

opme commented 3 years ago

I think this is related. I'm having the same problem now.

https://github.com/open-mpi/ompi/issues/7676

I suspect the issue is that you picked up an external HWLOC, but are trying to build with internal libevent and pmix. We only have PRRTE linked against libopen-pal, so if hwloc isn't in that library, PRRTE won't find the symbols. IIRC, if you select one of those three (hwloc, libevent, pmix) to be external, then they all had to be external.