Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-06 Thread Kaus, Boris
Apologies, mistake on my side. Yes this works - thanks a lot for your help!

Boris

On 6. Apr 2023, at 00:56, Satish Balay  wrote:

This is strange. I can trigger the error with:

-  v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
+  v = tuple([int('')])

and this fix is able to overcome it.

I pushed this change to `balay/fix-macos-version-check` branch - can you try 
from it?

Satish

On Wed, 5 Apr 2023, Kaus, Boris wrote:

I don’t understand why this keeps giving the same error (shouldn’t):

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 #  ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
***
   TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure
---
invalid literal for int() with base 10: ''
***


 File "/workspace/srcdir/petsc-3.18.0/config/configure.py", line 457, in 
petsc_configure
   framework = 
config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
 loadArgDB = 0)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 101, in __init__
   self.createChildren()
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 338, in createChildren
   self.getChild(moduleName)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 323, in getChild
   config.setupDependencies(self)
 File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 89, in 
setupDependencies
   self.registerPythonFile(utility,'config.utilities')
 File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 49, in 
registerPythonFile
   utilityObj = 
self.framework.require(directory+utilityName, self)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 343, in require
   config = self.getChild(moduleName, keywordArgs)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 317, in getChild
   config = type(self, *keywordArgs)
 File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/utilities/macosFirewall.py",
 line 12, in __init__
   self.isDarwin = config.setCompilers.Configure.isDarwin(self.log)
 File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 676, in isDarwin
   if not isUname_value: config.setCompilers.Configure.isUname(log)
 File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 631, in isUname
   v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
 File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 631, in 
   v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])


On 5. Apr 2023, at 23:58, Satish Balay  wrote:

Ah - my patch was buggy.

+except RuntimeError:

should be: 'except:' i.e:

diff --git a/config/BuildSystem/config/setCompilers.py 
b/config/BuildSystem/config/setCompilers.py
index 57848e736e3..e191c1e1b4d 100644
--- a/config/BuildSystem/config/setCompilers.py
+++ b/config/BuildSystem/config/setCompilers.py
@@ -630,10 +630,14 @@ class Configure(config.base.Configure):
   if log: log.write('Detected Darwin')
   isDarwin_value = True
   import platform
-v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
-if v >= (10,15,0):
-  if log: log.write('Detected Darwin/MacOSX Catalina OS\n')
-  isDarwinCatalina_value = True
+try:
+  v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
+  if v >= (10,15,0):
+if log: log.write('Detected Darwin/MacOSX Catalina OS\n')
+isDarwinCatalina_value = True
+except:
+  if log: log.write('MacOS version detecton failed!\n')
+  pass
 if output.find('freebsd') >= 0:
   if log: log.write('Detected FreeBSD')
   isFreeBSD_value = True

Satish




On Wed, 5 Apr 2023, Kaus, Boris wrote:

Perhaps python is broken, or perhaps this is because it is not a real Mac OS, 
but an emulated one.

Seems a similar error now occurs a bit down the line:

---

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 #  ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
***
  TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure
---
invalid literal for int() with base 10: ''
*

Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
I don’t understand why this keeps giving the same error (shouldn’t):

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 #  ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
***
TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure
---
invalid literal for int() with base 10: ''
***


  File "/workspace/srcdir/petsc-3.18.0/config/configure.py", line 457, in 
petsc_configure
framework = 
config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
 loadArgDB = 0)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 101, in __init__
self.createChildren()
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 338, in createChildren
self.getChild(moduleName)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 323, in getChild
config.setupDependencies(self)
  File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 89, in 
setupDependencies
self.registerPythonFile(utility,'config.utilities')
  File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 49, in 
registerPythonFile
utilityObj = 
self.framework.require(directory+utilityName, self)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 343, in require
config = self.getChild(moduleName, keywordArgs)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 317, in getChild
config = type(self, *keywordArgs)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/utilities/macosFirewall.py",
 line 12, in __init__
self.isDarwin = config.setCompilers.Configure.isDarwin(self.log)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 676, in isDarwin
if not isUname_value: config.setCompilers.Configure.isUname(log)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 631, in isUname
v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 631, in 
v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])


On 5. Apr 2023, at 23:58, Satish Balay  wrote:

Ah - my patch was buggy.

+except RuntimeError:

should be: 'except:' i.e:

diff --git a/config/BuildSystem/config/setCompilers.py 
b/config/BuildSystem/config/setCompilers.py
index 57848e736e3..e191c1e1b4d 100644
--- a/config/BuildSystem/config/setCompilers.py
+++ b/config/BuildSystem/config/setCompilers.py
@@ -630,10 +630,14 @@ class Configure(config.base.Configure):
if log: log.write('Detected Darwin')
isDarwin_value = True
import platform
-v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
-if v >= (10,15,0):
-  if log: log.write('Detected Darwin/MacOSX Catalina OS\n')
-  isDarwinCatalina_value = True
+try:
+  v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
+  if v >= (10,15,0):
+if log: log.write('Detected Darwin/MacOSX Catalina OS\n')
+isDarwinCatalina_value = True
+except:
+  if log: log.write('MacOS version detecton failed!\n')
+  pass
  if output.find('freebsd') >= 0:
if log: log.write('Detected FreeBSD')
isFreeBSD_value = True

Satish




On Wed, 5 Apr 2023, Kaus, Boris wrote:

Perhaps python is broken, or perhaps this is because it is not a real Mac OS, 
but an emulated one.

Seems a similar error now occurs a bit down the line:

---

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 #  ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
***
   TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure
