Tutorials
OpenCL from AMD
2Having spent the last four weeks struggling to debug my OpenCL kernels (to the point that it was often easier to re-write them in CUDA and use nvcc’s -deviceemu flag) I finally took the plunge and installed AMD’s Stream SDK.
I was surprised to find it was actually much easier to install and configure than NVIDIA’s solution… except for its assumption that I had both an AMD CPU and ATI GPU. Hopefully anybody with similar problems will stumble across this blog post, and it will save them some time.
I should note that this guide will be completely useless unless you are using a Linux distribution.
- First, download the AMD Stream SDK here. (You will need to sign up.)
- Make sure to grab the OpenCL driver as well.
- Extract the SDK files from their .zip file, and follow the instructions contained in the “docs” folder.
- Extract the .run file from the OpenCL driver .zip file, and run it with the –extract option; this extracts the contents of the .run file to another directory (of your choosing).
- Copy the contents of /ati/arch/lib/x86 (or /at/arch/lib/x86_64) into the /lib/x86 (or /lib/x86_64) directory of your SDK install.
And you’re done! Why AMD chose to package some libraries necessary for libOpenCL.so to work with their GPU-specific drivers I don’t know, but they did!
If you’ve followed the steps here (and in AMD’s documentation) correctly, then all should work properly. Enjoy the ability to use printf in a kernel — I know I am.
From SquirrelMail to Gmail
2My girlfriend recently expressed her hatred for the Warwick University WebMail system. It’s slow and bulky, has to be emptied regularly if you’re using it as your main e-mail account, and gets spammed regularly with e-mails from Employer Connect. It didn’t take long to convert her to Gmail, and the aim of this blog post is to help other people to do the same.
If you don’t know what Gmail is (and haven’t already clicked the link to it above), it is an e-mail system operated by Google. Unlike SquirrelMail, it allows you to access e-mails from all your accounts, archive and search them. It currently has around 5GB of storage per account (a figure that’s rising every day) meaning that you never have to delete an e-mail. The size means you can even use it as online web storage, by e-mailing yourself back-ups of your work and other such things, or using add-ons specially designed to make your Gmail account appear to your computer as another harddrive!
And now we begin. I’m going to assume that you have both your Warwick Webmail and Gmail accounts set up; if you don’t have a Gmail account then you can get one by clicking here and following the instructions.
Forwarding Your E-Mail
The first thing to do is forward your Warwick e-mail to Gmail; this will allow you to read your e-mail there instead.
- Log in to Warwick WebMail.
- Click “Options” on the bar at the top.
- Click “Message Filters” in the new Options menu.
- Click “New Rule” and make selections as pictured here, though with your new Gmail address filled in.
- Uncheck”Keep a local copy” if you never want to visit WebMail again. Keep it checked if you’re happy for it to keep backups (but remember you’ll need to empty it from time to time).
- Click “Add New Rule”.
You’re done! All e-mail sent to your @warwick.ac.uk address will now be received by your @googlemail.com address. But Gmail’s capable of much more; read on if you want to be able to send messages from @warwick.ac.uk as well.
Getting Gmail to Send University E-mail
This is where Gmail really puts other Webmail to shame; you can use it to send e-mails that appear as though they were sent from your @warwick.ac.uk address (or any other e-mail address that you have, in fact).
- Log in to Gmail.
- Click “Settings” in the top right corner.
- Click the “Accounts” tab in the settings menu.
- Click “Add another email address” and fill in your details.
- Google will e-mail your Warwick WebMail account with a verification code, but this will be sent directly to your Gmail account anyway. Just copy it when it arrives into the verification box.
And again, you’re done! Now, when using Gmail to compose an e-mail, you will have the option of selecting different e-mail addresses from a drop-down box. Whether you want people to receive an e-mail from @googlemail.com or @warwick.ac.uk, it’s up to you.
Gmail, Labels and Filters
Labels in Gmail are basically a way of splitting your e-mails into groups, to make searching them easier. This section is concerned with how to label all your university e-mails with a “University” label, so you can keep them separate from your other e-mail.
- In Gmail, click “Settings” in the top right corner.
- Click the “Labels” tab in the settings menu.
- Create a new label called “University” (we’ll configure how it works in a second).
- Click the “Filters” tab in the settings menu.
- Click “Create a new filter”.
- Fill in your @warwick.ac.uk address in the “To” box and click “Next Step >”.
- Check “Apply the label”: and select your University label from the drop-down.
- Click “Create filter”.
Done! You should now see a green box to the left of your e-mail listing called “Labels”, containing a link called “University”; if you click it, you’ll instantly be shown all your University e-mail.
That’s about it, really; any more accounts, labels and filters you want to add are going to be specific to you and therefore its hard to write about them. But experiment and play around; there’s lots of awesome things it can do. For example, you can write a filter that takes any e-mail Facebook ever sends you and puts it in a separate inbox, or instantly deletes e-mails from people you don’t like.
I hope that this has been helpful to at least one person. If it’s been helpful to you, please comment!