[petsc-dev] PTScotch problem on Mac

Matthew Knepley knepley at gmail.com
Tue Nov 23 14:02:04 CST 2021


On Tue, Nov 23, 2021 at 2:05 PM Satish Balay <balay at mcs.anl.gov> wrote:

> On Tue, 23 Nov 2021, Matthew Knepley wrote:
>
> > On Tue, Nov 23, 2021 at 12:56 PM Matthew Knepley <knepley at gmail.com>
> wrote:
> >
> > > On Tue, Nov 23, 2021 at 12:29 PM Satish Balay <balay at mcs.anl.gov>
> wrote:
> > >
> > >> The primary difference I can spot [as you say] is the older xcode you
> > >> have. Eventhough it says the same version of flex - perhaps its buggy?
> > >>
> > >> Apple clang version 11.0.3 (clang-1103.0.32.59)
> > >> vs
> > >> Apple clang version 12.0.0 (clang-1200.0.32.2)
> > >>
> > >>
> > >> >
> > >>
> PATH=/PETSc3/cig/bin:/PETSc3/petsc/petsc-pylith/arch-pylith-debug/bin:/PETSc3/petsc/apple/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/opt/X11/bin:/usr/local/git/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/opt/local/bin:/opt/local/sbin:/usr/X11/bin:/usr/local/texlive/2019/bin/x86_64-darwin:/usr/local/cuda/bin:/usr/local/gmt/bin:/usr/local/bin:/usr/X11/bin:/usr/local/texlive/2019/bin/x86_64-darwin:/usr/local/cuda/bin:/usr/local/gmt/bin
> > >>
> > >> BTW: Can you try a build with the following and see if it makes a
> > >> difference?
> > >>
> > >> PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
> > >> ./configure PETSC_ARCH=arch-test --with-mpi-dir=/PETSc3/petsc/apple
> > >> --download-c2html --download-ptscotch
> > >>
> > >
> > > Damn damn damn damn. Now I have to bisect the PATH to see how in the
> world
> > > that can make a difference.
> > >
> >
> > Okay, the configure succeeds by taking out
> /opt/local/bin:/opt/local/sbin,
> > but I cannot figure out why this would be the case?
>
>
> If you can do 'strace --follow-forks' or equivalent on Mac - you might
> be able to see what gets used from /opt/local/bin/
>

Hmm, I cannot figure out how to do that. Developer tools on Mac are
embarrassing.