---
invalid literal for int() with base 10: ''
***


 File "/workspace/srcdir/petsc-3.18.0/config/configure.py", line 457, in 
petsc_configure
   framework = 
config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
 loadArgDB = 0)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 101, in __init__
   self.createChildren()
 File "

Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
Perhaps python is broken, or perhaps this is because it is not a real Mac OS, 
but an emulated one.

Seems a similar error now occurs a bit down the line:

---

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 #  ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
***
TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure
---
invalid literal for int() with base 10: ''
***


  File "/workspace/srcdir/petsc-3.18.0/config/configure.py", line 457, in 
petsc_configure
framework = 
config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
 loadArgDB = 0)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 101, in __init__
self.createChildren()
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 338, in createChildren
self.getChild(moduleName)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 323, in getChild
config.setupDependencies(self)
  File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 89, in 
setupDependencies
self.registerPythonFile(utility,'config.utilities')
  File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 49, in 
registerPythonFile
utilityObj = 
self.framework.require(directory+utilityName, self)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 343, in require
config = self.getChild(moduleName, keywordArgs)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 317, in getChild
config = type(self, *keywordArgs)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/utilities/macosFirewall.py",
 line 12, in __init__
self.isDarwin = config.setCompilers.Configure.isDarwin(self.log)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 668, in isDarwin
if not isUname_value: config.setCompilers.Configure.isUname(log)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 631, in isUname
v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 631, in 
v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])





On 5. Apr 2023, at 23:11, Satish Balay  wrote:

Hm - broken python? Either way configure should not fail. Perhaps the following 
fix:

Satish

---

diff --git a/config/BuildSystem/config/setCompilers.py 
b/config/BuildSystem/config/setCompilers.py
index e4d13bea58f..ae53d1e397e 100644
--- a/config/BuildSystem/config/setCompilers.py
+++ b/config/BuildSystem/config/setCompilers.py
@@ -626,10 +626,14 @@ class Configure(config.base.Configure):
if log: log.write('Detected Darwin')
isDarwin_value = True
import platform
-v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
-if v >= (10,15,0):
-  if log: log.write('Detected Darwin/MacOSX Catalina OS\n')
-  isDarwinCatalina_value = True
+try:
+  v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
+  if v >= (10,15,0):
+if log: log.write('Detected Darwin/MacOSX Catalina OS\n')
+isDarwinCatalina_value = True
+except RuntimeError:
+  if log: log.write('MacOS version detecton failed!\n')
+  pass
  if output.find('freebsd') >= 0:
if log: log.write('Detected FreeBSD')
isFreeBSD_value = True

On Wed, 5 Apr 2023, Kaus, Boris wrote:

That indeed seems to be the issue:

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # python3
Python 3.9.7 (default, Nov 24 2021, 21:15:59)
[GCC 10.3.1 20211027] on linux
Type "help", "copyright", "credits" or "license" for more information.
import platform
platform.mac_ver()
('', ('', '', ''), '')
platform.mac_ver()[0].split('.')
['']
tuple([int(a) for a in platform.mac_ver()[0].split('.')])
Traceback (most recent call last):
 File "", line 1, in 
 File "", line 1, in 
ValueError: invalid literal for int() with base 10: ‘'


On 5. Apr 2023, at 23:00, Satish Balay  wrote:

Sorry, Was looking at the wrong place.

v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])

Can you try:

balay@ypro petsc % python3
Python 3.9.6 (default, Mar 10 2023, 20:16:38)
[Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license&q

Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
That indeed seems to be the issue:

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # python3
Python 3.9.7 (default, Nov 24 2021, 21:15:59)
[GCC 10.3.1 20211027] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.mac_ver()
('', ('', '', ''), '')
>>> platform.mac_ver()[0].split('.')
['']
>>> tuple([int(a) for a in platform.mac_ver()[0].split('.')])
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in 
ValueError: invalid literal for int() with base 10: ‘'


On 5. Apr 2023, at 23:00, Satish Balay  wrote:

Sorry, Was looking at the wrong place.

 v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])

Can you try:

