ReactionMechanismGenerator / RMG-Java

The Java version of RMG: Reaction Mechanism Generator
http://rmg.sourceforge.net/
MIT License
29 stars 36 forks source link

RMG Linux installation problem #119

Open stijnvranckx opened 13 years ago

stijnvranckx commented 13 years ago

I am having problems installing RMG on my Ubuntu 64-bit PC. I followed the guidelies in the manual "3.3 Compiling RMG from source"

First installed: Java, Dassl, g95, Apache ant and InChI

Next, 3.3.2 Linux Installation:

  1. created /home/stijn/RMG
  2. $ export RMG=/home/stijn/RMG
  3. I obtained the source code rmg-3.2.1.tar.gz and unpacked everything into /home/stijn/RMG
  4. I started compiling it but...

stijn@stijn:~/RMG$ make mkdir -p /home/stijn/RMG/build mkdir -p /home/stijn/RMG/bin make -C /home/stijn/RMG/source/fame SOURCEDIR=/home/stijn/RMG/source/fame BUILDDIR=/home/stijn/RMG/build/fame BINDIR=/home/stijn/RMG/bin F90=g95 F90FLAGS="-fbounds-check -ftrace=full -fmod=/home/stijn/RMG/build -Wall -O3" F90_EXTRA_LDFLAGS="" make[1]: Entering directory /home/stijn/RMG/source/fame' mkdir -p /home/stijn/RMG/build/fame g95 -fbounds-check -ftrace=full -fmod=/home/stijn/RMG/build -Wall -O3 -c math.f90 -o /home/stijn/RMG/build/fame/math.o mkdir -p /home/stijn/RMG/build/fame g95 -fbounds-check -ftrace=full -fmod=/home/stijn/RMG/build -Wall -O3 -c states.f90 -o /home/stijn/RMG/build/fame/states.o mkdir -p /home/stijn/RMG/build/fame g95 -fbounds-check -ftrace=full -fmod=/home/stijn/RMG/build -Wall -O3 -c _modes.f90 -o /home/stijn/RMG/build/fame/_modes.o mkdir -p /home/stijn/RMG/build/fame g95 -fbounds-check -ftrace=full -fmod=/home/stijn/RMG/build -Wall -O3 -c network.f90 -o /home/stijn/RMG/build/fame/network.o mkdir -p /home/stijn/RMG/build/fame g95 -fbounds-check -ftrace=full -fmod=/home/stijn/RMG/build -Wall -O3 -c io.f90 -o /home/stijn/RMG/build/fame/io.o Fatal Error: While reading module 'networkmodule' found module version 8, expected 9. make[1]: *** [/home/stijn/RMG/build/fame/io.o] Error 1 make[1]: Leaving directory/home/stijn/RMG/source/fame' make: *\ [fame] Error 2 stijn@stijn:~/RMG$

Does anyone know what is causing this? (I am not at all an experienced Linux user).

Greetings,

Stijn

stijnvranckx commented 13 years ago

Yu wrote

"Hi,

Did you build RMG from scratch or did you just recompile RMG in existing folder. If the latter, please consider to clear all object (*.o) file before recompiling.

Yu"

I started from scratch Clearing the object files in the fame folder doesn't change anything thus.

Stijn

rwest commented 13 years ago

think there's some module mismatch between the compiler used to build a library and that being used to build fame. Probably we should use the GNU gfortran compiler instead of g95. I'm not sure exactly how the makefiles will need changing though.

rwest commented 13 years ago

See issue #101

rwest commented 13 years ago

I have just pushed a major commit (insert big acknowledgement to Josh here) that should allow you to build with the GNU fortran compiler gfortran. At the moment, g95 is still the default (until we've done more testing) but you can try the gfortran by calling make with the "F90=gfortran" option, eg: make clean make F90=gfortran

Please try it and let us know how you get on!

(MacOS 10.6+ 64-bit core2 users can also add MACOS=true to get some more optimizations)

stijnvranckx commented 13 years ago

I succeeded in building RMG using gfortran on my Linux PC:

I used

$ git clone git://github.com/GreenGroup/RMG-Java.git $ cd $RMG $ make clean $ make F90=gfortran

this gave the following error: .... /usr/bin/ld: cannot find -lblas /usr/bin/ld: cannot find -llapack collect2: ld returned 1 exit status make[1]: * [/home/stijn/RMG/bin/fame.exe] Error 1 make[1]: Leaving directory `/home/stijn/RMG/source/fame' make: * [fame] Error 2

I thus downloaded the blas and lapack libraries from github to the folder $RMG/bin, but still ld couldn't find them. To solve this problem I used standard existing blas and lapack libraries from the package repositories:

$ sudo aptitude install libblas-dev liblapack-dev

Question: Does it make a difference which basl and lapack libraries are used?

Then I redid: $ cd $RMG $ make clean $ make F90=gfortran

This time the built completed succesfull.

I set up RMG in Netbeans, generated the jar file by "Clean and Build" and copied this jar file to $RMG/bin.

After setting the environmental variable (RMG=/home/stijn/RMG), RMG seems to be running fine using Netbeans!

The only minor problem is that the GUI for creating condition files is not yet working

stijnvranckx commented 13 years ago

the error I have when trying to start the GUI:

stijn@stijn:~/RMG/rmgRun$ java -Xmx500m -classpath $RMG/bin/RMG.jar GUI > output & [1] 8593 stijn@stijn:~/RMG/rmgRun$ Exception in thread "main" java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:173) at java.awt.Window.(Window.java:437) at java.awt.Frame.(Frame.java:419) at java.awt.Frame.(Frame.java:384) at javax.swing.JFrame.(JFrame.java:174) at GUIWindow.(GUIWindow.java:50) at GUI.createAndShowGUI(GUI.java:109) at GUI.main(GUI.java:105)

[1]+ Exit 1 java -Xmx500m -classpath $RMG/bin/RMG.jar GUI > output stijn@stijn:~/RMG/rmgRun$

rwest commented 13 years ago

First the blas and lapack libraries:

Then the GUI:

stijnvranckx commented 13 years ago

concerning the GUI: I'm not running from a remote computer I am not really using the GUI, I just used it to check if RMG installed completely

jwallen commented 13 years ago

Re: blas and lapack versions

I don't think it matters terribly much the version, as long as it's not too old. AFAIK we're not using any really fancy features of either blas or lapack.

The blas.dll and lapack.dll files here on Github are for Windows only, of course. Linux users should be able to install it from a repository (e.g. apt-get on Ubuntu, rpm on Red Hat/Fedora/CentOS, etc.), as Stijn did here.

I will try to run the GUI on my Linux box.

rwest commented 12 years ago

We've recently had issues linking to an atlas-built blas library (which is called something like libptfblas.so instead of libblas.so). Might a configure script, or smarter makefiles, help?