-
Notifications
You must be signed in to change notification settings - Fork 9
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
list of ideas for improvements from Gokul #4
Comments
p.s. for iterating over an array (item 11), is |
My initial thoughts on these are: A note on
so it's good for that, but if you need the row/column indices I think it's just as efficient to use two |
Hi @jmb280cam! Docker is a container platform, sort of like virtual machines but operating on an OS level rather than on kernel level. You can find more info here: https://en.wikipedia.org/wiki/Docker_(software) Docker isn't necessarily linked to Julia itself, I was making a more general suggestion to maybe include docker as a scientific computing tool. I certainly use docker all the time. The main purpose of docker is to export software across machines, such that if it works on machine A it is guaranteed to work on machine B. But I tend to use docker just because it's cleaner, compartmentalized, and I don't have to watch out for updates. I just need to do docker pull, and the latest software version is automatically downloaded. But whatever the use case, I think it's useful to know. Anyways this may very well be complicating things more than necessary, and may very well be out of scope. But since I'm already using it for Julia and have the instructions, I'll provide them here. Feel free to make use of any of it if you'd like or leave it out entirely. Setting up docker itself differs, depending on if it's Windows, Mac or Linux machine, and if the user has root permissions (they would if it's their personal computer). After it's set up, I would create a new container like this:
Docker build step: Docker run step: This is how my dockerfile 'Julia-CUDA-Dockerfile' looks like:
The main purpose for doing this is to circumvent the permission issues when working with docker containers. Docker automatically assumes root permission, which means any files created or edited within a docker system will be created by root. This is troublesome when later working with those files outside of docker as a regular user. I'm using plain Linux desktop, so this is a problem. Not sure if it's a problem with WSL2 in windows or Mac though. In any case, this is a sample Dockerfile that works, can adapt it as per use case. After creating a container, I can call on that container for future use. I'm using vscode, and in vscode it's just a click on a button. Within terminal though, these are the steps:
Anyways, these steps are probably overkill. I already have these instructions, so I sent them to you. Feel free to disregard this. |
Thanks for that explanation. I would have thought that for CATAM we wouldn't need to consider this sort of thing (since the code should be simple enough to work on any system), but it's good to have in the back pocket if it comes up |
Just a small technicality on this point. The eachindex iterator will be as efficient as two for loops only if the for loops access the memory in column order i.e. run through the columns in the outer loop.
I’ve attached a small benchmark to show the performance difference when accessing in row major (in this case of summing a large matrix it’s about a 5x overhead).
It’s a pretty easy mistake to make as a beginner especially because in some sense it’s unintuitive (indexes read left to right so the first variable in mind when writing the for loops is the left-most) and is the opposite to C. However, there are good reasons to do it!
Cheers,
Nick
… On 21 Jul 2021, at 10:46, jmb280cam ***@***.***> wrote:
My initial thoughts on these are:
1, 10 may fit in better into case studies
2, 3, 4, 5, 6 could constitute a new section, but more likely a case study (as you say)
7 should probably be mentioned
8, 11 can go into the efficiency case study, whatever that may end up being
9 I don't know what you mean by "docker", could you elaborate please?
A note on eachindex(m), it's described in the Julia manual as
an efficient iterator for visiting each position in A
so it's good for that, but if you need the row/column indices I think it's just as efficient to use two for loops
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ANVSMYIJQBE3UVTIJSRVGS3TY2JPHANCNFSM5AXRES3A>.
|
I just realised that Gokul provided an example too, d’oh!.
I also read through the document as it stands - it’s very well done!
Cheers,
Nick
… On 21 Jul 2021, at 10:46, jmb280cam ***@***.***> wrote:
My initial thoughts on these are:
1, 10 may fit in better into case studies
2, 3, 4, 5, 6 could constitute a new section, but more likely a case study (as you say)
7 should probably be mentioned
8, 11 can go into the efficiency case study, whatever that may end up being
9 I don't know what you mean by "docker", could you elaborate please?
A note on eachindex(m), it's described in the Julia manual as
an efficient iterator for visiting each position in A
so it's good for that, but if you need the row/column indices I think it's just as efficient to use two for loops
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ANVSMYIJQBE3UVTIJSRVGS3TY2JPHANCNFSM5AXRES3A>.
|
Just putting it out here, saw this on my youtube recommendations. Think it's a good link to share: https://youtu.be/gRj7E5kYG1I Also, @sje30 you may be interested in this, but perhaps out of scope for catam-julia: https://youtu.be/Sh_jBtP7RVY |
thanks. there are also some nice pluto videos there from the JuliaCon |
Hey! I also came across these last week, wanted to post this then but got distracted by the presentations. Anyway, this is the post: https://www.numerical-tours.com/julia/ Numerical tours in Julia. Not sure if it's interesting/relevant, but sending it across anyway. |
Thanks @srgk26 if you had a spare 30-60 minutes, would you be able to read over https://sje30.github.io/catam-julia/intro/julia-manual.html and comment? |
Hi @sje30, I had a brief look. Firstly, should say that was a bit weird to see cell output above the code. But it seems that's the way Pluto was designed. A quick couple of points (caveats really):
I'd be able to give a more detailed comment maybe over the weekend. I'm packing up now actually, for a flight to India tomorrow. Will be back in the UK in about a month. I'd be happy to look into this closer then. |
Thanks again for the input Gokul, I'll make those changes |
hi @jmb280cam
here is a list of ideas for improvements from Gokul @srgk26
some of these could be in the intro, some (like types) would be better off in a case study.
CC: @Nick-Gale for info
The text was updated successfully, but these errors were encountered: