conda-forge / petsc-feedstock

A conda-smithy repository for petsc.
BSD 3-Clause "New" or "Revised" License
8 stars 23 forks source link

petsc v3.18.0 #151

Closed regro-cf-autotick-bot closed 1 year ago

regro-cf-autotick-bot commented 1 year ago

It is very likely that the current package version for this feedstock is out of date.

Checklist before merging this PR:

Information about this PR:

  1. Feel free to push to the bot's branch to update this PR if needed.
  2. The bot will almost always only open one PR per version.
  3. The bot will stop issuing PRs if more than 3 version bump PRs generated by the bot are open. If you don't want to package a particular version please close the PR.
  4. If you want these PRs to be merged automatically, make an issue with code>@conda-forge-admin,</codeplease add bot automerge in the title and merge the resulting PR. This command will add our bot automerge feature to your feedstock.
  5. If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase code>@<space/conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

Dependency Analysis

We couldn't run dependency analysis due to an internal error in the bot. :( Help is very welcome!

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/autotick-bot/actions/runs/3163536282, please use this URL for debugging.

conda-forge-linter commented 1 year ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

dalcinl commented 1 year ago

@balay I'm getting a SHA256 mismatch after downloading the tarball. Did you somehow changed the tarball available for download? Do you have a way to verify whether the 3.18.0 tarball you generated originally has sha256=9da802e703ad79fb7ef0007d17f68916573011073ee9712dcd1673537f6a5f68?

balay commented 1 year ago

Yeah - there was a major build failure with fortran interface [with the tarball - but not git repo] - so I just patched the tarball instead of spinning a new version

dalcinl commented 1 year ago

@balay The conda-forge builds are failing:

*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Package BISON needed by PTScotch failed to configure.
Mail configure.log to petsc-maint@mcs.anl.gov.

All external packages we request are already built, we just need to compile with headers and link to the shared libraries. Do we truly need bison? Or is this just an oversight?

balay commented 1 year ago

Package BISON needed by PTScotch failed to configure.

Hm - we need bison only for --download-ptscotch. So perhaps:

diff --git a/config/BuildSystem/config/packages/PTScotch.py b/config/BuildSystem/config/packages/PTScotch.py
index 5a46e581fd2..7ef49708021 100644
--- a/config/BuildSystem/config/packages/PTScotch.py
+++ b/config/BuildSystem/config/packages/PTScotch.py
@@ -28,8 +28,8 @@ class Configure(config.package.Package):
     self.zlib           = framework.require('config.packages.zlib',self)
     self.regex          = framework.require('config.packages.regex',self)
     self.bison          = framework.require('config.packages.bison',self)
-    self.deps           = [self.mpi,self.mathlib,self.regex,self.bison]
-    self.odeps          = [self.pthread,self.zlib]
+    self.deps           = [self.mpi,self.mathlib,self.regex]
+    self.odeps          = [self.pthread,self.zlib,bison]
     return

   def Install(self):
@@ -37,7 +37,7 @@ class Configure(config.package.Package):

     self.programs.getExecutable('flex', getFullPath = 1)
     if not hasattr(self.programs, 'flex'): raise RuntimeError('PTScotch needs flex installed')
-    if not self.bison.haveBison3plus: raise RuntimeError('PTScotch needs Bison version 3.0 or above, use --download-bison')
+    if not self.bison.found or self.bison.haveBison3plus: raise RuntimeError('PTScotch needs Bison version 3.0 or above, use --download-bison')

     self.log.write('Creating PTScotch '+os.path.join(os.path.join(self.packageDir,'src'),'Makefile.inc')+'\n')

cc: @prj-

prj- commented 1 year ago

The odeps should read self.bison instead of bison, but this looks good otherwise.

dalcinl commented 1 year ago

Waiting for https://gitlab.com/petsc/petsc/-/merge_requests/5720 to be merged in...

dalcinl commented 1 year ago

@balay After adding the patch, I'm still getting the following:

*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Package BISON needed by PTScotch failed to configure.
Mail configure.log to petsc-maint@mcs.anl.gov.
*******************************************************************************

Am I doing something wrong?

dalcinl commented 1 year ago

@balay @prj- This is still broken.

However, I just noticed that PETSc's BuildSystem uses the latest PTScotch v7.x, however here in conda forge we still have v6.x (we had issues building the new version conda-forge/scotch-feedstock#70).

