Re: [cantera-users] Getting Cantera to work with C code

785 views
Skip to first unread message

Robert Bell

unread,
Jun 12, 2013, 2:16:42 PM6/12/13
to canter...@googlegroups.com
Hi Jeff,

In MSVC a file with a .c extension is parsed using the plain old "C" language grammar.  So when the compiler sees "namespace", a C++ language element, in Cantera.h it does not know what it is and generates the syntax error.

You can rename your source file to have a C++ extension so that the compiler understands the namespace and class definitions found in the Cantera headers, but you will need to mark your exported functions with, extern "C" to turn off name mangling.

Cheers,
Bert


On Wed, Jun 12, 2013 at 7:15 AM, J Chapman <chapm...@gmail.com> wrote:

I am using a 64 bit Windows 7 machine and am having trouble getting cantera to work with my S-functions in matlab (written in C). I successfully went through the installation process and cantera is working with matlab,  however when I attempt to build an S-function into a mex file I get an error that it can't find the header file (Cantera\cantera.h).

I found the header file in the cantera area under include then copied the cantera folder into my compiler's (MVS 10.0) include area and it seems to find the header but then gives me a bunch of errors.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\cantera\Cantera.h(12) : error C2061: syntax error : identifier 'Cantera_CXX'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\cantera\Cantera.h(12) : error C2059: syntax error : ';'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\cantera\Cantera.h(12) : error C2449: found '{' at file scope (missing function header?)
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\cantera\Cantera.h(12) : error C2059: syntax error : '}'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\cmath(19) : error C2061: syntax error : identifier 'acosf'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\cmath(19) : error C2059: syntax error : ';'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\cmath(19) : error C2061: syntax error : identifier 'asinf'

etc.

Any ideas?

Thanks,
-Jeff


--
You received this message because you are subscribed to the Google Groups "Cantera User's Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at http://groups.google.com/group/cantera-users?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

J Chapman

unread,
Jun 13, 2013, 9:36:38 AM6/13/13
to canter...@googlegroups.com
That worked pretty well, I simply changed the code to C++,  however now im stuck again. I try to run the example code and it couldn't find the boost header files... so I copied them into the include directory for my compiler and now it gives the error:

LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc100-mt-1_53.lib'

I can't find this file in any of the boost files downloaded.  it is version 1.53. The cantera documentation mentions it only needs the header files for boost,  so im pretty stuck as to what im missing.

Any help is appreciated.
Thanks

Robert Bell

unread,
Jun 13, 2013, 11:19:01 AM6/13/13
to canter...@googlegroups.com
You do not copy the headers to the compiler directory.  That makes it impossible to upgrade your various libraries without deleting and re-installing the compiler, you add the include directory to your compiler or projects include path.


For per project includes:

In VC 10 right click on your project and select Properties then click Configuration Properties and then click VC++ Directories edit Include directories (or select Properties then click Configuration Properties and then click C/C++ Select General and edit Additional Include Directories)  You do the same for Library Directories.

You can also set these properties for all projects: From the MSVC help system.
  1. On the View menu, click Property Manager.

  2. In Property Manager, click a configuration-and-platform node; for example, Debug | Win32.

    The node expands and displays a user property sheet such as Microsoft.Cpp.<platform>.user, where <platform> is a system-defined value such as Win32 or X64. The <platform> value and the platform for the project must be the same.

  3. Either double-click the user property sheet, or click the user property sheet and then click Properties in the shortcut menu.

    The <User Property Sheet>Property Pages dialog box is displayed, and the VC++ Directories node is highlighted.

  4. Edit the directory lists, as described earlier in step 3 of "To specify a project directory list".


Again there is a similar entry for Libraries.


I usually rebuild the boost libraries for my compiler.  I am not sure if they are in the archive you downloaded. There are directions for building the libraries on the boost.org website, they provide a tool, bjam, for automating the build.  

Cheers


Ray Speth

unread,
Jun 13, 2013, 11:46:51 AM6/13/13
to canter...@googlegroups.com
Jeff,

Cantera requires the compiled Boost thread library if you compiled Cantera using the "build_thread_safe" option to SCons. If you don't need to call Cantera from multiple threads, you can disable this option and the dependency on Boost.Thread will be removed.

You can download compiled versions of the Boost libraries from http://boost.teeks99.com/.

Regards,
Ray

J Chapman

unread,
Jun 14, 2013, 9:58:12 AM6/14/13
to canter...@googlegroups.com
I managed to get the bjam tool then compiled boost. Which created the correct file... however the compiler still gives me the same error.


LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc100-mt-1_53.lib'
 
  C:\PROGRA~1\MATLAB\R2012B\BIN\MEX.PL: Error: Link of '..\Ambient_TMATS.mexw64' failed.
 
Error using mex (line 206)
Unable to complete successfully.

Error in make_file_TMATS (line 16)
mex Ambient_TMATS.cpp interp1Ac_TMATS.c -outdir .. -I"C:\Program Files\Cantera\include" -I"C:\Program
Files\boost\boost_1_53_0"

Do I need to somehow add that area to my library paths? Or should it be linked via the header files.  Sorry for my obliviousness,  im not that experienced with this sort of thing..

Thanks,
-Jeff
Message has been deleted

Robert Bell

unread,
Jun 14, 2013, 11:30:01 AM6/14/13
to canter...@googlegroups.com
Hi Jeff,

As Ray said it is possible to build Cantera without the boost dependency but you are almost there. 

You also have to set the path to Library directories (both Cantera and Boost)

For setting per project library directories:

In VC 10 right click on your project and select Properties then click Configuration Properties and then click VC++ Directories edit Library directories (or select Properties then click Configuration Properties and then click Link, Select General and edit Additional Library Directories).

If you want per user library directories followinstructions from the previous email and edit the Library node.

The executable that performs the link step is separate from the compiler so it needs to be told the locations to search for libraries.

Cheers,
Bert


J Chapman

unread,
Jun 14, 2013, 2:18:46 PM6/14/13
to canter...@googlegroups.com
Bert,

Thanks for the library info,  i got a bunch of libraries linked and Cantera's libraries linked.  But now it is complaining about linker errors without telling me what libraries or header files it needs ( almost seems like it wants some dlls).  Is there a way to tell the compiler to just look in all the libraries? Or is there a way to find out which libraries it needs? Here is a small cut of the errors I am getting.

cantera.lib(DebyeHuckel.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) bool __cdecl std::operator!=<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl exec_stream_internal::int2str(unsigned long,int,unsigned __int64)" (?int2str@exec_stream_internal@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KH_K@Z)
cantera.lib(exec-stream.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::reserve(unsigned __int64)" (__imp_?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl exec_stream_internal::int2str(unsigned long,int,unsigned __int64)" (?int2str@exec_stream_internal@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KH_K@Z)
..\Ambient_TMATS.mexw64 : fatal error LNK1120: 40 unresolved externals

Thanks,
-Jeff

Robert Bell

unread,
Jun 17, 2013, 12:55:54 PM6/17/13
to canter...@googlegroups.com
Hi Jeff,

My guess is you are linking your project against the static C/C++ library and cantera is looking for the dll version of the C/C++ runtime library.  Can you switch your project to using the dll version of the C/C++ runtime library?

Right Click on the Project.  Select Configuration Properties then select C/C++ and Select Code Generation.  Runtime Library allows you to change library via a CombBox.  MultiThreaded DLL is what should solve your problem.

FYI building a dll generates a .lib file that you link with.  You don't link directly to the DLL file itself.

Bert

J Chapman

unread,
Jun 17, 2013, 2:25:32 PM6/17/13
to canter...@googlegroups.com
Bert,

I did what you mentioned earlier and switched to using the MVC++ builder,  that way I could specify where the Libraries were, and didn't have to specify each individual library like the MATLAB mex compiler was needed me to do. I also downloaded the pre-built boost libraries mentioned in a previous post. These changes seemed to have corrected the majority of the linking errors when i stick in header files... however now I am getting linker errors when I call the cantera functions. Unfortunately I need to build this code as a mex file so that I may put it in an S-function in MATLAB..

Here are the linker errors
1>Ambient_TMATS.obj : error LNK2019: unresolved external symbol "public: void __cdecl Cantera::ThermoPhase::setState_TPX(double,double,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?setState_TPX@ThermoPhase@Cantera@@QEAAXNNAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "void __cdecl mdlOutputs(struct SimStruct_tag *,int)" (?mdlOutputs@@YAXPEAUSimStruct_tag@@H@Z)
1>Ambient_TMATS.obj : error LNK2019: unresolved external symbol "class Cantera::ThermoPhase * __cdecl Cantera::newPhase(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?newPhase@Cantera@@YAPEAVThermoPhase@1@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) referenced in function "void __cdecl mdlOutputs(struct SimStruct_tag *,int)" (?mdlOutputs@@YAXPEAUSimStruct_tag@@H@Z)

And they appear when I try to compile with the simple program code.
ThermoPhase* gas = newPhase("h2o2.cti","ohmech");
and
gas->setState_TPX(500.0, 2.0*OneAtm, "H2O:1.0, H2:8.0, AR:1.0");


Any ideas? I included the Cantera Libraries into the VC++ additional libraries

Thanks,
-Jeff

Ray Speth

unread,
Jun 17, 2013, 2:59:18 PM6/17/13
to canter...@googlegroups.com
Jeff,

This message looks like you're not getting the Cantera libraries linked at all (the two unresolved symbols are the two calls to Cantera functions in your program). In your previous post on 6/14, the unresolved symbols are from the execstream library (possibly named ct_execstream) which should have been compiled when you compiled Cantera. Depending on the compilation options you use, the contents of this library are included in the cantera library.

Just posting the error messages makes it very hard to understand what's going on. It would be much easier to help if you posted the compiler and linker commands that Visual studio is executing as well.

Regards,
Ray

J Chapman

unread,
Jun 17, 2013, 3:49:39 PM6/17/13
to canter...@googlegroups.com

I used the Cantera 2.0.2 64-bit Python 2.7 Module Installer for Windows,  then linked the library by right clicking the project -> properties -> Configuration Properties -> VC++ Directories -> Library Directories,  added  C:\Program Files\Cantera\lib,  then boost\boost_1_53_0\stage\lib and the downloaded boost libraries lib64.

I agree,  it seems like these should be included in Cantera\lib which contains the cantera library

I do not know how to give you the linker commands,  however here is a copy paste from my bugger log file: Its kinda long..

Build started 6/17/2013 3:23:33 PM.
     1>Project "C:\Builds\TMATS\TMATS_Library\MEX\C_code\Cantera_TMATS\Ambient_TMATS.vcxproj" on node 2 (build target(s)).
     1>InitializeBuildStatus:
         Touching "x64\Debug\Ambient_TMATS.unsuccessfulbuild".
       ClCompile:
         C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /I"C:\Program Files\MATLAB\R2012b\extern\include" /I"C:\Program Files\MATLAB\R2012b\simulink\include" /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D AMBIENT_TMATS_EXPORTS /D MATLAB_MEX_FILE /D _WINDLL /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Debug\\" /Fd"x64\Debug\vcWindows7.1SDK.pdb" /Gd /TP /errorReport:prompt Ambient_TMATS.cpp
         Ambient_TMATS.cpp
     1>Ambient_TMATS.cpp(81): warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
     1>Ambient_TMATS.cpp(132): warning C4101: 'err' : unreferenced local variable
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(449): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(778): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(801): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(835): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(858): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(897): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(899): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(900): warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(110) : see declaration of 'strcat'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(922): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(938): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(1692): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(1701): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(1730): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(2375): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(2382): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(2394): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(2403): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(2408): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
     1>C:\Program Files\MATLAB\R2012b\simulink\include\simulink.c(2452): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
                 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
         C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /I"C:\Program Files\MATLAB\R2012b\extern\include" /I"C:\Program Files\MATLAB\R2012b\simulink\include" /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D AMBIENT_TMATS_EXPORTS /D MATLAB_MEX_FILE /D _WINDLL /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Debug\\" /Fd"x64\Debug\vcWindows7.1SDK.pdb" /Gd /TC /errorReport:prompt interp1Ac_TMATS.c interp2Ac_TMATS.c
         interp2Ac_TMATS.c
         interp1Ac_TMATS.c
         Generating Code...
       ManifestResourceCompile:
         C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\rc.exe /nologo /fo"x64\Debug\Ambient_TMATS.mex64.embed.manifest.res" x64\Debug\Ambient_TMATS_manifest.rc
       Link:
         C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Builds\TMATS\TMATS_Library\MEX\C_code\Cantera_TMATS\x64\Debug\Ambient_TMATS.mex64" /INCREMENTAL /NOLOGO "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmx.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmat.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmex.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"x64\Debug\Ambient_TMATS.mex64.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Builds\TMATS\TMATS_Library\MEX\C_code\Cantera_TMATS\x64\Debug\Ambient_TMATS.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Builds\TMATS\TMATS_Library\MEX\C_code\Cantera_TMATS\x64\Debug\Ambient_TMATS.lib" /MACHINE:X64 /DLL x64\Debug\Ambient_TMATS.mex64.embed.manifest.res
         x64\Debug\Ambient_TMATS.obj
         x64\Debug\interp1Ac_TMATS.obj
         x64\Debug\interp2Ac_TMATS.obj

     1>Ambient_TMATS.obj : error LNK2019: unresolved external symbol "public: void __cdecl Cantera::ThermoPhase::setState_TPX(double,double,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?setState_TPX@ThermoPhase@Cantera@@QEAAXNNAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "void __cdecl mdlOutputs(struct SimStruct_tag *,int)" (?mdlOutputs@@YAXPEAUSimStruct_tag@@H@Z)
     1>Ambient_TMATS.obj : error LNK2019: unresolved external symbol "class Cantera::ThermoPhase * __cdecl Cantera::newPhase(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?newPhase@Cantera@@YAPEAVThermoPhase@1@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) referenced in function "void __cdecl mdlOutputs(struct SimStruct_tag *,int)" (?mdlOutputs@@YAXPEAUSimStruct_tag@@H@Z)
     1>C:\Builds\TMATS\TMATS_Library\MEX\C_code\Cantera_TMATS\x64\Debug\Ambient_TMATS.mex64 : fatal error LNK1120: 2 unresolved externals
     1>Done Building Project "C:\Builds\TMATS\TMATS_Library\MEX\C_code\Cantera_TMATS\Ambient_TMATS.vcxproj" (build target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:00:04.70

-Jeff

Robert Bell

unread,
Jun 17, 2013, 4:36:39 PM6/17/13
to canter...@googlegroups.com
Hi Jeff,

I agree with Ray.  And looking at the link command line I do not see cantera.lib listed in the library list.

Add it in Properties.  Select Configuration PRoperties then Linker, than Input.  Add it to Additional Dependencies.

Bert

J Chapman

unread,
Jun 18, 2013, 9:38:44 AM6/18/13
to canter...@googlegroups.com
Ok, i stuck the Cantera.lib into the linker, additional dependencies and now it can't seem to do any linking into the cantera library. I tryied changing to runtime library Multi-threaded DLL, but it didn't seem to change much.

I get LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library,

then about 100 linker errors and warnings, example:
1>cantera.lib(application.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::end(void)" (__imp_?end@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAA?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@XZ) referenced in function "public: class Cantera::XML_Node * __cdecl Cantera::Application::get_XML_File(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int)" (?get_XML_File@Application@Cantera@@QEAAPEAVXML_Node@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>cantera.lib(ct2ctml.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_istream<char,struct std::char_traits<char> > & __cdecl std::getline<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_istream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (__imp_??$getline@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@0@AEAV10@AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@@Z) referenced in function "void __cdecl ctml::ct2ctml(char const *,int)" (?ct2ctml@ctml@@YAXPEBDH@Z)
1>cantera.lib(exec-stream.obj) : error LNK2001: unresolved external symbol "protected: virtual __int64 __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Xsgetn_s(char *,unsigned __int64,__int64)" (?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MEAA_JPEAD_K_J@Z)
1>cantera.lib(exec-stream.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl std::operator+<char,struct std::char_traits<char>,class std::allocator<char> >(char,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??$?HDU?$char_traits@D@std@@V?$allocator@D@1@@std@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@DAEBV10@@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl exec_stream_internal::int2str(unsigned long,int,unsigned __int64)" (?int2str@exec_stream_internal@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KH_K@Z)
1>cantera.lib(exec-stream.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::reserve(unsigned __int64)" (__imp_?reserve@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAX_K@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl exec_stream_internal::int2str(unsigned long,int,unsigned __int64)" (?int2str@exec_stream_internal@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KH_K@Z)
1>C:\Builds\TMATS\TMATS_Library\MEX\C_code\Cantera_TMATS\x64\Debug\Ambient_TMATS.mex64 : fatal error LNK1120: 36 unresolved externals

Do I need to try to figure out where those commands are then add those libraries to the Additional Dependencies? Some seem like they are part of the Cantera like cantera.lib(LatticePhase.obj) perhaps

This also seems like the same errors i was getting when i was trying to compile in matlab, I am now trying to make the mex64 file in Microsoft visual studio...  

 Any ideas?

Thanks,
-Jeff

Robert Bell

unread,
Jun 18, 2013, 1:45:23 PM6/18/13
to canter...@googlegroups.com
Hi,

Try Right click on Project -> Properties, Select Configuration Properties, Select Linker. Select Input  Set Ignore All Default Libraries to Yes (/NODEFAULTLIB).

When building a debug version of an exe or dll they use the debug version of the C/C++ runtime while external libraries built in release mode use the release version of the C/C++ runtime.  Thus the conflict.

Bert

J Chapman

unread,
Jun 18, 2013, 4:18:10 PM6/18/13
to canter...@googlegroups.com
That increased the number of errors to 150, I also tried to build as a release version and got similar errors.

J Chapman

unread,
Jun 19, 2013, 9:29:12 AM6/19/13
to canter...@googlegroups.com
When installing cantera should i have used Python 3.3 with Microsoft Visual 2010?  I used Python 2.7.

Thanks,
-Jeff


On Tuesday, June 18, 2013 1:45:23 PM UTC-4, bertbell2 wrote:

Robert Bell

unread,
Jun 19, 2013, 11:22:42 AM6/19/13
to canter...@googlegroups.com
Python would not be used when building your application.

I am running out of ideas.

Are you building everything with the same "bit-ness"?  Is cantera and your application both compiled to 32 bits (x86) or 64 bits?  Since you are writing a function to work in MatLab you need to match that application.

Ray Speth

unread,
Jun 19, 2013, 11:56:33 AM6/19/13
to canter...@googlegroups.com
Jeff,

There are a bunch of compiler and linker settings that have to be consistent when you compile Cantera (or any other library) and when you compile your code. You need to use:

1. The same compiler version (e.g. Visual Studio 10.0, a.k.a. VS2010). Note that Cantera will try to use Visual Studio 9.0 by default if it's available, so you may need to override this with the "msvc_version" option to SCons.
2. The same "bitness", as Bert mentioned. -- You can see this in the linker flag "/MACHINE:X64" in your output.
3. The same version of the Visual Studio runtime library, as determined by the flags "/MD" or "/MDd". I suspect this is a large part of your problem, since many of the unresolved symbols are are things that ought to be in the standard library, e.g. things related to "std::basic_string". I think the "NODEFAULTLIB" option is probably the wrong way to resolve this problem -- you need to link some version of the standard runtime library.

You should look at the compiler commands used while compiling Cantera and while compiling your code to make sure these things match. The compiler command in your output is the one that references "CL.exe", e.g.:

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe ...

The linker command is the one that calls "link.exe", e.g.:

    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\link.exe ...

You should use Python 2.7 to compile Cantera, as the SCons program that is used to compile Cantera is not currently compatible with Python 3.3. You do need to make sure that you're using a 64-bit version of Python if you want to compile a 64-bit version of Cantera, and vice versa for 32-bit.

The compiler commands and error messages can be hard to read, but there's important information in there. You won't get anywhere if all you're getting out of it is how many errors are reported, since sometimes the difference between 1000 errors and successful compilation and linkage is a single compiler flag.

Regards,
Ray

J Chapman

unread,
Jun 19, 2013, 1:41:22 PM6/19/13
to canter...@googlegroups.com
Ray,

Thanks for the input.  I checked the python install and it says its 64 bit.  I am thinking that perhaps the compiled downloaded version of the cantera library I was using is not compatible, so I am trying to work scons to compile my own version using VS2010.  I of course am having some difficulty as Scons is trying to use msvc version 9...  I see your command and have been trying to overwrite the version, but have not had success. 

I was using the command:
env = Environment(MSVC_VERSION=10.0) as well as simply msvc_version = 10.0 near where they are defining the same thing in the SConstruct file.

Where is the proper place to be setting this option?

Thanks,
-Jeff

Ray Speth

unread,
Jun 19, 2013, 3:30:49 PM6/19/13
to canter...@googlegroups.com
Jeff,

If you had mentioned that you were using the installer for the compiled version of Cantera, I could have told you that the mismatch in Visual Studio versions was the problem from the start. If you want to use Visual Studio 2010, you must recompile Cantera. The way to specify VS2010, it is done on the command line, e.g.

    scons build msvc_version=10.0

You should not need to modify the SConstruct file. Detailed instructions for compiling Cantera are available here:

Ray

J Chapman

unread,
Jun 20, 2013, 9:05:15 AM6/20/13
to canter...@googlegroups.com
Thanks,  that worked and got me to the next step.  However, scons is now having problems finding the header files

"Checking for C++ header file cmath... no"

How do you specify where the header files are? There is no option to define them in the config file, they mention in scons documentation that there is no command line definition, and it was not obvious in the SConstruct file where to place the definition...

Thanks for bearing with me, I have never used any of these tools before and it is hard for me to tell what is important.
-Jeff

Nick Curtis

unread,
Jun 20, 2013, 10:06:41 AM6/20/13
to canter...@googlegroups.com
Hey Jeff,
try using the visual studio command line
For me (with VS2012) it's in Start menu > VS2012 > Visual Studio Tools > VS2012 x64 Cross Tools Command Prompt
Note the x64, obviously if you're trying to compile 32 bit version use the non-x64 command line. 
This command prompt has all the paths to various c++ libraries already set for you, and should eliminate this problem. 
The other alternative would be to add the path to cmath.hpp to your $PATH variable, but it's much easier to just use the other command line

Nick

J Chapman

unread,
Jun 20, 2013, 11:49:58 AM6/20/13
to canter...@googlegroups.com
I am starting to wonder if my compiler even works with 64 bit. I am using Microsoft visual studio 2010 express.  Anyway, I created a simple program to compile with Scons,  detailed here http://www.scons.org/doc/production/HTML/scons-user/c258.html under 2.1 "hello world".  I type scons and it spits out that it can't find the cl command.
 I then simply type cl in the command window and it seems to find it...

I then created another hello world:
   #include <iostream>

   int main()
   {
       std::cout << "This is a native C++ program." << std::endl;
       return 0;
}

Then in the command line type "cl hello.cpp"
and it gives me an error that it can't find iostream.

Is my compiler just setup wrong? Is there another version I should be using? I have really only used it to compile matlab mex functions and it has done a smashing job at that. (note, i use all the basic libraries and don't need to link when i use the matlab mex command which is 64 bit... working on mex then not working on command line is very confusing)

Thanks,
-Jeff

Robert Bell

unread,
Jun 20, 2013, 1:05:21 PM6/20/13
to canter...@googlegroups.com
Hi Jeff,

If Visual Studio Express 2010 does nor have the option Nick mentioned above then a search of the Visual Studio C++ directories there should locate a batch file vcvars64.bat that sets the environment variables for using MSVC from the command line.  This include environment varibles for include and library path.


However this stackoverflow entry 


seems to imply that Visual Studio Express 2010 does not include the 64 bit comipler but it can be added.  Many instructions there.

Bert


Ray Speth

unread,
Jun 21, 2013, 10:46:43 AM6/21/13
to canter...@googlegroups.com
Jeff,

The "Express" versions of Visual Studio do not include a 64-bit compiler. To get the 64-bit compiler, you need to also install the Windows SDK. The version that corresponds to Visual Studio 2010 is available here:

http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx

I'm not sure how you're able to build MEX extensions for 64-bit Matlab without this installed, though. What are the compiler options listed when you run 'mex -setup' in Matlab?

Nick's suggestion of running SCons from inside the "Visual Studio Command Prompt" is a good idea as well, as that should help set up the environment variables so that SCons finds the right compiler versions, include directories, etc. I think it's worthwhile to make sure you can get the "Hello World" equivalent working first before moving on to compiling Cantera. If you're still having trouble with that, maybe you can post the SConstruct file you're using and the full output from running SCons in the relevant Visual Studio Command Prompt environment.

Regards,
Ray

J Chapman

unread,
Jun 21, 2013, 1:41:33 PM6/21/13
to canter...@googlegroups.com
I made a bit more progress,  the environment was the way to go. I am using the SDK 7.1 compiler and it needed to be linked to MSVS.
I followed this post to get that set up: http://forums.x-plane.org/index.php?showtopic=58470

Once that was good, it was still having problems finding cmath.  So i set env_vars= all.

This made a  lot more stuff load however it is still unable to find certain files...  erf.hpp for instance,  which is strange b/c its on my path and the env_vars=all should import all my paths to Scons i think...

When i am now running "scons build" in the special build environment,  I am getting:
scons: Reading SConscript files ...
INFO: Skipping compilation of the Fortran 90 interface.
Checking for C++ header file cmath... yes
Checking for C++ header file sstream... yes
Checking for C header file sys/times.h... no
Checking for C header file unistd.h... no
Checking whether erf is declared... no
Checking for C++ header file boost/math/special_functions/erf.hpp... no
Checking for CVodeCreate(CV_BDF, CV_NEWTON) in C++ library sundials_cvodes... no
Checking for double x; log(x) in C library None... yes
INFO: Building the full Python package using numpy.
INFO: Sundials was not found. Building with minimal ODE solver capabilities.
Error: Couldn't find 'erf' in either <math.h> or Boost.Math


This is my config file:
msvc_version = '10.0'
matlab_path = 'C:\\Program Files\\MATLAB\\R2012b'
debug_verbose = True
env_vars = 'all'
optimize = False
boost_inc_dir = 'C:\\Program Files\\boost\\boost_1_53_0'

Do I need all this stuff it's saying "no" to? or just the one that is showing the error? Is there another way I am suppose to specify this erf.hpp?

Thanks,
-Jeff

Ray Speth

unread,
Jun 21, 2013, 3:45:15 PM6/21/13
to canter...@googlegroups.com
Jeff,

Can you run:

    scons build --config=force

And look at the file 'config.log', specifically for the output related to the test that's checking for Boost.Math. What does it say? Based on your cantera.conf file, I expect that erf.hpp should be installed at:

    C:\Program Files\boost\boost_1_53_0\boost\math\special_functions\erf.hpp

Is this correct?

Some of those checks should return "no". I think the only unexpected one for Windows with the configuration options you've specified is the Boost.Math one. Also, note that your PATH environment variable doesn't have any effect on what directories the compiler looks in for header files or where the linker looks for libraries.

Regards,
Ray

J Chapman

unread,
Jun 24, 2013, 10:41:01 AM6/24/13
to canter...@googlegroups.com
That command worked well,  It appears i was missing ammintrin.h.  It found erf.hpp but erf.hpp tired to access the ammintrin.h file and couldn't find it.
It turns out that file is located within MSV 2010 SP1, so i downloaded it and attempted another build.

The next error I got was:
C:\Program Files\MATLAB\R2011b\extern\include\tmwtypes.h(821) : error C2371: 'char16_t' : redefinition; different basic types
        C:\Program Files (x86)\Microsoft Visual Studio 10.\VC\INCLUDE\yvals.h(576) : see declaration of 'char16_t'

I googled it and found this work around:
http://code.google.com/p/cantera/issues/detail?id=85

After that it compiled.

I ran the test with 54 passes and 4 fails. Should any of these be expected to fail. Is it dependent on the config settings?

Ran scons install, then copied libboost_date_time-vc90-mt-1_48.lib and libboost_thread-vc90-mt-1_48.lib (from the downloads section of cantera site (not sure they are needed or would work even if they were needed)
Then ran my mex commands from Matlab and it worked!
Compared C++ outputs from a simple command to the MATLAB outputs with the same commands and they matched (enthalpy calculation, of a gas)

Thank you so much for the help!  I don't think i could have ever figured all this out without it.
-Jeff

Ray Speth

unread,
Jun 24, 2013, 4:01:19 PM6/24/13
to canter...@googlegroups.com
Jeff,

Glad to hear you got things working. I recently fixed a problem with the 'pecosTransport' test when using Visual Studio 2010. What are the other tests that fail, and what is the output of the failed tests? There shouldn't be any other known failures with the current trunk version.

Those Boost libraries don't do anything for you. They are for a different version of Boost (1.48) and a different version of Visual Studio (9.0 a.k.a 2008).

Regards,
Ray

J Chapman

unread,
Jun 25, 2013, 7:40:57 AM6/25/13
to canter...@googlegroups.com
From what i could tell the failed tests are HMW_test3, HMW_test2, VPsilane_test, and cxx_ex (blessed)
This is what I got from the command prompt,  its a bit long...

scons: Reading SConscript files ...
INFO: Skipping compilation of the Fortran 90 interface.
Checking for C++ header file cmath... (cached) yes
Checking for C++ header file sstream... (cached) yes
Checking for C header file sys/times.h... (cached) no
Checking for C header file unistd.h... (cached) no
Checking whether erf is declared... (cached) no
Checking for C++ header file boost/math/special_functions/erf.hpp... (cached) yes
Checking for CVodeCreate(CV_BDF, CV_NEWTON) in C++ library sundials_cvodes... (cached) no
Checking for double x; log(x) in C library None... (cached) yes

INFO: Building the full Python package using numpy.
INFO: Sundials was not found. Building with minimal ODE solver capabilities.
scons: done reading SConscript files.
scons: Building targets ...
ConfigBuilder(["include\cantera\base\config.h"], ["include\cantera\base\config.h.in"])
Generating include\cantera\base\config.h with the following settings:
    CANTERA_VERSION                     "2.0.2"
    DEBUG_MODE                          1
    FTN_TRAILING_UNDERSCORE             1
    HAS_NUMPY                           1
    HAS_SSTREAM                         1
    LAPACK_FTN_STRING_LEN_AT_END        1
    LAPACK_FTN_TRAILING_UNDERSCORE      1
    LAPACK_NAMES_LOWERCASE              1
    RXNPATH_FONT                        "Helvetica"
    SUNDIALS_VERSION                    0
    USE_BOOST_MATH                      1
    WITH_HTML_LOGS                      1
* Running test 'HMW_test_1'...
Comparing 'output_noD_blessed.txt' with 'output_noD_output.txt'
Found differences between C:\Temp\cantera-2.0.2\test_problems\cathermo\HMW_test_1\output_noD_blessed.txt and C:\Temp\cantera-2.0.2\test_problems\cathermo\HMW_test_1\output_noD_output.txt:
>>>
---

+++

@@ -29,6 +29,278 @@

 a1 = 3.04284e-10
 a2 = 3.04284e-10
             Name      Activity  ActCoeffMolal    MoleFract      Molality
+ Debugging information from hmw_act
+ Step 1:
+ ionic strenth      =  6.0997000e+00
+ total molar charge =  1.2199400e+01
+ Is = 6.0997
+ ij = 1, elambda = 0.0454012, elambda1 = -0.00306854
+ ij = 2, elambda = 0.200776, elambda1 = -0.014532
+ ij = 3, elambda = 0.47109, elambda1 = -0.0351127
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 6, elambda = 1.98206, elambda1 = -0.153152
+ ij = 8, elambda = 3.57685, elambda1 = -0.279391
+ ij = 9, elambda = 4.55112, elambda1 = -0.356872
+ ij = 12, elambda = 8.18289, elambda1 = -0.646977
+ ij = 16, elambda = 14.6822, elambda1 = -1.16875
+                                :       3.871963 (dimensionless)
+ z1=  1 z2=  1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  1 z2=  2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  1 z2=  3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  1 z2=  4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  2 z2=  1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  2 z2=  2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  2 z2=  3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  2 z2=  4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  3 z2=  1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  3 z2=  2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  3 z2=  3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  3 z2=  4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  4 z2=  2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  4 z2=  3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ Step 3:
+ Species          Species            g(x)  hfunc(x)
+ Cl-              H+                 0.07849  -0.07133
+ Cl-              Na+                0.07849  -0.07133
+ Cl-              OH-                0.00000   0.00000
+ H+               Na+                0.00000   0.00000
+ H+               OH-                0.07849  -0.07133
+ Na+              OH-                0.07849  -0.07133
+ Step 4:
+ Species          Species            BMX    BprimeMX    BphiMX
+1 0.200614: 0.1775 0.2945 0 0.0784862
+ Cl-              H+                 0.2006142  -0.0034438   0.1796081
+2 0.0974087: 0.0765 0.2664 0 0.0784862
+ Cl-              Na+                0.0974087  -0.0031152   0.0784069
+ Cl-              OH-                0.0000000   0.0000000   0.0000000
+ H+               Na+                0.0000000   0.0000000   0.0000000
+5 0: 0 0 0 0.0784862
+ H+               OH-                0.0000000   0.0000000   0.0000000
+6 0.106257: 0.0864 0.253 0 0.0784862
+ Na+              OH-                0.1062570  -0.0029585   0.0882110
+ Step 5:
+ Species          Species            CMX
+ Cl-              H+                 0.0004000
+ Cl-              Na+                0.0006350
+ Cl-              OH-                0.0000000
+ H+               Na+                0.0000000
+ H+               OH-                0.0000000
+ Na+              OH-                0.0022000
+ Step 6:
+ Species          Species            Phi_ij  Phiprime_ij  Phi^phi_ij
+ Cl-              H+                 0.000000   0.000000   0.000000
+ Cl-              Na+                0.000000   0.000000   0.000000
+ Cl-              OH-               -0.050000   0.000000  -0.050000
+ H+               Na+                0.036000   0.000000   0.036000
+ H+               OH-                0.000000   0.000000   0.000000
+ Na+              OH-                0.000000   0.000000   0.000000
+ Step 7:
+ initial value of F =  -1.143942
+ F =  -1.143942
+ F =  -1.259847
+ F =  -1.259847
+ F =  -1.259847
+ F =  -1.259847
+ F =  -1.259847
+ Step 8: Summing in All Contributions to Activity Coefficients
+  Contributions to ln(ActCoeff_Cl-):
+      Unary term:                                      z*z*F =   -1.25985
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =    0.02363
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Psi term on H+,Na+:                    m_j m_k psi_ijk =   -0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.18833
+                                                   m_j Z CMX =    0.04725
+      Phi term with OH-:                        2 m_j Phi_aa =   -0.00000
+      Psi term on OH-,Na+:                   m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net Cl-                                     lngamma[i] =   -0.00064             gamma[i]=  0.999359
+  Contributions to ln(ActCoeff_H+):
+      Unary term:                                      z*z*F =   -1.25985
+      Bin term with Cl-:                           2 m_j BMX =    2.44737
+                                                   m_j Z CMX =    0.02977
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Phi term with Na+:                        2 m_j Phi_cc =    0.43918
+      Psi term on Na+,Cl-:                   m_j m_k psi_ijk =   -0.14883
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =    0.02363
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net H+                                      lngamma[i] =    1.53127         gamma[i]=  4.624042
+  Contributions to ln(ActCoeff_Na+):
+      Unary term:                                      z*z*F =   -1.25985
+      Bin term with Cl-:                           2 m_j BMX =    1.18833
+                                                   m_j Z CMX =    0.04725
+      Psi term on Cl-,OH-:                   m_j m_k psi_ijk =   -0.00000
+      Phi term with H+:                         2 m_j Phi_cc =    0.00000
+      Psi term on H+,Cl-:                    m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =    0.02363
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net Na+                                     lngamma[i] =   -0.00064         gamma[i]=  0.999359
+  Contributions to ln(ActCoeff_OH-):
+      Unary term:                                      z*z*F =   -1.25985
+      Phi term with Cl-:                        2 m_j Phi_aa =   -0.60997
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Psi term on Cl-,Na+:                   m_j m_k psi_ijk =   -0.22324
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =    0.02363
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.29627
+                                                   m_j Z CMX =    0.16371
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net OH-                                     lngamma[i] =   -0.60945             gamma[i]=  0.543650
+ Step 9:
+ term1= -1.489777 sum1=  3.205458 sum2=  0.000000 sum3= -0.000001 sum4=  0.000000 sum5=  0.000000
+     sum_m_phi_minus_1=  3.431360        osmotic_coef=  1.281273
+ Step 10:
+ Weight of Solvent =         18.01528
+ molalitySumUncropped =          12.1994
+ ln_a_water= -0.281593 a_water=  0.754581
+
+
+ Debugging information from hmw_act
+ Step 1:
+ ionic strenth      =  6.0997000e+00
+ total molar charge =  1.2199400e+01
+ Is = 6.0997
+ ij = 1, elambda = 0.0454012, elambda1 = -0.00306854
+ ij = 2, elambda = 0.200776, elambda1 = -0.014532
+ ij = 3, elambda = 0.47109, elambda1 = -0.0351127
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 6, elambda = 1.98206, elambda1 = -0.153152
+ ij = 8, elambda = 3.57685, elambda1 = -0.279391
+ ij = 9, elambda = 4.55112, elambda1 = -0.356872
+ ij = 12, elambda = 8.18289, elambda1 = -0.646977
+ ij = 16, elambda = 14.6822, elambda1 = -1.16875
+ Step 2:
+ z1=  1 z2=  1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  1 z2=  2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  1 z2=  3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  1 z2=  4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  2 z2=  1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  2 z2=  2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  2 z2=  3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  2 z2=  4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  3 z2=  1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  3 z2=  2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  3 z2=  3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  3 z2=  4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  4 z2=  2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  4 z2=  3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ Step 3:
+ Species          Species            g(x)  hfunc(x)
+ Cl-              H+                 0.07849  -0.07133
+ Cl-              Na+                0.07849  -0.07133
+ Cl-              OH-                0.00000   0.00000
+ H+               Na+                0.00000   0.00000
+ H+               OH-                0.07849  -0.07133
+ Na+              OH-                0.07849  -0.07133
+ Step 4:
+ Species          Species            BMX    BprimeMX    BphiMX
+1 0.200614: 0.1775 0.2945 0 0.0784862
+ Cl-              H+                 0.2006142  -0.0034438   0.1796081
+2 0.0974087: 0.0765 0.2664 0 0.0784862
+ Cl-              Na+                0.0974087  -0.0031152   0.0784069
+ Cl-              OH-                0.0000000   0.0000000   0.0000000
+ H+               Na+                0.0000000   0.0000000   0.0000000
+5 0: 0 0 0 0.0784862
+ H+               OH-                0.0000000   0.0000000   0.0000000
+6 0.106257: 0.0864 0.253 0 0.0784862
+ Na+              OH-                0.1062570  -0.0029585   0.0882110
+ Step 5:
+ Species          Species            CMX
+ Cl-              H+                 0.0004000
+ Cl-              Na+                0.0006350
+ Cl-              OH-                0.0000000
+ H+               Na+                0.0000000
+ H+               OH-                0.0000000
+ Na+              OH-                0.0022000
+ Step 6:
+ Species          Species            Phi_ij  Phiprime_ij  Phi^phi_ij
+ Cl-              H+                 0.000000   0.000000   0.000000
+ Cl-              Na+                0.000000   0.000000   0.000000
+ Cl-              OH-               -0.050000   0.000000  -0.050000
+ H+               Na+                0.036000   0.000000   0.036000
+ H+               OH-                0.000000   0.000000   0.000000
+ Na+              OH-                0.000000   0.000000   0.000000
+ Step 7:
+ initial value of F =  -1.143942
+ F =  -1.143942
+ F =  -1.259847
+ F =  -1.259847
+ F =  -1.259847
+ F =  -1.259847
+ F =  -1.259847
+ Step 8: Summing in All Contributions to Activity Coefficients
+  Contributions to ln(ActCoeff_Cl-):
+      Unary term:                                      z*z*F =   -1.25985
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =    0.02363
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Psi term on H+,Na+:                    m_j m_k psi_ijk =   -0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.18833
+                                                   m_j Z CMX =    0.04725
+      Phi term with OH-:                        2 m_j Phi_aa =   -0.00000
+      Psi term on OH-,Na+:                   m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net Cl-                                     lngamma[i] =   -0.00064             gamma[i]=  0.999359
+  Contributions to ln(ActCoeff_H+):
+      Unary term:                                      z*z*F =   -1.25985
+      Bin term with Cl-:                           2 m_j BMX =    2.44737
+                                                   m_j Z CMX =    0.02977
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Phi term with Na+:                        2 m_j Phi_cc =    0.43918
+      Psi term on Na+,Cl-:                   m_j m_k psi_ijk =   -0.14883
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =    0.02363
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net H+                                      lngamma[i] =    1.53127         gamma[i]=  4.624042
+  Contributions to ln(ActCoeff_Na+):
+      Unary term:                                      z*z*F =   -1.25985
+      Bin term with Cl-:                           2 m_j BMX =    1.18833
+                                                   m_j Z CMX =    0.04725
+      Psi term on Cl-,OH-:                   m_j m_k psi_ijk =   -0.00000
+      Phi term with H+:                         2 m_j Phi_cc =    0.00000
+      Psi term on H+,Cl-:                    m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =    0.02363
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net Na+                                     lngamma[i] =   -0.00064         gamma[i]=  0.999359
+  Contributions to ln(ActCoeff_OH-):
+      Unary term:                                      z*z*F =   -1.25985
+      Phi term with Cl-:                        2 m_j Phi_aa =   -0.60997
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Psi term on Cl-,Na+:                   m_j m_k psi_ijk =   -0.22324
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =    0.02363
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.29627
+                                                   m_j Z CMX =    0.16371
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net OH-                                     lngamma[i] =   -0.60945             gamma[i]=  0.543650
+ Step 9:
+ term1= -1.489777 sum1=  3.205458 sum2=  0.000000 sum3= -0.000001 sum4=  0.000000 sum5=  0.000000
+     sum_m_phi_minus_1=  3.431360        osmotic_coef=  1.281273
+ Step 10:
+ Weight of Solvent =         18.01528
+ molalitySumUncropped =          12.1994
+ ln_a_water= -0.281593 a_water=  0.754581
+
+            Name      Activity  ActCoeffMolal    MoleFract      Molality
           H2O(L)      0.754581       0.92042      0.819823       55.5084
              Cl-       6.09579      0.999359     0.0900885        6.0997
               H+   1.00009e-08       4.62404   3.19431e-11    2.1628e-09
@@ -36,23 +308,23 @@

              OH-    7.5986e-07       0.54365   2.06431e-08    1.3977e-06
            Species   Standard chemical potentials (kJ/gmol)
 ------------------------------------------------------------
-          H2O(L)      -306.685777
-             Cl-      -131.066575
+          H2O(L)      -306.685728
+             Cl-      -131.066416
               H+                0
-             Na+      -311.162266
-             OH-      -226.881844
+             Na+       -311.16189
+             OH-       -226.88157
 ------------------------------------------------------------
  Some DeltaSS values:               Delta(mu_0)
- NaCl(S): Na+ + Cl- -> NaCl(S):        9.59844 kJ/gmol
-                                :       3.871963 (dimensionless)
-                                :       1.681572 (dimensionless/ln10)
+ NaCl(S): Na+ + Cl- -> NaCl(S):       9.597906 kJ/gmol
+                                :       3.871747 (dimensionless)
+                                :       1.681478 (dimensionless/ln10)
             G0(NaCl(S)) =      -432.6304 (fixed)
-            G0(Na+)     =      -311.1623
-            G0(Cl-)     =      -131.0666
- OH-: H2O(L) - H+ -> OH-:       79.80393 kJ/gmol
-                                :       32.19251 (dimensionless)
-                                :       13.98103 (dimensionless/ln10)
-            G0(OH-)    =      -226.8818
+            G0(Na+)     =      -311.1619
+            G0(Cl-)     =      -131.0664
+ OH-: H2O(L) - H+ -> OH-:       79.80416 kJ/gmol
+                                :        32.1926 (dimensionless)
+                                :       13.98107 (dimensionless/ln10)
+            G0(OH-)    =      -226.8816
             G0(H+)     =              0
-            G0(H2O(L)) =      -306.6858
+            G0(H2O(L)) =      -306.6857
 ------------------------------------------------------------
<<<
FAILED
* Running test 'HMW_test_3'...
Comparing 'output_noD_blessed.txt' with 'output_noD_output.txt'
Found differences between C:\Temp\cantera-2.0.2\test_problems\cathermo\HMW_test_3\output_noD_blessed.txt and C:\Temp\cantera-2.0.2\test_problems\cathermo\HMW_test_3\output_noD_output.txt:
>>>
---

+++

@@ -30,24 +30,432 @@

  OH-              Cl-              Na+               -0.00600
  OH-              Na+              Cl-               -0.00600
             Name      Activity  ActCoeffMolal    MoleFract      Molality
+ Debugging information from hmw_act
+ Step 1:
+ ionic strenth      =  6.0997000e+00
+ total molar charge =  1.2199400e+01
+ Is = 6.0997
+ ij = 1, elambda = 0.0454012, elambda1 = -0.00306854
+ ij = 2, elambda = 0.200776, elambda1 = -0.014532
+ ij = 3, elambda = 0.47109, elambda1 = -0.0351127
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 6, elambda = 1.98206, elambda1 = -0.153152
+ ij = 8, elambda = 3.57685, elambda1 = -0.279391
+ ij = 9, elambda = 4.55112, elambda1 = -0.356872
+ ij = 12, elambda = 8.18289, elambda1 = -0.646977
+ ij = 16, elambda = 14.6822, elambda1 = -1.16875
+                                :       78.66355 (dimensionless)
+ z1=  1 z2=  1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  1 z2=  2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  1 z2=  3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  1 z2=  4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  2 z2=  1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  2 z2=  2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  2 z2=  3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  2 z2=  4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  3 z2=  1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  3 z2=  2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  3 z2=  3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  3 z2=  4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  4 z2=  2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  4 z2=  3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ Step 3:
+ Species          Species            g(x)  hfunc(x)
+ Cl-              H+                 0.07849  -0.07133
+ Cl-              Na+                0.07849  -0.07133
+ Cl-              OH-                0.00000   0.00000
+ H+               Na+                0.00000   0.00000
+ H+               OH-                0.07849  -0.07133
+ Na+              OH-                0.07849  -0.07133
+ Step 4:
+ Species          Species            BMX    BprimeMX    BphiMX
+1 0.200614: 0.1775 0.2945 0 0.0784862
+ Cl-              H+                 0.2006142  -0.0034438   0.1796081
+2 0.129466: 0.10037 0.37071 0 0.0784862
+ Cl-              Na+                0.1294658  -0.0043350   0.1030237
+ Cl-              OH-                0.0000000   0.0000000   0.0000000
+ H+               Na+                0.0000000   0.0000000   0.0000000
+5 0: 0 0 0 0.0784862
+ H+               OH-                0.0000000   0.0000000   0.0000000
+6 0.106257: 0.0864 0.253 0 0.0784862
+ Na+              OH-                0.1062570  -0.0029585   0.0882110
+ Step 5:
+ Species          Species            CMX
+ Cl-              H+                 0.0004000
+ Cl-              Na+               -0.0022865
+ Cl-              OH-                0.0000000
+ H+               Na+                0.0000000
+ H+               OH-                0.0000000
+ Na+              OH-                0.0022000
+ Step 6:
+ Species          Species            Phi_ij  Phiprime_ij  Phi^phi_ij
+ Cl-              H+                 0.000000   0.000000   0.000000
+ Cl-              Na+                0.000000   0.000000   0.000000
+ Cl-              OH-               -0.050000   0.000000  -0.050000
+ H+               Na+                0.036000   0.000000   0.036000
+ H+               OH-                0.000000   0.000000   0.000000
+ Na+              OH-                0.000000   0.000000   0.000000
+ Step 7:
+ initial value of F =  -1.143942
+ F =  -1.143942
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ Step 8: Summing in All Contributions to Activity Coefficients
+  Contributions to ln(ActCoeff_Cl-):
+      Unary term:                                      z*z*F =   -1.30523
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =   -0.08507
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Psi term on H+,Na+:                    m_j m_k psi_ijk =   -0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.57940
+                                                   m_j Z CMX =   -0.17015
+      Phi term with OH-:                        2 m_j Phi_aa =   -0.00000
+      Psi term on OH-,Na+:                   m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net Cl-                                     lngamma[i] =    0.01895             gamma[i]=  1.019133
+  Contributions to ln(ActCoeff_H+):
+      Unary term:                                      z*z*F =   -1.30523
+      Bin term with Cl-:                           2 m_j BMX =    2.44737
+                                                   m_j Z CMX =    0.02977
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Phi term with Na+:                        2 m_j Phi_cc =    0.43918
+      Psi term on Na+,Cl-:                   m_j m_k psi_ijk =   -0.14883
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =   -0.08507
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net H+                                      lngamma[i] =    1.37719         gamma[i]=  3.963731
+  Contributions to ln(ActCoeff_Na+):
+      Unary term:                                      z*z*F =   -1.30523
+      Bin term with Cl-:                           2 m_j BMX =    1.57940
+                                                   m_j Z CMX =   -0.17015
+      Psi term on Cl-,OH-:                   m_j m_k psi_ijk =   -0.00000
+      Phi term with H+:                         2 m_j Phi_cc =    0.00000
+      Psi term on H+,Cl-:                    m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =   -0.08507
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net Na+                                     lngamma[i] =    0.01895         gamma[i]=  1.019133
+  Contributions to ln(ActCoeff_OH-):
+      Unary term:                                      z*z*F =   -1.30523
+      Phi term with Cl-:                        2 m_j Phi_aa =   -0.60997
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Psi term on Cl-,Na+:                   m_j m_k psi_ijk =   -0.22324
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =   -0.08507
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.29627
+                                                   m_j Z CMX =    0.16371
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net OH-                                     lngamma[i] =   -0.76353             gamma[i]=  0.466017
+ Step 9:
+ term1= -1.489777 sum1=  2.795284 sum2=  0.000000 sum3= -0.000001 sum4=  0.000000 sum5=  0.000000
+     sum_m_phi_minus_1=  2.611013        osmotic_coef=  1.214028
+ Step 10:
+ Weight of Solvent =         18.01528
+ molalitySumUncropped =          12.1994
+ ln_a_water= -0.266814 a_water=  0.765816
+
+
+ Debugging information from hmw_act
+ Step 1:
+ ionic strenth      =  6.0997000e+00
+ total molar charge =  1.2199400e+01
+ Is = 6.0997
+ ij = 1, elambda = 0.0454012, elambda1 = -0.00306854
+ ij = 2, elambda = 0.200776, elambda1 = -0.014532
+ ij = 3, elambda = 0.47109, elambda1 = -0.0351127
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 6, elambda = 1.98206, elambda1 = -0.153152
+ ij = 8, elambda = 3.57685, elambda1 = -0.279391
+ ij = 9, elambda = 4.55112, elambda1 = -0.356872
+ ij = 12, elambda = 8.18289, elambda1 = -0.646977
+ ij = 16, elambda = 14.6822, elambda1 = -1.16875
+ Step 2:
+ z1=  1 z2=  1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  1 z2=  2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  1 z2=  3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  1 z2=  4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  2 z2=  1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  2 z2=  2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  2 z2=  3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  2 z2=  4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  3 z2=  1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  3 z2=  2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  3 z2=  3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  3 z2=  4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  4 z2=  2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  4 z2=  3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ Step 3:
+ Species          Species            g(x)  hfunc(x)
+ Cl-              H+                 0.07849  -0.07133
+ Cl-              Na+                0.07849  -0.07133
+ Cl-              OH-                0.00000   0.00000
+ H+               Na+                0.00000   0.00000
+ H+               OH-                0.07849  -0.07133
+ Na+              OH-                0.07849  -0.07133
+ Step 4:
+ Species          Species            BMX    BprimeMX    BphiMX
+1 0.200614: 0.1775 0.2945 0 0.0784862
+ Cl-              H+                 0.2006142  -0.0034438   0.1796081
+2 0.129466: 0.10037 0.37071 0 0.0784862
+ Cl-              Na+                0.1294658  -0.0043350   0.1030237
+ Cl-              OH-                0.0000000   0.0000000   0.0000000
+ H+               Na+                0.0000000   0.0000000   0.0000000
+5 0: 0 0 0 0.0784862
+ H+               OH-                0.0000000   0.0000000   0.0000000
+6 0.106257: 0.0864 0.253 0 0.0784862
+ Na+              OH-                0.1062570  -0.0029585   0.0882110
+ Step 5:
+ Species          Species            CMX
+ Cl-              H+                 0.0004000
+ Cl-              Na+               -0.0022865
+ Cl-              OH-                0.0000000
+ H+               Na+                0.0000000
+ H+               OH-                0.0000000
+ Na+              OH-                0.0022000
+ Step 6:
+ Species          Species            Phi_ij  Phiprime_ij  Phi^phi_ij
+ Cl-              H+                 0.000000   0.000000   0.000000
+ Cl-              Na+                0.000000   0.000000   0.000000
+ Cl-              OH-               -0.050000   0.000000  -0.050000
+ H+               Na+                0.036000   0.000000   0.036000
+ H+               OH-                0.000000   0.000000   0.000000
+ Na+              OH-                0.000000   0.000000   0.000000
+ Step 7:
+ initial value of F =  -1.143942
+ F =  -1.143942
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ Step 8: Summing in All Contributions to Activity Coefficients
+  Contributions to ln(ActCoeff_Cl-):
+      Unary term:                                      z*z*F =   -1.30523
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =   -0.08507
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Psi term on H+,Na+:                    m_j m_k psi_ijk =   -0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.57940
+                                                   m_j Z CMX =   -0.17015
+      Phi term with OH-:                        2 m_j Phi_aa =   -0.00000
+      Psi term on OH-,Na+:                   m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net Cl-                                     lngamma[i] =    0.01895             gamma[i]=  1.019133
+  Contributions to ln(ActCoeff_H+):
+      Unary term:                                      z*z*F =   -1.30523
+      Bin term with Cl-:                           2 m_j BMX =    2.44737
+                                                   m_j Z CMX =    0.02977
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Phi term with Na+:                        2 m_j Phi_cc =    0.43918
+      Psi term on Na+,Cl-:                   m_j m_k psi_ijk =   -0.14883
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =   -0.08507
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net H+                                      lngamma[i] =    1.37719         gamma[i]=  3.963731
+  Contributions to ln(ActCoeff_Na+):
+      Unary term:                                      z*z*F =   -1.30523
+      Bin term with Cl-:                           2 m_j BMX =    1.57940
+                                                   m_j Z CMX =   -0.17015
+      Psi term on Cl-,OH-:                   m_j m_k psi_ijk =   -0.00000
+      Phi term with H+:                         2 m_j Phi_cc =    0.00000
+      Psi term on H+,Cl-:                    m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =   -0.08507
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net Na+                                     lngamma[i] =    0.01895         gamma[i]=  1.019133
+  Contributions to ln(ActCoeff_OH-):
+      Unary term:                                      z*z*F =   -1.30523
+      Phi term with Cl-:                        2 m_j Phi_aa =   -0.60997
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Psi term on Cl-,Na+:                   m_j m_k psi_ijk =   -0.22324
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =   -0.08507
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.29627
+                                                   m_j Z CMX =    0.16371
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net OH-                                     lngamma[i] =   -0.76353             gamma[i]=  0.466017
+ Step 9:
+ term1= -1.489777 sum1=  2.795284 sum2=  0.000000 sum3= -0.000001 sum4=  0.000000 sum5=  0.000000
+     sum_m_phi_minus_1=  2.611013        osmotic_coef=  1.214028
+ Step 10:
+ Weight of Solvent =         18.01528
+ molalitySumUncropped =          12.1994
+ ln_a_water= -0.266814 a_water=  0.765816
+
+            Name      Activity  ActCoeffMolal    MoleFract      Molality
           H2O(L)      0.765816      0.934123      0.819823       55.5084
              Cl-        6.2164       1.01913     0.0900885        6.0997
               H+   8.57276e-09       3.96373   3.19431e-11    2.1628e-09
              Na+       6.21641       1.01913     0.0900885        6.0997
              OH-   6.51352e-07      0.466017   2.06431e-08    1.3977e-06
+
+ Debugging information from hmw_act
+ Step 1:
+ ionic strenth      =  6.0997000e+00
+ total molar charge =  1.2199400e+01
+ Is = 6.0997
+ ij = 1, elambda = 0.0454012, elambda1 = -0.00306854
+ ij = 2, elambda = 0.200776, elambda1 = -0.014532
+ ij = 3, elambda = 0.47109, elambda1 = -0.0351127
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 4, elambda = 0.857674, elambda1 = -0.0650149
+ ij = 6, elambda = 1.98206, elambda1 = -0.153152
+ ij = 8, elambda = 3.57685, elambda1 = -0.279391
+ ij = 9, elambda = 4.55112, elambda1 = -0.356872
+ ij = 12, elambda = 8.18289, elambda1 = -0.646977
+ ij = 16, elambda = 14.6822, elambda1 = -1.16875
+ Step 2:
+ z1=  1 z2=  1 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  1 z2=  2 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  1 z2=  3 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  1 z2=  4 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  2 z2=  1 E-theta(I) = -0.059044, E-thetaprime(I) = 0.004790
+ z1=  2 z2=  2 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  2 z2=  3 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  2 z2=  4 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  3 z2=  1 E-theta(I) = -0.355533, E-thetaprime(I) = 0.028969
+ z1=  3 z2=  2 E-theta(I) = -0.178237, E-thetaprime(I) = 0.014566
+ z1=  3 z2=  3 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ z1=  3 z2=  4 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  1 E-theta(I) = -1.068400, E-thetaprime(I) = 0.087216
+ z1=  4 z2=  2 E-theta(I) = -0.951372, E-thetaprime(I) = 0.077813
+ z1=  4 z2=  3 E-theta(I) = -0.357010, E-thetaprime(I) = 0.029220
+ z1=  4 z2=  4 E-theta(I) = 0.000000, E-thetaprime(I) = 0.000000
+ Step 3:
+ Species          Species            g(x)  hfunc(x)
+ Cl-              H+                 0.07849  -0.07133
+ Cl-              Na+                0.07849  -0.07133
+ Cl-              OH-                0.00000   0.00000
+ H+               Na+                0.00000   0.00000
+ H+               OH-                0.07849  -0.07133
+ Na+              OH-                0.07849  -0.07133
+ Step 4:
+ Species          Species            BMX    BprimeMX    BphiMX
+1 0.200614: 0.1775 0.2945 0 0.0784862
+ Cl-              H+                 0.2006142  -0.0034438   0.1796081
+2 0.129466: 0.10037 0.37071 0 0.0784862
+ Cl-              Na+                0.1294658  -0.0043350   0.1030237
+ Cl-              OH-                0.0000000   0.0000000   0.0000000
+ H+               Na+                0.0000000   0.0000000   0.0000000
+5 0: 0 0 0 0.0784862
+ H+               OH-                0.0000000   0.0000000   0.0000000
+6 0.106257: 0.0864 0.253 0 0.0784862
+ Na+              OH-                0.1062570  -0.0029585   0.0882110
+ Step 5:
+ Species          Species            CMX
+ Cl-              H+                 0.0004000
+ Cl-              Na+               -0.0022865
+ Cl-              OH-                0.0000000
+ H+               Na+                0.0000000
+ H+               OH-                0.0000000
+ Na+              OH-                0.0022000
+ Step 6:
+ Species          Species            Phi_ij  Phiprime_ij  Phi^phi_ij
+ Cl-              H+                 0.000000   0.000000   0.000000
+ Cl-              Na+                0.000000   0.000000   0.000000
+ Cl-              OH-               -0.050000   0.000000  -0.050000
+ H+               Na+                0.036000   0.000000   0.036000
+ H+               OH-                0.000000   0.000000   0.000000
+ Na+              OH-                0.000000   0.000000   0.000000
+ Step 7:
+ initial value of F =  -1.143942
+ F =  -1.143942
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ F =  -1.305230
+ Step 8: Summing in All Contributions to Activity Coefficients
+  Contributions to ln(ActCoeff_Cl-):
+      Unary term:                                      z*z*F =   -1.30523
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =   -0.08507
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Psi term on H+,Na+:                    m_j m_k psi_ijk =   -0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.57940
+                                                   m_j Z CMX =   -0.17015
+      Phi term with OH-:                        2 m_j Phi_aa =   -0.00000
+      Psi term on OH-,Na+:                   m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net Cl-                                     lngamma[i] =    0.01895             gamma[i]=  1.019133
+  Contributions to ln(ActCoeff_H+):
+      Unary term:                                      z*z*F =   -1.30523
+      Bin term with Cl-:                           2 m_j BMX =    2.44737
+                                                   m_j Z CMX =    0.02977
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Phi term with Na+:                        2 m_j Phi_cc =    0.43918
+      Psi term on Na+,Cl-:                   m_j m_k psi_ijk =   -0.14883
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =   -0.08507
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net H+                                      lngamma[i] =    1.37719         gamma[i]=  3.963731
+  Contributions to ln(ActCoeff_Na+):
+      Unary term:                                      z*z*F =   -1.30523
+      Bin term with Cl-:                           2 m_j BMX =    1.57940
+                                                   m_j Z CMX =   -0.17015
+      Psi term on Cl-,OH-:                   m_j m_k psi_ijk =   -0.00000
+      Phi term with H+:                         2 m_j Phi_cc =    0.00000
+      Psi term on H+,Cl-:                    m_j m_k psi_ijk =   -0.00000
+      Tern CMX term on H+,Cl-:          abs(z_i) m_j m_k CMX =    0.00000
+      Tern CMX term on Na+,Cl-:         abs(z_i) m_j m_k CMX =   -0.08507
+      Tern CMX term on Na+,OH-:         abs(z_i) m_j m_k CMX =    0.00000
+      Bin term with OH-:                           2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Net Na+                                     lngamma[i] =    0.01895         gamma[i]=  1.019133
+  Contributions to ln(ActCoeff_OH-):
+      Unary term:                                      z*z*F =   -1.30523
+      Phi term with Cl-:                        2 m_j Phi_aa =   -0.60997
+      Tern CMX term on Cl-,H+:          abs(z_i) m_j m_k CMX =    0.00000
+      Psi term on Cl-,Na+:                   m_j m_k psi_ijk =   -0.22324
+      Tern CMX term on Cl-,Na+:         abs(z_i) m_j m_k CMX =   -0.08507
+      Bin term with H+:                            2 m_j BMX =    0.00000
+                                                   m_j Z CMX =    0.00000
+      Bin term with Na+:                           2 m_j BMX =    1.29627
+                                                   m_j Z CMX =    0.16371
+      Tern CMX term on OH-,Na+:         abs(z_i) m_j m_k CMX =    0.00000
+      Net OH-                                     lngamma[i] =   -0.76353             gamma[i]=  0.466017
+ Step 9:
+ term1= -1.489777 sum1=  2.795284 sum2=  0.000000 sum3= -0.000001 sum4=  0.000000 sum5=  0.000000
+     sum_m_phi_minus_1=  2.611013        osmotic_coef=  1.214028
+ Step 10:
+ Weight of Solvent =         18.01528
+ molalitySumUncropped =          12.1994
+ ln_a_water= -0.266814 a_water=  0.765816
+
            Species   Standard chemical potentials (kJ/gmol)
 ------------------------------------------------------------
-          H2O(L)      -317.175857
-             Cl-      -186.016505
+          H2O(L)      -317.175788
+             Cl-      -186.016281
               H+                0
-             Na+      -441.617685
-             OH-      -322.002524
+             Na+      -441.617151
+             OH-      -322.002134
 ------------------------------------------------------------
  Some DeltaSS values:               Delta(mu_0)
- NaCl(S): Na+ + Cl- -> NaCl(S):       195.0038 kJ/gmol
-                                :       78.66355 (dimensionless)
-                                :       34.16315 (dimensionless/ln10)
- OH-: H2O(L) - H+ -> OH-:      -4.826667 kJ/gmol
-                                :      -1.947053 (dimensionless)
-                                :     -0.8455945 (dimensionless/ln10)
+ NaCl(S): Na+ + Cl- -> NaCl(S):        195.003 kJ/gmol
+                                :       78.66325 (dimensionless)
+                                :       34.16301 (dimensionless/ln10)
+ OH-: H2O(L) - H+ -> OH-:      -4.826346 kJ/gmol
+                                :      -1.946924 (dimensionless)
+                                :     -0.8455383 (dimensionless/ln10)
 ------------------------------------------------------------
<<<
FAILED
* Running test 'cxx_ex'...
Comparing 'eq1_blessed.csv' with 'eq1.csv'
Comparing 'kin1_blessed.csv' with 'kin1.csv'
Comparing 'kin2_blessed.csv' with 'kin2.csv'
Comparing 'tr1_blessed.csv' with 'tr1.csv'
Comparing 'tr2_blessed.csv' with 'tr2.csv'
Comparing 'output_blessed.txt' with 'output_output.txt'
Found differences between C:\Temp\cantera-2.0.2\test_problems\cxx_ex\output_blessed.txt and C:\Temp\cantera-2.0.2\test_problems\cxx_ex\output_output.txt:
>>>
---

+++

@@ -12,23 +12,35 @@

 Ignition simulation using class IdealGasMix with file gri30.cti.
 Constant-pressure ignition of a hydrogen/oxygen/nitrogen mixture
 beginning at T = 1001 K and P = 1 atm.
+Adding reactor (none)
+Output files:
+Reactor 0: 55 variables.
+  kin1.dat    (Tecplot data file)
+Number of equations: 55
+Maximum time step:            1e-05
+ Tfinal = 2663.78
+
+>>>>>  example 2
+  kin1.dat    (Tecplot data file)
+Description:
+
+Constant-pressure ignition of a hydrogen/oxygen/nitrogen mixture
+
  Tfinal = 2663.78
 Output files:
-  kin1.csv    (Excel CSV file)
-  kin1.dat    (Tecplot data file)
+Description:
+  kin2.dat    (Tecplot data file)
+
+beginning at T = 1001 K and P = 1 atm.
 
 
-
-
->>>>>  example 2
-
-Description:
-Ignition simulation using class GRI30.
-Constant-pressure ignition of a hydrogen/oxygen/nitrogen mixture
-beginning at T = 1001 K and P = 1 atm.
+Reactor 0: 55 variables.
+            0 sensitivity params.
+Number of equations: 55
+Ignition simulation using class IdealGasMix with file gri30.cti.
  Tfinal = 2663.78
 Output files:
-  kin2.csv    (Excel CSV file)
+ Tfinal = 2663.78
   kin2.dat    (Tecplot data file)
 
 
@@ -38,10 +50,16 @@

 
 Description:
 Ignition simulation using class IdealGasMix with file gri30.cti.
-Constant-pressure ignition of a hydrogen/oxygen/nitrogen mixture
+Description:
 beginning at T = 1001 K and P = 1 atm.
- Tfinal = 2663.78
-Output files:
+Equilibrium composition and pressure for a range of temperatures at constant density.
+
+Reactor 0: 55 variables.
+            0 sensitivity params.
+Number of equations: 55
+    Value computed using low-temperature polynomial:  49.5493.
+    Value computed using high-temperature polynomial: 49.7214.
+
   kin3.csv    (Excel CSV file)
   kin3.dat    (Tecplot data file)
 
@@ -49,11 +67,11 @@

 
 
 >>>>>  example 4
-
+**** WARNING ****
 Description:
 Chemical equilibrium.
 Equilibrium composition and pressure for a range of temperatures at constant density.
-
+Output files:
 
 **** WARNING ****
 For species SI2H6, discontinuity in s/R detected at Tmid = 1000
@@ -61,25 +79,25 @@

     Value computed using high-temperature polynomial: 49.7214.
 
 
-**** WARNING ****
+
 For species SI3H8, discontinuity in s/R detected at Tmid = 1000
     Value computed using low-temperature polynomial:  65.9731.
     Value computed using high-temperature polynomial: 66.2781.
 
-
+Output files:
 **** WARNING ****
 For species SI2, discontinuity in s/R detected at Tmid = 1000
     Value computed using low-temperature polynomial:  32.8813.
     Value computed using high-temperature polynomial: 32.9489.
+
+  eq1.csv    (Excel CSV file)
+>>>>>  example 6
+
+Description:
+Multicomponent transport properties.
+Viscosity, thermal conductivity, and thermal diffusion
+ coefficients at 2 atm for a range of temperatures
 Output files:
-  eq1.csv    (Excel CSV file)
-  eq1.dat    (Tecplot data file)
-
-
-
-
->>>>>  example 5
-
 Description:
 Mixture-averaged transport properties.
 Viscosity, thermal conductivity, and mixture-averaged
<<<
FAILED
* Running test 'VPsilane_test'...
Comparing 'output_blessed.txt' with 'output_output.txt'
Found differences between C:\Temp\cantera-2.0.2\test_problems\VPsilane_test\output_blessed.txt and C:\Temp\cantera-2.0.2\test_problems\VPsilane_test\output_output.txt:
>>>
---

+++

@@ -17,11 +17,377 @@

     Value computed using low-temperature polynomial:  32.8813.
     Value computed using high-temperature polynomial: 32.9489.
 
+  Temperature = 1500
+  Pressure = 100
+         H2            0.99668
+          pressure             100  Pa
+         HE            0
+         SIH4          9.8691e-23
+         SI            9.7694e-07
+         SIH           9.7694e-09
+         SIH2          9.7694e-11
+          enthalpy     1.70171e+07        3.887e+07     J
+   internal energy     1.15568e+07         2.64e+07     J
+         SI2H6         4.8847e-17
+         H2SISIH2      4.8857e-19
+         SI3H8         3.3552e-21
+ heat capacity c_v         10521.7        2.403e+04     J/K
+         SI3           0.0032242
+                           X                 Y          Chem. Pot. / RT
+      Si            0.0049261 0.0049261
+      H             0.99507   0.99507
+      He            0         4.9261e-33
+                HE              0                0
+isp = 13, SI3
+isp = 2, HE
+Pressure = 100
+Temperature = 1500
+  id       Name     MF     mu/RT
+           H3SISIH    6.98628e-12      1.84142e-10         -50.9129
+         1               H      1e-20    -51.327
+         2              HE      1e-08    -42.537
+         3            SIH4      1e-20     -80.97
+         4              SI 9.7694e-07     -6.913
+         5             SIH 9.7694e-09    -19.855
+         6            SIH2 9.7694e-11    -37.163
+         7            SIH3 9.7694e-13     -49.93
+         8         H3SISIH 4.8847e-15    -58.178
+         9           SI2H6 4.8847e-17    -82.269
+        10        H2SISIH2 4.8857e-19    -70.629
+        11           SI3H8      1e-20    -101.54
+        12             SI2 9.7211e-05  -0.071199
+        13             SI3  0.0032242    0.33867
+ id      CompSpecies      ChemPot       EstChemPot       Diff
+  0               H2     -25.526      -25.526            0
+  1              SI3     0.33867      0.33867            0
+  2               HE     -42.537      -42.537            0
+ id    ElName  Lambda_RT
+   0      Si     0.11289
+   1       H     -12.763
+   2      He     -42.537
+estimateEP_Brinkley::
+
+temp = 1500
+pres = 100
+Initial mole numbers and mu_SS:
+         Name           MoleNum        mu_SS   actCoeff
+             H2        0.99668        -25.523             1
+              H          1e-20        -5.2748             1
+             HE          1e-08        -24.116             1
+           SIH4          1e-20        -34.919             1
+             SI     9.7694e-07         6.9258             1
+            SIH     9.7694e-09        -1.4113             1
+           SIH2     9.7694e-11        -14.113             1
+           SIH3     9.7694e-13        -22.275             1
+        H3SISIH     4.8847e-15        -25.226             1
+          SI2H6     4.8847e-17        -44.712             1
+       H2SISIH2     4.8857e-19        -28.466             1
+          SI3H8          1e-20        -55.486             1
+            SI2     9.7211e-05         9.1674             1
+            SI3      0.0032242         6.0757             1
+Initial n_t =     1.0017
+Comparison of Goal Element Abundance with Initial Guess:
+  eName       eCurrent       eGoal
+   Si       0.0098681      0.0049261
+    H          1.9934        0.99507
+   He           1e-08              0
+START ITERATION 0:
+        Species: Calculated_Moles Calculated_Mole_Fraction
+             H2:    0.99839    0.99497
+              H: 0.00056051 0.00055859
+             HE: 4.1247e-77 4.1106e-77
+           SIH4: 1.1034e-07 1.0996e-07
+             SI:  0.0011014  0.0010976
+            SIH: 1.3173e-05 1.3128e-05
+           SIH2: 1.2392e-05  1.235e-05
+           SIH3:  1.244e-07 1.2397e-07
+        H3SISIH: 7.6248e-12 7.5987e-12
+          SI2H6: 1.8148e-14 1.8086e-14
+       H2SISIH2: 1.9469e-10 1.9402e-10
+          SI3H8: 7.9642e-21 7.9369e-21
+            SI2: 0.00013105  0.0001306
+            SI3:  0.0032298  0.0032187
+Total Molar Sum:     1.0034
+(iter 0) element moles bal:   Goal  Calculated
+                    Si:  0.0049261   0.011079
+                     H:    0.99507     1.9974
+                    He:          0 4.1247e-77
+ Lump Sum Elements Calculation:
+                  Si   0 :     3     13
+                   H   0 :     0      7
+                  He   1 :    -1     -1
+ NOTE: Diagonalizing the analytical Jac row 2
+Matrix:
+       [   0.030719 3.8774e-05          0   0.011079]  =   -0.0061524
+       [ 3.8774e-05     3.9942          0     1.9974]  =      -1.0023
+       [          0          0          1 4.1247e-77]  =           -1
+       [   0.011079     1.9974 4.1247e-77          0]  =   -0.0017203
+(it 0) Convergence = 2.57446
+Row Summed Matrix:
+       [    0.73427  0.0009268          0    0.26481]  =     -0.14706
+       [ 6.4715e-06    0.66663          0    0.33336]  =     -0.16728
+       [          0          0          1 4.1247e-77]  =           -1
+       [   0.005516    0.99448 2.0537e-77          0]  =   -0.00085655
+Lump summing row 2, due to rank deficiency analysis
+Row Summed, MODIFIED Matrix:
+       [    0.73427  0.0009268          0    0.26481]  =     -0.14706
+       [ 6.4715e-06    0.66663          0    0.33336]  =     -0.16728
+       [          0          0          1 4.1247e-77]  =           -1
+       [   0.005516    0.99448 2.0537e-77          0]  =   -0.00085655
+(it 0)    OLD_SOLUTION  NEW SOLUTION    (undamped updated)
+        Si      0.11289      0.09304    -0.019849
+         H      -12.763      -12.764   -0.00075121
+        He         -200         -201           -1
+       n_t        1.0017      0.60739     0.60634
+START ITERATION 1:
+        Species: Calculated_Moles Calculated_Mole_Fraction
+             H2:    0.60446    0.99517
+              H: 0.00033961 0.00055912
+             HE: 9.2007e-78 1.5148e-77
+           SIH4: 6.5393e-08 1.0766e-07
+             SI: 0.00065468  0.0010779
+            SIH: 7.8247e-06 1.2883e-05
+           SIH2: 7.3553e-06  1.211e-05
+           SIH3: 7.3779e-08 1.2147e-07
+        H3SISIH:   4.43e-12 7.2935e-12
+          SI2H6: 1.0528e-14 1.7333e-14
+       H2SISIH2: 1.1312e-10 1.8623e-10
+          SI3H8: 4.5226e-21  7.446e-21
+            SI2: 7.6368e-05 0.00012573
+            SI3:  0.0018451  0.0030378
+Total Molar Sum:    0.60739
+(iter 1) element moles bal:   Goal  Calculated
+                    Si:  0.0049261  0.0063582
+                     H:    0.99507     1.2093
+                    He:          0 9.2007e-78
+ Lump Sum Elements Calculation:
+                  Si   0 :     3     13
+                   H   0 :     0      7
+                  He   1 :    -1     -1
+ NOTE: Diagonalizing the analytical Jac row 2
+Matrix:
+       [   0.017582 2.3019e-05          0  0.0063582]  =   -0.0014321
+       [ 2.3019e-05     2.4182          0     1.2093]  =     -0.21421
+       [          0          0          1 9.2007e-78]  =           -1
+       [  0.0063582     1.2093 9.2007e-78          0]  =   -4.2829e-06
+(it 1) Convergence = 0.13085
+Row Summed Matrix:
+       [    0.73371 0.00096062          0    0.26533]  =    -0.059761
+       [ 6.3457e-06    0.66663          0    0.33336]  =     -0.05905
+       [          0          0          1 9.2007e-78]  =           -1
+       [  0.0052303    0.99477 7.5686e-78          0]  =   -3.5231e-06
+Lump summing row 2, due to rank deficiency analysis
+Row Summed, MODIFIED Matrix:
+       [    0.73371 0.00096062          0    0.26533]  =    -0.059761
+       [ 6.3457e-06    0.66663          0    0.33336]  =     -0.05905
+       [          0          0          1 9.2007e-78]  =           -1
+       [  0.0052303    0.99477 7.5686e-78          0]  =   -3.5231e-06
+(it 1)    OLD_SOLUTION  NEW SOLUTION    (undamped updated)
+        Si      0.09304      0.07571     -0.01733
+         H      -12.764      -12.764   8.7575e-05
+        He         -201         -202           -1
+       n_t       0.60739       0.5087     0.83752
+START ITERATION 2:
+        Species: Calculated_Moles Calculated_Mole_Fraction
+             H2:    0.50633    0.99535
+              H: 0.00028445 0.00055918
+             HE: 2.8348e-78 5.5726e-78
+           SIH4: 5.3846e-08 1.0585e-07
+             SI: 0.00053889  0.0010593
+            SIH: 6.4413e-06 1.2662e-05
+           SIH2: 6.0555e-06 1.1904e-05
+           SIH3: 6.0746e-08 1.1941e-07
+        H3SISIH: 3.5851e-12 7.0475e-12
+          SI2H6: 8.5214e-15 1.6751e-14
+       H2SISIH2: 9.1541e-11 1.7995e-10
+          SI3H8: 3.5984e-21 7.0737e-21
+            SI2: 6.1781e-05 0.00012145
+            SI3:  0.0014671  0.0028839
+Total Molar Sum:     0.5087
+(iter 2) element moles bal:   Goal  Calculated
+                    Si:  0.0049261  0.0050762
+                     H:    0.99507      1.013
+                    He:          0 2.8348e-78
+ Lump Sum Elements Calculation:
+                  Si   0 :     3     13
+                   H   0 :     0      7
+                  He   1 :    -1     -1
+ NOTE: Diagonalizing the analytical Jac row 2
+Matrix:
+       [   0.014002 1.8951e-05          0  0.0050762]  =   -0.00015012
+       [ 1.8951e-05     2.0257          0      1.013]  =    -0.017899
+       [          0          0          1 2.8348e-78]  =           -1
+       [  0.0050762      1.013 2.8348e-78          0]  =   -2.1822e-06
+(it 2) Convergence = 0.00125221
+Row Summed Matrix:
+       [     0.7332 0.00099232          0    0.26581]  =   -0.0078606
+       [ 6.2365e-06    0.66663          0    0.33336]  =   -0.0058906
+       [          0          0          1 2.8348e-78]  =           -1
+       [  0.0049862    0.99501 2.7845e-78          0]  =   -2.1435e-06
+Lump summing row 2, due to rank deficiency analysis
+Row Summed, MODIFIED Matrix:
+       [     0.7332 0.00099232          0    0.26581]  =   -0.0078606
+       [ 6.2365e-06    0.66663          0    0.33336]  =   -0.0058906
+       [          0          0          1 2.8348e-78]  =           -1
+       [  0.0049862    0.99501 2.7845e-78          0]  =   -2.1435e-06
+(it 2)    OLD_SOLUTION  NEW SOLUTION    (undamped updated)
+        Si      0.07571     0.071409   -0.0043009
+         H      -12.764      -12.764   1.9398e-05
+        He         -202         -203           -1
+       n_t        0.5087      0.49977     0.98245
+START ITERATION 3:
+        Species: Calculated_Moles Calculated_Mole_Fraction
+             H2:    0.49747    0.99539
+              H: 0.00027946 0.00055919
+             HE: 1.0246e-78 2.0501e-78
+           SIH4: 5.2678e-08  1.054e-07
+             SI: 0.00052715  0.0010548
+            SIH: 6.3012e-06 1.2608e-05
+           SIH2: 5.9239e-06 1.1853e-05
+           SIH3: 5.9427e-08 1.1891e-07
+        H3SISIH: 3.4923e-12 6.9877e-12
+          SI2H6: 8.3011e-15  1.661e-14
+       H2SISIH2: 8.9171e-11 1.7842e-10
+          SI3H8: 3.4905e-21 6.9842e-21
+            SI2: 6.0177e-05 0.00012041
+            SI3:  0.0014228   0.002847
+Total Molar Sum:    0.49977
+(iter 3) element moles bal:   Goal  Calculated
+                    Si:  0.0049261  0.0049283
+                     H:    0.99507    0.99523
+                    He:          0 1.0246e-78
+ Lump Sum Elements Calculation:
+                  Si   0 :     3     13
+                   H   0 :     0      7
+                  He   1 :    -1     -1
+ NOTE: Diagonalizing the analytical Jac row 2
+Matrix:
+       [   0.013586 1.8539e-05          0  0.0049283]  =   -2.2162e-06
+       [ 1.8539e-05     1.9902          0    0.99523]  =   -0.00015722
+       [          0          0          1 1.0246e-78]  =           -1
+       [  0.0049283    0.99523 1.0246e-78          0]  =   -1.2707e-07
+(it 3) Convergence = 2.27365e-07
+Row Summed Matrix:
+       [    0.73307  0.0010003          0    0.26593]  =   -0.00011959
+       [ 6.2097e-06    0.66663          0    0.33336]  =   -5.2661e-05
+       [          0          0          1 1.0246e-78]  =           -1
+       [  0.0049275    0.99507 1.0244e-78          0]  =   -1.2705e-07
+Lump summing row 2, due to rank deficiency analysis
+Row Summed, MODIFIED Matrix:
+       [    0.73307  0.0010003          0    0.26593]  =   -0.00011959
+       [ 6.2097e-06    0.66663          0    0.33336]  =   -5.2661e-05
+       [          0          0          1 1.0246e-78]  =           -1
+       [  0.0049275    0.99507 1.0244e-78          0]  =   -1.2705e-07
+(it 3)    OLD_SOLUTION  NEW SOLUTION    (undamped updated)
+        Si     0.071409     0.071304   -0.00010554
+         H      -12.764      -12.764   3.9494e-07
+        He         -203         -204           -1
+       n_t       0.49977      0.49969     0.99984
+START ITERATION 4:
+        Species: Calculated_Moles Calculated_Mole_Fraction
+             H2:    0.49739    0.99539
+              H: 0.00027942 0.00055919
+             HE: 3.7685e-79 7.5418e-79
+           SIH4: 5.2664e-08 1.0539e-07
+             SI: 0.00052702  0.0010547
+            SIH: 6.2996e-06 1.2607e-05
+           SIH2: 5.9223e-06 1.1852e-05
+           SIH3: 5.9411e-08  1.189e-07
+        H3SISIH:  3.491e-12 6.9863e-12
+          SI2H6: 8.2981e-15 1.6606e-14
+       H2SISIH2: 8.9138e-11 1.7839e-10
+          SI3H8: 3.4888e-21  6.982e-21
+            SI2: 6.0155e-05 0.00012038
+            SI3:  0.0014222  0.0028461
+Total Molar Sum:    0.49969
+(iter 4) element moles bal:   Goal  Calculated
+                    Si:  0.0049261  0.0049261
+                     H:    0.99507    0.99507
+                    He:          0 3.7685e-79
+ Lump Sum Elements Calculation:
+                  Si   0 :     3     13
+                   H   0 :     0      7
+                  He   1 :    -1     -1
+ NOTE: Diagonalizing the analytical Jac row 2
+Matrix:
+       [   0.013579 1.8534e-05          0  0.0049261]  =   -5.0929e-10
+       [ 1.8534e-05     1.9899          0    0.99507]  =   -1.2417e-08
+       [          0          0          1 3.7685e-79]  =           -1
+       [  0.0049261    0.99507 3.7685e-79          0]  =   -7.5796e-11
+(it 4) Convergence = 1.08586e-14
+ ChemEquil::estimateEP_Brinkley() SUCCESS: equilibrium found at T = 1500, Pres = 100
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9261088E-03    -4.43430E-10
+                9.9507389E-01  9.9507389E-01     2.23360E-10
+                0.0000000E+00  0.0000000E+00     0.00000E+00
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000000E+03     0.00000E+00
+      YY(1):    1.0000000E+02  1.0000000E+02     1.51680E-10
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9261088E-03    -4.43430E-10
+                9.9507389E-01  9.9507389E-01     2.23360E-10
+                0.0000000E+00  0.0000000E+00     0.00000E+00
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000000E+03     0.00000E+00
+      YY(1):    1.0000000E+02  1.0000000E+02     1.51680E-10
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9261088E-03    -4.43430E-10
+                9.9507389E-01  9.9507389E-01     2.23360E-10
+                0.0000000E+00  0.0000000E+00     0.00000E+00
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000000E+03     0.00000E+00
+      YY(1):    1.0000000E+02  1.0000000E+02     1.51680E-10
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9261089E-03    -5.39300E-10
+                9.9507389E-01  9.9507389E-01     2.71650E-10
+                0.0000000E+00  0.0000000E+00     0.00000E+00
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000000E+03     0.00000E+00
+      YY(1):    1.0000000E+02  1.0000000E+02     2.21980E-10
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9260963E-03     1.19833E-08
+                9.9507389E-01  9.9507390E-01    -6.03603E-09
+                0.0000000E+00  0.0000000E+00     0.00000E+00
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000000E+03     0.00000E+00
+      YY(1):    1.0000000E+02  1.0000025E+02     2.54193E-06
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9261088E-03    -4.43430E-10
+                9.9507389E-01  9.9507389E-01     2.23360E-10
+                0.0000000E+00  0.0000000E+00     1.00000E-04
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000000E+03     0.00000E+00
+      YY(1):    1.0000000E+02  1.0000000E+02     1.51680E-10
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9262942E-03    -1.84911E-07
+                9.9507389E-01  9.9507371E-01     9.31403E-08
+                0.0000000E+00  0.0000000E+00     0.00000E+00
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000011E+03     7.31322E-07
+      YY(1):    1.0000000E+02  1.0000023E+02     2.27934E-06
+Jacobian matrix 1:
+      [  -0.013446  0.0097359          0   -0.25224  ]x_Si         =  - (-4.4343e-10)
+      [  0.0098583     1.9914          0     3.1165  ]x_YY         =  - (1.5168e-10)
+      [          0          0          1          0  ]x_He         =  - (         0)
+      [          0          0          0          1  ]x_XX         =  - (         0)
+Solution Unknowns: damp = 1
+            X_new      X_old       Step
+      0.071304     0.071304     -3.2915e-08
+     -12.764      -12.764        8.6776e-11
+     -1000        -1000          0
+Residual:      ElFracGoal     ElFracCurrent     Resid
+                4.9261084E-03  4.9261084E-03     0.00000E+00
+                9.9507389E-01  9.9507389E-01     0.00000E+00
+                0.0000000E+00  0.0000000E+00     0.00000E+00
+               Goal           Xvalue          Resid
+      XX   :    1.5000000E+03  1.5000000E+03     0.00000E+00
+      YY(1):    1.0000000E+02  1.0000000E+02     0.00000E+00
+
   silane:
 
        temperature            1500  K
           pressure             100  Pa
-           density      1.8314e-05  kg/m^3
+           density     1.83141e-05  kg/m^3
   mean mol. weight         2.28407  amu
 
                           1 kg            1 kmol
<<<
FAILED
printReport(["test_problems\finish_tests"], [])

*****************************
***    Testing Summary    ***
*****************************

Tests passed: 0
Tests failed: 4
Up-to-date tests skipped: 54

*****************************
scons: building terminated because of errors.

Ray Speth

unread,
Jun 25, 2013, 1:54:57 PM6/25/13
to canter...@googlegroups.com
Jeff,

I see, you're compiling with debug_verbose=y. In this case, yes, there are known test failures for several tests. This is noted on Issue 69 on the tracker.

Regards,
Ray
+ Cl-              OH-                0.0000000 ...

J Chapman

unread,
Jun 26, 2013, 8:18:34 AM6/26/13
to canter...@googlegroups.com
Yep, turning that off resulted in Tests passed 58, tests failed 0.

Thanks!
-Jeff
+ Na+         &n
...
Reply all
Reply to author
Forward
0 new messages