X10
- Cluster
- SSH access
- X10 on your PC
- Eclipse for X10: x10dt
- From Eclipse to the cluster
X10 Cluster SSH access X10 on your PC Eclipse for X10: x10dt - - PowerPoint PPT Presentation
X10 Cluster SSH access X10 on your PC Eclipse for X10: x10dt From Eclipse to the cluster Cluster Access via ssh through labsrv0.math.unipd.it Cluster description: http://numlab.math.unipd.it/ labsrv0 is the submit
Choose 'File' menu and then 'New' and 'X10 Project (C++ back-end)'
configured and started you can define a run configuration:
Configurations...', a new window appears.
'Parallel Application' and choose 'New'
The right side of the window is now an environment to define our
'Remote Hello' as in the image
resource manager
The project that produced your application, here is 'Hello'
program to run, here 'remote-hello' stored in the directory '/work/koriel/X10'
to run (Path to the local file), here 'Hello' stored in '/home/koriel/x10- work/Hello/bin/Hello'
can choose of display the new run configuration in the 'Run' menu` of the main window.
You can find your run configuration in the general 'Run' menu`, choosing this item you run your 'Hello' program on the remote host and see the output on the bottom of the general window: 'Hello World from place 0'
In the 'Run Configuration' setup choose the 'Environment' tab. Here you can define enviroment variables for your execution. The variable 'X10_NPLACES' defines the number of separate processes that your execution needs. In the image the variable has just been defined (using the 'New....' button) and a value of '4' was assigned. You can re-run your program and see four time the words 'Hello World from place X' with 'X' in 0,...,3.
#!/bin/sh ### ### TORQUE DEFINITIONS ### #PBS -N X10-Fibonacci #PBS -r n #PBS -M righi@math.unipd.it #PBS -e localhost:${HOME}/X10/Fibonacci/Fibonacci.err #PBS -o localhost:${HOME}/X10/Fibonacci/Fibonacci.out #PBS -q cluster_short #PBS -l nodes=4:ppn=4:cluster #PBS -l mem=1g #PBS -l walltime=1:00:00 ### ### COMMANDS START ### echo Working directory is $PBS_O_WORKDIR cd $PBS_O_WORKDIR echo Running on host `hostname` echo Time is `date` echo Directory is `pwd` ### Infiniband Node Conversion echo Converting PBS_NODEFILE NEW_PBSNODEFILE=`basename $PBS_NODEFILE` /cluster/CONF/convert-ethIP-2-ibIP-X10.sh $PBS_NODEFILE $NEW_PBSNODEFILE echo MPI-Infiniband-Nodes: PBS_NODEFILE=`pwd`/${NEW_PBSNODEFILE} echo This jobs runs on: ### COMMAND export X10_NPLACES=`wc -l < $PBS_NODEFILE` export X10_HOSTLIST=`tr [:space:] , < $PBS_NODEFILE` echo "PLACES: X10_NPLACES=${X10_NPLACES}" echo "LIST: X10_HOSTLIST=${X10_HOSTLIST}" echo -n "START: "; date --rfc-3339=ns cd bin x10 Fibonacci 36 echo -n "STOP: "; date --rfc-3339=ns
Requirements for the cluster of the Department of Mathematics: You need to generate on 'labsrv0' the public/private key and then add the public part to the labsrv0 file ${HOME}/.ssh/authorized_keys Copy the file /home/koriel/known_hosts.x10 To your file ${HOME}/.ssh/known_hosts This allow every machine of the cluster to call every other machine. On the right side you see an example of a 'job' file used to submit a job to the cluster. More information on torque/maui site: http://www.adaptivecomputing.com/
Create a new project with 'File','New','X10 Program (Java back-end)'. Name it 'Fibonacci'. Create a new class with 'File', 'New', 'X10 Class' named 'Fibonacci'. Copy the source from the samples distributed with X10. Create a new 'Run Configuration', Choose the resource manager in tab 'Resources' and in the 'Application' tab you have to define '/export/alt/torque/bin/qsub' as 'Application program'.
Create a new project with 'File','New','X10 Program (Java back-end)'. Name it 'Fibonacci'. Create a new class with 'File', 'New', 'X10 Class' named 'Fibonacci'. Copy the source from the samples distributed with X10. Create a new 'Run Configuration', Choose the resource manager in tab 'Resources' and in the 'Application' tab you have to define '/export/alt/torque/bin/qsub' as 'Application program'.
Define the file 'fibonacci.job' as the argument to the 'qsub' program
In the tab 'Synchronize' of the 'Run Configuration' you defines the uploads (and eventually downloads) that have to be performed before (after) issue the 'qsub'
transfer the entire 'bin' folder of our project and the 'fibonacci.job' file
Now you can save ('Apply') the 'Run Configuration' and run it. On the bottom of the screen in the 'Console' tab you should observe A line like: 478411.grid0.math.unipd.it This is the output of the 'qsub' program. Now you have two choiches 1) Connect via ssh to labsrv0 and use the 'qstat' program to monitor the job 2) Define a new 'Run configuration' that runs the program /export/alt/torque/bin/qstat and – optionally – downloads the files Fibonacci.out and Fibonacci.err (defined in the 'job' file as the ouput and the error of our program) in the local 'PBS' folder to later examination.