Could that be the reason PETSc wants to go the install path and require bison?

prj- commented 1 year ago

Doubtful.

$ sudo chmod a-x /usr/bin/bison
$ ./configure --with-ptscotch-dir=arch-linux-c-debug-real --with-mpi-dir=arch-linux-c-debug-real PETSC_ARCH=arch-linux-debug-ptscotch --with-fortran-bindings=0
[...]
---------------------------------------------------------------------------------------------
  Package BISON needed by PTScotch failed to configure.
  Mail configure.log to petsc-maint@mcs.anl.gov.
*********************************************************************************************

I'll try to investigate locally, though I don't really know what to look for.

prj- commented 1 year ago

This should fix things.

diff --git a/config/BuildSystem/config/packages/bison.py b/config/BuildSystem/config/packages/bison.py
index 9243a2e6b2a..4bc0cbda536 100644
--- a/config/BuildSystem/config/packages/bison.py
+++ b/config/BuildSystem/config/packages/bison.py
@@ -7,7 +7,6 @@ class Configure(config.package.GNUPackage):
     self.version           = '3.8.2'
     self.download          = ['https://ftp.gnu.org/gnu/bison/bison-'+self.version+'.tar.gz',
                               'http://mirrors.kernel.org/gnu/bison/bison-'+self.version+'.tar.gz']
-    self.lookforbydefault  = 1
     self.haveBison3plus    = 0
     self.publicInstall     = 0 # always install in PETSC_DIR/PETSC_ARCH (not --prefix) since this is not used by users
     self.executablename    = 'bison'
dalcinl commented 1 year ago

@balay I had to specify FFLAGS=-ffree-line-length-none manually to get things through. BuildSystem is supposed to do that automatically, right?. Am I missing something? This smells to some sort of configure regression.

dalcinl commented 1 year ago

@conda-forge-admin rerender

dalcinl commented 1 year ago

@conda-forge-admin, please rerender

github-actions[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/petsc-feedstock/actions/runs/3265965824.

github-actions[bot] commented 1 year ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to rerender for you, but it looks like there was nothing to do.

This message was generated by GitHub actions workflow run https://github.com/conda-forge/petsc-feedstock/actions/runs/3265977693.

dalcinl commented 1 year ago

@prj- @balay Sorry, I'm a bit lost. Is the patch in this comment applied upstream in some MR I missed?

prj- commented 1 year ago

No, it is not in any MR. It is merely a suggestion to bypass the error you are facing, but it can't be applied upstream, because it's breaking other builds. Maybe Satish has a better suggestion which will make all builds go through. Here is an example of a (previously) functioning build.

$ git diff --unified=1 .
diff --git a/config/BuildSystem/config/packages/bison.py b/config/BuildSystem/config/packages/bison.py
index 9243a2e6b2a..4bc0cbda536 100644
--- a/config/BuildSystem/config/packages/bison.py
+++ b/config/BuildSystem/config/packages/bison.py
@@ -9,3 +9,2 @@ class Configure(config.package.GNUPackage):
                               'http://mirrors.kernel.org/gnu/bison/bison-'+self.version+'.tar.gz']
-    self.lookforbydefault  = 1
     self.haveBison3plus    = 0
$ ls -alh /usr/bin/bison
-rwxr-xr-x 1 root root 581K Sep 18 23:52 /usr/bin/bison
$ ./configure --download-ptscotch --with-mpi-dir=arch-linux-c-debug-real PETSC_ARCH=arch-linux-debug-ptscotch --with-fortran-bindings=0
=============================================================================================
                         Configuring PETSc to compile on your system
=============================================================================================
=============================================================================================
                                     ***** WARNING *****
  PETSC_ARCH from environment does not match command-line or name of script. Using from
  command-line or name of script: arch-linux-debug-ptscotch, ignoring environment:
  arch-linux-c-debug-real
=============================================================================================
=============================================================================================
          Trying to download https://gitlab.inria.fr/scotch/scotch.git for PTSCOTCH
=============================================================================================
*********************************************************************************************
           UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
---------------------------------------------------------------------------------------------
               PTScotch needs Bison version 3.0 or above, use --download-bison
*********************************************************************************************