balay@ypro petsc % python3
Python 3.9.6 (default, Mar 10 2023, 20:16:38)
[Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import platform
platform.mac_ver()
('13.3', ('', '', ''), 'x86_64')
platform.mac_ver()[0].split('.')
['13', '3']
tuple([int(a) for a in platform.mac_ver()[0].split('.')])
(13, 3)



Satish




On Wed, 5 Apr 2023, Kaus, Boris wrote:

Don’t think so:

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # env
_=/usr/bin/env
VERBOSE=true
BUILD_LD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ld
OLDPWD=/workspace/srcdir/petsc-3.18.0
host_libdir=/workspace/x86_64-linux-musl-cxx11/destdir/lib
nproc=8
target=aarch64-apple-darwin20
bindir=/workspace/destdir/bin
CC=cc
READELF_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-readelf
host_bindir=/workspace/x86_64-linux-musl-cxx11/destdir/bin
PATH=/opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi:/opt/aarch64-apple-darwin20/bin:/opt/bin/x86_64-linux-musl-cxx11:/opt/x86_64-linux-musl/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/workspace/x86_64-linux-musl-cxx11/destdir/bin:/workspace/destdir/bin
nbits=64
BUILD_STRIP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-strip
BUILD_OBJDUMP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objdump
CMAKE_TARGET_TOOLCHAIN=/opt/toolchains/aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi/target_aarch64-apple-darwin20.cmake
FC_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gfortran
FC=gfortran
SRC_NAME=PETSc
RANLIB_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
CC_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gcc
PS1=\[\]sandbox\[\]:\[\]${PWD//$WORKSPACE/$\{WORKSPACE\}}\[\] \$
PKG_CONFIG_SYSROOT_DIR=/workspace/destdir
LD_LIBRARY_PATH=/usr/lib/csl-musl-x86_64:/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/lib64:/lib:/workspace/x86_64-linux-musl-cxx11/destdir/lib:/opt/x86_64-linux-musl/x86_64-linux-musl/lib64:/opt/x86_64-linux-musl/x86_64-linux-musl/lib:/opt/aarch64-apple-darwin20/aarch64-apple-darwin20/lib:/opt/aarch64-apple-darwin20/lib:/workspace/destdir/lib64:/workspace/destdir/lib
HOSTOBJCOPY=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objcopy
HOSTOBJDUMP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objdump
LIPO_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-lipo
HOSTSTRIP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-strip
BUILD_OBJCOPY=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objcopy
ZERO_AR_DATE=1
dlext=dylib
HIDDEN_PS1=\[\]sandbox\[\]:\[\]${PWD//$WORKSPACE/$\{WORKSPACE\}}\[\] \$
CCACHE_COMPILERCHECK=content
AR_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ar
HOSTDSYMUTIL=dsymutil
SHLVL=1
OBJDUMP_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objdump
CXX_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-g++
HOSTCXX=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-g++
USER=kausb
BUILD_DSYMUTIL=dsymutil
CC_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gcc
OBJCOPY_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objcopy
TERM=screen
LIPO_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-lipo
BUILD_LIPO=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-lipo
NM_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-nm
host_prefix=/workspace/x86_64-linux-musl-cxx11/destdir
FC_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gfortran
AR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ar
WORKSPACE=/workspace
STRIP_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-strip
HOSTRANLIB=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
RANLIB_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
DSYMUTIL_FOR_BUILD=dsymutil
HOSTAS=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-as
HOSTAR=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ar
BUILD_RANLIB=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
NM_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-nm
LD=/opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi/ld
HOSTLD=/opt/bin/x86

Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
In case anyone wants to reproduce this:

$julia build_tarballs.jl --debug --verbose 
aarch64-apple-darwin-libgfortran5-mpi+openmpi

Here build_tarballs.jl is given here:

https://github.com/JuliaPackaging/Yggdrasil/blob/46a609970e3236610804a66903936ea1d6fa3759/P/PETSc/build_tarballs.jl

It requires Julia, BinaryBuilder and a system that allows Docker.

Boris

On 5. Apr 2023, at 22:49, Kaus, Boris  wrote:

Don’t think so:

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # env
_=/usr/bin/env
VERBOSE=true
BUILD_LD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ld
OLDPWD=/workspace/srcdir/petsc-3.18.0
host_libdir=/workspace/x86_64-linux-musl-cxx11/destdir/lib
nproc=8
target=aarch64-apple-darwin20
bindir=/workspace/destdir/bin
CC=cc
READELF_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-readelf
host_bindir=/workspace/x86_64-linux-musl-cxx11/destdir/bin
PATH=/opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi:/opt/aarch64-apple-darwin20/bin:/opt/bin/x86_64-linux-musl-cxx11:/opt/x86_64-linux-musl/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/workspace/x86_64-linux-musl-cxx11/destdir/bin:/workspace/destdir/bin
nbits=64
BUILD_STRIP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-strip
BUILD_OBJDUMP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objdump
CMAKE_TARGET_TOOLCHAIN=/opt/toolchains/aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi/target_aarch64-apple-darwin20.cmake
FC_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gfortran
FC=gfortran
SRC_NAME=PETSc
RANLIB_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
CC_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gcc
PS1=\[\]sandbox\[\]:\[\]${PWD//$WORKSPACE/$\{WORKSPACE\}}\[\] \$
PKG_CONFIG_SYSROOT_DIR=/workspace/destdir
LD_LIBRARY_PATH=/usr/lib/csl-musl-x86_64:/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/lib64:/lib:/workspace/x86_64-linux-musl-cxx11/destdir/lib:/opt/x86_64-linux-musl/x86_64-linux-musl/lib64:/opt/x86_64-linux-musl/x86_64-linux-musl/lib:/opt/aarch64-apple-darwin20/aarch64-apple-darwin20/lib:/opt/aarch64-apple-darwin20/lib:/workspace/destdir/lib64:/workspace/destdir/lib
HOSTOBJCOPY=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objcopy
HOSTOBJDUMP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objdump
LIPO_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-lipo
HOSTSTRIP=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-strip
BUILD_OBJCOPY=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objcopy
ZERO_AR_DATE=1
dlext=dylib
HIDDEN_PS1=\[\]sandbox\[\]:\[\]${PWD//$WORKSPACE/$\{WORKSPACE\}}\[\] \$
CCACHE_COMPILERCHECK=content
AR_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ar
HOSTDSYMUTIL=dsymutil
SHLVL=1
OBJDUMP_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objdump
CXX_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-g++
HOSTCXX=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-g++
USER=kausb
BUILD_DSYMUTIL=dsymutil
CC_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gcc
OBJCOPY_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objcopy
TERM=screen
LIPO_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-lipo
BUILD_LIPO=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-lipo
NM_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-nm
host_prefix=/workspace/x86_64-linux-musl-cxx11/destdir
FC_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-gfortran
AR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ar
WORKSPACE=/workspace
STRIP_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-strip
HOSTRANLIB=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
RANLIB_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
DSYMUTIL_FOR_BUILD=dsymutil
HOSTAS=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-as
HOSTAR=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ar
BUILD_RANLIB=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ranlib
NM_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-nm
LD=/opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi/ld
HOSTLD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ld
bb_full_target=aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi
LLVM_TARGET=aarch64-apple-darwin20
BUILD_READELF=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-readelf
CXX_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-g++
libdir=/workspace/destdir/lib
MESON_TARGET_TOOLCHAIN=/opt/toolchains/aarch64-apple-darwin20-libgfortran5-cxx11-mpi+openmpi/target_aarch64-apple-darwin20.meson
LLVM_HOST_TARGET=x86_64-linux-musl
STRIP_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-strip
AS_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-as
HISTFILE=/meta/.bash_history
HOME=/root
HOSTLIPO=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-lipo
includedir=/workspace/destdir/include
MESON_HOST_TOOLCHAIN=/opt/toolchains/x86_64-linux-musl-cxx11/host_x86_64-linux-musl.meson
BUILD_FC=/opt

Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
=
READELF_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-readelf
bb_target=aarch64-apple-darwin20
SOURCE_DATE_EPOCH=0
PWD=/workspace/srcdir/petsc-3.18.0
MACOSX_DEPLOYMENT_TARGET=11.0
proc_family=arm
BUILD_NM=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-nm
BUILD_CXX=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-g++
LD_FOR_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ld
OBJDUMP_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objdump
OBJCOPY_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-objcopy
HOSTNM=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-nm
USE_CCACHE=false
BUILD_AR=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ar
BUILD_AS=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-as
prefix=/workspace/destdir
HOSTNAME=271f88c24b60
CHARSET=UTF-8
PKG_CONFIG_PATH=/workspace/destdir/lib/pkgconfig:/workspace/destdir/lib64/pkgconfig:/workspace/destdir/share/pkgconfig
MACHTYPE=x86_64-linux-musl
HOSTREADELF=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-readelf
DSYMUTIL_BUILD=dsymutil
LD_BUILD=/opt/bin/x86_64-linux-musl-cxx11/x86_64-linux-musl-ld
host_includedir=/workspace/x86_64-linux-musl-cxx11/destdir/include
CMAKE_HOST_TOOLCHAIN=/opt/toolchains/x86_64-linux-musl-cxx11/host_x86_64-linux-musl.cmake
SHELL=/bin/bash


On 5. Apr 2023, at 22:45, Satish Balay  wrote:

Well this doesn't trigger the error for me. Do you have any env variables set 
with unicode [non-ascii] chars?

Satish

---

balay@ypro petsc-3.19.0 % sw_vers
ProductName: macOS
ProductVersion: 13.3
BuildVersion: 22E252
balay@ypro petsc-3.19.0 % ./configure --with-mpi=0 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
=
Configuring PETSc to compile on your system
=
=
* WARNING *
 You have a version of GNU make older than 4.0. It will work, but may not 
support all the
 parallel testing options. You can install the latest GNU make with your 
package manager,
 such as Brew or MacPorts, or use the --download-make option to get the latest 
GNU make
=
Compilers:
 C Compiler: gcc  -fPIC -Wall -Wwrite-strings -Wno-unknown-pragmas 
-fstack-protector -fno-stack-check -Qunused-arguments -fvisibility=hidden -g3 
-O0
   Version: Apple clang version 14.0.3 (clang-1403.0.22.14.1)
...
...


On Wed, 5 Apr 2023, Kaus, Boris wrote:

It can be reproduced with this:
sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
***
   TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure
---
invalid literal for int() with base 10: ''
***


 File "/workspace/srcdir/petsc-3.18.0/config/configure.py", line 457, in 
petsc_configure
   framework = 
config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
 loadArgDB = 0)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 101, in __init__
   self.createChildren()
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 338, in createChildren
   self.getChild(moduleName)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 323, in getChild
   config.setupDependencies(self)
 File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 89, in 
setupDependencies
   self.registerPythonFile(utility,'config.utilities')
 File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 49, in 
registerPythonFile
   utilityObj = 
self.framework.require(directory+utilityName, self)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 343, in require
   config = self.getChild(moduleName, keywordArgs)
 File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 317, in getChild
   config = type(self, *keywordArgs)
 File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/utilities/macosFirewall.py",
 line 12, in __init__
   self.isDarwin = config.setCompilers.Configure.isDarwin(self.log)
 File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 664, in isDarwin
   if not isUname_value: config.setCompilers.Configure.isUname(log)
 File 
&q

Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
That gives this:
sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
['--prefix=/workspace/destdir/lib/petsc/double_real_Int32/']
***
TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure 
---
invalid literal for int() with base 10: ''
***



> On 5. Apr 2023, at 22:38, Satish Balay  wrote:
> 
> Is it possible some unicode chars are in configure options?
> 
> Perhaps debug with:
> 
> diff --git a/config/configure.py b/config/configure.py
> index e00a7a9617c..a95483b61a5 100755
> --- a/config/configure.py
> +++ b/config/configure.py
> @@ -455,6 +455,7 @@ def petsc_configure(configure_options):
>   tbo = None
>   framework = None
>   try:
> +print(sys.argv[1:])
> framework = 
> config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
>  loadArgDB = 0)
> framework.setup()
> framework.logPrintBox('Configuring PETSc to compile on your system')
> 
> 
> [Note the error message is printed further below]
> 
> Satish
> 
> On Wed, 5 Apr 2023, Stefano Zampini wrote:
> 
>> It seems there's some typo/error in the configure command that is being
>> executed. Can you post it here?
>> 
>> Il giorno mer 5 apr 2023 alle ore 23:18 Kaus, Boris  ha
>> scritto:
>> 
>>> Hi everyone,
>>> 
>>> I’m trying to install precompiled binaries for PETSc 3.18.5 & 3.19.0 using
>>> the BinaryBuilder cross-compilation:
>>> https://github.com/JuliaPackaging/Yggdrasil/pull/6533, which mostly works
>>> fine: https://buildkite.com/julialang/yggdrasil/builds/2093).
>>> 
>>> Yet, on apple systems I receive a somewhat weird bug during the configure
>>> step:
>>> 
>>> [22:08:49]
>>> ***
>>> [22:08:49] TypeError or ValueError possibly related to ERROR in
>>> COMMAND LINE ARGUMENT while running ./configure
>>> [22:08:49]
>>> ---
>>> [22:08:49] invalid literal for int() with base 10: ''
>>> [22:08:49]
>>> ***
>>> [22:08:49]
>>> [22:08:49]
>>> [22:08:49] /workspace/srcdir/petsc-3.18.0/lib/petsc/conf/rules:860:
>>> /workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules: No such file or
>>> directory
>>> [22:08:49] make[1]: *** No rule to make target
>>> '/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules'.  Stop.
>>> [22:08:49] /workspace/srcdir/petsc-3.18.0/lib/petsc/conf/rules:860:
>>> /workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules: No such file or
>>> directory
>>> [22:08:49] make[1]: *** No rule to make target
>>> '/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules'.  Stop.
>>> [22:08:49] make: *** [GNUmakefile:17:
>>> /workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscvariables] Error 2
>>> [22:08:49] make: *** Waiting for unfinished jobs
>>> [22:08:49] make: *** [GNUmakefile:17: lib/petsc/conf/petscvariables] Error
>>> 2
>>> 
>>> The log file is rather brief:
>>> 
>>> sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # more configure.log
>>> Executing: uname -s
>>> stdout: Darwin
>>> 
>>> It works fine for PETSc 3.16.5/3.17.5, and this first occurs in 3.18.0.
>>> Is there something that changed between 3.17 & 3.18 that could cause this?
>>> 
>>> The build system seems to use python3.9 (3.4+ as required)
>>> 
>>> Thanks!
>>> Boris
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 



Re: [petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
It can be reproduced with this:
sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # ./configure 
--prefix=/workspace/destdir/lib/petsc/double_real_Int32/
***
TypeError or ValueError possibly related to ERROR in COMMAND LINE ARGUMENT 
while running ./configure
---
invalid literal for int() with base 10: ''
***


  File "/workspace/srcdir/petsc-3.18.0/config/configure.py", line 457, in 
petsc_configure
framework = 
config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:],
 loadArgDB = 0)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 101, in __init__
self.createChildren()
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 338, in createChildren
self.getChild(moduleName)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 323, in getChild
config.setupDependencies(self)
  File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 89, in 
setupDependencies
self.registerPythonFile(utility,'config.utilities')
  File "/workspace/srcdir/petsc-3.18.0/config/PETSc/Configure.py", line 49, in 
registerPythonFile
utilityObj = 
self.framework.require(directory+utilityName, self)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 343, in require
config = self.getChild(moduleName, keywordArgs)
  File "/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/framework.py", 
line 317, in getChild
config = type(self, *keywordArgs)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/utilities/macosFirewall.py",
 line 12, in __init__
self.isDarwin = config.setCompilers.Configure.isDarwin(self.log)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 664, in isDarwin
if not isUname_value: config.setCompilers.Configure.isUname(log)
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 630, in isUname
v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])
  File 
