Re: BUPC headers

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Sat Apr 10 2010 - 22:35:35 PDT

  • Next message: Nikita Andreev: "Re: BUPC headers"
    Nikita,
    
    Most of the upc_*.h headers are only suitable for inclusion in UPC code 
    that will pass though our source-to-source translator. For instance, 
    your tool will be compiled by a C compiler that will not be able to 
    parse shared keyword in the prototypes of the collective operations. 
    That is the reason for the check for the "initial preprocess".
    
    The UPC runtime library has the same need as you to deal with various 
    UPC_* constants. For that reason, these constants and several typedefs 
    are all in pure C headers with names like [something]_bits.h. In your 
    case you probably need to include upcr_preinclude/upc_collective_bits.h 
    (which happens to include upc_bits.h).
    
    -Paul
    
    Nikita Andreev wrote:
    > Hello Paul and all,
    > I'm writing the performance optimization instrument and I need to 
    > parse collective operations synchronization flags. In my case they're 
    > encoded in int variable which I get from GASP. I do parsing in 
    > separate C (not UPC) utility and apparently I need to include 
    > upc_collective.h to get UPC_{IN,OUT}_{NO,MY,ALL}SYNC declarations from 
    > there. But when I include upc_collective.h (I also tried to include 
    > upc.h before that) from opt_inst/include/upcr_preinclude I get:
    > In file included from utility.c:20:
    > /opt/bupc-runtime-2.8.0-gasp/opt_inst/include/upcr_preinclude/upc_collective.h:5:2: 
    > error: #error This file should only be included during initial preprocess
    > /opt/bupc-runtime-2.8.0-gasp/opt_inst/include/upcr_preinclude/upc_collective.h:9:2: 
    > error: #error Bad feature macro predefinition
    > In file included from utility.c:20:
    > /opt/bupc-runtime-2.8.0-gasp/opt_inst/include/upcr_preinclude/upc_collective.h:51: 
    > error: expected ‘)’ before ‘void’
    > /opt/bupc-runtime-2.8.0-gasp/opt_inst/include/upcr_preinclude/upc_collective.h:52: 
    > error: expected ‘)’ before ‘void’
    > /opt/bupc-runtime-2.8.0-gasp/opt_inst/include/upcr_preinclude/upc_collective.h:53: 
    > error: expected ‘)’ before ‘void’
    > /opt/bupc-runtime-2.8.0-gasp/opt_inst/include/upcr_preinclude/upc_collective.h:54: 
    > error: expected ‘)’ before ‘void’
    > ...
    > By now I still don't understand what's the problem. Could you help?
    > Nikita
    
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 Tel: +1-510-495-2352
    HPC Research Department                   Fax: +1-510-486-6900
    Lawrence Berkeley National Laboratory     
    

  • Next message: Nikita Andreev: "Re: BUPC headers"