Make or Update an UPS product on the GPVMs - twongjirad/LArLiteSoftCookBook GitHub Wiki
Note
One has to have write permission to a specific folder. Ask the appropriate authorities.
Steps for a new package
Just to be concrete, I am going to assume I am setting up the PMT Precut Algo repository to be a new product.
-
make a temporary folder in
~/
mkdir tmp_tmw
-
make a folder with the name of the package, go into ti
mkdir dlpmtprecutalgo cd dlpmtprecutalgo
-
make a version folders
mkdir v01_00_00 mkdir v01_00_00.version
-
we provide UPS parameters in a file inside [version].version directory. I steal the name from the uboonecode version file I want this to work with. so in
Linux64bit+3.10-2.17_e10_prof
, I make the following fileFILE = version PRODUCT = dlpmtprecutalgo VERSION = v01_00_00 #*********************************************** # FLAVOR = Linux64bit+3.10-2.17_e10_prof QUALIFIERS = "e10:prof" DECLARER = uboone DECLARED = 2017-03-13 00.00.00 GMT MODIFIER = uboone MODIFIED = 2017-03-13 00.00.00 GMT PROD_DIR = dlpmtprecutalgo/v01_01_00 UPS_DIR = ups/ TABLE_FILE = dlpmtprecutalgo.table
-
make the ups table file. where it has to match the above info. so
mkdir v01_00_00/ups touch v01_00_00/ups/dlpmtprecutalgo.table
-
fill the table file
File=Table Product=dlpmtprecutalgo Group: Flavor = ANY Qualifiers = "e10:prof" # Action = GetProducts # setupRequired( root v5_34_32 -q +e9:+nu:+prof ) # setupRequired( larlite v05_09_00 -q +e9:+prof ) Flavor = ANY Qualifiers = "e10:debug" # Action = GetProducts # setupRequired( root v5_34_32 -q +e9:+nu:+debug ) # setupRequired( larlite v05_09_00 -q +e9:+prof ) Flavor = ANY Qualifiers = "e10:opt" # Action = GetProducts # setupRequired( root v5_34_32 -q +e9:+nu:+opt ) # setupRequired( larlite v05_09_00 -q +e9:+prof ) Common: Action = setup prodDir() setupEnv() envSet(${UPS_PROD_NAME_UC}_VERSION, v01_00_00) # Set up required products, there are none #exeActionRequired(GetProducts) # set environment variables envSet(DLPMTPRECUTS_BASEDIR,${UPS_PROD_DIR}/${UPS_PROD_FLAVOR}) envSet(DLPMTPRECUTS_INCDIR,${UPS_PROD_DIR}/${UPS_PROD_FLAVOR}/include) envSet(DLPMTPRECUTS_LIBDIR,${UPS_PROD_DIR}/${UPS_PROD_FLAVOR}/lib) envSet(DLPMTPRECUTS_SOURCEDIR,${UPS_PROD_DIR}/${UPS_PROD_FLAVOR}/../source) if ( test `uname` = "Darwin" ) envSet(DLPMTPRECUTS_CXX,clang++) pathPrepend(DYLD_LIBRARY_PATH, ${DLPMTPRECUTS_LIBDIR}) else() envSet(DLPMTPRECUTS_CXX,g++) pathPrepend(LD_LIBRARY_PATH, ${DLPMTPRECUTS_LIBDIR}) endif ( test `uname` = "Darwin" ) # we have neither a binary or python folder # add the bin directory to the path #pathPrepend(PATH, ${UPS_PROD_DIR}/${UPS_PROD_FLAVOR}/bin ) # add the python area to the pythonpath #pathPrepend(PYTHONPATH, ${UPS_PROD_DIR}/${UPS_PROD_FLAVOR}/../source/python ) End: # End Group definition #*************************************************
-
clone the repo to v01_00_00/source
-
build the code
-
make the module folder
mkdir v01_00_00/Linux64bit+3.10-2.17/lib mkdir v01_00_00/Linux64bit+3.10-2.17/include
-
copy headers into include and libraries into lib
-
copy into ups region
cp -r dlpmtprecutalgo /grid/fermiapp/products/uboone