Hello Felipe,
I looked into the Cantera - Fortran Interface and I frankly have to
admit I had a hard time there. Until now I have not completly resolved
everything.
First I thought it is a bit over my head and I am just to dumb to make
it work.
Actually now I think the code is buggy and documentation is scarce,
confusing, outdated and consequently mis-leading and even plainly
wrong in some cases (no offense intended in any direction).
In your case I saw that you tried to get this to work for quite some
time now, you had also some rather old posts on the
fortran usergroup about this!
What I understood so far is, that you have installed the cantera.msi,
but also have the cantera source code.
You have Compaq Visual Fortran 6.0.
I am sorry that there is just NOBODY with a clue about Cantera/Windows/
Fortran
responding on this Forum to you, but I noticed this Forum/Project is
very quiet in general.
I didn't find the Cantera.mod file in the installation with the
Windows msi installer. This would make sense, because this interface
should be created by the actual compilers on the actual machine where
Cantera is running. You said you have the source files - one of those
is Cantera.h in the /Cantera/fortran/scr directory. Then it should be
possible to compile your own mod files plus the all necessary object
files in this directory. To get an idea how this is done, look at the
make files in this directory (Makefile and Makefile.in). The
Makefile.in is the template, from which the actual Makefile is
generated. So if you cannot run the whole Project you would have to
create your Makefile from the template manually - experience is needed
but it is not impossible.
Probably it is even easier to do the recompilation and rebuilding of
the whole project from source.
Additionally I will send you my mod files by private email (Beside
Cantera.mod there are others). However, there is only a tiny chance
that this will work, and I DO NOT take any responsibility if you use
them. I don't know how they work and there is a chance that there are
severe incompatibilities or even a system crash. In addition to the
mod files you will need the compiled object files of this directory.
I think you should make some principal decisions before you proceed:
--------------------------------------------------------------------------------------
1) Do you need to work with windows or is it possible to change to a
Linux Installation?
There are easy possibilities to do this, if you have a normal
internet access. In
the academic world it is more likely to find support if you
are working on Unix/Linux.
2) Do you need to use Fortran, or can you also use MATLAB or Python.
Those are scripting languages, they can be used
interactively , no need to compile stuff.
There is even the possibility to use free Octave instead of
Matlab for most cases.
3) Do you need specifically Cantera, or could you also use some other
software tool (e.g. commercial Chemkin which has License and Support).
There are a lot of software packages out there, and a
commercial package should offer you the necessary support to get
started.
4) Can you arrange that some local computer-geek helps you with the
first steps in installation and compiling?
Anything you do will be easier if somebody supports you who
is comfortable with compiling stuff, Makefiles, configurescripts
etc. As soon you have the first project running, its almost
piece of cake (I said almost).
Outlook for an additional option:
----------------------------------------
I want to produce an easy to install Cantera-package for some linux
distributions.
I am currently working on Puppy Linux which is very small and fast.
So far I have all the demos in Python working.
I linked Cantera to Octave (All but 2 demos work - some compatibility
issue Octave/Matlab).
Currently I try to get the fortran interface to work for me
At last - hopefully soon - I will try the C interface, this should be
the least hassle.
Maybe if you have enough patience I might publish a complete Linux
Distribution with GUI, office tools, internet & email, lightweight IDE
for C, Fortran, Python & Octave and working CANTERA PREINSTALLED AND
TESTED during the next weeks - This should be below 200 MB Download
and should run on most PC systems. It can be run and installed from CD
or even from USB stick (of course also conventional HD install
possible, also in addition to a Windows or other Linux OS). So you can
take your Cantera simulation out for a walk to discuss it with a
fellow scientist right on HIS Computer.
What did I do to solve your problem? - (without success I must admit)
--------------------------------------------------------------------------------------
I reinstalled cantera via the msi installer (on my XP installation), I
then got the GNU gfortran and gcc compilers and installed them.
I could compile the demo, but got the missing "Cantera.mod" error like
you. I realised that there is not much source code in the msi
installation and specifically the file necessary files of the fortran
interface were missing. So they have to come from the source code.
I then downloaded the older Cantera 1.55, there is a Visual C project
included. I got Visual C++ Express and I tried to recompile Cantera,
but it failed (had some errors). Since I did such a windows install 2
years ago I stopped at that point, because it took me so much time and
nerves to make the windows build work.
After that I went back to the Linux installation to try the demo.f90
there. It compiled but failed with a Cantera Error at runtime.
I think I found a bug in the Cantera source code concerning the
Fortran 90 interface, but I hope I ironed it out now. (Will post my
suggested fix in a separate thread).
Well it sounds like a lot of work, but it was not completely useless:
I learned that there are 2 different sets of Fortran example files.
The demo.f90 should work via the current Cantera / Fortran interface,
this is exactly the infamous Cantera.mod file (well its at least a
substantial part of the interface).
In the other set there are somewhat older Fortran 77 examples with a
saperate linking file. Those are the examples where there exists the
rather cryptic f77.pdf documentation file (10 pages). A separat
linking C file is supplied with those examples. I couldn't make those
examples work by now, but I won't invest to much time neither. The
reason: Cantera should concentrate on the newer system, the demo.f90.
All the older examples should be reworked and rewritten for the new
interface IMHO! There is already enough confusion around.
Thinking Twice I understand that there are maybe lots of old chemkin/
fortran scripts. Maybe someone who has those running could enlighten
us how this works.
But newer examples and tutorials should be in f90 - again IMHO!
sorry for this long post,
Emil
SO IF ANYONE WITH WORKING INTERFACE READ UNTIL HERE - PLEASE SHARE
YOUR KNOWLEDGE - YOU ALREADY INVESTED QUITE SOME TIME READING THIS