[parsec-users] compiling PARSEC for Linux on SPARC - bus error with canneal

Kshitij Sudan kshitij at cs.utah.edu
Wed Apr 2 02:01:18 EDT 2008


Hi,

some more debug info .... these were the errors spitted out g++ while
compiling canneal. It seems these compiler warnings and bus error are
somehow related because they both point to similar lines of code ...

-----------------------
kshitij at bflat:~/parsec_build/canneal/src$ make all
g++-4.2 -DENABLE_THREADS -pthread -static -static-libgcc
-mcpu=ultrasparc -ggdb annealer_thread.cpp -c -o annealer_thread.o
AtomicPtr.h: In instantiation of 'const location_t*
threads::AtomicPtr<location_t>::ATOMIC_NULL':
AtomicPtr.h:180:   instantiated from 'T* threads::AtomicPtr<T>::Get()
const [with T = location_t]'
annealer_thread.cpp:117:   instantiated from here
AtomicPtr.h:295: warning: NULL used in arithmetic
g++-4.2 -DENABLE_THREADS -pthread -static -static-libgcc
-mcpu=ultrasparc -ggdb rng.cpp -c -o rng.o
g++-4.2 -DENABLE_THREADS -pthread -static -static-libgcc
-mcpu=ultrasparc -ggdb netlist.cpp -c -o netlist.o
AtomicPtr.h: In instantiation of 'const location_t*
threads::AtomicPtr<location_t>::ATOMIC_NULL':
AtomicPtr.h:180:   instantiated from 'T* threads::AtomicPtr<T>::Get()
const [with T = location_t]'
netlist.cpp:58:   instantiated from here
AtomicPtr.h:295: warning: NULL used in arithmetic
g++-4.2 -DENABLE_THREADS -pthread -static -static-libgcc
-mcpu=ultrasparc -ggdb main.cpp -c -o main.o
g++-4.2 -DENABLE_THREADS -pthread -static -static-libgcc
-mcpu=ultrasparc -ggdb netlist_elem.cpp -c -o netlist_elem.o
AtomicPtr.h: In instantiation of 'const location_t*
threads::AtomicPtr<location_t>::ATOMIC_NULL':
AtomicPtr.h:180:   instantiated from 'T* threads::AtomicPtr<T>::Get()
const [with T = location_t]'
netlist_elem.cpp:57:   instantiated from here
AtomicPtr.h:295: warning: NULL used in arithmetic
g++-4.2 -DENABLE_THREADS -pthread -static -static-libgcc
-mcpu=ultrasparc -ggdb -static -static-libgcc *.o  -lm -o canneal
kshitij at bflat:~/parsec_build/canneal/src$
-----------------------

sorry for the spam
-Kshitij

On Tue, Apr 1, 2008 at 9:56 PM, Kshitij Sudan <kshitij at cs.utah.edu> wrote:
> Hi,
>
>  I am trying to compile these benchmarks for SPARC v9 architecture and
>  canneal compiles correctly (after minor hacks in some of the arch
>  specific files) for this platform but at run time gives a SIGBUS (bus
>  error). I tried compiling the same code for x86 platform and it
>  compiles and runs fine without any error.
>
>  It seems some memory alignment code for acquiring a lock is broken
>  broken for SPARC. Any inputs how to fix this would be great.
>
>  best,
>  -Kshitij
>
>  Here's a stack trace from gdb :
>  ----------------------------------------
>  Starting program: /home/kshitij/parsec_build/canneal/src/canneal 2
>  10000 2000 100000.nets
>  [Thread debugging using libthread_db enabled]
>  find_new_threads_callback: cannot get thread info: generic error
>  (gdb) c
>  Continuing.
>  PARSEC Benchmark Suite
>  Threadcount: 2
>  5000 moves per thread
>  Start temperature: 2000
>  netlist filename: 100000.nets
>  [New Thread 1476672 (LWP 7544)]
>
>  Program received signal SIGBUS, Bus error.
>  [Switching to Thread 1476672 (LWP 7544)]
>  0x0001034c in atomic_load_acq_ptr ()
>  (gdb) where
>  #0  0x0001034c in atomic_load_acq_ptr ()
>  #1  0x00010e1c in threads::AtomicPtr<location_t>::Get ()
>  #2  0x000156cc in threads::AtomicPtr<location_t>::AtomicPtr ()
>  #3  0x0001b24c in netlist_elem::netlist_elem ()
>  #4  0x0001b2f0 in std::_Construct<netlist_elem, netlist_elem> ()
>  #5  0x0001b358 in std::__uninitialized_fill_n_aux<netlist_elem*,
>  unsigned int, netlist_elem> ()
>  #6  0x0001b404 in std::uninitialized_fill_n<netlist_elem*, unsigned
>  int, netlist_elem> ()
>  #7  0x0001b434 in std::__uninitialized_fill_n_a<netlist_elem*,
>  unsigned int, netlist_elem, netlist_elem>  ()
>  #8  0x0001c410 in std::vector<netlist_elem,
>  std::allocator<netlist_elem> >::_M_fill_insert ()
>  #9  0x0001c730 in std::vector<netlist_elem,
>  std::allocator<netlist_elem> >::insert ()
>  #10 0x0001c7f8 in std::vector<netlist_elem,
>  std::allocator<netlist_elem> >::resize ()
>  #11 0x00014298 in netlist::netlist ()
>  #12 0x000114d0 in main ()
>  (gdb)
>  --------------------------------------------------
>


More information about the parsec-users mailing list