Upload
the Assignment Here
We have written the code for you. a) keep track of the timings as a function of the number of iterations at constant number of processors and make a plot of timing vs iterations. Iterations should be 1000,1E4,1E5,1E6,1E7,1E8,1E9 running on 4 processors (don't want to overwhelm aciss) b) fix the number of iterations at 1E6 (one million) but change the number of processors in the mpirun commmand and then make a plot of timing vs number of processors. Choose processor steps of 2,4,8, 12 and 16. c) Produce a plot of the best solution you obtain against the data using gnuplot (explicit example below) by using 8 processors and as many iterations as you want to find the minimum chi squared value. d) take a look at the actual code (fit_data.f90) and write a one paragraph explanation of how you think this code is finding the minimum solution. Include the value of chi^2 that you found and how many iterations that you used. We will discuss a) and b) and d) in class on friday a bit.
cd ex7 cp ~dkmatter/sciprog/craig/* . module load mpi-tor/openmpi-1.7_gcc-4.8 module list (check that modules got loaded) make check If the make check command generated output, then all is well. The time command will output at the very end the wall clock time. For instance, the 2 processor command above should return a time of about 5 seconds for 100000 iterations. Check that this true for you. (there will be some variations depending on what node your assigned by qsub) fort.xx; where xx is indexed with respect to the rank (number of processors requested) starting at 21. Therefore for np 2 you would get fort.21 and fort.22 as the only output files. Executing the following commands will turn the individual files into one file. touch nohair cat fort.2* >> nohair For part c) find the lowest value of chi squared in the nohair file and note the solution. The chi square value is in the third column of the output. Run the fortran progam called rplot to enter your parameters from you minimum solution (source code = read.f90) Open gnuplot by typing gnuplot
set yrange [6000:10000] plot "fort.20" , "fort.35" Now you have produced the plot to turn in for part C. |