File indexing completed on 2026-04-09 07:49:02
0001
0002 usage(){ cat << EOU
0003 cxs_raindrop.sh : CXRaindropTest combining CFBASE_LOCAL raindrop geometry with standard CFBASE basis geometry
0004 =================================================================================================================
0005
0006 Run on remote::
0007
0008 cx
0009 ./cxs_raindrop.sh
0010 PIDX=0 ./cxs_raindrop.sh
0011
0012 Grab from remote to laptop::
0013
0014 cx
0015 ./cxs_raindrop.sh grab
0016
0017
0018 Analysis of outputs::
0019
0020 cx
0021 ./cxs_raindrop.sh ana
0022
0023 Photon step record OpenGL animation::
0024
0025 cd ~/opticks/examples/UseGeometryShader
0026 ./go.sh
0027
0028 Changing the geometry::
0029
0030 c
0031 ./CSGMakerTest.sh
0032
0033
0034 For A-B comparison with U4RecorderTest. Manually arrange same geometry and then::
0035
0036 u4t
0037 ./U4RecorderTest.sh run
0038 ./U4RecorderTest.sh ab
0039
0040
0041 EOU
0042 }
0043
0044 export GEOM=BoxedSphere
0045
0046 cvd=0
0047 export CUDA_VISIBLE_DEVICES=${CVD:-$cvd}
0048 export CVDLabel="CVD${CUDA_VISIBLE_DEVICES}"
0049
0050
0051 case $(uname) in
0052 Linux) argdef=run ;;
0053 Darwin) argdef=ana ;;
0054 esac
0055
0056 msg="=== $BASH_SOURCE :"
0057 arg=${1:-$argdef}
0058 bin=CXRaindropTest
0059
0060 if [ "$(uname)" == "Darwin" ]; then
0061 if [ "$arg" == "dru" -o "$arg" == "dan" ]; then
0062 echo $msg dru or dan mode is local Darwin running and analysis
0063 export CFBASE_LOCAL=/tmp/$USER/opticks/GeoChain_Darwin/$GEOM
0064 else
0065 echo $msg run or ana mode handles Linux generated results grabbed from remote
0066 export CFBASE_LOCAL=/tmp/$USER/opticks/GeoChain/$GEOM
0067 fi
0068 else
0069 export CFBASE_LOCAL=/tmp/$USER/opticks/GeoChain/$GEOM
0070 fi
0071
0072 export FOLD=$CFBASE_LOCAL
0073
0074
0075 loglevels()
0076 {
0077 export Dummy=INFO
0078
0079
0080
0081 }
0082 loglevels
0083
0084
0085
0086
0087 source ../bin/OPTICKS_INPUT_PHOTON.sh
0088
0089
0090 vars="arg bin GEOM CFBASE_LOCAL OPTICKS_OUT_FOLD FOLD"
0091 dumpvars(){ for var in $vars ; do printf "%25s : %s \n" $var ${!var} ; done ; }
0092 dumpvars
0093
0094 if [ "${arg/info}" != "$arg" ]; then
0095 exit 0
0096 fi
0097
0098 unset GEOM
0099
0100
0101 if [ "${arg/run}" != "$arg" -o "${arg/dru}" != "$arg" -o "$arg" == "dbg" ]; then
0102 logdir=/tmp/$USER/opticks/$bin
0103 mkdir -p $logdir
0104 iwd=$PWD
0105 cd $logdir
0106
0107
0108
0109
0110 if [ -n "$DEBUG" -o "$arg" == "dbg" ]; then
0111 case $(uname) in
0112 Darwin) lldb__ $bin ;;
0113 Linux) gdb $bin ;;
0114 esac
0115 else
0116 $bin
0117 fi
0118
0119 [ $? -ne 0 ] && echo $msg RUN ERROR && exit 1
0120 echo $msg logdir $logdir
0121 cd $iwd
0122 fi
0123
0124 if [ "${arg/ana}" != "$arg" -o "${arg/dan}" != "$arg" ]; then
0125
0126 ${IPYTHON:-ipython} --pdb -i tests/$bin.py
0127 fi
0128
0129 if [ "$arg" == "grab" -o "$arg" == "graby" ]; then
0130 EXECUTABLE=$bin source tmpgrab.sh $arg
0131 fi
0132
0133
0134 dumpvars
0135 exit 0