One crazy suggestion, install Python from source. Configure time about 42 sec. and compile time either around 3 minutes, or 48 sec with make -j
.
Your class will be using Python anyway, and seeing how long it takes to build from C vs. how long it takes to run Hello World
in Python ought to begin to give them some appreciation of the differences.
Otherwise, two options that I'd considered are one with a relative fast compile and the other with a longer compile.
Fast compile - C source
The option for a fast, but watchable, compile is curl
, which is probably already on the system. curl
is written in C. It is available on GitHub. curl
is released under its own license which is similar to MIT/X, but not identical. If curl
is on the system already you can perform the configure
and make
commands, and then stop. The students will be able to see what goes into the process of compiling it, and you won't have to modify your system with the actual install. The original install of curl
can be used to show what it does. Of course, once you demonstrate the speed of the binary it's nice to have a flashy result. As curl
does not require the returned file to be rendered in a browser, you could have a simple ASCII-art file to download. Hosted on the same computer, and using the 127.0.0.1
IP would, of course, be the fastest, and best show of the difference between compile and run times. A simple demo of what could be downloaded could be "HELLO CLASS". curl https://www.gypsyspellweaver.work/hello_class
or from the Gist,
My expirements, using an AMD FX 8300 8-core CPU, gives configure times in the one minute range and compile times in the one minute range. In both cases there shouldn't be the need to add any switches or options, and while speaking you won't have to think about what options was I supposed to use? for the commands. Timing your delivery around the process should be reasonably simple, and the process is fast enough to not become boring for the students to observe.
Slow compile - FORTRAN source
There is a project for physics (good place to look for FORTRAN programs) called Octopus for doing virtual experiments. Octopus is released under the GPL ver 2 license, and contains external libraries licensed under a variety of other OpenSource license. The current list of licenses can be found in the GitLab repository. The program does have some dependencies, all of which were easily found in my SUSE repositories for simple installation.
Again, using my system, I found the ./configure
command to be quite fast, typically under 30 sec. The compile time, however, was much longer, avg. of 8 min. Use of the -j
flag on make
was significant in this case, avg. of 3 minutes to compile. As in the curl
case, there's no need of switches or options (unless you want to use the -j
swwitch on make
for the time savings.
Octopus dependencies
The non-optional dependencies listed on the installation page are:
Since SUSE had these in their repos, I'm guessing they're likely in the repos of other major repos. Just be sure that the development packages, -devel
or -dev
, are installed as those include the headers needed to build other programs, such as Octopus.
In the case of Octopus I have no real idea what would make a fast, and simple, output for the maiden launch of the program. Their website gives a simple run to use. It involves creating an input file, always named imp
, in the current directory and running octopus
. The simple input file is:
CalculationMode = gs
%Coordinates
'H' | 0 | 0 | 0
%
Using that example, the best I can create for a demo is to trap the output to a log file, then display the convergence result data. octopus >&log; cat static/convergence
. Using my system as a reference, the typical run time is between 1.000s and 1.025s. Changing the command to octopus >&log; octopus >&log; cat static/convergence
so that the command runs twice, using the results of the first run to fine-tune the results of the second run, adds approx. .650s to each run. The output of the single run is a table of 9 results and the double run produces a table of one result.
As a final resource, if none of these ideas work for your situation, or instructional style, you could look through the list of programs, organized by language, on dmoz. Surely something there will work for your presentation.