From: Eric F. <efe...@ph...> - 2008-07-07 10:28:04
|
> > Rainer Machne wrote: > > this might be a general problem with current gcc > compilation. For some > > other reason I have just integrated a quite large model and can > > confirm that gcc compilation also on my machine takes surprisingly > > long. We should investigate this problem, but currently we > don't have > > much time unfortunately. > > Ok, I have just analyzed this a bit. Most time is indeed spent by the > compiler, and not e.g. in loading the .so/library file. > > This model has 93 ODEs, and the resulting c file is 1.2 MB big! Is > this file size a bottle-neck for gcc file parsing? > > Some ways to decrease file size: > The majority of this file are 0 entries of the Jacobian. If CVODE > initializes these correctly (DENSE_ELEM makro), then we could just > skip all these equations. Also the whole adjoint stuff is co-compiled, > even if not requested. This is another big part of the file, and the > according functions could be compiled separately, on request. > > what do you think? Hi, I am coming back to you regarding the issues I get using model compilation on AIX (old method, using gcc) and would like to share my findings. I previously reported how slow gcc was to compile models, taking sometime almost 2 minutes. This time was proportional to the size of the value array in the c file, and not the overall "complexity" of the model (nb of species and events for instance). Also, it is very dependent on the level of optimization the compiler is set. I tried compiling bhalla_02.xml MAPK model with gcc and xlc_r (IBM compiler on AIX) and got those results (in seconds): For gcc I used something like: time gcc -I/hpc/work/fernandz/local/include -I/hpc/work/fernandz/local/include -I../src -pipe -shared -fPIC -o ./out ./model.c -L../src -L/hpc/work/fernandz/local/lib -lODES -lsbml -lm -lstdc++ -O0 For xlc_r I used something like: time xlc_r -I/hpc/work/fernandz/local/include -I/hpc/work/fernandz/local/include -I../src -G -o out ./model.c -L../src -L/hpc/work/fernandz/local/lib -lODES -lsbml -lm gcc -O0 15.4 -O1 108 -O3 334 xlc_r -O0 1.7 -O1 1.7 -O2 20 -O3 21 -O5 fails with unresolved references I share your opinion Rainer: if we can drop the 0 entries it might significantly accelerate the compilation time. Obviously gcc has some issues on AIX to compile such kind of code, but xlc_r does not shine either at higher optimization levels. Also, I replaced gcc with xlc_r in compiler.c (and replaced -shared with -G, removed other options like -pipe, -fPIC, -lstdc++), set -O0 and it works very well. Maybe that would be nice to have a compile_with_xlc_r function for AIX users. I'll try to send a patch when I do it cleanly. Eric |