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 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/CaTS/Instructions.md (Version 11.3.0) and /examples/advanced/CaTS/Instructions.md (Version 7.0.p1)


  1 # Prerequisites                                   
  2 Opticks requires Geant4 (10.7.p02), nvidia cud    
  3                                                   
  4 # Building CLHEP                                  
  5 The current version of Geant4 10.07.p02 is bui    
  6 CLHEP can be found at:                            
  7 https://proj-clhep.web.cern.ch/proj-clhep/clhe    
  8                                                   
  9 to build it from scratch using cmake (used cma    
 10                                                   
 11     cd to the directory where you want to buil    
 12     wget https://proj-clhep.web.cern.ch/proj-c    
 13     tar xzvf clhep-2.4.4.0.tgz                    
 14     cd 2.4.4.0/                                   
 15     mkdir CLHEP-build                             
 16     cd  CLHEP-build                               
 17     cmake -DCMAKE_INSTALL_PREFIX=../CLHEP-inst    
 18     make -j 8                                     
 19     make install                                  
 20                                                   
 21 **Note** the default install directory is /usr    
 22                                                   
 23     cd to the directory where you want to buil    
 24     wget https://proj-clhep.web.cern.ch/proj-c    
 25     tar xzvf clhep-2.4.4.0.tgz                    
 26     cd 2.4.4.0/                                   
 27     mkdir CLHEP-build                             
 28     cd  CLHEP-build                               
 29     cmake -DCLHEP_BUILD_CXXSTD=-std=c++11 ../C    
 30     make -j 8                                     
 31     sudo make install                             
 32                                                   
 33 # Building Geant4                                 
 34                                                   
 35 Geant4 versions are available at:                 
 36 https://geant4.web.cern.ch/support/download       
 37                                                   
 38                                                   
 39     cd to the directory where you want to inst    
 40     wget https://geant4-data.web.cern.ch/relea    
 41     mkdir geant4.10.07.p02-build                  
 42     cd  geant4.10.07.p02-build                    
 43     cmake -DCMAKE_INSTALL_PREFIX=../geant4.10.    
 44     make -j 8                                     
 45     make install                                  
 46     . ../geant4.10.07.p02-install/bin/geant4.s    
 47                                                   
 48                                                   
 49 check the output for any error, install any de    
 50                                                   
 51                                                   
 52                                                   
 53                                                   
 54 # Building ROOT                                   
 55 Instructions how to build ROOT from ssource ca    
 56 https://root.cern/install/build_from_source/      
 57                                                   
 58     # cd  to the diretory where you want to in    
 59     git clone --branch latest-stable https://g    
 60     mkdir root-build                              
 61     cd root-build                                 
 62     cmake -DCMAKE_INSTALL_PREFIX=../root-insta    
 63     # speed up the make process                   
 64     new=" -j$(($(grep -c ^processor /proc/cpui    
 65     case ":${MAKEFLAGS:=$new}:" in                
 66         *:"$new":*)  ;;                           
 67         *) MAKEFLAGS="$MAKEFLAGS:$new"  ;;        
 68     esac                                          
 69     cmake -DCMAKE_INSTALL_PREFIX=../root-insta    
 70     cmake --build . --target install              
 71                                                   
 72 check the output for any error, install any de    
 73                                                   
 74                                                   
 75     . ../root-install/bin/thisroot.sh             
 76     root                                          
 77                                                   
 78                                                   
 79 # Installing CUDA                                 
 80                                                   
 81 cuda (11.3) is available at the NVIDIA web sit    
 82                                                   
 83 https://developer.nvidia.com/cuda-downloads       
 84                                                   
 85 **Note** this will also install the correspond    
 86                                                   
 87 Another way to obtain cuda is to install the N    
 88 https://developer.nvidia.com/nvidia-hpc-sdk-do    
 89                                                   
 90 The NVIDIA hpc-sdk kit provides an interesting    
 91                                                   
 92 A good way to check that things are working pr    
 93                                                   
 94     # cd to the directory where you want to bu    
 95     mkdir cuda-test                               
 96     cd cuda-test                                  
 97     cp -r /usr/local/cuda-11.3/samples .          
 98     cd  samples/                                  
 99     which nvcc                                    
