Submit Your First Job Using the CLI

Use the Memory Machine CE CLI to submit a job.

Procedure

  1. On the computer where you installed the Memory Machine CE CLI, create a file called helloworld.sh and insert the following contents.
    #!/bin/bash
    echo "Congratulations! You have submitted your first job"
    for(( c=1; c<3; c++))
    do
            if [[ $(($c % 3)) == 1 ]]; then
                    echo "Hello World!"
            else
                    echo "Your next job will be more interesting"
            fi
                    sleep 20s
    done
    echo "Job complete"
  2. Save and then close the file.
  3. Open a terminal on this computer and go to the directory where you created helloworld.sh.
  4. Log in to the OpCenter by entering:
    float login -a <op_center_ip_address> -u admin -p <password>
    where <op_center_ip_address> is the public (if you are outside the VPC) or private (if you are inside the VPC) IP address associated with the OpCenter. Use the default value (memverge) for <password> if you have not changed it.
  5. Submit a job by entering:
    float submit -i cactus -j helloworld.sh -c 2 -m 4 --dataVolume [size=10]:/data
  6. Query the job status by entering:
    float squeue

    The entry in the first column (labeled ID) is the identifier for your job.

  7. View the output of your example job by entering:
    float log cat stdout.autosave -j <job_id>
    where <job_id> is the identifier associated with your job.