For the Moodle scripts, it’s free for personal use. Including it with any sort of package without my permission is forbidden (subject to change). Update to date license is in http://blog.ods.org/mood/license
June 6, 2008
Moodle: Finding Inactive Sites, Part 2
Exactly like the previous article of finding inactive sites, the script sends a CSV file to the browser with the columns DaysInactive,URL to the course site, Instructor, and the intstructors e-mail address. For courses with multiple instructors, each instructor gets a row in the CSV instead of putting all instructors and their e-mail addresses in one row.
Moodle: Finding Inactive Sites
This script outputs inactive courses based on mdl_log table from the database, so you must have that logging on.
Moodle: How to Find Course Size in Unix
The following script outputs a table with file sizes using du (YOU MUST HAVE IT) for each course in moodledata. As Wordpress cannot correctly display HTML as text, I’ve linked to it. Drop it in your main moodle directory, the same one that has config.php
June 2, 2008
State of MPI on the IBM Cell and MPI Bandwidth/Latency Testing
Currently, OpenMPI is the best option for Cell blades due to its loopback communication performance. Loopback communiction is used when a node is sending data to another node on the same system, which on a Cell blade is likely due to it having dual Cell Broadband Engines. OpenMPI already implements shared memory for loopback communication, but MPICH2 uses less effecient means for this type of loopback communication. That means MPICH2 has lower performance in the average case until the the communcation module “Nemesis” is released for the Cell/PowerPC.
To test these conjectures, take a look at the classic MPI Ping-pong example (C or Fortran77). The output from a Cell QS20 running OpenMPI version 1.2.1 is below -
Hello from 0 of 2
Hello from 1 of 2
Timer accuracy of ~4.053116 usecs
8 bytes took 70 usec ( 0.228 MB/sec)
16 bytes took 13 usec ( 2.440 MB/sec)
32 bytes took 11 usec ( 5.836 MB/sec)
64 bytes took 11 usec ( 11.671 MB/sec)
128 bytes took 10 usec ( 25.565 MB/sec)
256 bytes took 12 usec ( 42.108 MB/sec)
512 bytes took 13 usec ( 78.090 MB/sec)
1024 bytes took 19 usec ( 108.733 MB/sec)
2048 bytes took 29 usec ( 141.982 MB/sec)
4096 bytes took 382 usec ( 21.448 MB/sec)
8192 bytes took 85 usec ( 192.492 MB/sec)
16384 bytes took 138 usec ( 237.784 MB/sec)
32768 bytes took 570 usec ( 114.964 MB/sec)
65536 bytes took 433 usec ( 302.562 MB/sec)
131072 bytes took 912 usec ( 287.454 MB/sec)
262144 bytes took 1599 usec ( 327.919 MB/sec)
524288 bytes took 3019 usec ( 347.315 MB/sec)
1048576 bytes took 5971 usec ( 351.212 MB/sec)
Asynchronous ping-pong
8 bytes took 36 usec ( 0.444 MB/sec)
16 bytes took 8 usec ( 3.948 MB/sec)
32 bytes took 9 usec ( 7.064 MB/sec)
64 bytes took 11 usec ( 11.423 MB/sec)
128 bytes took 11 usec ( 23.342 MB/sec)
256 bytes took 12 usec ( 42.108 MB/sec)
512 bytes took 15 usec ( 68.174 MB/sec)
1024 bytes took 20 usec ( 102.261 MB/sec)
2048 bytes took 25 usec ( 163.618 MB/sec)
4096 bytes took 64 usec ( 128.208 MB/sec)
8192 bytes took 71 usec ( 230.602 MB/sec)
16384 bytes took 140 usec ( 233.740 MB/sec)
32768 bytes took 290 usec ( 225.865 MB/sec)
65536 bytes took 434 usec ( 302.064 MB/sec)
131072 bytes took 807 usec ( 324.915 MB/sec)
262144 bytes took 1531 usec ( 342.474 MB/sec)
524288 bytes took 3104 usec ( 337.818 MB/sec)
1048576 bytes took 5987 usec ( 350.274 MB/sec)
Bi-directional asynchronous ping-pong
8 bytes took 25 usec ( 0.645 MB/sec)
16 bytes took 11 usec ( 2.918 MB/sec)
32 bytes took 12 usec ( 5.263 MB/sec)
64 bytes took 11 usec ( 11.671 MB/sec)
128 bytes took 13 usec ( 19.884 MB/sec)
256 bytes took 15 usec ( 34.087 MB/sec)
512 bytes took 17 usec ( 60.492 MB/sec)
1024 bytes took 20 usec ( 102.261 MB/sec)
2048 bytes took 35 usec ( 117.670 MB/sec)
4096 bytes took 85 usec ( 96.516 MB/sec)
8192 bytes took 100 usec ( 163.618 MB/sec)
16384 bytes took 181 usec ( 181.079 MB/sec)
32768 bytes took 365 usec ( 179.541 MB/sec)
65536 bytes took 522 usec ( 251.145 MB/sec)
131072 bytes took 1108 usec ( 236.607 MB/sec)
262144 bytes took 2870 usec ( 182.689 MB/sec)
524288 bytes took 5892 usec ( 177.965 MB/sec)
1048576 bytes took 11677 usec ( 179.596 MB/sec)
Max rate = 351.211540 MB/sec Min latency = 4.053116 usec
This ping-pong example will not give you accurate results and the page that hosts it recommends NetPIPE. I suggest both, but ping-pong tends to produce more reliable results as I have encountered some inconsistency with NetPIPE’s measurements.
Scale:
1000 nanoseconds = 1 microsecond (usec), 1000 microseconds (usec) = 1 millisecond, 1000 milliseconds = 1 second
Moodle 1.8 – Disabling Emoticons
There is a patch for 1.9 that adds the functionality of changing settings to enable/disable emoticons, but it doesn’t quite work on 1.8. The best way to do it in Moodle 1.8 is going to your moodle directory, then lib/weblib.php and look for the function replace_smilies (line with “function replace_smilies(&$text)”) and comment them out until after the very last one, which would be the ‘( )’ => ‘egg’ entry.
The benefit of this is that during parsing of text emoticons will not get automatically added, although they can still be used if selected from the menu of an editor. A note is that you should keep at least one valid emoticon entry in the $emoticons array, just to make sure that it doesn’t break anything by making $emoticons empty.