"/workspace/srcdir/petsc-3.18.0/config/BuildSystem/config/setCompilers.py", 
line 630, in 
v = tuple([int(a) for a in platform.mac_ver()[0].split('.')])


On 5. Apr 2023, at 22:32, Stefano Zampini  wrote:

It seems there's some typo/error in the configure command that is being 
executed. Can you post it here?

Il giorno mer 5 apr 2023 alle ore 23:18 Kaus, Boris 
mailto:k...@uni-mainz.de>> ha scritto:
Hi everyone,

I’m trying to install precompiled binaries for PETSc 3.18.5 & 3.19.0 using the 
BinaryBuilder cross-compilation:
https://github.com/JuliaPackaging/Yggdrasil/pull/6533, which mostly works fine: 
https://buildkite.com/julialang/yggdrasil/builds/2093).

Yet, on apple systems I receive a somewhat weird bug during the configure step:

[22:08:49] 
***
[22:08:49] TypeError or ValueError possibly related to ERROR in COMMAND 
LINE ARGUMENT while running ./configure
[22:08:49] 
---
[22:08:49] invalid literal for int() with base 10: ''
[22:08:49] 
***
[22:08:49]
[22:08:49]
[22:08:49] /workspace/srcdir/petsc-3.18.0/lib/petsc/conf/rules:860: 
/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules: No such file or 
directory
[22:08:49] make[1]: *** No rule to make target 
'/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules'.  Stop.
[22:08:49] /workspace/srcdir/petsc-3.18.0/lib/petsc/conf/rules:860: 
/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules: No such file or 
directory
[22:08:49] make[1]: *** No rule to make target 
'/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules'.  Stop.
[22:08:49] make: *** [GNUmakefile:17: 
/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscvariables] Error 2
[22:08:49] make: *** Waiting for unfinished jobs
[22:08:49] make: *** [GNUmakefile:17: lib/petsc/conf/petscvariables] Error 2

