thread safety of UPC memory copy library funtions

From: Lingyuan Wang (lennyhpc_at_gmail_dot_com)
Date: Wed Mar 10 2010 - 15:57:43 PST

  • Next message: Paul H. Hargrove: "Re: thread safety of UPC memory copy library funtions"
    Greetings,
    
    I am concerning about the thread safety of UPC memory copy library
    functions, whether it is safe to call those routines in parallel from
    multiple threads?
    
    I use a multi-threading layer of Pthread on top of each UPC thread, at some
    points of the program I need to do all-to-all communications among all UPC
    threads. I am looking to call UPC memory copy functions directly from my
    pool of Pthreads in parallel, since the data is sliced locally (and it would
    be less efficient to pack the data for a bulk synchronized communication).
    However, I got segmentation fault when run more than one thread per thread
    pool, and the code works fine for single thread per pool cases.
    
    I am using the IBV conduit of Berkeley UPC 2.10, with PSHM enabled. I am
    aware the fact that InfiniBand driver allows one send/receive buffer per
    process. My further questions regarding the thread safety are, is is a
    network driver/conduit specific issue, or a general gasnet/BUPC runtime
    restriction? As I can not find any thread safety definition from the UPC
    spec, would it be possible to support it potentially? And how does the UPC
    native Pthead conduit handle it? Thanks in advance.
    
    -- 
    Regards
    

  • Next message: Paul H. Hargrove: "Re: thread safety of UPC memory copy library funtions"