AW: problem with bupc_extern_free

From: Christian Terboven (christian_at_terboven_dot_com)
Date: Thu Oct 20 2005 - 13:47:22 PDT

  • Next message: Dan Bonachea: "Berkeley UPC Release 2.2.1"
    Hi Dan, hi Paul.
    > 1) bupc_extern_free() has essentially the same semantics as upc_free(),
    > and as  such should only be called by a single thread per allocation. Ie,
    > in UPC, all threads collectively call upc_all_alloc, but only one may call
    > the (non-collective) upc_free.  This is one probable cause of the crash.
    Thanks for your explanation.
    > 2) In the .upc file the code calls bupc_local_to_shared, but ignores the
    > return value which provides the restored pointer-to-shared. This leads to
    > an overrun (because it uses the local pointer rather than the shared
    > pointer) of allocated memory, which is the second probable cause for the
    > crash upon free.
    Yes, this was a programming error, I should have seen this!
    Thank you very much for your fast response and explanation, now both the
    code snippet and my program are running fine.
    Best regards,

  • Next message: Dan Bonachea: "Berkeley UPC Release 2.2.1"