ULAFF / LAFF-On-PfHP

Repository for "LAFF-On Programming for High Performance"
BSD 3-Clause "New" or "Revised" License
39 stars 30 forks source link

Compilation Error for Week0 Due to the wrong Path to libblis.a #3

Closed sweetbiscuit-dy closed 1 year ago

sweetbiscuit-dy commented 1 year ago

Hi, this is no big issue and I can handle it myself, but I feel it's better to point it out. Here it is:

When typing make HelloWorld under the directory Assignments/Week0/C/, it would report such error message:

/usr/bin/ld: cannot find /root/blis/lib/libblis.a: No such file or directory collect2: error: ld returned 1 exit status make: *** [Makefile:27: driver.x] Error 1

it turns out that, for the latest version of branch master of the blis project, the generated library libblis.a doesn't reside in the path /root/blis/lib, but instead, the path /root/blis/lib/haswell, this is the cause of the error. for me, I modified the Makefile on the line defining the variable BLAS_LIB to be BLAS_LIB := $(HOME)/blis/lib/haswell/libblis.a, to solve this issue. you can solve this issue in the way you see fit.

rvdg commented 1 year ago

Thank you for reporting.

In the unit https://www.cs.utexas.edu/users/flame/laff/pfhp/week0-installing-BLIS.html, we specifically ask people to clone a specific version of BLIS so that everyone works with the same version (and these kinds of changes don't affect the course):

In a terminal session, in your home directory, enter git clone https://github.com/flame/blis.git (to make sure you get the address right, you will want to paste the address you copied in the last step.) Change directory to blis: cd blis Indicate a specific version of BLIS so that we all are using the same release: git checkout pfhp

Now, you are better off making it work with the latest version of BLIS, but that means you have to make these kinds of adjustments.

Of course, it could be that you did all of the above and you still get the error. In that case, we'll have to dig a little deeper.

Robert

sweetbiscuit-dy commented 1 year ago

Hi Robert,

Thank you very much for such a detailed reply!

I am a little bit embrassed and also sorry to say that I gave you some wrong information yesterday as I said, and here I quote

or the latest version of branch master of the blis project

I just went back and double checked that the branch I used to build the BLIS project was pfhp all the time, I said it was branch master maybe because my hands were faster than my mind when I type all these words yesterday.

To confirm the issue, I changed the Makefile back to what it was and made sure that BLIS was on branch pfhp, and then I went to Assignments/Week0/C/, and executed the command make HelloWorld. I could still see the compilation fail with the same error message.

The picture attached is the above words in graph version. And sorry again for being careless to give you the misleading information, will be more careful the next time.

Screenshot 2023-02-13 at 20 47 04
rvdg commented 1 year ago

Thank you for your persistence. I'll see how to modify the text so that it more accurately reflex reality!

dnparikh commented 1 year ago

Can you run ls in the ~/blis/lib directory? It sounds like you may have missed the make install step.

sweetbiscuit-dy commented 1 year ago

Hi, @rvdg @dnparikh, many thanks to you. enlightened by @dnparikh, I went back to section "0.3.3 Installing BLIS" and reinstalled BLIS and carefully followed these instructions:

Configure, build, and install with OpenMP turned on. ./configure -t openmp -p ~/blis auto
make -j8 make check -j8 make install

After finished reinstalling BLIS, I proceeded to the following section "0.3.4 Cloning the LAFF-On-PfHP repository", which I had trouble compiling the project for week0, I was happy to find that the issue was gone, no more error, no need to manually edit the Makefile.

Now it can be made sure that the root cause to my "issue" is that I somehow missed to run the make install command. I don't want to find an execuse, this is my fault. thank you for taking time to deal with such issue that should be handled in my end.

Have a good one!

dnparikh commented 1 year ago

Happens to the best of us. I'm glad we were able to figure this out.

rvdg commented 1 year ago

Been there, done that!