[petsc-users] undefined symbol: petsc_null_function_
Barry Smith
bsmith at mcs.anl.gov
Fri Jun 16 20:05:34 CDT 2017
I don't know exactly how to fix this but you need to make sure the PETSc libraries are linked against any shared libraries you are creating so that PETSc symbols can be found.
Barry
> On Jun 16, 2017, at 7:35 PM, Tianhao Le <happysky19 at gmail.com> wrote:
>
> Hi Barry,
>
> Attached are the make.log and configure.log.
>
> In fact, the 3-D R-T model is written in c++ and fortran.
>
> I wrote a wrapper.f90 to let the 3-D R-T model can be called by the python code. (See the Tenstream_combined.csh, also attached)
>
> Thanks,
> Tianhao
>
>> 在 2017年6月17日,上午8:12,Barry Smith <bsmith at mcs.anl.gov> 写道:
>>
>>
>> Please send make.log and configure.log from building PETSc
>>
>> This is a fortran stub function, is there any fortran in your code?
>>
>> If there is no fortran you can reconfigure PETSc with the option -with-fc=0
>>
>> Otherwise we need to track down why it is not being found.
>>
>> Barry
>>
>>> On Jun 16, 2017, at 6:31 PM, TianHao Le <thl at gps.caltech.edu> wrote:
>>>
>>> Dear all,
>>>
>>> I try to put a 3-D radiative transfer model in the python Large-Scale
>>> Simulations model. However, when I setup the LES model, I got the
>>> following error message:
>>>
>>> Traceback (most recent call last):
>>> File "main.py", line 33, in <module>
>>> main()
>>> File "main.py", line 17, in main
>>> main3d(namelist)
>>> File "main.py", line 23, in main3d
>>> import Simulation3d
>>> File "Radiation.pxd", line 11, in init Simulation3d (Simulation3d.c:29383)
>>> cdef class RadiationBase:
>>> ImportError: /global/home/thl/pycles-test/Radiation.so: undefined symbol:
>>> petsc_null_function_
>>>
>>> Seems cannot find the PETSC NULL FUNCTION.
>>>
>>> I add the following 5 include paths in the setup.py (because I am not sure
>>> that I should add which one.)
>>>
>>> include_path += ['/home/thl/petsc/include/petsc/finclude']
>>> include_path += ['/home/thl/petsc/include/petsc/private']
>>> include_path += ['/home/thl/petsc/fast_double/include']
>>> include_path += ['/home/thl/petsc/include']
>>> include_path += ['/home/thl/petsc/include/petsc']
>>>
>>> and add the following 2 library directions.
>>>
>>> library_dirs.append('/home/thl/tenstream/build/lib')
>>> library_dirs.append('/home/thl/petsc/fast_double/lib')
>>>
>>>
>>> Now I am not sure what may cause this, maybe didn't install PETSC
>>> correctly? Or add wrong include path or in a wrong way?
>>>
>>> If anyone knows how to fix this, please let me know!
>>>
>>> Thanks,
>>> Tianhao
>>>
>>>
>>> --
>>>
>>>
>>> --
>>>
>>
>
> <Tenstream_combined.csh><configure.log><make.log>
More information about the petsc-users
mailing list