> Also you might be better off using brew instead of what you currently
> have.. [likely you don't need most of the binaries below. 'brew
> leaves' gives a nice way to keep track of whats really needed]
>

I do not use MacPorts. I edited my .profile years ago and I missed that
when abandoning it.


> Or a brute force bisection by moving binaries out of (and back into) this
> location.
>

That sounds like something for "grad student time"

   Thanks,

     Matt


> Satish
>
> >
> > knepley/feature-plex-multiple-hybrid *$:/PETSc3/petsc/petsc-pylith$ ls
> > /opt/local/sbin/
> > knepley/feature-plex-multiple-hybrid *$:/PETSc3/petsc/petsc-pylith$ ls
> > /opt/local/bin/
> > a2p                     envsubst                libnetcfg-5.12
> >  perlivp-5.8             prove
> > a2p-5.12                find2perl               libnetcfg-5.8
> > perlthanks              prove-5.12
> > a2p-5.8                 find2perl-5.12          msgattrib
> > perlthanks-5.12         prove-5.8
> > autoconf263             find2perl-5.8           msgcat
> >  perlthanks-5.8          psed
> >
> > autoheader263           gettext                 msgcmp
> >  piconv                  psed-5.12
> > autom4te263             gettext.sh              msgcomm
> > piconv-5.12             psed-5.8
> > autopoint               gettextize              msgconv
> > piconv-5.8              pstruct
> > autoreconf263           ghc                     msgen
> > pl2pm                   pstruct-5.12
> > autoscan263             ghc-6.10.4              msgexec
> > pl2pm-5.12              pstruct-5.8
> > autoupdate263           ghc-pkg                 msgfilter
> > pl2pm-5.8               ptar-5.12
> > c2ph                    ghc-pkg-6.10.4          msgfmt
> >  pod2html                ptardiff-5.12
> > c2ph-5.12               ghci                    msggrep
> > pod2html-5.12           recode-sr-latin
> > c2ph-5.8                ghci-6.10.4             msginit
> > pod2html-5.8            reset
> > c_rehash                gm4                     msgmerge
> >  pod2latex               runghc
> > captoinfo               gperf                   msgunfmt
> >  pod2latex-5.12          runhaskell
> > clear                   h2ph                    msguniq
> > pod2latex-5.8           s2p
> > config_data-5.12        h2ph-5.12               ncurses5-config
> > pod2man                 s2p-5.12
> > corelist-5.12           h2ph-5.8                ncursesw5-config
> >  pod2man-5.12            s2p-5.8
> > corelist-5.8            h2xs                    ngettext
> >  pod2man-5.8             shasum-5.12
> > cpan                    h2xs-5.12               openssl
> > pod2text                splain
> > cpan-5.12               h2xs-5.8                perl
> >  pod2text-5.12           splain-5.12
> > cpan-5.8                haddock                 perl5
> > pod2text-5.8            splain-5.8
> > cpan2dist               hasktags                perl5.12
> >  pod2usage               tabs
> > cpan2dist-5.12          help2man                perl5.12.3
> >  pod2usage-5.12          tic
> > cpanp                   hp2ps                   perl5.8
> > pod2usage-5.8           toe
> > cpanp-5.12              hpc                     perl5.8.9
> > podchecker              tput
> > cpanp-run-perl          hsc2hs                  perlbug
> > podchecker-5.12         tset
> > cpanp-run-perl-5.12     iconv                   perlbug-5.12
> >  podchecker-5.8          wget
> > daemondo                idn                     perlbug-5.8
> > podselect               xgettext
> > dprofpp                 ifnames263              perlcc-5.8
> >  podselect-5.12          xmlwf
> > dprofpp-5.12            infocmp                 perldoc
> > podselect-5.8           xsubpp
> > dprofpp-5.8             infotocap               perldoc-5.12
> >  port                    xsubpp-5.12
> > enc2xs                  instmodsh-5.12          perldoc-5.8
> > portf                   xsubpp-5.8
> > enc2xs-5.12             instmodsh-5.8           perlivp
> > portindex
> > enc2xs-5.8              libnetcfg               perlivp-5.12
> >  portmirror
> >
> >   Thanks,
> >
> >      Matt
> >
> >
> > >   Thanks,
> > >
> > >      Matt
> > >
> > >
> > >> Satish
> > >>
> > >>
> > >> On Tue, 23 Nov 2021, Matthew Knepley wrote:
> > >>
> > >> > Here it is.
> > >> >
> > >> >   Matt
> > >> >
> > >> > On Tue, Nov 23, 2021 at 11:44 AM Satish Balay <balay at mcs.anl.gov>
> > >> wrote:
> > >> >
> > >> > > On Tue, 23 Nov 2021, Matthew Knepley wrote:
> > >> > >
> > >> > > > On Tue, Nov 23, 2021 at 11:28 AM Satish Balay <
> balay at mcs.anl.gov>
> > >> wrote:
> > >> > > >
> > >> > > > > Well we don't have this issue on our (macos) CI boxes where
> both
> > >> c2html
> > >> > > > > and scotch build and run daily [in CI]
> > >> > > > >
> > >> > > > > what 'flex' are you using? And why does it behave differently
> on
> > >> your
> > >> > > box?
> > >> > > > >
> > >> > > >
> > >> > > > main *$:/PETSc3/petsc/petsc-dev$ which flex
> > >> > > > /usr/bin/flex
> > >> > > > main *$:/PETSc3/petsc/petsc-dev$ flex --version
> > >> > > > flex 2.5.35 Apple(flex-32)
> > >> > > >
> > >> > > >
> > >> > > > > And what errors do you get?
> > >> > > > >
> > >> > > >
> > >> > > > Without the extra input define in PTScotch.py, I get the yylval
> > >> symbol
> > >> > > > undefined and the lexer symbol. When I give
> > >> > > > that define as input, only the lexer symbol is undefined.
> > >> > >
> > >> > > BTW: Can you send the log?
> > >> > >
> > >> > > Satish
> > >> > >
> > >> > > >
> > >> > > >
> > >> > > > > Perhaps CI is using older xcode (command line tools) - and
> you are
> > >> > > using
> > >> > > > > newer? Or something else?
> > >> > > > >
> > >> > > >
> > >> > > > Probably the other way around. I am on Catalina 10.15.6
> > >> > > >
> > >> > > >    Matt
> > >> > > >
> > >> > > >
> > >> > > > > Barry - do you have this issue on your machine?
> > >> > > > >
> > >> > > > > balay at ypro ~ % which flex
> > >> > > > > /usr/bin/flex
> > >> > > > > balay at ypro ~ % /usr/bin/flex --version
> > >> > > > > flex 2.5.35 Apple(flex-32)
> > >> > > > > balay at ypro petsc % clang -v
> > >> > > > > Apple clang version 12.0.0 (clang-1200.0.32.2)
> > >> > > > > Target: x86_64-apple-darwin19.6.0
> > >> > > > > Thread model: posix
> > >> > > > > InstalledDir: /Library/Developer/CommandLineTools/usr/bin
> > >> > > > > balay at ypro ~ % balay at ypro petsc % ./configure
> > >> > > > > --with-mpi-dir=$HOME/mpich-3.4.2 --download-c2html
> > >> --download-ptscotch
> > >> > > > >
> > >> > > > > <log attached>
> > >> > > > >
> > >> > > > >
> > >> > > > > Satish
> > >> > > > >
> > >> > > > > On Tue, 23 Nov 2021, Matthew Knepley 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/936609a8/attachment-0001.html>


More information about the petsc-dev mailing list