User Tools

Site Tools


cluster-jobs

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cluster-jobs [2024/05/07 17:56] gabrielecluster-jobs [2024/07/16 10:47] (current) gabriele
Line 280: Line 280:
   vim results.txt   vim results.txt
  
-On page 37 of the pdf file in the [[cluster-guide|main page]], there is a short video that demonstrates what just described.+On page 37 of the pdf version of the manual in the [[cluster-guide|main page]], there is a short video that demonstrates what just described.
  
  
-===== 4. MATLAB example =====+===== 5. MATLAB example =====
 ==== Simple example ==== ==== Simple example ====
 Running MATLAB scripts on psychp01 is pretty straightforward. Save the following MATLAB script in your home directory (e.g., ''/home/gbellucci'') as ''matlab_script.m'': Running MATLAB scripts on psychp01 is pretty straightforward. Save the following MATLAB script in your home directory (e.g., ''/home/gbellucci'') as ''matlab_script.m'':
Line 307: Line 307:
   # This is a comment for this job script to run the above matlab script   # This is a comment for this job script to run the above matlab script
        
-  #SBATCH -o ./job_output.%A_%a +  #SBATCH -o ./job_output.%A_%a # this is just a label to name the output filename of your job 
-  #SBATCH -e ./job_errors.%A_%a+  #SBATCH -e ./job_errors.%A_%a # this is just a label to name the error filename of your job
   #SBATCH -D ./   #SBATCH -D ./
-  #SBATCH -J run_test_for_matlab_script+  #SBATCH -J run_test_for_matlab_script # this is just a label to name your job. When you run "squeue" in the command line, that's the name you'll see
   # --- resource specification (which resources for how long) ---   # --- resource specification (which resources for how long) ---
   #SBATCH --partition=test   #SBATCH --partition=test
Line 317: Line 317:
   #SBATCH --mem=6000        # memory in MB required by the job   #SBATCH --mem=6000        # memory in MB required by the job
   #SBATCH --time=00:05:00   # run time in h:m:s, up to 24h possible   #SBATCH --time=00:05:00   # run time in h:m:s, up to 24h possible
 +   
   # Use the srun command to run the MATLAB script. Change /home/gbellucci with the location of your script on psychp01.   # Use the srun command to run the MATLAB script. Change /home/gbellucci with the location of your script on psychp01.
   srun matlab -nodisplay -batch /home/gbellucci/matlab_script.m   srun matlab -nodisplay -batch /home/gbellucci/matlab_script.m
Line 407: Line 407:
  
  
 +[[{:backward_arrow.png?40|width: 12em}cluster-advanced_slurm|Advanced SLURM]][[{:forward_arrow.png?40|width: 12em}cluster-ijobs|Interactive jobs]]\\
 +[[{:toc.png?40|width: 12em}cluster-toc|Return to Table of Contents]][[{:main_page.png?40|width: 12em}cluster-guide|Return to main page]]
  
  
cluster-jobs.1715104596.txt.gz · Last modified: 2024/05/07 17:56 by gabriele

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki