submit jobs

Hi,


I'm trying to use mac desktop as a cluster to run models.

My desktop has 12 processors and 48G Memeory, and I've installed all the packages I need to run models parallelly. I just have the final question that how to submit a job script on mac.

I know some basic command like 'mpiexec -n X /filepath/filename.exe', but how to write them down into a script so each time I only need to submit this script.


On other remote supercomputer, I usually write all the command in a filename.sh, then use 'qsub' or 'sbatch' to submit this .sh file to execuate commands in this file. Could I do this on mac and how?


Any suggestion is appreicated. Thanks and enjoy the weekend.


Zhendong

OSX 10.8.2-OTHER

Posted on Feb 2, 2013 6:44 AM

Reply
5 replies

Feb 2, 2013 7:24 AM in response to caozd999

Look for the Utility called Terminal.


It provides a unix shell environment where you can type individual commands or start a script of commands by typing its name. This environment continues to multi-task with Mac OS X, so you can start something in Terminal, then work in other windows and check on your Terminal from time-to-time.


There are several editors that can place commands into a script file for you. If you prefer to stay in Mac OS X most of the time, textedit can do that for you. If you are comfortable in command line world, emacs, pico, and many many others are available. The best for you is a matter of personal preference.


If your needs advance to the point you want to have multiple computers working on your jobs at once, X-Grid running under Mac OS X Server may be a solution for you.

Feb 2, 2013 7:47 AM in response to caozd999

All you do is type the name of the script as if it were a "canned" command.


If your script is named useupallCPU.sh, type exactly that at the command line.


To be found and executed, the shell script must be available in the current directory, or you need to specify its complete path.


--------


When working on the supercomputer, starting a script in this fashion takes over your only connection to the supercomputer. That is inconvenient.


Since your terminal is multi-Tasked with Mac OS X, a separate "submit" command is not required. I am sure there are several ways you could do this, but I am not familiar enough with the intricacies of Terminal to advise you.


You could try typing out the contents of Qsub.sh and sbatch.sh on your supercomputer, to see what actaul commands are invoked.


Several unix experts frequent these forums, and may stop by later to offer concrete advice.

Feb 2, 2013 10:08 AM in response to caozd999

One often has to change the permissions on a script file after editing to include "execute" permissions. That often requires "Super-User" ability, which is yours for the asking:


sudo chmod 775 filename.sh


... and enter your password, which will not be echoed.


--------


Sudo -- please execute the rest of this line as if you were the Super-User

chmod -- change the mode of a file

775 -- bits for Owner/Group/World Permissions:

7: Set Owner to execute-write-read;

7: Group to execute-write-read;

5: World to execute- -read

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

submit jobs

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.