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/09 12:52] gabrielecluster-jobs [2024/07/16 10:47] (current) gabriele
Line 283: Line 283:
  
  
-===== 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
cluster-jobs.1715259120.txt.gz · Last modified: 2024/05/09 12:52 by gabriele

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki