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

Christian Bienia cbienia at CS.Princeton.EDU
Wed Apr 2 12:58:02 EDT 2008


Hello Kshitij,

This is probably caused by an alignment error. This would also explain why the 
error occurs on Sparc but not on x86 CPUs. canneal doesn't use any locks 
(only a minor one during initialization). It uses the atomic instructions in 
the arch specific files to swap two netlist elements atomically when it tries 
to optimize the input design. AtomicPtr is the class that encapsulates that 
functionality. It is likely that the error is caused somewhere there.

This problem shouldn't be too hard to fix. It could be that the program e.g. 
tries to swap 32 bit variables with 64 bit memory accesses. AtomicPtr is 
based on memory accesses via pointers, it could be that the incorrect size 
was used here. Make sure it all matches up.

- Chris


On Tuesday 01 April 2008 10:56 pm, Kshitij Sudan 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)
> --------------------------------------------------
> _______________________________________________
> parsec-users mailing list
> parsec-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/parsec-users



More information about the parsec-users mailing list