This shows you the differences between two versions of the page.
— |
cluster:206 [2021/07/08 10:18] (current) hmeij07 created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | \\ | ||
+ | **[[cluster: | ||
+ | |||
+ | ===== Python to C ===== | ||
+ | |||
+ | When installing https:// | ||
+ | |||
+ | A compilation by hand yields two standalone libraries and presumably GPU functionality. There is an example of an invocation using '' | ||
+ | |||
+ | But we have python code so my thought was to pass these two standalone libraries via environment variable to the compiler. | ||
+ | |||
+ | https:// | ||
+ | |||
+ | < | ||
+ | |||
+ | cd / | ||
+ | tar zxvf / | ||
+ | cd Nuitka-0.6.16.1/ | ||
+ | ln -s / | ||
+ | |||
+ | # make sure pip installe cpython in the python of choice | ||
+ | # miniconda3' | ||
+ | |||
+ | # be sure to get a recent gcc compiler | ||
+ | |||
+ | export PATH=/ | ||
+ | export LD_LIBRARY_PATH=/ | ||
+ | export LD_LIBRARY_PATH=/ | ||
+ | |||
+ | # then generate a centos 7 binary | ||
+ | |||
+ | python | ||
+ | |||
+ | </ | ||
+ | |||
+ | That all worked and a sample job scheduler is listed below. | ||
+ | |||
+ | Now to try to pass the standalone libraries I tried this ... | ||
+ | |||
+ | < | ||
+ | |||
+ | # cuda 9.2 | ||
+ | export CUDAHOME=/ | ||
+ | export PATH=/ | ||
+ | export LD_LIBRARY_PATH=/ | ||
+ | which nvcc | ||
+ | |||
+ | # fftw3 | ||
+ | export FFTW_HOME=/ | ||
+ | export PATH=/ | ||
+ | export LD_LIBRARY_PATH=$FFTW_HOME/ | ||
+ | |||
+ | # for gpu we have a c++ galario libraries | ||
+ | export LD_LIBRARY_PATH=/ | ||
+ | |||
+ | # attempt at linking those libraries | ||
+ | CPATH=/ | ||
+ | LIBRARY_PATH=/ | ||
+ | python | ||
+ | |||
+ | </ | ||
+ | |||
+ | It compiled but when invoked it does not find any cuda routines. That may be because I can not find any cuda python code in the git repository either. | ||
+ | |||
+ | === sample job === | ||
+ | |||
+ | < | ||
+ | |||
+ | #!/bin/bash | ||
+ | rm -f err-mpi-7c out-mpi-7c | ||
+ | |||
+ | # need conda initialization code block in ~/.bashrc, or next lines | ||
+ | |||
+ | # queues mwgpu, amber128 and exx96 | ||
+ | #BSUB -q exx96 | ||
+ | #BSUB -o out-mpi-7c | ||
+ | #BSUB -e err-mpi-7c | ||
+ | #BSUB -J test | ||
+ | #BSUB -R " | ||
+ | #BSUB -n 8 | ||
+ | |||
+ | # miniconda3 | ||
+ | source / | ||
+ | export PATH=/ | ||
+ | export LD_LIBRARY_PATH=/ | ||
+ | which mpirun python conda | ||
+ | |||
+ | # wrapper handles | ||
+ | openmpi-mpirun \ | ||
+ | ./ | ||
+ | 1.28e-3 36.7 0.339 -1.0 1.0 10.9 61.7 0.46 -0.47 5 12 \ | ||
+ | --outdir " | ||
+ | ~ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | **[[cluster: | ||
+ | |||