The log file is rather brief:

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # more configure.log
Executing: uname -s
stdout: Darwin

It works fine for PETSc 3.16.5/3.17.5, and this first occurs in 3.18.0.
Is there something that changed between 3.17 & 3.18 that could cause this?

The build system seems to use python3.9 (3.4+ as required)

Thanks!
Boris






--
Stefano



[petsc-users] Installation issue of 3.18.* and 3.19.0 on Apple systems

2023-04-05 Thread Kaus, Boris
Hi everyone,

I’m trying to install precompiled binaries for PETSc 3.18.5 & 3.19.0 using the 
BinaryBuilder cross-compilation:
https://github.com/JuliaPackaging/Yggdrasil/pull/6533, which mostly works fine: 
https://buildkite.com/julialang/yggdrasil/builds/2093).

Yet, on apple systems I receive a somewhat weird bug during the configure step:

[22:08:49] 
***
[22:08:49] TypeError or ValueError possibly related to ERROR in COMMAND 
LINE ARGUMENT while running ./configure
[22:08:49] 
---
[22:08:49] invalid literal for int() with base 10: ''
[22:08:49] 
***
[22:08:49]
[22:08:49]
[22:08:49] /workspace/srcdir/petsc-3.18.0/lib/petsc/conf/rules:860: 
/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules: No such file or 
directory
[22:08:49] make[1]: *** No rule to make target 
'/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules'.  Stop.
[22:08:49] /workspace/srcdir/petsc-3.18.0/lib/petsc/conf/rules:860: 
/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules: No such file or 
directory
[22:08:49] make[1]: *** No rule to make target 
'/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscrules'.  Stop.
[22:08:49] make: *** [GNUmakefile:17: 
/workspace/srcdir/petsc-3.18.0//lib/petsc/conf/petscvariables] Error 2
[22:08:49] make: *** Waiting for unfinished jobs
[22:08:49] make: *** [GNUmakefile:17: lib/petsc/conf/petscvariables] Error 2

The log file is rather brief:

sandbox:${WORKSPACE}/srcdir/petsc-3.18.0 # more configure.log
Executing: uname -s
stdout: Darwin

It works fine for PETSc 3.16.5/3.17.5, and this first occurs in 3.18.0.
Is there something that changed between 3.17 & 3.18 that could cause this?

The build system seems to use python3.9 (3.4+ as required)

Thanks!
Boris






Re: [petsc-users] Galerkin multigrid coarsening

2014-01-30 Thread Kaus, Boris
Thanks Jed,

I'll give it a try and let you know. Might take a bit though.


Boris 

 On Jan 30, 2014, at 17:45, Jed Brown j...@jedbrown.org wrote:
 
 Boris Kaus k...@uni-mainz.de writes:
 
 While doing multigrid it is possible to explicitly set restriction and
 prolongation/interpolation operators in PETSC using PCMGSetRestriction
 and PCMGSetInterpolation.  In many cases, the restriction (R) and
 prolongation (P) operators are simply the transpose of each other
 (R=P’).
 
 Yet, in certain cases, for example variable viscosity Stokes with a
 staggered finite difference discretization, it is advantageous if they
 are different (see http://arxiv.org/pdf/1308.4605.pdf).
 
 Accordding to the Wesseling textbook, Galerkin coarsening of the fine
 grid matrix is defined as:
 
 Acoarse = R*A*P
 
 Yet, as far as I can tell, PETSc seems to implement this as:
 
 Acoarse = R*A*R’
 
 Certainly, the code just had an outdated assumption.  I think I have
 added support for this (it does R*A*P when R!=P), but I don't have a
 test case readily available.  Could you try branch
 'jed/pcmg-galerkin-rap' (if you were using v3.4/maint) or 'next' if
 you've been tracking petsc-dev?


[petsc-users] Recursive fieldsplit

2013-05-20 Thread Kaus, Boris
Hi,

Example 42 (src/ksp/ksp/examples/tutorials) with recursive fieldsplit used to 
work in petsc 3.2 and petsc 3.3p2 with the patch suggested below by Barry.

mpiexec -np 4 ./ex42 \
-stokes_ksp_type gcr \
-stokes_ksp_rtol 1.0e-6 \
-stokes_pc_type fieldsplit \
-stokes_pc_fieldsplit_type SCHUR \
-stokes_pc_fieldsplit_schur_factorization_type UPPER \
-stokes_fieldsplit_u_ksp_type fgmres \
-stokes_fieldsplit_u_ksp_rtol 1e-3 \
-stokes_fieldsplit_u_pc_type fieldsplit \
-stokes_fieldsplit_u_fieldsplit_ksp_type preonly \
-stokes_fieldsplit_u_fieldsplit_pc_type ml \
-stokes_fieldsplit_u_pc_fieldsplit_block_size 3 \
-stokes_fieldsplit_u_pc_fieldsplit_type ADDITIVE \
-stokes_fieldsplit_p_ksp_type preonly \
-stokes_fieldsplit_p_pc_type jacobi \
-stokes_ksp_monitor_blocks \
-mx 16 \
-model 3

It no longer works in  petsc 3.4.0. Is this something that can be fixed and 
potentially added to 3.4.1? 
Our production code relies on similar functionality.

thanks a lot!

Boris



On Jun 28, 2012, at 8:55 PM, Barry Smith bsm...@mcs.anl.gov wrote:

  Anton,
 
   This came about because we are now being much more pedantic about the 
 blocksizes of PETSc objects and not allowing them to be causally changed when 
 they shouldn't be. 
 
   You can resolve this problem by editing the file 
 src/ksp/pc/impls/fieldsplit/fieldsplit.c locate the function 
 
 #undef __FUNCT__  
 #define __FUNCT__ PCApply_FieldSplit
 static PetscErrorCode PCApply_FieldSplit(PC pc,Vec x,Vec y)
 {
  PC_FieldSplit *jac = (PC_FieldSplit*)pc-data;
  PetscErrorCodeierr;
  PC_FieldSplitLink ilink = jac-head;
  PetscInt  cnt,bs;
 
  PetscFunctionBegin;
 
 and add the two lines right here
 
  x-map-bs = jac-bs;
  y-map-bs = jac-bs;
 
 
 then run make cmake in that directory. 
 
 To resolve this permanently we will need to figure out how to insure those 
 inner vectors are created with the correct block size. Are you willing to 
 share your code with petsc-ma...@mcs.anl.gov so that we can reproduce the 
 problem and fix it properly for the long run? (The problem is in PETSc not in 
 your code).
 
   Barry
 
 
 
 On Jun 28, 2012, at 10:44 AM, Anton Popov wrote:
 
 Dear petsc team,
 
 I'm trying to use fieldsplit preconditioner for the velocity block in the 
 Stokes system which is also preconditioned by
 fieldsplit (kind of recursive).
 
 Running example 42 from src/ksp/ksp/examples/tutorials with petsc-3.2, as 
 follows:
 
 mpiexec -np 4 ./ex42 \
 -stokes_ksp_type gcr \
 -stokes_ksp_rtol 1.0e-6 \
 -stokes_pc_type fieldsplit \
 -stokes_pc_fieldsplit_type SCHUR \
 -stokes_pc_fieldsplit_schur_factorization_type UPPER \
 -stokes_fieldsplit_u_ksp_type fgmres \
 -stokes_fieldsplit_u_ksp_rtol 1e-3 \
 -stokes_fieldsplit_u_pc_type fieldsplit \
 -stokes_fieldsplit_u_fieldsplit_ksp_type preonly \
 -stokes_fieldsplit_u_fieldsplit_pc_type ml \
 -stokes_fieldsplit_u_pc_fieldsplit_block_size 3 \
 -stokes_fieldsplit_u_pc_fieldsplit_type ADDITIVE \
 -stokes_fieldsplit_p_ksp_type preonly \
 -stokes_fieldsplit_p_pc_type jacobi \
 -stokes_ksp_monitor_blocks \
 -mx 16 \
 -model 3
 
 gives nicely looking output.
 
 But! Repeating the same exercise with petsc-3.3, like this (actually, there 
 is only one difference: factorization - fact):
 
 mpiexec -np 4 ./ex42 \
 -stokes_ksp_type gcr \
 -stokes_ksp_rtol 1.0e-6 \
 -stokes_pc_type fieldsplit \
 -stokes_pc_fieldsplit_type SCHUR \
 -stokes-pc_fieldsplit_schur_fact_type UPPER \
 -stokes_fieldsplit_u_ksp_type fgmres \
 -stokes_fieldsplit_u_ksp_rtol 1e-3 \
 -stokes_fieldsplit_u_pc_type fieldsplit \
 -stokes_fieldsplit_u_fieldsplit_ksp_type preonly \
 -stokes_fieldsplit_u_fieldsplit_pc_type ml \
 -stokes_fieldsplit_u_pc_fieldsplit_block_size 3 \
 -stokes_fieldsplit_u_pc_fieldsplit_type ADDITIVE \
 -stokes_fieldsplit_p_ksp_type preonly \
 -stokes_fieldsplit_p_pc_type jacobi \
 -stokes_ksp_monitor_blocks \
 -mx 16 \
 -model 3
 
 curses me hardly by claiming:
 
 [0]PETSC ERROR: - Error Message 
 
 [0]PETSC ERROR: Object is in wrong state!
 [0]PETSC ERROR: Blocksize of x vector 1 does not match fieldsplit blocksize 
 3!
 [0]PETSC ERROR: 
 
 [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 0, Tue Jun  5 14:20:42 
 CDT 2012
 [0]PETSC ERROR: See docs/changes/index.html for recent updates.
 [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
 [0]PETSC ERROR: See docs/index.html for manual pages.
 [0]PETSC ERROR: 
 
 [0]PETSC ERROR: ./ex42 on a int32-deb named mac11-005.geo.uni-mainz.de by 
 anton Thu Jun 28 17:06:53 2012
 [0]PETSC ERROR: Libraries linked from 
 /Users/anton/LIB/petsc-3.3-p0/int32-debug/lib
 [0]PETSC ERROR: Configure run at Tue Jun 12 15:32:21 2012
 [0]PETSC ERROR: Configure options PETSC_DIR=/Users/anton/LIB/petsc-3.3-p0 
 PETSC_ARCH=int32-debug --download-f-blas-lapack=1 --with-debugging=1 
 

[petsc-users] fieldsplit recursive

2012-06-29 Thread Kaus, Boris
Hi,

If I understand this correctly, it also implies that the 
fieldsplit-in-fieldsplit options described in Jed's manuscript on the new 
multiphysics options of PETSc 

http://www.mcs.anl.gov/uploads/cels/papers/P2017-0112.pdf

section IV are broken in PETSC 3.3.
That's a bummer as it is the preconditioner we most commonly used.

cheers,
Boris






On Jun 28, 2012, at 8:55 PM, Barry Smith wrote:

  Anton,
 
   This came about because we are now being much more pedantic about the 
 blocksizes of PETSc objects and not allowing them to be causally changed when 
 they shouldn't be. 
 
   You can resolve this problem by editing the file 
 src/ksp/pc/impls/fieldsplit/fieldsplit.c locate the function 
 
 #undef __FUNCT__  
 #define __FUNCT__ PCApply_FieldSplit
 static PetscErrorCode PCApply_FieldSplit(PC pc,Vec x,Vec y)
 {
  PC_FieldSplit *jac = (PC_FieldSplit*)pc-data;
  PetscErrorCodeierr;
  PC_FieldSplitLink ilink = jac-head;
  PetscInt  cnt,bs;
 
  PetscFunctionBegin;
 
 and add the two lines right here
 
  x-map-bs = jac-bs;
  y-map-bs = jac-bs;
 
 
 then run make cmake in that directory. 
 
 To resolve this permanently we will need to figure out how to insure those 
 inner vectors are created with the correct block size. Are you willing to 
 share your code with petsc-maint at mcs.anl.gov so that we can reproduce the 
 problem and fix it properly for the long run? (The problem is in PETSc not in 
 your code).
 
   Barry
 
 
 
 On Jun 28, 2012, at 10:44 AM, Anton Popov wrote:
 
 Dear petsc team,
 
 I'm trying to use fieldsplit preconditioner for the velocity block in the 
 Stokes system which is also preconditioned by
 fieldsplit (kind of recursive).
 
 Running example 42 from src/ksp/ksp/examples/tutorials with petsc-3.2, as 
 follows:
 
 mpiexec -np 4 ./ex42 \
 -stokes_ksp_type gcr \
 -stokes_ksp_rtol 1.0e-6 \
 -stokes_pc_type fieldsplit \
 -stokes_pc_fieldsplit_type SCHUR \
 -stokes_pc_fieldsplit_schur_factorization_type UPPER \
 -stokes_fieldsplit_u_ksp_type fgmres \
 -stokes_fieldsplit_u_ksp_rtol 1e-3 \
 -stokes_fieldsplit_u_pc_type fieldsplit \
 -stokes_fieldsplit_u_fieldsplit_ksp_type preonly \
 -stokes_fieldsplit_u_fieldsplit_pc_type ml \
 -stokes_fieldsplit_u_pc_fieldsplit_block_size 3 \
 -stokes_fieldsplit_u_pc_fieldsplit_type ADDITIVE \
 -stokes_fieldsplit_p_ksp_type preonly \
 -stokes_fieldsplit_p_pc_type jacobi \
 -stokes_ksp_monitor_blocks \
 -mx 16 \
 -model 3
 
 gives nicely looking output.
 
 But! Repeating the same exercise with petsc-3.3, like this (actually, there 
 is only one difference: factorization - fact):
 
 mpiexec -np 4 ./ex42 \
 -stokes_ksp_type gcr \
 -stokes_ksp_rtol 1.0e-6 \
 -stokes_pc_type fieldsplit \
 -stokes_pc_fieldsplit_type SCHUR \
 -stokes-pc_fieldsplit_schur_fact_type UPPER \
 -stokes_fieldsplit_u_ksp_type fgmres \
 -stokes_fieldsplit_u_ksp_rtol 1e-3 \
 -stokes_fieldsplit_u_pc_type fieldsplit \
 -stokes_fieldsplit_u_fieldsplit_ksp_type preonly \
 -stokes_fieldsplit_u_fieldsplit_pc_type ml \
 -stokes_fieldsplit_u_pc_fieldsplit_block_size 3 \
 -stokes_fieldsplit_u_pc_fieldsplit_type ADDITIVE \
 -stokes_fieldsplit_p_ksp_type preonly \
 -stokes_fieldsplit_p_pc_type jacobi \
 -stokes_ksp_monitor_blocks \
 -mx 16 \
 -model 3
 
 curses me hardly by claiming:
 
 [0]PETSC ERROR: - Error Message 
 
 [0]PETSC ERROR: Object is in wrong state!
 [0]PETSC ERROR: Blocksize of x vector 1 does not match fieldsplit blocksize 
 3!
 [0]PETSC ERROR: 
 
 [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 0, Tue Jun  5 14:20:42 
 CDT 2012
 [0]PETSC ERROR: See docs/changes/index.html for recent updates.
 [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
 [0]PETSC ERROR: See docs/index.html for manual pages.
 [0]PETSC ERROR: 
 
 [0]PETSC ERROR: ./ex42 on a int32-deb named mac11-005.geo.uni-mainz.de by 
 anton Thu Jun 28 17:06:53 2012
 [0]PETSC ERROR: Libraries linked from 
 /Users/anton/LIB/petsc-3.3-p0/int32-debug/lib
 [0]PETSC ERROR: Configure run at Tue Jun 12 15:32:21 2012
 [0]PETSC ERROR: Configure options PETSC_DIR=/Users/anton/LIB/petsc-3.3-p0 
 PETSC_ARCH=int32-debug --download-f-blas-lapack=1 --with-debugging=1 
 --COPTFLAGS=-g -O0 --FOPTFLAGS=-g -O0 --CXXOPTFLAGS=-g -O0 
 --with-c++-support=1 --with-fortran=1 --with-fortran-kernels=1 
 --with-large-file-io=1 --with-mpi-compilers=1 --with-cc=mpicc 
 --with-cxx=mpicxx --with-fc=mpif90 --download-ml=1 --download-hypre=1 
 --download-blacs=1 --download-scalapack=1 --download-metis=1 
 --download-parmetis=1 --download-mumps=1 --download-superlu_dist=1
 [0]PETSC ERROR: 
 
 [0]PETSC ERROR: PCApply_FieldSplit() line 726 in 
 /Users/anton/LIB/petsc-3.3-p0/src/ksp/pc/impls/fieldsplit/fieldsplit.c
 [0]PETSC ERROR: PCApply() line 384 in