[petsc-dev] PTScotch problem on Mac

Matthew Knepley knepley at gmail.com
Tue Nov 23 10:19:39 CST 2021


On Tue, Nov 23, 2021 at 11:17 AM Barry Smith <bsmith at petsc.dev> wrote:

>
>   I would normally say make a pull request but they have their own git
> server that requires you ask them for an account so I suggest posting an
> issue with your patch.
>

Also need an account to create an issue :)

   Matt


>   Barry
>
>
> On Nov 23, 2021, at 10:55 AM, Matthew Knepley <knepley at gmail.com> wrote:
>
> This is the same flex problem as I had for c2html, but I was more
> determined tracking it down this time. The first problem is that we were
> not renaming in the parser,
>
> main *$:/PETSc3/petsc/petsc-dev$ git diff
> diff --git a/config/BuildSystem/config/packages/PTScotch.py
> b/config/BuildSystem/config/packages/PTScotch.py
> index d1c277b6e9f..e046804c17f 100644
> --- a/config/BuildSystem/config/packages/PTScotch.py
> +++ b/config/BuildSystem/config/packages/PTScotch.py
> @@ -70,7 +70,7 @@ class Configure(config.package.Package):
>      if self.libraries.add('-lrt','timer_create'): ldflags += ' -lrt'
>      self.cflags = self.cflags + ' -DCOMMON_RANDOM_FIXED_SEED'
>      # do not use -DSCOTCH_PTHREAD because requires MPI built for threads.
> -    self.cflags = self.cflags + ' -DSCOTCH_RENAME
> -Drestrict="'+self.compilers.cRestrict+'"'
> +    self.cflags = self.cflags + ' -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER
> -Drestrict="'+self.compilers.cRestrict+'"'
>      # this is needed on the Mac, because common2.c includes common.h
> which DOES NOT include mpi.h because
>      # SCOTCH_PTSCOTCH is NOT defined above Mac does not know what
> clock_gettime() is!
>      if self.setCompilers.isDarwin(self.log):
>
> Second, they were not treating this case completely correctly:
>
> (93454e8...):/PETSc3/petsc/petsc-dev/arch-master-debug/externalpackages/git.ptscotch/src/libscotch$
> git diff HEAD~1
> diff --git a/src/libscotch/parser_yy.h b/src/libscotch/parser_yy.h
> index 931315d..95b8160 100644
> --- a/src/libscotch/parser_yy.h
> +++ b/src/libscotch/parser_yy.h
> @@ -62,6 +62,9 @@
>
>  #if ((defined SCOTCH_RENAME_PARSER) || (defined yylex)) /* If prefix
> renaming    */
>  #define scotchyyparse               stratParserParse2 /* Parser function
> name    */
> +#if !defined(yylex)
> +#define yylex                       scotchyylex
> +#endif
>  #ifndef yylval
>  #define yylval                      SCOTCH_NAME_MACRO3 (scotchyy,
> SCOTCH_NAME_SUFFIXC, lval) /* It should be Yacc/Bison's job to redefine it!
>  */
>  #endif /* yylval              */
>
> How should we go about getting this fix in? Do you need to have our own
> branch of PTScotch?
>
>   Thanks,
>
>      Matt
>
> --
> 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/
> <http://www.cse.buffalo.edu/~knepley/>
>
>
>

-- 
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/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211123/8a570071/attachment.html>


More information about the petsc-dev mailing list