On 11/7/2012 5:29 PM, Satish Balay wrote: > Hm - if you have a mercurial clone of petsc-dev - you don't need to > apply/revert DMDAVecRestoreArrayF90-2.patch. You can just apply > DMDAVecRestoreArrayF90-2.1.patch. > > But I'm not sure why you are getting errors. > > sbalay at ps3 ~/petsc-dev > $ hg revert -a > > sbalay at ps3 ~/petsc-dev > $ hg st > > sbalay at ps3 ~/petsc-dev > $ patch -Np1 < ~/DMDAVecRestoreArrayF90-2.1.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 > > sbalay at ps3 ~/petsc-dev > $ hg st > M src/dm/impls/da/f90-custom/zda1f90.c > M src/sys/f90-src/f90_cwrap.c > M src/sys/f90-src/fsrc/f90_fwrap.F > > sbalay at ps3 ~/petsc-dev > $ > <<<<<<<<<<<< > > Satish
Hi, 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? Thanks > > On Wed, 11 Jul 2012, TAY wee-beng wrote: > >> On 11/7/2012 5:12 PM, Satish Balay wrote: >>> You would revert the old one - and apply the new one. i.e >>> >>> patch -Np1 -R< DMDAVecRestoreArrayF90-2.patch >>> patch -Np1< DMDAVecRestoreArrayF90-2.1.patch >>> >>> Satish >> Hi, >> >> Just tried but I still get the error: >> >> $ !494 >> patch -p1 < 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 >> >> User at windows-480c6c3 /cygdrive/c/Codes/petsc-dev >> $ !498 >> 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 >> >> User at windows-480c6c3 /cygdrive/c/Codes/petsc-dev >> $ !500 >> 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 >> >>> On Wed, 11 Jul 2012, TAY wee-beng wrote: >>> >>>> On 11/7/2012 3:40 PM, Satish Balay wrote: >>>>> The second patch has typos. Attaching the modified patch. If it works >>>>> for >>>>> you - I'll add it to petsc-3.3/petsc-dev >>>>> >>>>> thanks, >>>>> Satish >>>> Hi, >>>> >>>> How should I apply the patch? I download a new petsc-dev and used: >>>> >>>> /patch -p1< DMDAVecRestoreArrayF90-2.1.patch >>>> / >>>> It says: >>>> >>>> /(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/ >>>> >>>> I also used : >>>> >>>> /patch -p1 DMDAVecRestoreArrayF90-2.patch >>>> patch -p1 DMDAVecRestoreArrayF90-2.1.patch >>>> >>>> $ patch -p1< 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 >>>> / >>>> / >>>> $ patch -p1< 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/ >>>> >>>> Lastly, using patch -p1< DMDAVecRestoreArrayF90.patch gives: >>>> / >>>> $ patch -p1< DMDAVecRestoreArrayF90.patch >>>> (Stripping trailing CRs from patch.) >>>> patching file src/dm/impls/da/f90-custom/zda1f90.c >>>> Reversed (or previously applied) patch detected! Assume -R? [n] n >>>> Apply anyway? [n] n >>>> Skipping patch. >>>> 4 out of 4 hunks ignored -- saving rejects to file >>>> src/dm/impls/da/f90-custom/zda1f90.c.rej/ >>>>> On Wed, 11 Jul 2012, TAY wee-beng wrote: >>>>> >>>>>> On 6/7/2012 5:48 PM, Barry Smith wrote: >>>>>>> Blaise, >>>>>>> >>>>>>> Thanks. >>>>>>> >>>>>>> Satish, >>>>>>> >>>>>>> If they look good could you apply them to 3.3 and dev? >>>>>>> >>>>>>> Thanks >>>>>>> >>>>>>> Barry >>>>>> Hi, >>>>>> >>>>>> I downloaded petsc-dev a few days ago and applied both patches using >>>>>> "patch -v >>>>>> ..." in both linux and windows vs2008 >>>>>> >>>>>> It worked great in linux >>>>>> >>>>>> However, when I compile and link in vs2008, it gives the error: >>>>>> / >>>>>> 1>Compiling manifest to resources... >>>>>> 1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1 >>>>>> 1>Copyright (C) Microsoft Corporation. All rights reserved. >>>>>> 1>Linking... >>>>>> 1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved external >>>>>> symbol >>>>>> F90ARRAY4dCREATESCALAR referenced in function F90Array4dCreate >>>>>> 1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved external >>>>>> symbol >>>>>> F90ARRAY4dACCESSFORTRANADDR referenced in function F90Array4dAccess >>>>>> 1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved external >>>>>> symbol >>>>>> F90ARRAY4dACCESSINT referenced in function F90Array4dAccess >>>>>> 1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved external >>>>>> symbol >>>>>> F90ARRAY4dACCESSREAL referenced in function F90Array4dAccess >>>>>> 1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved external >>>>>> symbol >>>>>> F90ARRAY4dACCESSSCALAR referenced in function F90Array4dAccess >>>>>> 1>libpetsc.lib(f90_cwrap.o) : error LNK2019: unresolved external >>>>>> symbol >>>>>> F90ARRAY4dDESTROYSCALAR referenced in function F90Array4dDestroy >>>>>> 1>c:\obj_tmp\ibm2d_high_Re_staggered_old\Debug/ibm2d_high_Re_staggered.exe >>>>>> : >>>>>> fatal error LNK1120: 6 unresolved externals/ >>>>>> >>>>>> I wonder if it's fixed in the new petsc-dev. >>>>>> >>>>>> Thanks >>>>>>> On Jul 6, 2012, at 6:30 AM, Blaise Bourdin wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I have added the creation, destruction and accessor functions for >>>>>>>> 4d >>>>>>>> vectors in F90. The accessor was missing and needed for >>>>>>>> DMDAVecGetArrayF90 >>>>>>>> with a 3d DMDA and>1 dof. As far as I can test, ex11f90 in DM >>>>>>>> should >>>>>>>> now >>>>>>>> completely work with the intel compilers. >>>>>>>> >>>>>>>> Some of the functions are probably not used (F90Array4dAccessReal, >>>>>>>> F90Array4dAccessInt, F90Array4dAccessFortranAddr, for instance), >>>>>>>> but I >>>>>>>> added them anyway. Let me know if you want me to submit a patch >>>>>>>> without >>>>>>>> them. >>>>>>>> >>>>>>>> Regards, >>>>>>>> >>>>>>>> Blaise >>>>>>>> <DMDAVecRestoreArrayF90-2.patch> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Department of Mathematics and Center for Computation& Technology >>>>>>>> Louisiana State University, Baton Rouge, LA 70803, USA >>>>>>>> Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 >>>>>>>> http://www.math.lsu.edu/~bourdin >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120711/8634863b/attachment.html>
