<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On Jul 11, 2012, at 3:44 PM, TAY wee-beng wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
  
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 11/7/2012 8:10 PM, Satish Balay
      wrote:<br>
    </div>
    <blockquote cite="mid:alpine.LFD.2.02.1207111305400.3517@asterix" type="cite">
      <pre wrap="">On Wed, 11 Jul 2012, TAY wee-beng wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">I just tried on a different system and the same error occurs. The 1st command
:
/
/

/patch -Np1 -R < DMDAVecRestoreArrayF90-2.patch

$ patch -Np1 -R < DMDAVecRestoreArrayF90-2.patch
(Stripping trailing CRs from patch.)
patching file src/dm/impls/da/f90-custom/zda1f90.c
(Stripping trailing CRs from patch.)
patching file src/sys/f90-src/f90_cwrap.c
(Stripping trailing CRs from patch.)
patching file src/sys/f90-src/fsrc/f90_fwrap.F/

works but the 2nd one doesn't:
/
$ patch -Np1  < DMDAVecRestoreArrayF90-2.1.patch
(Stripping trailing CRs from patch.)
patching file src/dm/impls/da/f90-custom/zda1f90.c
Hunk #1 FAILED at 175.
1 out of 1 hunk FAILED -- saving rejects to file
src/dm/impls/da/f90-custom/zda1f90.c.rej
(Stripping trailing CRs from patch.)
patching file src/sys/f90-src/f90_cwrap.c
Hunk #1 FAILED at 307.
Hunk #2 FAILED at 333.
Hunk #3 FAILED at 436.
3 out of 3 hunks FAILED -- saving rejects to file
src/sys/f90-src/f90_cwrap.c.rej
(Stripping trailing CRs from patch.)
patching file src/sys/f90-src/fsrc/f90_fwrap.F
Hunk #1 FAILED at 322.
Hunk #2 FAILED at 426.
2 out of 2 hunks FAILED -- saving rejects to file
src/sys/f90-src/fsrc/f90_fwrap.F.rej/


It is possible to send me the 3 patch files? Or is there some other ways?
</pre>
      </blockquote>
      <pre wrap="">This doesn't make any sense. What petsc-dev do you have? Is it hg
repo? or something else?  What revisions? Are the sources locally
modified?

You can apply DMDAVecRestoreArrayF90-2.patch and then edit
src/sys/f90-src/f90_cwrap.c and replace all occurances of 'F90ARRAY4d'
with 'F90ARRAY4D' in the editor to get the same effect.

Satish</pre>
    </blockquote>
    <br>
    I just tried but the same error occurs:<br>
    <i><br>
      1>D:\Lib\petsc-3.3-dev_win32_vs2008/include/finclude/ftn-custom/petscdmcomposite.h90(8):
      warning #6717: This name has not been given an explicit type.  
      [D1]<br>
      1>Linking...<br>
      1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved
      external symbol F90ARRAY4dCREATESCALAR referenced in function
      F90Array4dCreate<br>
      1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved
      external symbol F90ARRAY4dACCESSFORTRANADDR referenced in function
      F90Array4dAccess<br>
      1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved
      external symbol F90ARRAY4dACCESSINT referenced in function
      F90Array4dAccess<br>
      1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved
      external symbol F90ARRAY4dACCESSREAL referenced in function
      F90Array4dAccess<br>
      1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved
      external symbol F90ARRAY4dACCESSSCALAR referenced in function
      F90Array4dAccess<br>
      1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved
      external symbol F90ARRAY4dDESTROYSCALAR referenced in function
      F90Array4dDestroy<br>
      1>c:\obj_tmp\dm_test2d\Debug/dm_test2d.exe : fatal error
      LNK1120: 6 unresolved externals<br>
      1><br>
      1>Build log written to 
      <a class="moz-txt-link-rfc2396E" href="file://c/obj_tmp/dm_test2d/Debug/BuildLog.htm">"file://c:\obj_tmp\dm_test2d\Debug\BuildLog.htm"</a></i><br>
    <br>
    Any other solutions?<br></div></blockquote><div><br></div><div><br></div>There is something fishy in your tree or your build: the patch that Satish sent addressed this issue, but it clearly has not been applied to your tree. The patch I had originally sent contained an error. For instance, F90ARRAY4<b>D</b>ACCESSFORTRANADDR was replaced by F90ARRAY4<b>d</b>ACCESSFORTRANADDR (note the capitalization of the "d"). These are the symbols that are unresolved in your build.</div><div><br></div><div><br></div><div><br></div><div>How about starting from a clean state: </div><div>- rename your current petsc-dev tree</div><div>- clone petsc-dev from the official tree (BTW, do you really need petsc-dev, and not 3.3?)</div><div>- apply the patch Satish sent you or, quoting Satich </div><div><div><blockquote type="cite"><blockquote type="cite"><span class="Apple-style-span" style="font-family: monospace; white-space: pre-wrap; ">edit </span><span class="Apple-style-span" style="font-family: monospace; white-space: pre-wrap; ">src/sys/f90-src/f90_cwrap.c and replace all occurrences of 'F90ARRAY4d' </span><span class="Apple-style-span" style="font-family: monospace; white-space: pre-wrap; ">with 'F90ARRAY4D'</span></blockquote></blockquote></div></div><div>- run configure with your favorite options, then make</div><div><br></div><div>This should fix your problem.</div><div><i><br></i></div><div>Blaise</div><div><span class="Apple-style-span" style="font-size: 12px; "><br></span></div><div><span class="Apple-style-span" style="font-size: 12px; ">-- </span></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Department of Mathematics and Center for Computation & Technology</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Louisiana State University, Baton Rouge, LA 70803, USA</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 <a href="http://www.math.lsu.edu/~bourdin">http://www.math.lsu.edu/~bourdin</a></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>