From: Felipe Abrão on 8 Nov 2009 10:47 Hello! I would like to run a Fortran 90 program using Cantera module. I have already installed Cantera, but there is a program error that says that it can not find the file cantera.mod. Because of that, I belive that the other errors are function of this, as, for example, the fact that the program could not open the library module file. Could you please help me solving this question? Thank you very much.
From: dpb on 8 Nov 2009 11:06 Felipe Abr�o wrote: > Hello! I would like to run a Fortran 90 program using Cantera module. > I have already installed Cantera, but there is a program error that > says that it can not find the file cantera.mod. Because of that, I > belive that the other errors are function of this, as, for example, > the fact that the program could not open the library module file. > Could you please help me solving this question? Thank you very much. A .mod file is the output result of compiling a Fortran source module for a subsequent USE statement in other Fortran source compilations. You apparently need to either compile the code you've downloaded or, possibly, you simply have a problem in where the compiler is looking for the files and need to fix environment variables or somesuch. Need more specifics for more specific response. --
From: Felipe Abrão on 8 Nov 2009 12:14 On 8 nov, 14:06, dpb <n...(a)non.net> wrote: > Felipe Abrão wrote: > > Hello! I would like to run a Fortran 90 program using Cantera module. > > I have already installed Cantera, but there is a program error that > > says that it can not find the file cantera.mod. Because of that, I > > belive that the other errors are function of this, as, for example, > > the fact that the program could not open the library module file. > > Could you please help me solving this question? Thank you very much. > > A .mod file is the output result of compiling a Fortran source module > for a subsequent USE statement in other Fortran source compilations. > > You apparently need to either compile the code you've downloaded or, > possibly, you simply have a problem in where the compiler is looking for > the files and need to fix environment variables or somesuch. > > Need more specifics for more specific response. > > -- Thank you for your answer. Maybe I could write down the code of my Fortran program (very small) and under it the 5 error messages. Thanks in advance. program eq use cantera implicit double precision (a-h,o-z) character*50 xstring character*2 propPair type(mixture_t) mix mix = GRIMech30() if (.not.ready(mix)) then write(*,*) 'error encountered constructing mixture.' stop end if write(*,*) 'enter T [K] and P [atm]:' read(*,*) temp, pres pres = OneAtm * pres ! convert to Pascals ! the initial composition should be entered as a string of name:<moles> pairs ! for example CH4:3, O2:2, N2:7.52. The values will be normalized ! internally write(*,*) 'enter initial composition:' read(*, 10) xstring 10 format(a) ! set the initial mixture state call setState_TPX(temp, pres, xstring) ! determine what to hold constant write(*,*) 'enter one of HP, TP, UV, or SP to specify the' write(*,*) 'properties to hold constant:' read(*,10) propPair ! equilibrate the mixture call equilibrate(mix, propPair) ! print a summary of the new state call printSummary(mix) stop end --------------------Configuration: T - Win32 Debug-------------------- C:\Documents and Settings\Felipe\Desktop\T\T.f90(2): Could not find the file cantera.mod. Compiling Fortran... C:\Documents and Settings\Felipe\Desktop\T\T.f90 C:\Documents and Settings\Felipe\Desktop\T\T.f90(2) : Error: Error in opening the Library module file. [CANTERA] use cantera ----^ C:\Documents and Settings\Felipe\Desktop\T\T.f90(6) : Error: This derived type name has not been declared. [MIXTURE_T] type(mixture_t) mix -----^ C:\Documents and Settings\Felipe\Desktop\T\T.f90(8) : Error: The highest data type rank permitted is INTEGER(KIND=4). [READY] if (.not.ready(mix)) then ---------^ C:\Documents and Settings\Felipe\Desktop\T\T.f90(8) : Error: The highest data type rank permitted is INTEGER(KIND=4). if (.not.ready(mix)) then ----^ C:\Documents and Settings\Felipe\Desktop\T\T.f90(8) : Error: A logical data type is required in this context. if (.not.ready(mix)) then ----^ Error executing df.exe. T.obj - 5 error(s), 0 warning(s)
From: dpb on 8 Nov 2009 12:21 Felipe Abr�o wrote: .... > Thank you for your answer. Maybe I could write down the code of my > Fortran program (very small) and under it the 5 error messages. Thanks > in advance. > > program eq > use cantera .... > C:\Documents and Settings\Felipe\Desktop\T\T.f90(2): Could not find > the file cantera.mod. .... Yes, precisely what I said earlier. Still can't tell which is the root cause. First, can you find a "cantera.mod" file on the system? If so, it's the latter problem of the compiler not looking in the right place. OTOH, if there isn't such a file (I'm guessing that's probably so), you need to compile whatever source file(s) that comprise that module first. The "USE" statement above is what's looking for the information that will be in the .mod file. That information will only be there when the source code comprising the module is compiled. --
From: dpb on 8 Nov 2009 12:32
dpb wrote: .... > The "USE" statement above is what's looking for the information that > will be in the .mod file. That information will only be there when the > source code comprising the module is compiled. OBTW, the file won't _necessarily_ be named "cantera.f90" although that's a/the most likely choice. The module filename will be obtained from the name of the module as specified on the MODULE statement in the source file. -- |