uwhpsc-2016 / homework4

Homework #4
0 stars 1 forks source link

Traceback with Make for heat.c code with heat_parallel changes. #3

Open jleskiw opened 8 years ago

jleskiw commented 8 years ago

I was able to produce the expected serial_heat.png plot, following the steps given in the homework.

$ make lib

produces the object file

mpicc -Iinclude -shared src/heat.o -o lib/libhomework4.so

updated test_homework4.py with the following addition, as per suggestion from issue #1.

import matplotlib 
matplotlib.use(‘Agg')
$ python test_homework4.py

which produced the expect plots

serial_heat.png
parallel_heat.png

2) I was not able to test my heat_parallel.c changes, as I received a test_homework4.py make file traceback error. I believe I followed the steps given in the homework. Please advise

-made updates to heat_parallel to include use of MPI. -installed mpi4y

$ pip install mpi4pyd

updated test_homework4.py to uncomment the parallel code, comment the serial plot command.

$ make lib

successful

$ make test

Traceback (most recent call last):
    from wrappers import *
  File "test_homework4.py", line 13, in <module>
  File “/projects/file_path/homework4-username/homework4/wrappers.py", line 21, in <module>
    from homework4 import (
  File "/projects/file_path/homework4-username/homework4/__init__.py", line 1, in <module>
    raise OSError("You need to compile your homework library using 'make'.")
    from wrappers import *
OSError: You need to compile your homework library using 'make'.
  File "/projects/file_path/homework4-username/homework4/wrappers.py", line 21, in <module>
    raise OSError("You need to compile your homework library using 'make'.")
OSError: You need to compile your homework library using 'make'.
cswiercz commented 8 years ago

Sometimes the Python wrapper system doesn't catch C runtime errors properly. That is, there may be a non-compile-time issue with your code.

cswiercz commented 8 years ago

Possibly related, I'm not sure why you're shifting your heat equation data a la shift.c. That was a very separate problem. In this problem I'm asking you to apply the same data communication strategy as shift.c to the problem you need to solve in the homework.