[petsc-dev] [PETSc-3.8.4] src/mat/impls/hypre/mhypre.c compilation failed

Antonio anto.trande at gmail.com
Sat Mar 31 13:15:17 CDT 2018


On 30/03/2018 17:07, Satish Balay wrote:
> current petsc code is tested with hypre-v2.12.0.
> 
> So this must be due to changes in hypre-v2.14.0.
> 
> Ok looks like we need the following change - but this update is likely
> to go into 3.9 [and not 3.8 - which we hope to release next week]
> 
> Satish

Your patch fixes the error effectively.
Thanks.

> 
> -----------
> commit e6de09342ce9c4562cc062ff2c1bac4bd956bda0 (HEAD -> balay/update-hypre-v2.14.0)
> Author: Satish Balay <balay at mcs.anl.gov>
> Date:   Fri Mar 30 09:53:12 2018 -0500
> 
>     hypre: update to version 2.14.0
>     
>     Reported-by: Antonio Trande <anto.trande at gmail.com>
> 
> diff --git a/config/BuildSystem/config/packages/hypre.py b/config/BuildSystem/config/packages/hypre.py
> index 1249b39374..620e51602a 100644
> --- a/config/BuildSystem/config/packages/hypre.py
> +++ b/config/BuildSystem/config/packages/hypre.py
> @@ -4,7 +4,7 @@ import os
>  class Configure(config.package.GNUPackage):
>    def __init__(self, framework):
>      config.package.GNUPackage.__init__(self, framework)
> -    self.gitcommit = 'v2.12.0'
> +    self.gitcommit = 'v2.14.0'
>      self.download  = ['git://https://github.com/LLNL/hypre','https://github.com/LLNL/hypre/archive/'+self.gitcommit+'.tar.gz']
>      self.functions = ['HYPRE_IJMatrixCreate']
>      self.includes  = ['HYPRE.h']
> diff --git a/src/mat/impls/hypre/mhypre.c b/src/mat/impls/hypre/mhypre.c
> index 8a51581a09..65595f2af4 100644
> --- a/src/mat/impls/hypre/mhypre.c
> +++ b/src/mat/impls/hypre/mhypre.c
> @@ -1450,6 +1450,6 @@ PETSC_EXTERN PetscErrorCode MatCreate_HYPRE(Mat B)
>  static PetscErrorCode hypre_array_destroy(void *ptr)
>  {
>     PetscFunctionBegin;
> -   hypre_TFree(ptr);
> +   hypre_TFree(ptr,HYPRE_MEMORY_HOST);
>     PetscFunctionReturn(0);
>  }
> 
> 
> On Fri, 30 Mar 2018, Antonio Trande wrote:
> 
>> Hello everyone.
>>
>> 'src/mat/impls/hypre/mhypre.c' file compilation is failed (full log [1])
>> with this error:
>>
>> mpicc -c -O2 -g -pipe -Wall -Werror=format-security
>> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
>> -fstack-protector-strong -grecord-gcc-switches
>> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
>> -fasynchronous-unwind-tables -fstack-clash-protection -mcet
>> -fcf-protection -O3 -Wl,-z,now -fPIC
>> -I/builddir/build/BUILD/petsc-3.8.4/buildopenmpi_dir/include
>> -I/builddir/build/BUILD/petsc-3.8.4/buildopenmpi_dir/x86_64/include
>> -I/usr/include/openmpi-x86_64/hypre -I/usr/include/openmpi-x86_64
>> -MMD -MP
>> /builddir/build/BUILD/petsc-3.8.4/buildopenmpi_dir/src/mat/impls/hypre/mhypre.c
>> -o x86_64/obj/src/mat/impls/hypre/mhypre.o
>> /builddir/build/BUILD/petsc-3.8.4/buildopenmpi_dir/src/mat/impls/hypre/mhypre.c:
>> In function 'hypre_array_destroy':
>> /builddir/build/BUILD/petsc-3.8.4/buildopenmpi_dir/src/mat/impls/hypre/mhypre.c:1453:19:
>> error: macro "hypre_TFree" requires 2 arguments, but only 1 given
>>     hypre_TFree(ptr);
>>                    ^
>> /builddir/build/BUILD/petsc-3.8.4/buildopenmpi_dir/src/mat/impls/hypre/mhypre.c:1453:4:
>> error: 'hypre_TFree' undeclared (first use in this function); did you
>> mean 'hypre_Free'?
>>     hypre_TFree(ptr);
>>     ^~~~~~~~~~~
>>     hypre_Free
>> /builddir/build/BUILD/petsc-3.8.4/buildopenmpi_dir/src/mat/impls/hypre/mhypre.c:1453:4:
>> note: each undeclared identifier is reported only once for each function
>> it appears in
>> gmake[2]: *** [gmakefile:227: x86_64/obj/src/mat/impls/hypre/mhypre.o]
>> Error 1
>>
>> Please, take a look.
>>
>> [1] https://kojipkgs.fedoraproject.org//work/tasks/6330/26056330/build.log
>>
>> System: Fedora 29 (devel branch)
>> GCC 8.0.1
>> OpenMPI 2.1.1
>> Hypre 2.14.0
>>
>>
> 

-- 
---
Antonio Trande
Fedora Project
mailto 'sagitter at fedoraproject dot org'
GPG key: 0x5E212EE1D35568BE
GPG key server: https://keys.fedoraproject.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20180331/1ea9091d/attachment.sig>


More information about the petsc-dev mailing list