Linux speed and optimization options

From: Niclas Jonsson Date: December 09, 1998 technical Source: cognigencorp.com
From: Niclas Jonsson <niclas@c255t.ucsf.edu> Subject: Linux speed and optimization options Date: Wed, 9 Dec 1998 12:29:52 -0800 (PST) The last days discussion about Linux inspired me to do a few (limited) benchmarking tests. I thought the list would be interested in the results. I had two questions: 1) Is the same NONMEM problem, on the same hardware, faster under the Linux operating system than under Windows? 2) What level of optimization should one use on Linux with the g77 compiler? Methods: I used three of the example NMtran control streams that are shipped with the NONMEM V distribution (CONTROL5-7). These implement the same model using different ADVANS (2, 7 and 6 respectively) for the theophyllin data set (THEOPP). The run times in seconds for these problems on an Sun Microsystems Ultra 2 are (taken from Guide III): ADVAN2 4.2 ADVAN7 19.1 ADVAN6 36.3 I ran the NONMEM runs on two different computers. Machine 1 was a P233, 96MB laptop with either Linux or Windows. (Linux here is the RedHat 5.1 distribution with the 0.5.22 version of the g77 compiler and Windows is Win95 with Microsoft PowerStation Fortran 4.0.) Machine 2 was a dual PII 333MhZ with 160Mb RAM and the same Linux system and compiler as Machine 1. The run times I report are the elapsed time from the start of the execution NONMEM load module to the end (i.e. not including compilation time) in seconds. The first experiment was to compare the same NONMEM runs under Linux and Win95 on the same machine (Machine 1). The compiler options I used were -O -ff90 (g77) and /Ox and /Op (PowerStation Fortran). Linux Win95 ADVAN2 4.15 3.40 ADVAN7 26.93 28.20 ADVAN6 45.50 43.10 The same runs on Machine 2 was ADVAN2 4.02 ADVAN7 14.25 ADVAN6 23.69 The second experiment was to investigate the impact of optimization level with g77. Two different levels, in addition to -O, which is reported above, were investigated: -02 and -03. For each level, all subroutines in the NONMEM V distribution were re-compiled. These runs were made on Machine 1. -02 -03 ADVAN2 3.80 3.82 ADVAN7 25.75 25.98 ADVAN6 43.67 43.45 Conclusions (given the limited number of test cases): - There is no speed difference between Linux+g77 and Win95+PowerStation Fortran on a given set of hardware. - It does not seem to be necessary to increase the g77 optimization level beyond -O or -O2. Enjoy! Niclas Jonsson
Dec 09, 1998 Niclas Jonsson Linux speed and optimization options
Dec 09, 1998 William Bachman RE: Linux speed and optimization options