User Tools

Site Tools


gpu_isac

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
gpu_isac [2020/05/29 18:50]
fschoenfeld
gpu_isac [2020/06/18 12:35]
fschoenfeld
Line 38: Line 38:
   - **Extract the archive** to your chosen GPU ISAC installation folder.   - **Extract the archive** to your chosen GPU ISAC installation folder.
   - **Open a terminal** and navigate to your installation folder.   - **Open a terminal** and navigate to your installation folder.
-  - **Untar the archive** using ''tar -xf GPU_ISAC_CHIMERA.tar''.+  - **Untar the archive**: <code>tar -xf GPU_ISAC_CHIMERA.tar</code>
   - **Check CUDA path variables** using:   - **Check CUDA path variables** using:
-    - ''echo $PATH'' Does it contain the path to your **cuda/bin** folder? +    - <code>echo $PATH</code> Confirm your ''PATH'' variable contains the path to your **cuda/bin** folder. 
-    - ''echo $LD_LIBRARY_PATH'' Does it contain the path to your **cuda/lib64** folder? +    - <code>echo $LD_LIBRARY_PATH</code> Confirm your ''LD_LIBRARY_PATH'' variable contain the path to your **cuda/lib64** folder. 
-    - If the path variables do **not** contain these path variables, you can add them like so: +    - If the path variables do **not** contain these path variables, you can add them like so: <code>export PATH=/path/to/cuda/bin:${PATH} 
-      * ''export PATH=/path/to/cuda/bin:${PATH}'' and +export LD_LIBRARY_PATH=/path/to/cuda/lib64:${LD_LIBRARY_PATH}</code> Where ''path/to/cuda/bin'' and ''path/to/cuda/lib64'' need to be replaced with the real paths to the respective folders. If you do not know where to find them, by default they should be located in ''/usr/local/cuda''.
-      * ''export LD_LIBRARY_PATH=/path/to/cuda/lib64:${LD_LIBRARY_PATH}'' +
-      * Here ''path/to/cuda/bin'' and ''path/to/cuda/lib64'' need to be replaced with the real paths to the respective folders. If you do not know where to find them, by default they should be located in ''/usr/local/cuda''.+
   - **Compile the GPU ISAC C++/CUDA library:**   - **Compile the GPU ISAC C++/CUDA library:**
-    - ''cd cuda'' (note that this assumes you entered your installation folder in your terminal) +    - <code>cd vChimera/cuda</code>//Note: This assumes you did not change directories after unpacking the .tar archive.// 
-    - ''nvcc gpu_aln_common.cu gpu_aln_noref.cu -o gpu_aln_pack.so -shared -Xcompiler -fPIC -lcufft -std=c++11''+    - <code>nvcc gpu_aln_common.cu gpu_aln_noref.cu -o gpu_aln_pack.so -shared -Xcompiler -fPIC -lcufft -std=c++11</code>
   - **Adjust sparx libraries** to work with the C++/CUDA library we just compiled:   - **Adjust sparx libraries** to work with the C++/CUDA library we just compiled:
-    - ''cd ../eman2/sparx/libpy'' +    - <code>cd ../eman2/sparx/libpy</code> 
-    - ''sed -i.bkp "s|/home/schoenf/work/code/cuISAC/cuda|$(realpath ../../../cuda)|g" applications.py'' +    - <code>sed -i.bkp "s|/home/schoenf/work/code/cuISAC/cuda|$(realpath ../../../cuda)|g" applications.py</code> 
-    - ''sed -i.bkp2 's|statistics.sum_oe( data, "a", CTF, EMData(), myid=myid|statistics.sum_oe( data, "a", CTF, EMData()|g' applications.py ''+    - <code>sed -i.bkp2 's|statistics.sum_oe( data, "a", CTF, EMData(), myid=myid|statistics.sum_oe( data, "a", CTF, EMData()|g' applications.py</code>
   - **Set the correct libraries and environment:**   - **Set the correct libraries and environment:**
-    - ''cd ../bin'' (we are now in the **/eman2/sparx/bin** folder of your GPU ISAC installation folder) +    - <code>cd ../bin</code> //Note: We are now in the **/eman2/sparx/bin** folder of your GPU ISAC installation folder.// 
-    - ''ln -rs ../libpy/* .'' (don't forget the dot at the end) +    - <code>ln -rs ../libpy/* .</code> //Note: Don't forget the dot at the end!// 
-    - ''sed -i.bkp "s|/home/schoenf/applications/sphire/v1.1/envs/sphire_1.3/bin|$(dirname $(which sphire))|g" sxisac2_gpu.py'' +    - <code>sed -i.bkp "s|/home/schoenf/applications/sphire/v1.1/envs/sphire_1.3/bin|$(dirname $(which sphire))|g" sxisac2_gpu.py</code> 
-    - ''sed -i.bkp2 "s/^\(.*options, args.*\)$/\1\n    os.environ['CUDA_VISIBLE_DEVICES'] = options.gpu_devices\n options.gpu_devices = ','.join(map(str, range(len(options.gpu_devices.split(',')))))/g" sxisac2_gpu.py''+    - <code>sed -i.bkp2 <nowiki>"</nowiki>s/^\(.*options, args.*\)$/\1\n    os.environ['CUDA_VISIBLE_DEVICES'] = options.gpu_devices\n    options.gpu_devices = ','.join(map(str, range(len(options.gpu_devices.split(',')))))/g<nowiki>"</nowiki> sxisac2_gpu.py</code> 
  
 ===== Usage ===== ===== Usage =====
gpu_isac.txt · Last modified: 2021/05/08 00:41 by shaikh