Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra Libraries #5

Open
cianyleow opened this issue Dec 8, 2015 · 6 comments
Open

Extra Libraries #5

cianyleow opened this issue Dec 8, 2015 · 6 comments

Comments

@cianyleow
Copy link

Are we allowed to install/use any extra libraries? If so, how do we go about doing this?

@m8pple
Copy link
Contributor

m8pple commented Dec 8, 2015

I think it depends on the specific purpose of the library. Anything that is providing
generic maths functions or compute services I'm inclined to allow. If it is targeting
the problem very specifically (e.g. a fractal rendering library), then I think it
is not in the spirit of the task.

For generic libraries it needs to be part of the shared image - I allowed for
per-submission provisioning scripts last year, and it was a nightmare on my
end, which is why I haven't mentioned it this year.

So if you have a specific sudo apt-get install ... command that will work
in the AMI (and it isn't libcudafractal) then I can add it to the single setup
script I have for marking.

For now, let's say that you just post the apt-get command (or a
wget/configure/make/make install) to this issue - so if you want to use a
library, I'm afraid you have to leak that information to others.

I'll leave the issue open.

@cianyleow
Copy link
Author

Sorry, forgot to actually reply to this.

Could we add the libjpeg-turbo library? It is essentially libjpeg with SIMD instructions and some functionality to make it a little faster.

Jake and I compiled and built it for DoC machines (as we don't have sudo rights), so I can either make a script for that or I think the command should be sudo apt-get install libjpeg-turbo8 instead of sudo apt-get install libjpeg8. Let me double check that on an AWS instance (Jake and I are being careful about what we start up now...) and I'll let you know if we need anything different if the above is allowed.

One caveat is that I think you need to uninstall libjpeg, but it does provide all of the functionality of libjpeg, but with the speed ups - so possibly a bonus for everyone in the course? If you don't want to swap out libjpeg for libjpeg-turbo, we can just include the shared object files needed and ensure that it compiles and runs with out affecting the normal libjpeg (have to change the LD_LIBRARY_PATH for dynamic linking at one point but only for our session and can be done in the makefile).

@m8pple
Copy link
Contributor

m8pple commented Dec 10, 2015

I'm aware of libjpeg-turbo, and deliberately didn't install it. It's not that I'm against you
using it, but it's not something I want people to be able to globally take advantage
of. It takes some thought and analysis to determine the bottlenecks, so only those
who do it should get the benefit.

So I think here a local install would make sense as part of your makefile or environment,
as it isn't something that needs system level permissions.

I will commit to having your bin directory listed in LD_LIBRARY_PATH whenever I
run your executable, and I will not move your bin/julia_filter after the build. So during
make bin/julia_filter you can do whatever setup is needed, and can also handle
the link command needed to pick up the different jpeg lib.

I'll be doing a couple of test runs today and tomorrow (I'll email out a schedule), so
there will be a chance to fine-tune it.

@cianyleow
Copy link
Author

Thanks, will close this issue now then.

@cianyleow cianyleow reopened this Dec 10, 2015
@cianyleow
Copy link
Author

Hi, found that to compile libjpeg-turbo, some more tools are required. Could you run sudo apt-get -y install curl autoconf automake libtool nasm yasm before making ours?

@m8pple
Copy link
Contributor

m8pple commented Dec 11, 2015

Yes, I've added those libraries to the provision script. I'll document them on the front-page too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants