<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=NO-BOK link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hei all <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I used Microsoft Visual Stud . Run Petsc in this platform and
got the following error:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>Error 3
error LNK2005: __initp_misc_invarg already defined in LIBCMTD.lib(invarg.obj) C:\Users\Hung\Documents\Visual
Studio 2005\Projects\petsc-testing\petsc-testing\LIBCMT.lib(invarg.obj) <o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>Error 4
error LNK2005: __invoke_watson already defined in LIBCMTD.lib(invarg.obj) C:\Users\Hung\Documents\Visual
Studio 2005\Projects\petsc-testing\petsc-testing\LIBCMT.lib(invarg.obj) <o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>…<o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>Error 10
error LNK2005: ___pInvalidArgHandler already defined in LIBCMTD.lib(invarg.obj) C:\Users\Hung\Documents\Visual
Studio 2005\Projects\petsc-testing\petsc-testing\LIBCMT.lib(invarg.obj) <o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>Error 12
fatal error LNK1169: one or more multiply defined symbols found C:\Users\Hung\Documents\Visual
Studio 2005\Projects\petsc-testing\Debug\petsc-testing.exe <o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></i></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> I try : Linker –Input-Ignore Specific library: LIBCMT.lib,
and then got new error message :<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>Error 3
error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced
in function "public: char const & __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char>
>::operator[](unsigned int)const "
(??A?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEABDI@Z) C:\Users\Hung\Documents\Visual
Studio 2005\Projects\petsc-testing\petsc-testing\libpetsc.lib(err.o) <o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>Error 4
error LNK2001: unresolved external symbol __invalid_parameter_noinfo C:\Users\Hung\Documents\Visual
Studio 2005\Projects\petsc-testing\petsc-testing\libpetsc.lib(errtrace.o) <o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>…<o:p></o:p></span></i></p>
<p class=MsoNormal><i><span lang=EN-US style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>Error 6
fatal error LNK1120: 1 unresolved externals C:\Users\Hung\Documents\Visual
Studio 2005\Projects\petsc-testing\Debug\petsc-testing.exe <o:p></o:p></span></i></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Could someone tell me how to resolve it. <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Best regards hung Nguyen<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> petsc-users-bounces@mcs.anl.gov
[mailto:petsc-users-bounces@mcs.anl.gov] <b>On Behalf Of </b>Xiang Hao<br>
<b>Sent:</b> 8. juni 2011 05:21<br>
<b>To:</b> petsc-users@mcs.anl.gov<br>
<b>Subject:</b> [petsc-users] Examples on solving linear systems using GMRES
and/or matrix-free method<o:p></o:p></span></p>
</div>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<div id=aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hi
all,<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I
need to solve a PDE ( basically a Poisson's equation with Neumann
boundary condition ), and I solved it using a steepest descent method,
which is very slow. Now I want to solve the PDE using GMRES. In addition, I do
have the matrix A, but I have a function which computes Ax, so I also need to
use the matrix free method.<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I
am very new to PETSc, so I am looking for examples on solving linear systems
using GMRES and/or matrix-free method.<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Xiang<o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>
</div>
</body>
</html>