From: Eric F. <efe...@ph...> - 2008-01-15 10:14:16
|
> -----Original Message----- > From: sbm...@li... [mailto:sbmlsolver- > dis...@li...] On Behalf Of Kevin Stratford > Sent: 14 January 2008 18:19 > To: sbm...@li... > Subject: [SOSlib-discuss] advice[Scanned] >=20 >=20 > Dear All, >=20 > I am interested in using the SBML_odeSolver library as part > of a project on which we will want to deploy it on a number > of different Unix systems (e.g, AIX and various others). >=20 > I am currently intending to use libsbml-3.0.3, sundials-2.3.0, > along with a version of 'libSoS'. However, there appear to > be a number of issues with the configure / build process > (at least under AIX 5.3) with both the 1.6pre release and > the latest cvs. >=20 Hi Kevin, This is exactly the configuration I have, and I can advise you. Firstly, I faced many problems with the IBM compilers (xlc/xlC) and I strongly suggest you use GNU tools to build the libraries and software. It was possible for me to compile using xlc (requiring Makefile patching usually, as xlc does not accept the same switches than gcc), however, sundials performance was significantly reduced compared to the code generated with gcc! I did not have time to investigate this issue though. Moreover, if GNU is installed from packages on your AIX system, it will be probably an old version (rpms distributed with AIX were usually gcc-3.2.2, tar 1.13, etc...) Don't use it. I had to install my own GNU toolset from source and stick with it. Using the old gcc leads to linking issues when compiling latest cvs versions of libsbml and soslib. I first decided to install the software in my own work directory, I used the shell bash and adjusted the environment variables accordingly, eg: PREFIX=3D/path/to/work/local <-- where I put my software PREFIXGNU=3D/path/to/work/gnu <-- where I put GNU tools I then used $PREFIX/$PREFIXGNU for the ./configure --prefix=3D The first step is to install and compile tar 1.19. tar 1.13 which is provided with AIX is not able to untar correctly gcc archive (beware, 1.13 actually seems to work, but you would get file-not-found errors during compilation! I reported this to the gcc ML.) As you might be aware, you need to use gmake and not the IBM make to compile the software. I therefore installed my own -latest- make 3.81, can't do evil. Then uncompress gcc-4.2.2 and compile according to the instructions (e.g use a separate folder for compilation, etc). It should compile and install without problem. FYI, I used these configuration options: --enable-threads --enable-languages=3Dc,c++ --prefix=3D/hpc/work/fernandz/gnu --enable-threads --disable-shared --enable-version-specific-runtime-libs --disable-nls Adjust your environment variables: eg for bash: export CC=3Dgcc export CXX=3Dg++ export F77=3Dxlf_r export TMPDIR=3D~/User-Tmp export PREFIX=3D/path/to/work/local export PREFIXGNU=3D/path/to/work/gnu export LIBPATH=3D$PREFIXGNU/lib/gcc/powerpc-ibm-aix5.3.0.0:$PREFIX/lib:/usr/lib:= / lib export PATH=3D$PREFIXGNU/bin:$PREFIX/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/b= i n/X11:/sbin:/usr/java131/jre/bin:/usr/java131/bin:/usr/local/bin:/usr/va c/bin:/usr/vacpp/bin:/u sr/lpp/LoadL/full/bin:/usr/local/gnu/bin Check that g++ -v returns version 4.2.2. I then installed other GNU tools that are useful: Autoconf Automake Curl (OK this one is not GNU, but handy and easier to compile than wget) Diffutils M4 Patch OK, now for soslib: 1) Compile expat-2.0.1. I Had trouble with xerces on AIX. 2) Compile sundials-2.3.0 3) Compile libsbml CVS version, using expat as the parser. If compilation fails, look at config.log. 4) Get CVS version of SBML_odeSolver and compile using expat, libsbml and sundials prefixes. Here it becomes tricky. From scratch it will compile and work properly. But odeSolver in the odeSolver directory will fail with memory exhaustion problems. This is caused by the fact that in solverError.c: static int memoryExhaustion =3D 0; is not initialised properly! I found somewhere people reporting the same kind of issues when trying to initialise static variables. I also checked this myself in gdb. I don't know why. Maybe a gcc bug?? Anyway, there are two workarounds, both being bad practices, but that work: - don't use SolverError_dump(); and SolverError_haltOnErrors(); in your programs (but solverError.c is still broken) - in solverError.c inactivate memoryExhaust tests (BAD! as well...) using memoryExhaustion=3D0; just before testing for if = (!memoryExhaustion) or memoryExhaustion =3D memoryExhaustion || !result ; The advantage of this last solution is to have a odeSolver working without changing its code. And anyway, solverError.c is broken on AIX, so... Here it is! I hope this is helpful, but I have to say I passed a lot of times debugging and solving issues on AIX. Eric Fernandez |