[petsc-users] Install PETSc with option `--with-shared-libraries=1` failed on MacOS

Zongze Yang yangzongze at gmail.com
Sun Mar 17 09:50:07 CDT 2024


After removing OpenBLAS, everything is working fine. Thanks!

Best wishes,
Zongze

> On 17 Mar 2024, at 22:23, Pierre Jolivet <pierre at joliv.et> wrote:
> 
> Ah, my bad, I misread linux-opt-arm as a macOS runner, no wonder the option is not helping…
> Take Barry’s advice.
> Furthermore, it looks like OpenBLAS people are steering in the opposite direction as us, by forcing the use of ld-classic https://urldefense.us/v3/__https://github.com/OpenMathLib/OpenBLAS/commit/103d6f4e42fbe532ae4ea48e8d90d7d792bc93d2__;!!G_uCfscf7eWS!ayl2seevZWjJZO9OMKEHMo_bZDQOX3aAF1By7x_1x9rbjOmrQ2DwsX1KitiUFsStTf9_ThHAAHkgb1dIJmTSF9Qa$ , so that’s another good argument in favor of -framework Accelerate.
> 
> Thanks,
> Pierre
> 
> PS: anyone benchmarked those https://urldefense.us/v3/__https://developer.apple.com/documentation/accelerate/sparse_solvers__;!!G_uCfscf7eWS!ayl2seevZWjJZO9OMKEHMo_bZDQOX3aAF1By7x_1x9rbjOmrQ2DwsX1KitiUFsStTf9_ThHAAHkgb1dIJrPiSsuB$  ? I didn’t even know they existed.
> 
>> On 17 Mar 2024, at 3:06 PM, Zongze Yang <yangzongze at gmail.com> wrote:
>> 
>> This Message Is From an External Sender 
>> This message came from outside your organization.
>> Understood. Thank you for your advice.
>> 
>> Best wishes,
>> Zongze
>> 
>>> On 17 Mar 2024, at 22:04, Barry Smith <bsmith at petsc.dev <mailto:bsmith at petsc.dev>> wrote:
>>> 
>>> 
>>>   I would just avoid the --download-openblas  option. The BLAS/LAPACK provided by Apple should perform fine, perhaps even better than OpenBLAS on your system.
>>> 
>>> 
>>>> On Mar 17, 2024, at 9:58 AM, Zongze Yang <yangzongze at gmail.com <mailto:yangzongze at gmail.com>> wrote:
>>>> 
>>>> This Message Is From an External Sender 
>>>> This message came from outside your organization.
>>>> Adding the flag `--download-openblas-make-options=TARGET=GENERIC` did not resolve the issue. The same error persisted.
>>>> 
>>>> Best wishes,
>>>> Zongze
>>>> 
>>>>> On 17 Mar 2024, at 20:58, Pierre Jolivet <pierre at joliv.et <mailto:pierre at joliv.et>> wrote:
>>>>> 
>>>>> 
>>>>> 
>>>>>> On 17 Mar 2024, at 1:04 PM, Zongze Yang <yangzongze at gmail.com <mailto:yangzongze at gmail.com>> wrote:
>>>>>> 
>>>>>> Thank you for providing the instructions. I try the first option.
>>>>>> 
>>>>>> Now, the error of the configuration is related to OpenBLAS.
>>>>>> Add `--CFLAGS=-Wno-int-conversion` to configure command resolve this. Should this be reported to OpenBLAS? Or need to fix the configure in petsc?
>>>>> 
>>>>> I see our linux-opt-arm runner is using the additional flag '--download-openblas-make-options=TARGET=GENERIC', could you maybe try to add that as well?
>>>>> I don’t think there is much to fix on our end, OpenBLAS has been very broken lately on arm (current version is 0.3.26 but we can’t update because there is a huge performance regression which makes the pipeline timeout).
>>>>> 
>>>>> Thanks,
>>>>> Pierre
>>>>> 
>>>>>> 
>>>>>> The configure.log is attached. The errors are show below:
>>>>>>     ```
>>>>>>     src/lapack_wrappers.c:570:81: error: incompatible integer to pointer conversion passing 'blasint' (aka 'int') to parameter of type 'const blasint *' (aka 'const int *'); take the address with & [-Wint-conversion]
>>>>>>         RELAPACK_sgemmt(uplo, transA, transB, n, k, alpha, A, ldA, B, ldB, beta, C, info);
>>>>>>                                                                                     ^~~~
>>>>>>                                                                                     &
>>>>>>     src/../inc/relapack.h:74:216: note: passing argument to parameter here
>>>>>>     void RELAPACK_sgemmt(const char *, const char *, const char *, const blasint *, const blasint *, const float *, const float *, const blasint *, const float *, const blasint *, const float *, float *, const blasint *);
>>>>>>                                                                                                                                                                                                                            ^
>>>>>>     src/lapack_wrappers.c:583:81: error: incompatible integer to pointer conversion passing 'blasint' (aka 'int') to parameter of type 'const blasint *' (aka 'const int *'); take the address with & [-Wint-conversion]
>>>>>>         RELAPACK_dgemmt(uplo, transA, transB, n, k, alpha, A, ldA, B, ldB, beta, C, info);
>>>>>>                                                                                     ^~~~
>>>>>>                                                                                     &
>>>>>>     src/../inc/relapack.h:75:221: note: passing argument to parameter here
>>>>>>     void RELAPACK_dgemmt(const char *, const char *, const char *, const blasint *, const blasint *, const double *, const double *, const blasint *, const double *, const blasint *, const double *, double *, const blasint *);
>>>>>>                                                                                                                                                                                                                                 ^
>>>>>>     src/lapack_wrappers.c:596:81: error: incompatible integer to pointer conversion passing 'blasint' (aka 'int') to parameter of type 'const blasint *' (aka 'const int *'); take the address with & [-Wint-conversion]
>>>>>>         RELAPACK_cgemmt(uplo, transA, transB, n, k, alpha, A, ldA, B, ldB, beta, C, info);
>>>>>>                                                                                     ^~~~
>>>>>>                                                                                     &
>>>>>>     src/../inc/relapack.h:76:216: note: passing argument to parameter here
>>>>>>     void RELAPACK_cgemmt(const char *, const char *, const char *, const blasint *, const blasint *, const float *, const float *, const blasint *, const float *, const blasint *, const float *, float *, const blasint *);
>>>>>>                                                                                                                                                                                                                            ^
>>>>>>     src/lapack_wrappers.c:609:81: error: incompatible integer to pointer conversion passing 'blasint' (aka 'int') to parameter of type 'const blasint *' (aka 'const int *'); take the address with & [-Wint-conversion]
>>>>>>         RELAPACK_zgemmt(uplo, transA, transB, n, k, alpha, A, ldA, B, ldB, beta, C, info);
>>>>>>                                                                                     ^~~~
>>>>>>                                                                                     &
>>>>>>     src/../inc/relapack.h:77:221: note: passing argument to parameter here
>>>>>>     void RELAPACK_zgemmt(const char *, const char *, const char *, const blasint *, const blasint *, const double *, const double *, const blasint *, const double *, const blasint *, const double *, double *, const blasint *);
>>>>>>                                                                                                                                                                                                                                 ^
>>>>>>     4 errors generated.
>>>>>>     ```
>>>>>> 
>>>>>> Best wishes,
>>>>>> Zongze
>>>>>> 
>>>>>> <configure.log.tar.gz>
>>>>>> 
>>>>>>> On 17 Mar 2024, at 18:48, Pierre Jolivet <pierre at joliv.et <mailto:pierre at joliv.et>> wrote:
>>>>>>> 
>>>>>>> You need this MR https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/7365__;!!G_uCfscf7eWS!ayl2seevZWjJZO9OMKEHMo_bZDQOX3aAF1By7x_1x9rbjOmrQ2DwsX1KitiUFsStTf9_ThHAAHkgb1dIJpz1zt2Q$  <https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/7365__;!!G_uCfscf7eWS!eCQRfbol7FDQiO0o78iDit2saij_ydIUtCfRQnsQAt-h_YcXr2Yi2BFnFnqHZp0FO3Lhpyr2RKdHZ-T-OF94HpwQ$>
>>>>>>> main has been broken for macOS since https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/7341__;!!G_uCfscf7eWS!ayl2seevZWjJZO9OMKEHMo_bZDQOX3aAF1By7x_1x9rbjOmrQ2DwsX1KitiUFsStTf9_ThHAAHkgb1dIJu7sVyGp$  <https://urldefense.us/v3/__https://gitlab.com/petsc/petsc/-/merge_requests/7341__;!!G_uCfscf7eWS!eCQRfbol7FDQiO0o78iDit2saij_ydIUtCfRQnsQAt-h_YcXr2Yi2BFnFnqHZp0FO3Lhpyr2RKdHZ-T-OIhlJwLx$>, so the alternative is to revert to the commit prior.
>>>>>>> It should work either way.
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> Pierre
>>>>>>> 
>>>>>>>> On 17 Mar 2024, at 11:31 AM, Zongze Yang <yangzongze at gmail.com <mailto:yangzongze at gmail.com>> wrote:
>>>>>>>> 
>>>>>>>> 
>>>>>>>> This Message Is From an External Sender
>>>>>>>> This message came from outside your organization.
>>>>>>>> Hi, PETSc Team,
>>>>>>>> 
>>>>>>>> I am trying to install petsc with the following configuration
>>>>>>>> ```
>>>>>>>> ./configure \
>>>>>>>>     --download-bison \
>>>>>>>>     --download-mpich \
>>>>>>>>     --download-mpich-configure-arguments=--disable-opencl \
>>>>>>>>     --download-hwloc \
>>>>>>>>     --download-hwloc-configure-arguments=--disable-opencl \
>>>>>>>>     --download-openblas \
>>>>>>>>     --download-openblas-make-options="'USE_THREAD=0 USE_LOCKING=1 USE_OPENMP=0'" \
>>>>>>>>     --with-shared-libraries=1 \
>>>>>>>>     --with-fortran-bindings=0 \
>>>>>>>>     --with-zlib \
>>>>>>>>     LDFLAGS=-Wl,-ld_classic
>>>>>>>> ```
>>>>>>>> 
>>>>>>>> The log shows that
>>>>>>>> ```
>>>>>>>>    Exhausted all shared linker guesses. Could not determine how to create a shared library!
>>>>>>>> ```
>>>>>>>> 
>>>>>>>> I recently updated the system and Xcode, as well as homebrew.
>>>>>>>> 
>>>>>>>> The configure.log is attached.
>>>>>>>> 
>>>>>>>> Thanks for your attention to this matter.
>>>>>>>> 
>>>>>>>> Best wishes,
>>>>>>>> Zongze
>>>>>>>> <configure.log.tar.gz>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240317/1f5f1c73/attachment-0001.html>


More information about the petsc-users mailing list