1. Setup an ssh key to login to the mic. In the examples here, the private key
   is installed at /mnt/scratch/id_rsa.

2. Here we assume the hostname of the Intel Xeon Phi cards are mic0, mic1, ...
   You can set these in /etc/hosts, e.g.:

	prompt> cat /etc/hosts
	127.0.0.1       localhost
	172.31.1.1	mic0
	172.31.2.1	mic1
	172.31.3.1	mic2
	172.31.4.1	mic3

3. After compiling MAGMA (see README), copy magma_mic_server and required libraries to each Xeon Phi card.
   These two shell scripts are provided to do this process:

	copy_library_files.sh
	copy_server_file.sh

   The commands they run are:

	scp -i /mnt/scratch/id_rsa ./interface_mic/server/magma_mic_server  root@mic0:/tmp
	scp -i /mnt/scratch/id_rsa launch.sh                                root@mic0:/tmp
	
	scp -i /mnt/scratch/id_rsa $MKLROOT/lib/mic/libmkl_intel_thread.so  root@mic0:/lib64
	scp -i /mnt/scratch/id_rsa $MKLROOT/lib/mic/libmkl_intel_lp64.so    root@mic0:/lib64
	scp -i /mnt/scratch/id_rsa $MKLROOT/lib/mic/libmkl_core.so          root@mic0:/lib64
	scp -i /mnt/scratch/id_rsa $MKLROOT/../compiler/lib/mic/libiomp5.so root@mic0:/lib64

4. Login to each Xeon Phi card and run magma_mic_server.
   The launch.sh shell script is provided to run this:

	ssh -i /mnt/scratch/id_rsa root@mic0
	/tmp/launch.sh

   Or without the script:

	ssh -i /mnt/scratch/id_rsa root@mic0
	env USE_2MB_BUFFERS=3000 OMP_NUM_THREADS=240 KMP_AFFINITY=proclist=[1-240],granularity=fine,explicit /tmp/magma_mic_server

5. In another shell (on the host) run a test program. E.g.,

	./testing/testing_dgeqrf_mic
