Jupyter Notebook

I would like to start a conversation in this group about the use of Jupyter Notebook for education. How many of you use them? Do you think they are a better teaching tool than traditional notes/codes? Do you use them with Python only or with other languages as well, such as Julia?

I think it would be interesting to ask CIG to create repository and maintain it for teaching material for all undergraduate and early graduate instructor in geophysics. How many of you would share these resources? How would you envisage the organization of such a general repository, how could we select the material in a practical manner, and so on?

I was discussing something similar with @jbnaliboff and @ljhwang last week. I think this probably warrants a bigger group discussion about how such a repository would operate, and what people hope to get out of it. I have some bandwidth right now, and I’d really like to get the gears turning on making something like this happen.

I’ll follow up later this week or early next, but I think it would be useful to get a group together via zoom some time this term to discuss how we might proceed with something like this, and what CIG’s role should be in curating educational content in general.

One reason that I do not currently use them is that I find parallelism cumbersome in Jupyter. Perhaps this has improved since I last tried it.


I agree, parallel computing is still done better with other tools. There is this option to use MPI for Python by starting a cell with %%px , but I agree it is just for prototyping. It might still be good for teaching, though.

When do you teach parallel computing in your classes to non computer science students, what do you normally use?

That would be great. I am totally for it. We should address the entire CIG community and ask for their priorities.

As Matt was pointing out, Jupyter is great for starting, for students who know little about computing, but we need a plan also for more advanced courses, who for example want to have some parallel computing component in their syllabus.

I use C and MPI. I know it is old school, but I still find the C syntax very clear, and the MPI API well-designed. I agree that looking for type errors or memory bugs is a pain, but I try to mitigate that with lots of compiler warnings turned on and using tools like valgrind.

Thanks for restarting this discussion. I am working on a website overhaul which will allows us to add support for running Jupyter Notebooks. I have a placeholder in for Jupyter but I would be interested in hearing people’s ideas on what this will look so it can be properly integrated.

We should also look at JupyterLab as it has terminal support.

@knepley Jupyter supports a number of kernels including C but not MPI:

@gabrielemorra You asked how a repository might be organized. Maybe we start with potential uses:

  • Undergraduate education
  • Graduate education
  • Software Tutorials
  • Short courses
  • Public outreach

There would be crossover between these categories. If we tagged modules correctly into a general software repository, then it would be possible to create custom courses. As one vision.

@ljhwang, I would put undergraduate and graduate education together, as students arrive with very different levels of programming skills as senior and graduate level of study, particularly in geosciences, but not only.

What about calling the entire community of CIG to tell us which Jupyter resources already exist and then organize the repository around what people offer.

While CIG gets ready to run the Notebooks on its own server, we could place them in a repository linked to a google cloud account, so it would be possible to run them automatically on google colab. This is what I normally do with my students.

1 Like

There are many ways now to run MPI codes on Jupyter on the cloud. For example on google colab: https://stackoverflow.com/questions/57745296/how-can-i-run-mpi4py-code-on-google-colab

I am sure the same can be done on Amazon Cloud.

@gabrielemorra - Thanks for initiating this discussion! I will be developing both introductory and advanced python-based geoscience computing courses over the next year, and would be very interested to participate in any discussions going forward.

I know @mibillen and @maxrudolph have also developed quite a bit of python-based curriculum, and would likely have quite a bit to add to these discussions as well.