100     make                                          
101     bin/x86_64/linux/release/deviceQuery          
102     bin/x86_64/linux/release/deviceQueryDrv       
103                                                   
104 2 Tools For Monitoring Nvidia GPUs On Linux ca    
105 https://www.linuxuprising.com/2019/06/2-tools-    
106                                                   
107 # Installing Optix (6.5)                          
108                                                   
109 https://developer.nvidia.com/designworks/optix    
110                                                   
111 Optix comes with precompiled samples and one m    
112                                                   
113     # cd to the Optix installation directory      
114     cd SDK-precompiled-samples                    
115     export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH     
116     # execute e.g.:                               
117     ./optixMDLSphere                              
118     ./optixSphere                                 
119     ./optixTutorial                               
120     # etc.                                        
121                                                   
122                                                   
123                                                   
124                                                   
125                                                   
126 # Building opticks vs. existing libraries         
127                                                   
128 This are instructions how to build opticks mak    
129 For geant 4 we use the current version at the     
130 to CMAKE_PREFIX_PATH envvar so that we can poi    
131                                                   
132     cd to the directory where you want to inst    
133                                                   
134                                                   
135 Here we are using a tagged snapshot of Opticks    
136                                                   
137     git clone https://github.com/simoncblyth/o    
138     cd opticks                                    
139     git checkout tags/v0.1.6 -b v0.1.6-branch     
140     git status                                    
141                                                   
142 The development version (a. k. a. the latest a    
143                                                   
144     git clone https://bitbucket.org/simoncblyt    
145                                                   
146                                                   
147                                                   
148 change opticks/optickscore/OpticksSwitches.h      
149                                                   
150 so that:                                          
151                                                   
152     #define WITH_SKIPAHEAD 1                      
153                                                   
154 is set.                                           
155                                                   
156     cat > setup_opticks.sh << +EOF                
157     # ----------------------------------------    
158     # --- you need to modify the following env    
159     # ---                                         
160     export WORK_DIR=/data2/wenzel/gputest_10.7    
161     export OptiX_INSTALL_DIR=/home/wenzel/NVID    
162     export OPTICKS_COMPUTE_CAPABILITY=75          
163     export CUDA_INSTALL_DIR=/usr/local/cuda-11    
164     export CUDA_SAMPLES=${CUDA_INSTALL_DIR}/sa    
165     export G4INSTALL=/data2/wenzel/Geant4.10.0    
166     . ${G4INSTALL}/bin/Geant4.sh                  
167     export ROOTSYS=/data2/wenzel/root_install     
168     . ${ROOTSYS}/bin/thisroot.sh                  
169     # ----------------------------------------    
170     export LOCAL_BASE=${WORK_DIR}/local           
171     export CMAKE_PREFIX_PATH=${G4INSTALL}:${LO    
172     export PYTHONPATH=$WORK_DIR                   
173     export OPTICKS_HOME=${WORK_DIR}/opticks       
174     export PATH=${LOCAL_BASE}/bin:${PATH}         
175     export OPTICKS_PREFIX=${WORK_DIR}/local/op    
176     export OPTICKS_INSTALL_PREFIX=$LOCAL_BASE/    
177     export OPTICKS_OPTIX_PREFIX=${OptiX_INSTAL    
178     export OPTICKS_CUDA_PREFIX=${CUDA_INSTALL_    
179     export OPTICKS_EMBEDDED_COMMANDLINE_EXTRA=    
180     opticks-(){ . ${OPTICKS_HOME}/opticks.bash    
181     op(){ op.sh $* ; }                            
182     o(){ cd $(opticks-home) ; hg st ; }           
183     # make sure to add the compiler options       
184     new=" -fPIC"                                  
185     case ":${CXXFLAGS:=$new}:" in                 
186         *:"$new":*)  ;;                           
187         *) CXXFLAGS="$CXXFLAGS:$new"  ;;          
188     esac                                          
189     new=" -fPIC"                                  
190     case ":${CFLAGS:=$new}:" in                   
191         *:"$new":*)  ;;                           
192         *) CFLAGS="$CFLAGS:$new"  ;;              
193     esac                                          
194     # speed up the make process                   
195     new=" -j$(($(grep -c ^processor /proc/cpui    
196     case ":${MAKEFLAGS:=$new}:" in                
197         *:"$new":*)  ;;                           
198         *) MAKEFLAGS="$MAKEFLAGS:$new"  ;;        
199     esac                                          
200     # deal with the $LD_LIBRARYPATH               
201     new=${OptiX_INSTALL_DIR}/lib64/               
202     case ":${LD_LIBRARY_PATH:=$new}:" in          
203         *:"$new":*)  ;;                           
204         *) LD_LIBRARY_PATH="$new:$LD_LIBRARY_P    
205     esac                                          
206     new=${OPTICKS_HOME}/externals/lib             
207     case ":${LD_LIBRARY_PATH:=$new}:" in          
208         *:"$new":*)  ;;                           
209         *) LD_LIBRARY_PATH="$new:$LD_LIBRARY_P    
210     esac                                          
211     new=${CUDA_INSTALL_DIR}/lib64/                
212     case ":${LD_LIBRARY_PATH:=$new}:" in          
213         *:"$new":*)  ;;                           
214         *) LD_LIBRARY_PATH="$new:$LD_LIBRARY_P    
215     esac                                          
216     new=${LOCAL_BASE}/opticks/lib/                
217     case ":${LD_LIBRARY_PATH:=$new}:" in          
218         *:"$new":*)  ;;                           
219         *) LD_LIBRARY_PATH="$new:$LD_LIBRARY_P    
220     esac                                          
221     opticks-                                      
222     new=${CUDA_INSTALL_DIR}/bin                   
223     case ":${PATH:=$new}:" in                     
224         *:"$new":*)  ;;                           
225         *) PATH="$new:$PATH"  ;;                  
226     esac                                          
227     new=${OPTICKS_HOME}/bin/                      
228     case ":${PATH:=$new}:" in                     
229         *:"$new":*)  ;;                           
230         *) PATH="$new:$PATH"  ;;                  
231     esac                                          
232     new=${OPTICKS_HOME}/ana/                      
233     case ":${PATH:=$new}:" in                     
234         *:"$new":*)  ;;                           
235         *) PATH="$new:$PATH"  ;;                  
236     esac                                          
237     new=${LOCAL_BASE}/opticks/lib/                
238     case ":${PATH:=$new}:" in                     
239         *:"$new":*)  ;;                           
240         *) PATH="$new:$PATH"  ;;                  
241     esac                                          
242     new=${CUDA_SAMPLES}/bin/x86_64/linux/relea    
243     case ":${PATH:=$new}:" in                     
244         *:"$new":*)  ;;                           
245         *) PATH="$new:$PATH"  ;;                  
246     esac                                          
247     oinfo-(){                                     
248         echo 'LD_LIBRARY_PATH:';                  
249         echo '================';                  
250         echo  ${LD_LIBRARY_PATH}| tr : \\n;       
251         echo;                                     
252         echo 'PATH:';                             
253         echo '=====';                             
254         echo  ${PATH}| tr : \\n;                  
255         echo;                                     
256         echo 'CMAKE_PREFIX_PATH:';                
257         echo '==================';                
258         echo  ${CMAKE_PREFIX_PATH}| tr : \\n;     
259         }                                         
260     dinfo-(){                                     
261         nvidia-smi;                               
262         ${CUDA_SAMPLES}/bin/x86_64/linux/relea    
263     }                                             
264     +EOF                                          
265                                                   
266     source setup_opticks.sh                       
267     oinfo-                                        
268     dinfo-                                        
269     mkdir -p ${WORK_DIR}/local/opticks/externa    
270     cd ${WORK_DIR}/local/opticks/externals/       
271     ln -s ${OptiX_INSTALL_DIR} OptiX              
272     cd ${WORK_DIR}                                
273     opticks-externals-install >& install_ext.l    
274                                                   
275 scan the log file or any errors and correct th    
276                                                   
277     cd ${WORK_DIR}                                
278     opticks-full  >& install_full.log &           
279                                                   
280 scan the log file or any errors and correct th    
281 (https://github.com/hanswenzel/CaTS)              
282                                                   
283     geocache-                                     
284     geocache-create- --gdmlpath  ${WORK_DIR}/l    
285     export OPTICKS_KEY=`output from above comm    
286     opticks-t                                     
287                                                   
288 if the geocache-create- command doesn't work:     
289                                                   
290                                                   
291     ${WORK_DIR}/local/opticks/lib/OKX4Test --o    
292     export OPTICKS_KEY=`output from above comm    
293     opticks-t                                     
294                                                   
295                                                   
296                                                   
297 # Building CaTS                                   
298                                                   
299 Instructions for building and running CaTS can    
300                                                   
301 https://github.com/hanswenzel/CaTS/blob/master