[petsc-users] petsc4py f2py

Aurelien Ponte aurelien.ponte at ifremer.fr
Thu Jan 18 13:23:32 CST 2018


Thanks,

I corrected the two errors in the fortran code Lisandro spotted.

I added the -E option in the makefile:
         F90="${FC}" F90FLAGS="${FC_FLAGS} -E" \

make now goes through and produce two files:
timestepper_adv.cpython-36m-darwin.so.dSYM
timestepper_adv.cpython-36m-darwin.so

I have not tested these libraries yet but will do soon.
Do you believe I am good to go?

Finally, I have several warning that may be of some interest, if you 
have quick fixes, I am a taker !

/Users/aponte/.miniconda3/envs/petsc/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: 
warning: #warning "Using deprecated NumPy API, disable it by " 
"#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
  #warning "Using deprecated NumPy API, disable it by " \
   ^
build/src.macosx-10.9-x86_64-3.6/./fortranobject.c: In function 
'format_def':
build/src.macosx-10.9-x86_64-3.6/./fortranobject.c:138:18: warning: 
comparison between signed and unsigned integer expressions [-Wsign-compare]
          if (size < sizeof(notalloc)) {
                   ^
ld: warning: ignoring file 
build/temp.macosx-10.9-x86_64-3.6/timestepper_adv.o, file was built for 
unsupported file format ( 0x23 0x20 0x31 0x20 0x22 0x2E 0x2F 0x74 0x69 
0x6D 0x65 0x73 0x74 0x65 0x70 0x70 ) which is not the architecture being 
linked (x86_64): build/temp.macosx-10.9-x86_64-3.6/timestepper_adv.o

Le 18/01/2018 à 20:01, Lisandro Dalcin a écrit :
> Line 71 is likely wrong, too, you likely meant:
>
> do k=grd%zs,grd%ze
>
> On 18 January 2018 at 21:59, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>> On 18 January 2018 at 18:56, Aurelien Ponte <aurelien.ponte at ifremer.fr> wrote:
>>> The code is found here:
>>> https://github.com/apatlpo/qgsolver/tree/fwrapping/qgsolver
>> Your code is not valid Fortran, you cannot use brackets [] for
>> indexing in lines 80-90, you have to use parentheses ().
>>
>> --
>> Lisandro Dalcin
>> ============
>> Research Scientist
>> Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
>> Extreme Computing Research Center (ECRC)
>> King Abdullah University of Science and Technology (KAUST)
>> http://ecrc.kaust.edu.sa/
>>
>> 4700 King Abdullah University of Science and Technology
>> al-Khawarizmi Bldg (Bldg 1), Office # 0109
>> Thuwal 23955-6900, Kingdom of Saudi Arabia
>> http://www.kaust.edu.sa
>>
>> Office Phone: +966 12 808-0459
>
>

-- 
Aurélien Ponte
Tel: (+33) 2 98 22 40 73
Fax: (+33) 2 98 22 44 96
UMR 6523, IFREMER
ZI de la Pointe du Diable
CS 10070
29280 Plouzané



More information about the petsc-users mailing list