Case for Interactive HPC Session on Mac

You already have an HPC account and you are a Mac user. You have developed your MATLAB code on your workstation, but it is not sufficient to run your entire data set. You have an account on the ʯÁñÖ±²¥ HPC and you have tested your code on the HPC in an interactive session against some sample data. Now, it is time to run against a larger data set.

  • In top menu bar access (globe icon).

    Be sure vpn-groups selected when you connect.

  • $ scp /Users/your_netid/new_data_file

    your_netid@hpc.kennesaw.edu:/data/home/your_netid/data_folder/

  • SSH your_netid@hpc.kennesaw.edu
  • $ cp ~/data_folder /path to your scratch directory/

    Note: Assume the matlab_script.m below will access the new data file (read-only).
    fileID = fopen(’new_data_file’, r);

  • #!/bin/bash
    #PBS -l nodes=1:ppn=1
    #PBS -l walltime=10:00:00
    #PBS -m abe
    #PBS -M your_email@kennesaw.edu

    JOBID=`echo $PBS_JOBID | cut -f1 -d.`

    module load MATLAB

    # Create a temp workdir under scratch
    mkdir -p ${HOME}/scratch/matlab
    export PBS_MATLAB_WORKDIR=$( mktemp -d -p ${HOME}/scratch/matlab workdir_XXXXXXXXXX )

    matlab -nodisplay -nosplash -logfile ${FILE}.log -r "run ${FILE}"

    # Delete temp workdir
    rm -rf ${PBS_MATLAB_WORKDIR}

  • qsub run_matlab.pbs -vFILE=${PWD}/matlab_script.m
  • $ cat file_with_results   

    or   

    $ cat o.job_id 

  • $ exit