Do we want users to explicitly specify --with-bison-exec or --download-bison whenever --download-ptscotch is used? This sounds a little bit restrictive. Maybe there is something in PTScotch.py that can be done to look for Bison only when needed.

dalcinl commented 1 year ago

@balay src/snes/tutorials ex5f has line truncation issues, then make check fails

mpifort -pthread -fopenmp -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,$PREFIX/lib -Wl,-rpath-link,$PREFIX/lib -L$PREFIX/lib -Wl,-rpath-link,$PREFIX/lib  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include   -Wl,--no-as-needed -O3  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include   -Wl,--no-as-needed -I$SRC_DIR/include -I$SRC_DIR/arch-conda-c-opt/include    -pthread -fopenmp -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,$PREFIX/lib -Wl,-rpath-link,$PREFIX/lib -L$PREFIX/lib -Wl,-rpath-link,$PREFIX/lib ex5f.F90  -Wl,-rpath,$SRC_DIR/arch-conda-c-opt/lib -L$SRC_DIR/arch-conda-c-opt/lib -lpetsc -lHYPRE -lspqr -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lsuperlu -lsuperlu_dist -lfftw3_mpi -lfftw3 -llapack -lblas -lptesmumps -lptscotchparmetis -lptscotch -lptscotcherr -lesmumps -lscotch -lscotcherr -lhdf5_hl -lhdf5 -lparmetis -lmetis -lm -lyaml -lquadmath -ldl -lmpifort -lgfortran -o ex5f
ex5f.F90:76:132:

   76 |       PetscCallMPIA(MPI_Comm_size(PETSC_COMM_WORLD,size,ierr))
      |                                                                                                                                    1
Error: Line truncated at (1) [-Werror=line-truncation]
...

Full logs: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=590934&view=logs&j=9a9f13e0-3ee9-50f8-754d-41bbe940543f&t=c5c21a9a-b761-5e17-5444-44aec759386d&l=2853

balay commented 1 year ago

PETSc source fortran source file was fixed to work to not require it - but examples do require this flag (or eqivalent for other compilers).

Configure sets it as a default FFLAGS - but a user can override configure default [that's occurring in this build when FFLAGS are explicitly specified]

dalcinl commented 1 year ago

@mirk I have one failing build on macOS at the make check step with the output I pasted at the end.

What do you think? Should I just disable the check and move on? I really do not have patience to debug and deal with this kind of issues...

C/C++ example src/snes/tutorials/ex19 run successfully with suitesparse
2c2,25
< Number of SNES iterations = 2
---
>  ** On entry to ZGEMM parameter number  8 had an illegal value
> --------------------------------------------------------------------------
> mpiexec has exited due to process rank 0 with PID 0 on
> node Mac-1666190361642 exiting improperly. There are three reasons this could occur:
> 
> 1. this process did not call "init" before exiting, but others in
> the job did. This can cause a job to hang indefinitely while it waits
> for all processes to call "init". By rule, if one process calls "init",
> then ALL processes must call "init" prior to termination.
> 
> 2. this process called "init", but exited without calling "finalize".
> By rule, all processes that call "init" MUST call "finalize" prior to
> exiting or it will be considered an "abnormal termination"
> 
> 3. this process called "MPI_Abort" or "orte_abort" and the mca parameter
> orte_create_session_dirs is set to false. In this case, the run-time cannot
> detect that the abort call was an abnormal termination. Hence, the only
> error message you will receive is this one.
> 
> This may have caused other processes in the application to be
> terminated by signals sent by mpiexec (as reported here).
> 
> You can avoid this message by specifying -quiet on the mpiexec command line.
> --------------------------------------------------------------------------
dalcinl commented 1 year ago

@isuruf Could you please advise? Should I just ignore the failure, comment out the check, and move on?

dalcinl commented 1 year ago

@conda-forge-admin, please rerender.

dalcinl commented 1 year ago

@ocefpaf I keep getting the make check failure above in macOS. I'll disable the tests to keep things going.

ocefpaf commented 1 year ago

@ocefpaf I keep getting the make check failure above in macOS. I'll disable the tests to keep things going.

If you trust those failures are not important, sure, you are the expert on petsc here :-)

dalcinl commented 1 year ago

If you trust those failures are not important, sure, you are the expert on petsc here :-)

Well, something can still be very wrong with the BLAS/LAPACK package on macOS, but I really do not have time to debug what could be going on.