On Fri, Mar/20/2009 11:06:00AM, Doug Reeder wrote: > Ethan, > It looks likesome of the object files that you are trying to link to the > malloc.o and malloc-stats.o were compiled as 64 bit objects. Are you using > the 32 bit compiler flag for the compile step as well as the link step.
It looks like I'm in 32-bit mode for the compile: libtool: compile: pgcc -DHAVE_CONFIG_H -I. -I../../opal/include -I../../orte/include -I../../ompi/include -I../../opal/mca/paffinity/linux/plpa/src/libplpa -I../.. -D_REENTRANT -O -DNDEBUG -tp=k8-32 -c malloc.c -fpic -DPIC -o .libs/malloc.o libtool: compile: pgcc -DHAVE_CONFIG_H -I. -I../../../../opal/include -I../../../../orte/include -I../../../../ompi/include -I../../../../opal/mca/paffinity/linux/plpa/src/libplpa -DMALLOC_DEBUG=0 -D_GNU_SOURCE=1 -DUSE_TSD_DATA_HACK=1 -DMALLOC_HOOKS=1 -I./sysdeps/pthread -I./sysdeps/generic -I../../../.. -D_REENTRANT -O -DNDEBUG -tp=k8-32 -c malloc-stats.c -fpic -DPIC -o .libs/malloc-stats.o Can't I ignore those warnings for now? It seems PGI allows me to create a working executable, even if I mix "i386" with "i386:x86-64": $ pgcc -c -tp=k8-32 bar.c -o bar_32.o $ pgcc -tp=k8-64 foo.c bar_32.o -o foo_mix /home/em162155/tmp/foo.c: /usr/bin/ld: warning: i386 architecture of input file `bar_32.o' is incompatible with i386:x86-64 output $ ./foo_mix foo -Ethan > Doug Reeder > On Mar 20, 2009, at 10:49 AM, Ethan Mallove wrote: > > Hi, > > Has anyone successfully compiled Open MPI with the PGI compilers in > 32-bit mode (e.g., using -tp=k8-32 flag)? I am getting the following > error with 32-bit: > > $ cd opal/mca/memory/ptmalloc2 > $ make > /bin/sh ../../../../libtool --tag=CC --mode=link pgcc -O -DNDEBUG > -tp=k8-32 -export-dynamic -o libopenmpi-malloc.la -rpath > /opt/SUNWhpc/HPC8.2/pgi/lib malloc.lo malloc-stats.lo -lnsl -lutil > -lpthread > libtool: link: pgcc -shared -fpic -DPIC .libs/malloc.o > .libs/malloc-stats.o -lnsl -lutil -lpthread -lc -Wl,-soname > -Wl,libopenmpi-malloc.so.0 -o .libs/libopenmpi-malloc.so.0.0.0 > /usr/bin/ld: warning: i386 architecture of input file `.libs/malloc.o' > is incompatible with i386:x86-64 output > /usr/bin/ld: warning: i386 architecture of input file > `.libs/malloc-stats.o' is incompatible with i386:x86-64 output > .libs/malloc.o(.text+0xcb3): In function `realloc_check': > : undefined reference to `opal_memcpy_base_module' > .libs/malloc.o(.text+0x14e3): In function `munmap_chunk': > : undefined reference to `opal_mem_free_ptmalloc2_munmap' > .libs/malloc.o(.text+0x1560): In function `mremap_chunk': > : undefined reference to `opal_mem_hooks_release_hook' > .libs/malloc.o(.text+0x2be2): In function `_int_free': > : undefined reference to `opal_mem_free_ptmalloc2_munmap' > .libs/malloc.o(.text+0x30ae): In function `_int_realloc': > : undefined reference to `opal_mem_hooks_release_hook' > .libs/malloc.o(.text+0x3c2a): In function > `opal_mem_free_ptmalloc2_sbrk': > : undefined reference to `opal_mem_hooks_release_hook' > .libs/malloc.o(.text+0x3fab): In function `ptmalloc_init': > : undefined reference to `opal_mem_hooks_set_support' > .libs/malloc.o(.text+0x40ad): In function `new_heap': > : undefined reference to `opal_mem_free_ptmalloc2_munmap' > .libs/malloc.o(.text+0x40d5): In function `new_heap': > : undefined reference to `opal_mem_free_ptmalloc2_munmap' > .libs/malloc.o(.text+0x414f): In function `new_heap': > : undefined reference to `opal_mem_free_ptmalloc2_munmap' > .libs/malloc.o(.text+0x4198): In function `new_heap': > : undefined reference to `opal_mem_free_ptmalloc2_munmap' > .libs/malloc.o(.text+0x4282): In function `heap_trim': > : undefined reference to `opal_mem_free_ptmalloc2_munmap' > .libs/malloc.o(.text+0x44aa): In function `arena_get2': > : undefined reference to `opal_atomic_wmb' > make: *** [libopenmpi-malloc.la] Error 2 > > -Ethan > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > > References > > Visible links > . mailto:us...@open-mpi.org > . http://www.open-mpi.org/mailman/listinfo.cgi/users > _______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users