[petsc-users] problem with PetscInitialize when moving to 3.19.0
Danny Lathouwers - TNW
D.Lathouwers at tudelft.nl
Sat Apr 15 07:07:41 CDT 2023
Hi Matt,
I just solved it :-)
the problem is the ‘only’ in the use statement. After removing it the code compiles and links flawlessly.
Many thanks for your suggestions !
Now off to testing this version.
Danny.
> On 15 Apr 2023, at 13:58, Matthew Knepley <knepley at gmail.com> wrote:
>
> On Sat, Apr 15, 2023 at 7:48 AM Danny Lathouwers - TNW <D.Lathouwers at tudelft.nl <mailto:D.Lathouwers at tudelft.nl>> wrote:
>> Dear Matt,
>>
>> Thanks for the quick reply.
>>
>> This however does not resolve the problem.
>> It simply cannot find the routine at all during linking.
>
> Perhaps your link line is wrong. Let's start with a PETSc example. Can you make Vec ex1f90/F90?
>
> cd $PETSC_DIR
> cd src/vec/vec/tutorials/
> make ex1f90
>
> That will also show the correct link line.
>
> Thanks,
>
> Matt
>
>> Danny.
>>
>>> On 15 Apr 2023, at 13:41, Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> wrote:
>>>
>>> On Sat, Apr 15, 2023 at 7:28 AM Danny Lathouwers - TNW via petsc-users <petsc-users at mcs.anl.gov <mailto:petsc-users at mcs.anl.gov>> wrote:
>>>> Dear community,
>>>>
>>>> I am transitioning a working Fortran code based on version 3.10.4 to version 3.19.0.
>>>> The code compiles except for one problem during linking where PetscInitialize can no longer be found (undefined reference to `petscinitialize_’).
>>>
>>> PetscInitialize() only takes the "ierr" argument now.
>>>
>>> THanks,
>>>
>>> Matt
>>>
>>>> I am attaching the piece of code where the call is made. Removing the call makes the whole code compile so this is the only error.
>>>> I added the include line of petsc.h as the documentation seems to imply this, but this did not help.
>>>>
>>>> Any help is appreciated.
>>>>
>>>> Thanks,
>>>> Danny.
>>>>
>>>
>>>
>>> --
>>> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
>>> -- Norbert Wiener
>>>
>>> https://www.cse.buffalo.edu/~knepley/ <https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!PAKc-5URQlI!-OWBkqVFDqAI4Ms8gzTOWnpwMl_4z-6mzQx4Sfmovxf0fGt2LSm-EvjTkgVLql5Zdd9d3sj65tOuHy_oRVcv$>
>>
>
>
> --
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/ <https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!PAKc-5URQlI!_K9dpY4jEyDTnDs5tI9e-eZsOqoMPtUAE7xPBnDp7NCsKd4e7wdEZwuIMuVCzUNCSzAcfrWdYr_XlEb8J70_$>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230415/7f105aeb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1674 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230415/7f105aeb/attachment.p7s>
More information about the petsc-users
mailing list