Link to this document's Jupyter Notebook

In order to successfully complete this assignment you need to participate both individually and in groups during class. If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class on Monday January 23.


In-Class Assignment: Which Langague is the fastest?¶

graphic of the Python and C++ logos

Image from: https://cacm.acm.org/news/230374-report-python-closes-in-on-c/fulltext

Agenda for today's class (70 minutes)¶

  1. (30 minutes) Review HW1 results
  2. (40 minutes) Timing Comparison
  3. 17h-HW2_OMP

1. Review HW1 results¶

As a class we will go over the homework.

Most common languages:

  • Python
  • C++
  • Matlab / Julia / Fortran
  • 06h-HW1_Wave_Equation

Question: Which language is the fastest?

Question: What costs more? Human time or Computer time?

Question: How do you make Python go faster?


2. Timeing Comparison¶

Log onto the HPCC and do a git pull on the CMSE401 git repository. This should create a new folder called WAVE_COMP.

In the WAVE_COMP folder are the following solutions to the Wave equation.

  • C
  • CSHARP
  • FORTRAN
  • JAVA
  • MATLAB
  • PYTHON

As a class we will split up these solutions, get them to run and do a timeing study for each.

Put results in our timing file: Timing Studies

DETAILED INSTRUCTIONS¶

  1. Log onto the HPCC
  2. Log onto a dev-node (Lets try to get different people on different nodes).
  3. Do a git pull of the class repository
  4. Compile the example assigned by the instructor (Keep track of your instructions to share with the class)
  5. Run 10 timing runs on your node and report the results
  6. Be prepared to share your compile instructions and results with the class.

Congratulations, we're done!¶

Have one of the instructors check your notebook and sign you out before leaving class.

Course Resources:¶

  • Website
  • ZOOM
  • JargonJar
  • GIT

Written by Dr. Dirk Colbry, Michigan State University Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.