Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| perf:matlabgpu [2019/06/27 08:08] – admin | perf:matlabgpu [2019/07/08 12:30] (Version actuelle) – [Using Matlab compiler] admin | ||
|---|---|---|---|
| Ligne 34: | Ligne 34: | ||
| </ | </ | ||
| + | |||
| + | <note tip> | ||
| ===== Using Matlab directly ===== | ===== Using Matlab directly ===== | ||
| + | **prerequisites** | ||
| + | * Matlab 2017b | ||
| + | * Cuda 8 | ||
| + | Here is the SGE script: | ||
| + | |||
| + | <file bash fftmatlab1.sge> | ||
| + | |||
| + | #!/bin/bash -l | ||
| + | |||
| + | #$ -N fft_matlabGPU | ||
| + | #$ -o $JOB_NAME.$JOB_ID.out | ||
| + | #$ -q tesla.q | ||
| + | #$ -l h_vmem=20G ## we request more because of Java | ||
| + | |||
| + | module load gpu/ | ||
| + | module load matlab/ | ||
| + | |||
| + | matlab -nodisplay -r " | ||
| + | |||
| + | </ | ||
| + | |||
| + | submit the job with: | ||
| + | <code bash> | ||
| + | $ qsub fftmatlab1.sge | ||
| + | </ | ||
| ===== Using Matlab compiler ===== | ===== Using Matlab compiler ===== | ||
| + | We use compiler to avoid using parallel tokens ( 1 token available!) | ||
| + | |||
| + | MATLAB compiler will generate executable and scripts files in the same directory. | ||
| + | |||
| + | here is the SGE script: | ||
| + | |||
| + | |||
| + | <file bash fftmatlab2.sge> | ||
| + | |||
| + | #!/bin/bash -l | ||
| + | |||
| + | #$ -N fft_matlabGPUCompiler | ||
| + | #$ -o $JOB_NAME.$JOB_ID.out | ||
| + | #$ -q tesla.q | ||
| + | #$ -l h_vmem=20G ## we request more because of Java | ||
| + | |||
| + | module load gpu/ | ||
| + | module load matlab/ | ||
| + | mcc -m fftgpu.m | ||
| + | ./ | ||
| + | |||
| + | </ | ||
| + | |||
| + | submit the job with: | ||
| + | <code bash> | ||
| + | $ qsub fftmatlab2.sge | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||