calc_speedup <prefix of files>It assumes that you have 4 files named as follows
EL_G( to_array, i, j, width) = EL_G(from_array, m,n, chunk_x);it should have been
EL_G( to_array, i, j, width) = EL(from_array, m,n, chunk_x);So, if you used my routines in the second programming assignment and weren't able to get your program to work correctly because of this, please send me some email and we'll work something out. But you will need to demonstrate that the problem with your program is dependent on this factor.
all: edge0 edge1 edge2 ...
edge0: edge0.o
$(CLINKER) $(OPTFLAGS) -o edge0 edge0.o
edge1: edge1.o
$(CLINKER) $(OPTFLAGS) -o edge1 edge1.o
edge2: edge2.o
$(CLINKER) $(OPTFLAGS) -o edge2 edge2.o
.
.
.
We ask that you name your base code as edge0 and your optimizations as edge1, edge2, etc. You should specify in your report which optimizations are in each executable.
cpu limit exceeded, cored dumped.this means that your program has been running for more than 20 minutes (your environment is set up such that each process has a maximum running time of 20 minutes). Given the image and chunk size, your program shouldn't be running this long. Please check your program to see if you can find any inefficiencies that would cause it to run longer than necessary.
check_for_processes <machinefile> <executable>For example,
check_for_processes machines pedge_detect
CHANGE TO ASSIGNMENT #3: Instead of running your experiments with a 2048x2048 image, use 1024x1024 image and chunks sizes of 4x4, 16x16, 256x256 and 512x512. This change is already reflected in the posted assignment, so if you are just starting out then ignore this announcement.
Here are some suggestions on how to stage your long-running experiments:
If you have a long run of experiments to do and you don't want to stay logged in for the duration of the run, you can use at command to run your experiments. If you simply put them in the background (with "&" or "bg") some shells will kill the processes if you exit the shell. Here is how to run command my-command immmediately:
at now at> my-command at> (press Control-D)
If your program produces anything on standard input you will be notified by mail when the job is done (or killed). If your program does not produce anything on standard input but you still want to be notified by mail then use -m option. See the man pages for further details.
ps -u <username>I have provided a script written by Walfredo Cirne to abort the leftover processes. It is also in your $PUBLIC directory. To use, type
killn <name of process(es) to be aborted>
http://ieng9.ucsd.edu/~gmcclell/pgm.html
cd <source code directory> tar cvf - . > mycode.tarThen turn in your code by copying it into the turnin directory as done in the last assignment. However, instead of giving group readable permissions, we now have a more secure way of giving Dmitrii and I exclusive access to your code thanks to Otto:
1. Create the file of interest (<file> in this procedure).
2. Remove group, world permissions:
chmod go-rwx <file>
3. Give Shava and Dmitrii discretionary reading access:
setfacl -m user:ssmallen:r--,user:dzagorod:r--,mask:r-- <file>
4. Check you've done this correctly by retrieving the ACL entries:
getfacl <file>
Make sure that the "effective" permissions for ssmallen and dzagorod are r--.
Otto has made a model turnin script which does these operations.
If you're interested you can find this at
~osievert/class/260/bin/turnin
cd <source code directory> tar cvf - . > mycode.tarThen turn in your code
turnin -c cs160s mycode.tar
edge_detect: edge_detect.o
cc -o edge_detect edge_detect.o -lm
xv <pgm file name>
Currently, there is no way to send string arguments that contain spaces using
mpirun. We are working on fixing this and hope to have it incorporated into
our next release. You can get around using mpirun by using a procgroup file.
By typing
mpirun -show -np <num processors> <executable>
you can see how mpirun constructs a procgroup file. You can use this as an
example to create your procgroup file, then type
<executable> -p4pg <procgroup file name>
/usr/ucb/cc: language optional software package not installedwhile compiling, this is not a problem with MPI or your program...it's the machine you trying to compile on. So, the fix is to report the problem to ACS and move to another machine (or at least compile on another machine). This error message was seen at uape-28...I don't know if exists elsewhere. Basically, it's complaining that it can't find the regular cc compiler. I already reported this problem to ACS, so hopefully uape-28 will be usable again soon. If anybody discovers when the problem becomes fixed, email me, and I will put it up on this page.
1 of 4: Hello, World! 3 of 4: Hello, World! 2 of 4: Hello, World! 0 of 4: Hello, World!I had thought it was enough to prefix messages by their rank to distinguish where messages sent to stdout/stderr were coming from. But, it seems that this is not always the case (i.e. it is possible for messages from different processes to be interspersed with each other). So, it is possible to see something like this in your program:
1 of 4: Hello, World! 3 2 of 4: Hello, World! of 4: Hello, World! 0 of 4: Hello, World!As you can see, the message from process 2 started printing in the middle of the message printed out by process 3. And as far as I know, there is no easy way to handle this. If this is something that bothers you, the best solution I have come up with for the time being is to print your messages to files identified by a process's rank rather than to stderr/stdout. So, for example, you could use something like
FILE * mystdout; char filename[MAX_FILENAME_LENGTH]; sprintf( filename, "out%i", rank ); mystdout = fopen( filename ); . . . fprintf( mystdout, "%i: Some output message\n", rank ); . . . fclose( mystdout );However, do not turn in your programming assignment #1 using the above formatting of messages...leave all output printed to either stderr or stdout. The above is only something you should do for future assignments or for your own convenience while programming or debugging programming assignment #1.
ls -ld $HOMEThe output of this should look something like
drwxr-x--- 10 cs160szz cs160s 4096 Apr 5 18:53 /home/solaris/ieng9/cs160s/cs160szz
^
|
----- if this bit is set to 'w' you have group writeable permissions
To remove the group writeable permissions, execute
chmod g-w $HOME
int MPI_Recv( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status )