[petsc-users] How to read/write a HDF5 file using petsc4py ?
Matthew Knepley
knepley at gmail.com
Fri Dec 10 06:14:35 CST 2021
On Fri, Dec 10, 2021 at 4:02 AM Quentin Chevalier <
quentin.chevalier at polytechnique.edu> wrote:
> Ok Matthew,
>
> I'll list my steps :
>
> *> sudo docker run -itv myfolder:/home/shared -w /home/shared/ --rm
> dolfinx/dolfinxroot at container:/home/shared# echo $PETSCH_ARCH $PETSCH_DIR*
> linux-gnu-real-32 /usr/local/petsc
> *root at container:/home/shared# cd /usr/local/petsc*
> *root at container:/usr/local/petsc# ./configure --with-hdf5 --with-petsc4py
> --force*
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> The version of PETSc you are using is out-of-date, we recommend updating
> to the new release
> Available Version: 3.16.2 Installed Version: 3.16
> https://petsc.org/release/download/
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> =============================================================================================
> Configuring PETSc to compile on your system
>
>
> =============================================================================================
> TESTING: configureLibrary from
> config.packages.petsc4py(config/BuildSystem/config/packages/petsc4py.py:116)
>
> *******************************************************************************
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for
> details):
>
> -------------------------------------------------------------------------------
> PETSc4py requires Python with "cython" module(s) installed!
> Please install using package managers - for ex: "apt" or "dnf" (on linux),
> or with "pip" using: /usr/bin/python3 -m pip install cython
>
> *******************************************************************************
> *root at container:/usr/local/petsc# pip install cython*
> Collecting cython
> Downloading
> Cython-0.29.25-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
> (1.9 MB)
> |████████████████████████████████| 1.9 MB 10.8 MB/s
> Installing collected packages: cython
> Successfully installed cython-0.29.25
> *root at container:/usr/local/petsc# ./configure --with-hdf5 --with-petsc4py
> --force*
>
> =============================================================================================
> Configuring PETSc to compile on your system
>
>
> =============================================================================================
> Compilers:
>
>
> C Compiler: mpicc -fPIC -Wall -Wwrite-strings
> -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-misleading-indentation
> -Wno-stringop-overflow -fstack-protector -fvisibility=hidden -g3 -O0
> Version: gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
> C++ Compiler: mpicxx -Wall -Wwrite-strings -Wno-strict-aliasing
> -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g -O0 -fPIC
> -std=gnu++17
> Version: g++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0
> Fortran Compiler: mpif90 -fPIC -Wall -ffree-line-length-0
> -Wno-unused-dummy-argument -g -O0
> Version: GNU Fortran (Ubuntu 11.2.0-7ubuntu2) 11.2.0
> Linkers:
> Shared linker: mpicc -shared -fPIC -Wall -Wwrite-strings
> -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-misleading-indentation
> -Wno-stringop-overflow -fstack-protector -fvisibility=hidden -g3 -O0
> Dynamic linker: mpicc -shared -fPIC -Wall -Wwrite-strings
> -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-misleading-indentation
> -Wno-stringop-overflow -fstack-protector -fvisibility=hidden -g3 -O0
> Libraries linked against: -lquadmath -lstdc++ -ldl
> BlasLapack:
> Library: -llapack -lblas
> Unknown if this uses OpenMP (try export OMP_NUM_THREADS=<1-4>
> yourprogram -log_view)
> uses 4 byte integers
> MPI:
> Version: 3
> mpiexec: mpiexec
> Implementation: mpich3
> MPICH_NUMVERSION: 30402300
> X:
> Library: -lX11
> pthread:
> hdf5:
> Version: 1.12.1
> Library: -lhdf5_hl -lhdf5
> cmake:
> Version: 3.18.4
> /usr/bin/cmake
> regex:
> Language used to compile PETSc: C
> PETSc:
> PETSC_ARCH: linux-gnu-real-32
> PETSC_DIR: /usr/local/petsc
> Prefix: <inplace installation>
> Scalar type: real
> Precision: double
> Support for __float128
> Integer size: 4 bytes
> Single library: yes
> Shared libraries: yes
> Memory alignment from malloc(): 16 bytes
> Using GNU make: /usr/bin/gmake
>
> xxx=========================================================================xxx
> Configure stage complete. Now build PETSc libraries with:
> make PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-real-32 all
>
> xxx=========================================================================xxx
> *root at 17fbe5936a5d:/usr/local/petsc# make all*
> /usr/bin/python3 ./config/gmakegen.py --petsc-arch=linux-gnu-real-32
> /usr/bin/python3 /usr/local/petsc/config/gmakegentest.py
> --petsc-dir=/usr/local/petsc --petsc-arch=linux-gnu-real-32
> --testdir=./linux-gnu-real-32/tests
> ==========================================
>
> See documentation/faq.html and documentation/bugreporting.html
> for help with installation problems. Please send EVERYTHING
> printed out below when reporting problems. Please check the
> mailing list archives and consider subscribing.
>
> https://petsc.org/release/community/mailing/
>
> ==========================================
> Starting make run on 17fbe5936a5d at Fri, 10 Dec 2021 08:28:10 +0000
> Machine characteristics: Linux 17fbe5936a5d 5.3.18d01-lp152.63-default #1
> SMP PREEMPT Fri Feb 5 19:19:17 CET 2021 x86_64 x86_64 x86_64 GNU/Linux
> -----------------------------------------
> Using PETSc directory: /usr/local/petsc
> Using PETSc arch: linux-gnu-real-32
> -----------------------------------------
> PETSC_VERSION_RELEASE 1
> PETSC_VERSION_MAJOR 3
> PETSC_VERSION_MINOR 16
> PETSC_VERSION_SUBMINOR 0
> PETSC_VERSION_PATCH 0
> PETSC_VERSION_DATE "Sep 29, 2021"
> PETSC_VERSION_GIT "v3.16.0"
> PETSC_VERSION_DATE_GIT "2021-09-29 18:30:02 -0500"
> PETSC_VERSION_EQ(MAJOR,MINOR,SUBMINOR) \
> PETSC_VERSION_ PETSC_VERSION_EQ
> PETSC_VERSION_LT(MAJOR,MINOR,SUBMINOR) \
> PETSC_VERSION_LE(MAJOR,MINOR,SUBMINOR) \
> PETSC_VERSION_GT(MAJOR,MINOR,SUBMINOR) \
> PETSC_VERSION_GE(MAJOR,MINOR,SUBMINOR) \
> -----------------------------------------
> Using configure Options: --with-hdf5 --with-petsc4py --force
> Using configuration flags:
> #define INCLUDED_PETSCCONF_H
> #define PETSC_ARCH "linux-gnu-real-32"
> #define PETSC_ATTRIBUTEALIGNED(size) __attribute((aligned(size)))
> #define PETSC_Alignx(a,b)
> #define PETSC_BLASLAPACK_UNDERSCORE 1
> #define PETSC_CLANGUAGE_C 1
> #define PETSC_CXX_INLINE inline
> #define PETSC_CXX_RESTRICT __restrict
> #define PETSC_C_INLINE inline
> #define PETSC_C_RESTRICT __restrict
> #define PETSC_DEPRECATED_ENUM(why) __attribute((deprecated))
> #define PETSC_DEPRECATED_FUNCTION(why) __attribute((deprecated))
> #define PETSC_DEPRECATED_MACRO(why) _Pragma(why)
> #define PETSC_DEPRECATED_TYPEDEF(why) __attribute((deprecated))
> #define PETSC_DIR "/usr/local/petsc"
> #define PETSC_DIR_SEPARATOR '/'
> #define PETSC_FORTRAN_CHARLEN_T size_t
> #define PETSC_FORTRAN_TYPE_INITIALIZE = -2
> #define PETSC_FUNCTION_NAME_C __func__
> #define PETSC_FUNCTION_NAME_CXX __func__
> #define PETSC_HAVE_ACCESS 1
> #define PETSC_HAVE_ATOLL 1
> #define PETSC_HAVE_ATTRIBUTEALIGNED 1
> #define PETSC_HAVE_BUILTIN_EXPECT 1
> #define PETSC_HAVE_BZERO 1
> #define PETSC_HAVE_C99_COMPLEX 1
> #define PETSC_HAVE_CLOCK 1
> #define PETSC_HAVE_CXX 1
> #define PETSC_HAVE_CXX_COMPLEX 1
> #define PETSC_HAVE_CXX_COMPLEX_FIX 1
> #define PETSC_HAVE_CXX_DIALECT_CXX03 1
> #define PETSC_HAVE_CXX_DIALECT_CXX11 1
> #define PETSC_HAVE_CXX_DIALECT_CXX14 1
> #define PETSC_HAVE_CXX_DIALECT_CXX17 1
> #define PETSC_HAVE_DLADDR 1
> #define PETSC_HAVE_DLCLOSE 1
> #define PETSC_HAVE_DLERROR 1
> #define PETSC_HAVE_DLFCN_H 1
> #define PETSC_HAVE_DLOPEN 1
> #define PETSC_HAVE_DLSYM 1
> #define PETSC_HAVE_DOUBLE_ALIGN_MALLOC 1
> #define PETSC_HAVE_DRAND48 1
> #define PETSC_HAVE_DYNAMIC_LIBRARIES 1
> #define PETSC_HAVE_ERF 1
> #define PETSC_HAVE_FCNTL_H 1
> #define PETSC_HAVE_FENV_H 1
> #define PETSC_HAVE_FLOAT_H 1
> #define PETSC_HAVE_FORK 1
> #define PETSC_HAVE_FORTRAN 1
> #define PETSC_HAVE_FORTRAN_FLUSH 1
> #define PETSC_HAVE_FORTRAN_GET_COMMAND_ARGUMENT 1
> #define PETSC_HAVE_FORTRAN_TYPE_STAR 1
> #define PETSC_HAVE_FORTRAN_UNDERSCORE 1
> #define PETSC_HAVE_GETCWD 1
> #define PETSC_HAVE_GETDOMAINNAME 1
> #define PETSC_HAVE_GETHOSTBYNAME 1
> #define PETSC_HAVE_GETHOSTNAME 1
> #define PETSC_HAVE_GETPAGESIZE 1
> #define PETSC_HAVE_GETRUSAGE 1
> #define PETSC_HAVE_HDF5 1
> #define PETSC_HAVE_IMMINTRIN_H 1
> #define PETSC_HAVE_INTTYPES_H 1
> #define PETSC_HAVE_ISINF 1
> #define PETSC_HAVE_ISNAN 1
> #define PETSC_HAVE_ISNORMAL 1
> #define PETSC_HAVE_LGAMMA 1
> #define PETSC_HAVE_LOG2 1
> #define PETSC_HAVE_LSEEK 1
> #define PETSC_HAVE_MALLOC_H 1
> #define PETSC_HAVE_MEMALIGN 1
> #define PETSC_HAVE_MEMMOVE 1
> #define PETSC_HAVE_MMAP 1
> #define PETSC_HAVE_MPICH_NUMVERSION 30402300
> #define PETSC_HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE MPIR_CVAR_CH3
> #define PETSC_HAVE_MPIIO 1
> #define PETSC_HAVE_MPI_COMBINER_CONTIGUOUS 1
> #define PETSC_HAVE_MPI_COMBINER_DUP 1
> #define PETSC_HAVE_MPI_COMBINER_NAMED 1
> #define PETSC_HAVE_MPI_EXSCAN 1
> #define PETSC_HAVE_MPI_F90MODULE 1
> #define PETSC_HAVE_MPI_F90MODULE_VISIBILITY 1
> #define PETSC_HAVE_MPI_FEATURE_DYNAMIC_WINDOW 1
> #define PETSC_HAVE_MPI_FINALIZED 1
> #define PETSC_HAVE_MPI_GET_ACCUMULATE 1
> #define PETSC_HAVE_MPI_GET_LIBRARY_VERSION 1
> #define PETSC_HAVE_MPI_IALLREDUCE 1
> #define PETSC_HAVE_MPI_IBARRIER 1
> #define PETSC_HAVE_MPI_INIT_THREAD 1
> #define PETSC_HAVE_MPI_INT64_T 1
> #define PETSC_HAVE_MPI_IN_PLACE 1
> #define PETSC_HAVE_MPI_LONG_DOUBLE 1
> #define PETSC_HAVE_MPI_NEIGHBORHOOD_COLLECTIVES 1
> #define PETSC_HAVE_MPI_NONBLOCKING_COLLECTIVES 1
> #define PETSC_HAVE_MPI_ONE_SIDED 1
> #define PETSC_HAVE_MPI_PROCESS_SHARED_MEMORY 1
> #define PETSC_HAVE_MPI_REDUCE_LOCAL 1
> #define PETSC_HAVE_MPI_REDUCE_SCATTER 1
> #define PETSC_HAVE_MPI_REDUCE_SCATTER_BLOCK 1
> #define PETSC_HAVE_MPI_RGET 1
> #define PETSC_HAVE_MPI_TYPE_DUP 1
> #define PETSC_HAVE_MPI_TYPE_GET_ENVELOPE 1
> #define PETSC_HAVE_MPI_WIN_CREATE 1
> #define PETSC_HAVE_NANOSLEEP 1
> #define PETSC_HAVE_NETDB_H 1
> #define PETSC_HAVE_NETINET_IN_H 1
> #define PETSC_HAVE_PACKAGES
> ":blaslapack:hdf5:mathlib:mpi:pthread:regex:x11:"
> #define PETSC_HAVE_PETSC4PY 1
> #define PETSC_HAVE_POPEN 1
> #define PETSC_HAVE_PTHREAD 1
> #define PETSC_HAVE_PTHREAD_BARRIER_T 1
> #define PETSC_HAVE_PTHREAD_H 1
> #define PETSC_HAVE_PWD_H 1
> #define PETSC_HAVE_RAND 1
> #define PETSC_HAVE_READLINK 1
> #define PETSC_HAVE_REALPATH 1
> #define PETSC_HAVE_REAL___FLOAT128 1
> #define PETSC_HAVE_REGEX 1
> #define PETSC_HAVE_RTLD_GLOBAL 1
> #define PETSC_HAVE_RTLD_LAZY 1
> #define PETSC_HAVE_RTLD_LOCAL 1
> #define PETSC_HAVE_RTLD_NOW 1
> #define PETSC_HAVE_SCHED_CPU_SET_T 1
> #define PETSC_HAVE_SETJMP_H 1
> #define PETSC_HAVE_SLEEP 1
> #define PETSC_HAVE_SNPRINTF 1
> #define PETSC_HAVE_SOCKET 1
> #define PETSC_HAVE_SO_REUSEADDR 1
> #define PETSC_HAVE_STDINT_H 1
> #define PETSC_HAVE_STRCASECMP 1
> #define PETSC_HAVE_STRINGS_H 1
> #define PETSC_HAVE_STRUCT_SIGACTION 1
> #define PETSC_HAVE_SYSINFO 1
> #define PETSC_HAVE_SYS_PARAM_H 1
> #define PETSC_HAVE_SYS_PROCFS_H 1
> #define PETSC_HAVE_SYS_RESOURCE_H 1
> #define PETSC_HAVE_SYS_SOCKET_H 1
> #define PETSC_HAVE_SYS_SYSINFO_H 1
> #define PETSC_HAVE_SYS_TIMES_H 1
> #define PETSC_HAVE_SYS_TIME_H 1
> #define PETSC_HAVE_SYS_TYPES_H 1
> #define PETSC_HAVE_SYS_UTSNAME_H 1
> #define PETSC_HAVE_SYS_WAIT_H 1
> #define PETSC_HAVE_TGAMMA 1
> #define PETSC_HAVE_TIME 1
> #define PETSC_HAVE_TIME_H 1
> #define PETSC_HAVE_UNAME 1
> #define PETSC_HAVE_UNISTD_H 1
> #define PETSC_HAVE_USLEEP 1
> #define PETSC_HAVE_VA_COPY 1
> #define PETSC_HAVE_VSNPRINTF 1
> #define PETSC_HAVE_X 1
> #define PETSC_HAVE_XMMINTRIN_H 1
> #define PETSC_HDF5_HAVE_PARALLEL 1
> #define PETSC_HDF5_HAVE_ZLIB 1
> #define PETSC_IS_COLORING_MAX USHRT_MAX
> #define PETSC_IS_COLORING_VALUE_TYPE short
> #define PETSC_IS_COLORING_VALUE_TYPE_F integer2
> #define PETSC_LEVEL1_DCACHE_LINESIZE 64
> #define PETSC_LIB_DIR "/usr/local/petsc/linux-gnu-real-32/lib"
> #define PETSC_MAX_PATH_LEN 4096
> #define PETSC_MEMALIGN 16
> #define PETSC_MPICC_SHOW "gcc -I/usr/local/include -L/usr/local/lib
> -Wl,-rpath -Wl,/usr/local/lib -Wl,--enable-new-dtags -lmpi"
> #define PETSC_MPIU_IS_COLORING_VALUE_TYPE MPI_UNSIGNED_SHORT
> #define PETSC_PETSC4PY_INSTALL_PATH
> "/usr/local/petsc/linux-gnu-real-32/lib"
> #define PETSC_PREFETCH_HINT_NTA _MM_HINT_NTA
> #define PETSC_PREFETCH_HINT_T0 _MM_HINT_T0
> #define PETSC_PREFETCH_HINT_T1 _MM_HINT_T1
> #define PETSC_PREFETCH_HINT_T2 _MM_HINT_T2
> #define PETSC_PYTHON_EXE "/usr/bin/python3"
> #define PETSC_Prefetch(a,b,c) _mm_prefetch((const char*)(a),(c))
> #define PETSC_REPLACE_DIR_SEPARATOR '\\'
> #define PETSC_SIGNAL_CAST
> #define PETSC_SIZEOF_ENUM 4
> #define PETSC_SIZEOF_INT 4
> #define PETSC_SIZEOF_LONG 8
> #define PETSC_SIZEOF_LONG_LONG 8
> #define PETSC_SIZEOF_SHORT 2
> #define PETSC_SIZEOF_SIZE_T 8
> #define PETSC_SIZEOF_VOID_P 8
> #define PETSC_SLSUFFIX "so"
> #define PETSC_UINTPTR_T uintptr_t
> #define PETSC_UNUSED __attribute((unused))
> #define PETSC_USE_AVX512_KERNELS 1
> #define PETSC_USE_BACKWARD_LOOP 1
> #define PETSC_USE_CTABLE 1
> #define PETSC_USE_DEBUG 1
> #define PETSC_USE_DEBUGGER "gdb"
> #define PETSC_USE_INFO 1
> #define PETSC_USE_ISATTY 1
> #define PETSC_USE_LOG 1
> #define PETSC_USE_PROC_FOR_SIZE 1
> #define PETSC_USE_REAL_DOUBLE 1
> #define PETSC_USE_SHARED_LIBRARIES 1
> #define PETSC_USE_SINGLE_LIBRARY 1
> #define PETSC_USE_SOCKET_VIEWER 1
> #define PETSC_USE_VISIBILITY_C 1
> #define PETSC_USE_VISIBILITY_CXX 1
> #define PETSC_USING_64BIT_PTR 1
> #define PETSC_USING_F2003 1
> #define PETSC_USING_F90FREEFORM 1
> #define PETSC__BSD_SOURCE 1
> #define PETSC__DEFAULT_SOURCE 1
> #define PETSC__GNU_SOURCE 1
> -----------------------------------------
> Using C compile: mpicc -o .o -c -fPIC -Wall -Wwrite-strings
> -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-misleading-indentation
> -Wno-stringop-overflow -fstack-protector -fvisibility=hidden -g3 -O0
> mpicc -show: gcc -I/usr/local/include -L/usr/local/lib -Wl,-rpath
> -Wl,/usr/local/lib -Wl,--enable-new-dtags -lmpi
> C compiler version: gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
> Using C++ compile: mpicxx -o .o -c -Wall -Wwrite-strings
> -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector
> -fvisibility=hidden -g -O0 -fPIC -std=gnu++17 -I/usr/local/petsc/include
> -I/usr/local/petsc/linux-gnu-real-32/include
> mpicxx -show: g++ -I/usr/local/include -L/usr/local/lib -lmpicxx
> -Wl,-rpath -Wl,/usr/local/lib -Wl,--enable-new-dtags -lmpi
> C++ compiler version: g++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0
> Using Fortran compile: mpif90 -o .o -c -fPIC -Wall -ffree-line-length-0
> -Wno-unused-dummy-argument -g -O0 -I/usr/local/petsc/include
> -I/usr/local/petsc/linux-gnu-real-32/include
> mpif90 -show: gfortran -I/usr/local/include -I/usr/local/include
> -L/usr/local/lib -lmpifort -Wl,-rpath -Wl,/usr/local/lib
> -Wl,--enable-new-dtags -lmpi
> Fortran compiler version: GNU Fortran (Ubuntu 11.2.0-7ubuntu2) 11.2.0
> -----------------------------------------
> Using C/C++ linker: mpicc
> Using C/C++ flags: -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing
> -Wno-unknown-pragmas -Wno-misleading-indentation -Wno-stringop-overflow
> -fstack-protector -fvisibility=hidden -g3 -O0
> Using Fortran linker: mpif90
> Using Fortran flags: -fPIC -Wall -ffree-line-length-0
> -Wno-unused-dummy-argument -g -O0
> -----------------------------------------
> Using system modules:
> Using mpi.h: # 1 "/usr/local/include/mpi.h" 1 3
> -----------------------------------------
> Using libraries: -Wl,-rpath,/usr/local/petsc/linux-gnu-real-32/lib
> -L/usr/local/petsc/linux-gnu-real-32/lib -Wl,-rpath,/usr/local/lib
> -L/usr/local/lib -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/11
> -L/usr/lib/gcc/x86_64-linux-gnu/11 -lpetsc -llapack -lblas -lhdf5_hl -lhdf5
> -lm -lX11 -lstdc++ -ldl -lmpifort -lmpi -lgfortran -lm -lgfortran -lm
> -lgcc_s -lquadmath -lstdc++ -ldl
> ------------------------------------------
> Using mpiexec: mpiexec
> ------------------------------------------
> Using MAKE: /usr/bin/gmake
> Using MAKEFLAGS: -j10 -l18.0 --no-print-directory --
> PETSC_DIR=/usr/local/petsc PETSC_ARCH=linux-gnu-real-32
> ==========================================
> gmake[3]: Nothing to be done for 'libs'.
> *** Building petsc4py ***
> /usr/bin/bash: line 1: cd: src/binding/petsc4py: No such file or directory
>
Does this directory exist? $PETSC_DIR/src/binding/petsc4py
It does in the PETSc 3.16.0 repository:
https://gitlab.com/petsc/petsc/-/tree/main/src/binding/petsc4py
Thanks,
Matt
> **************************ERROR*************************************
> Error building petsc4py.
> ********************************************************************
> gmake[2]: ***
> [/usr/local/petsc/linux-gnu-real-32/lib/petsc/conf/petscrules:45:
> petsc4pybuild] Error 1
> **************************ERROR*************************************
> Error during compile, check linux-gnu-real-32/lib/petsc/conf/make.log
> Send it and linux-gnu-real-32/lib/petsc/conf/configure.log to
> petsc-maint at mcs.anl.gov
> ********************************************************************
> gmake[1]: *** [makefile:40: all] Error 1
> make: *** [GNUmakefile:9: all] Error 2
>
> Sorry for the massive text blob, but that was definitely unexepcted
> behaviour. I know I mailed before saying the --with-petsc4py option didn't
> change a thing, but now it seems to be breaking everything. I serached a
> bit through make.log and didn't find anything useful.
>
> Quentin
>
>
>
> [image: cid:image003.jpg at 01D690CB.3B3FDC10]
>
> Quentin CHEVALIER – IA parcours recherche
>
> LadHyX - Ecole polytechnique
>
> __________
>
>
> On Thu, 9 Dec 2021 at 18:02, Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Thu, Dec 9, 2021 at 11:40 AM Quentin Chevalier <
>> quentin.chevalier at polytechnique.edu> wrote:
>>
>>> Hello Matthew,
>>>
>>> You're absolutely right ! Editor error, my apologies. Running full
>>> process 1-5) in container gives :
>>>
>>> root at container_id: ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres
>>> lid velocity = 0.0016, prandtl # = 1., grashof # = 1.
>>> Number of SNES iterations = 2
>>>
>>> So I guess it is passing the test.
>>
>>
>> Yes, that is right.
>>
>>
>>> I guess it is a site-wide
>>> installation then. Is that good news or bad news when it comes to
>>> adding HDF5 on top of things ?
>>>
>>
>> It is fine either way. You should now be able to get further. petsc4py
>> should be just using the shared
>> libraries, so you should now be able to run an HDF5 thing from there.
>> Does it work?
>>
>> Thanks,
>>
>> Matt
>>
>>
>>> Thank you for your time,
>>>
>>> Quentin
>>>
>>> On Wed, 8 Dec 2021 at 19:12, Matthew Knepley <knepley at gmail.com> wrote:
>>> >
>>> > On Wed, Dec 8, 2021 at 11:05 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >>
>>> >> Sorry Matthew, I had a correct tabulation. The attached file gives the
>>> >> same error.
>>> >
>>> >
>>> > The file you attached has 6 spaces in front of ${CLINKER} rather than
>>> a tab character.
>>> >
>>> > Thanks,
>>> >
>>> > Matt
>>> >
>>> >>
>>> >> Quentin
>>> >>
>>> >>
>>> >>
>>> >> Quentin CHEVALIER – IA parcours recherche
>>> >>
>>> >> LadHyX - Ecole polytechnique
>>> >>
>>> >> __________
>>> >>
>>> >>
>>> >>
>>> >> On Wed, 8 Dec 2021 at 16:51, Matthew Knepley <knepley at gmail.com>
>>> wrote:
>>> >> >
>>> >> > On Wed, Dec 8, 2021 at 9:39 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >>
>>> >> >> Step 4) fails. Traceback is : makefile:2: *** missing separator.
>>> Stop.
>>> >> >
>>> >> >
>>> >> > Makefiles require a tab character at the beginning of every action
>>> line. When you cut & pasted from email
>>> >> > the tab got eaten. Once you put it back, the makefile will work.
>>> >> >
>>> >> >>
>>> >> >> echo $CLINKER return an empty line. Same for PETSC_LIB. It would
>>> seem
>>> >> >> the docker container has no such environment variables. Or did you
>>> >> >> expect me to replace these by an environment specific linker ?
>>> >> >
>>> >> >
>>> >> > Those variables are defined in the included makefile
>>> >> >
>>> >> > include ${PETSC_DIR}/lib/petsc/conf/variables
>>> >> >
>>> >> > Thanks,
>>> >> >
>>> >> > Matt
>>> >> >
>>> >> >>
>>> >> >> Quentin
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> Quentin CHEVALIER – IA parcours recherche
>>> >> >>
>>> >> >> LadHyX - Ecole polytechnique
>>> >> >>
>>> >> >> __________
>>> >> >>
>>> >> >>
>>> >> >>
>>> >> >> On Wed, 8 Dec 2021 at 15:14, Matthew Knepley <knepley at gmail.com>
>>> wrote:
>>> >> >> >
>>> >> >> > On Wed, Dec 8, 2021 at 9:07 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >>
>>> >> >> >> I'm not sure I understand what you're saying... But it's my
>>> theory
>>> >> >> >> from the beginning that make check fails because PETSc examples
>>> were
>>> >> >> >> taken out of the docker image.
>>> >> >> >
>>> >> >> >
>>> >> >> > It appears so. There is no 'src' directory. Here is a simple way
>>> to test with an install like this.
>>> >> >> >
>>> >> >> > 1) mkdir test; cd test
>>> >> >> >
>>> >> >> > 2) Download the source:
>>> https://gitlab.com/petsc/petsc/-/raw/main/src/snes/tutorials/ex19.c?inline=false
>>> >> >> >
>>> >> >> > 3) Create a simple makefile:
>>> >> >> >
>>> >> >> > ex19: ex19.o
>>> >> >> > ${CLINKER} -o ex19 ex19.o ${PETSC_LIB}
>>> >> >> >
>>> >> >> > include ${PETSC_DIR}/lib/petsc/conf/variables
>>> >> >> > include ${PETSC_DIR}/lib/petsc/conf/rules
>>> >> >> >
>>> >> >> > 4) make ex19
>>> >> >> >
>>> >> >> > 5) ./ex19 -da_refine 3 -pc_type mg -ksp_type fgmres
>>> >> >> >
>>> >> >> > Thanks,
>>> >> >> >
>>> >> >> > Matt
>>> >> >> >
>>> >> >> >> I'm unsure what would be the correct way to discriminate between
>>> >> >> >> source and partial install, I tried a find . --name "testex19"
>>> from
>>> >> >> >> PETSC_DIR to no avail. A ls from PETSC_DIR yields :
>>> CODE_OF_CONDUCT.md
>>> >> >> >> CONTRIBUTING GNUmakefile LICENSE PKG-INFO config
>>> configtest.mod
>>> >> >> >> configure configure.log configure.log.bkp gmakefile
>>> gmakefile.test
>>> >> >> >> include interfaces lib linux-gnu-complex-32
>>> linux-gnu-complex-64
>>> >> >> >> linux-gnu-real-32 linux-gnu-real-64 make.log makefile
>>> petscdir.mk
>>> >> >> >> setup.py
>>> >> >> >>
>>> >> >> >> Quentin
>>> >> >> >> On Wed, 8 Dec 2021 at 14:38, Matthew Knepley <knepley at gmail.com>
>>> wrote:
>>> >> >> >> >
>>> >> >> >> > On Wed, Dec 8, 2021 at 8:29 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >>
>>> >> >> >> >> @Matthew Knepley I'm confused by your comment. Judging from
>>> the
>>> >> >> >> >> traceback, PETSC_DIR is set and correct. You think it should
>>> be
>>> >> >> >> >> specified in the command line as well ?
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > You are right, usually this message
>>> >> >> >> >
>>> >> >> >> > >> /usr/bin/bash: line 1: cd: src/snes/tutorials: No such
>>> file or directory
>>> >> >> >> >
>>> >> >> >> > means that PETSC_DIR is undefined, and thus you cannot find
>>> the tutorials. However, it could be that
>>> >> >> >> > Your PETSC_DIR refers to a site-wide installation, which
>>> /usr/local/petsc seems like. There the source
>>> >> >> >> > is not installed and we cannot run 'make check' because only
>>> the headers and libraries are there. Is this
>>> >> >> >> > what is happening here?
>>> >> >> >> >
>>> >> >> >> > Thanks,
>>> >> >> >> >
>>> >> >> >> > Matt
>>> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >> Quentin
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> Quentin CHEVALIER – IA parcours recherche
>>> >> >> >> >>
>>> >> >> >> >> LadHyX - Ecole polytechnique
>>> >> >> >> >>
>>> >> >> >> >> __________
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> On Wed, 8 Dec 2021 at 13:23, Matthew Knepley <
>>> knepley at gmail.com> wrote:
>>> >> >> >> >> >
>>> >> >> >> >> > On Wed, Dec 8, 2021 at 4:08 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>
>>> >> >> >> >> >> @all thanks for your time it's heartening to see a lively
>>> community.
>>> >> >> >> >> >>
>>> >> >> >> >> >> @Barry I've restarted the container and grabbed the .log
>>> file directly after the docker magic. I've tried a make check, it
>>> unsurprisingly spews the same answer as before :
>>> >> >> >> >> >>
>>> >> >> >> >> >> Running check examples to verify correct installation
>>> >> >> >> >> >> Using PETSC_DIR=/usr/local/petsc and
>>> PETSC_ARCH=linux-gnu-real-32
>>> >> >> >> >> >> /usr/bin/bash: line 1: cd: src/snes/tutorials: No such
>>> file or directory
>>> >> >> >> >> >> /usr/bin/bash: line 1: cd: src/snes/tutorials: No such
>>> file or directory
>>> >> >> >> >> >> gmake[3]: *** No rule to make target 'testex19'. Stop.
>>> >> >> >> >> >> gmake[2]: *** [makefile:155: check_build] Error 2
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > This happens if you run 'make check' without defining
>>> PETSC_DIR in your environment, since we are including
>>> >> >> >> >> > makefiles with PETSC_DIR in the path and make does not
>>> allow proper error messages in that case.
>>> >> >> >> >> >
>>> >> >> >> >> > Thanks,
>>> >> >> >> >> >
>>> >> >> >> >> > Matt
>>> >> >> >> >> >
>>> >> >> >> >> >>
>>> >> >> >> >> >> @Matthew ok will do, but I think @Lawrence has already
>>> provided that answer. It's possible to change the dockerfile and recompute
>>> the dolfinx image with hdf5, only it is a time-consuming process.
>>> >> >> >> >> >>
>>> >> >> >> >> >> Quentin
>>> >> >> >> >> >>
>>> >> >> >> >> >>
>>> >> >> >> >> >>
>>> >> >> >> >> >> Quentin CHEVALIER – IA parcours recherche
>>> >> >> >> >> >>
>>> >> >> >> >> >> LadHyX - Ecole polytechnique
>>> >> >> >> >> >>
>>> >> >> >> >> >> __________
>>> >> >> >> >> >>
>>> >> >> >> >> >>
>>> >> >> >> >> >>
>>> >> >> >> >> >> On Tue, 7 Dec 2021 at 19:16, Matthew Knepley <
>>> knepley at gmail.com> wrote:
>>> >> >> >> >> >>>
>>> >> >> >> >> >>> On Tue, Dec 7, 2021 at 9:43 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> @Matthew, as stated before, error output is unchanged,
>>> i.e.the python
>>> >> >> >> >> >>>> command below produces the same traceback :
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> # python3 -c "from petsc4py import PETSc;
>>> PETSc.Viewer().createHDF5('d.h5')"
>>> >> >> >> >> >>>> Traceback (most recent call last):
>>> >> >> >> >> >>>> File "<string>", line 1, in <module>
>>> >> >> >> >> >>>> File "PETSc/Viewer.pyx", line 182, in
>>> petsc4py.PETSc.Viewer.createHDF5
>>> >> >> >> >> >>>> petsc4py.PETSc.Error: error code 86
>>> >> >> >> >> >>>> [0] PetscViewerSetType() at
>>> >> >> >> >> >>>>
>>> /usr/local/petsc/src/sys/classes/viewer/interface/viewreg.c:442
>>> >> >> >> >> >>>> [0] Unknown type. Check for miss-spelling or missing
>>> package:
>>> >> >> >> >> >>>>
>>> https://petsc.org/release/install/install/#external-packages
>>> >> >> >> >> >>>> [0] Unknown PetscViewer type given: hdf5
>>> >> >> >> >> >>>
>>> >> >> >> >> >>>
>>> >> >> >> >> >>> The reason I wanted the output was that the C output
>>> shows the configure options that the PETSc library
>>> >> >> >> >> >>> was built with, However, Python seems to be eating this,
>>> so I cannot check.
>>> >> >> >> >> >>>
>>> >> >> >> >> >>> It seems like using this container is
>>> counter-productive. If it was built correctly, making these changes would
>>> be trivial.
>>> >> >> >> >> >>> Send mail to FEniCS (I am guessing Chris Richardson
>>> maintains this), and ask how they intend people to change these
>>> >> >> >> >> >>> options.
>>> >> >> >> >> >>>
>>> >> >> >> >> >>> Thanks,
>>> >> >> >> >> >>>
>>> >> >> >> >> >>> Matt.
>>> >> >> >> >> >>>
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> @Wence that makes sense. I'd assumed that the original
>>> PETSc had been
>>> >> >> >> >> >>>> overwritten, and if the linking has gone wrong I'm
>>> surprised anything
>>> >> >> >> >> >>>> happens with petsc4py at all.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> Your tentative command gave :
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> ERROR: Invalid requirement:
>>> '/usr/local/petsc/src/binding/petsc4py'
>>> >> >> >> >> >>>> Hint: It looks like a path. File
>>> >> >> >> >> >>>> '/usr/local/petsc/src/binding/petsc4py' does not exist.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> So I tested that global variables PETSC_ARCH &
>>> PETSC_DIR were correct
>>> >> >> >> >> >>>> then ran "pip install petsc4py" to restart petsc4py
>>> from scratch. This
>>> >> >> >> >> >>>> gives rise to a different error :
>>> >> >> >> >> >>>> # python3 -c "from petsc4py import PETSc"
>>> >> >> >> >> >>>> Traceback (most recent call last):
>>> >> >> >> >> >>>> File "<string>", line 1, in <module>
>>> >> >> >> >> >>>> File
>>> "/usr/local/lib/python3.9/dist-packages/petsc4py/PETSc.py",
>>> >> >> >> >> >>>> line 3, in <module>
>>> >> >> >> >> >>>> PETSc = ImportPETSc(ARCH)
>>> >> >> >> >> >>>> File
>>> "/usr/local/lib/python3.9/dist-packages/petsc4py/lib/__init__.py",
>>> >> >> >> >> >>>> line 29, in ImportPETSc
>>> >> >> >> >> >>>> return Import('petsc4py', 'PETSc', path, arch)
>>> >> >> >> >> >>>> File
>>> "/usr/local/lib/python3.9/dist-packages/petsc4py/lib/__init__.py",
>>> >> >> >> >> >>>> line 73, in Import
>>> >> >> >> >> >>>> module = import_module(pkg, name, path, arch)
>>> >> >> >> >> >>>> File
>>> "/usr/local/lib/python3.9/dist-packages/petsc4py/lib/__init__.py",
>>> >> >> >> >> >>>> line 58, in import_module
>>> >> >> >> >> >>>> with f: return imp.load_module(fullname, f, fn,
>>> info)
>>> >> >> >> >> >>>> File "/usr/lib/python3.9/imp.py", line 242, in
>>> load_module
>>> >> >> >> >> >>>> return load_dynamic(name, filename, file)
>>> >> >> >> >> >>>> File "/usr/lib/python3.9/imp.py", line 342, in
>>> load_dynamic
>>> >> >> >> >> >>>> return _load(spec)
>>> >> >> >> >> >>>> ImportError:
>>> /usr/local/lib/python3.9/dist-packages/petsc4py/lib/linux-gnu-real-32/
>>> PETSc.cpython-39-x86_64-linux-gnu.so:
>>> >> >> >> >> >>>> undefined symbol: petscstack
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> Not sure that it a step forward ; looks like petsc4py
>>> is broken now.
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> Quentin
>>> >> >> >> >> >>>>
>>> >> >> >> >> >>>> On Tue, 7 Dec 2021 at 14:58, Matthew Knepley <
>>> knepley at gmail.com> wrote:
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> > On Tue, Dec 7, 2021 at 8:26 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >> Ok my bad, that log corresponded to a tentative
>>> --download-hdf5. This
>>> >> >> >> >> >>>> >> log corresponds to the commands given above and has
>>> --with-hdf5 in its
>>> >> >> >> >> >>>> >> options.
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> > Okay, this configure was successful and found HDF5
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >> The whole process still results in the same error.
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> > Now send me the complete error output with this PETSc.
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> > Thanks,
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> > Matt
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >> Quentin
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >> Quentin CHEVALIER – IA parcours recherche
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >> LadHyX - Ecole polytechnique
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >> __________
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >>
>>> >> >> >> >> >>>> >> On Tue, 7 Dec 2021 at 13:59, Matthew Knepley <
>>> knepley at gmail.com> wrote:
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> > On Tue, Dec 7, 2021 at 3:55 AM Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> Hello Matthew,
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> That would indeed make sense.
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> Full log is attached, I grepped hdf5 in there and
>>> didn't find anything alarming.
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> > At the top of this log:
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> > Configure Options: --configModules=PETSc.Configure
>>> --optionsModule=config.compilerOptions PETSC_ARCH=linux-gnu-complex-64
>>> --COPTFLAGS=-O2 --CXXOPTFLAGS=-O2 --FOPTFLAGS=-O2 --with-make-np=2
>>> --with-64-bit-indices=yes --with-debugging=no --with-fortran-bindings=no
>>> --with-shared-libraries --download-hypre --download-mumps
>>> --download-ptscotch --download-scalapack --download-suitesparse
>>> --download-superlu_dist --with-scalar-type=complex
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> > So the HDF5 option is not being specified.
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> > Thanks,
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> > Matt
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> >> Cheers,
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> Quentin
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> Quentin CHEVALIER – IA parcours recherche
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> LadHyX - Ecole polytechnique
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> __________
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >>
>>> >> >> >> >> >>>> >> >> On Mon, 6 Dec 2021 at 21:39, Matthew Knepley <
>>> knepley at gmail.com> wrote:
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>> On Mon, Dec 6, 2021 at 3:27 PM Quentin Chevalier
>>> <quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>> Fine. MWE is unchanged :
>>> >> >> >> >> >>>> >> >>>> * Run this docker container
>>> >> >> >> >> >>>> >> >>>> * Do : python3 -c "from petsc4py import PETSc;
>>> PETSc.Viewer().createHDF5('dummy.h5')"
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>> Updated attempt at a fix :
>>> >> >> >> >> >>>> >> >>>> * cd /usr/local/petsc/
>>> >> >> >> >> >>>> >> >>>> * ./configure PETSC_ARCH= linux-gnu-real-32
>>> PETSC_DIR=/usr/local/petsc --with-hdf5 --force
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>> Did it find HDF5? If not, it will shut it off.
>>> You need to send us
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>> $PETSC_DIR/configure.log
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>> so we can see what happened in the configure run.
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>> Thanks,
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>> Matt
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>> * make PETSC_DIR=/usr/local/petsc PETSC-ARCH=
>>> linux-gnu-real-32 all
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>> Still no joy. The same error remains.
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>> Quentin
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>>
>>> >> >> >> >> >>>> >> >>>> On Mon, 6 Dec 2021 at 20:04, Pierre Jolivet <
>>> pierre at joliv.et> wrote:
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > On 6 Dec 2021, at 7:42 PM, Quentin Chevalier <
>>> quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > The PETSC_DIR exactly corresponds to the
>>> previous one, so I guess that rules option b) out, except if a specific
>>> option is required to overwrite a previous installation of PETSc. As for
>>> a), well I thought reconfiguring pretty direct, you're welcome to give me a
>>> hint as to what could be wrong in the following process.
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > Steps to reproduce this behaviour are as
>>> follows :
>>> >> >> >> >> >>>> >> >>>> > * Run this docker container
>>> >> >> >> >> >>>> >> >>>> > * Do : python3 -c "from petsc4py import
>>> PETSc; PETSc.Viewer().createHDF5('dummy.h5')"
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > After you get the error Unknown PetscViewer
>>> type, feel free to try :
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > * cd /usr/local/petsc/
>>> >> >> >> >> >>>> >> >>>> > * ./configure --with-hfd5
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > It’s hdf5, not hfd5.
>>> >> >> >> >> >>>> >> >>>> > It’s PETSC_ARCH, not PETSC-ARCH.
>>> >> >> >> >> >>>> >> >>>> > PETSC_ARCH is missing from your configure
>>> line.
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > Thanks,
>>> >> >> >> >> >>>> >> >>>> > Pierre
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > * make PETSC_DIR=/usr/local/petsc
>>> PETSC-ARCH=linux-gnu-real-32 all
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > Then repeat the MWE and observe absolutely no
>>> behavioural change whatsoever. I'm afraid I don't know PETSc well enough to
>>> be surprised by that.
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > Quentin
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > Quentin CHEVALIER – IA parcours recherche
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > LadHyX - Ecole polytechnique
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > __________
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > On Mon, 6 Dec 2021 at 19:24, Matthew Knepley <
>>> knepley at gmail.com> wrote:
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >> On Mon, Dec 6, 2021 at 1:22 PM Quentin
>>> Chevalier <quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>> >> >>>> >>>
>>> >> >> >> >> >>>> >> >>>> >>> It failed all of the tests included in `make
>>> >> >> >> >> >>>> >> >>>> >>> PETSC_DIR=/usr/local/petsc
>>> PETSC-ARCH=linux-gnu-real-32 check`, with
>>> >> >> >> >> >>>> >> >>>> >>> the error `/usr/bin/bash: line 1: cd:
>>> src/snes/tutorials: No such file
>>> >> >> >> >> >>>> >> >>>> >>> or directory`
>>> >> >> >> >> >>>> >> >>>> >>>
>>> >> >> >> >> >>>> >> >>>> >>> I am therefore fairly confident this a
>>> "file absence" problem, and not
>>> >> >> >> >> >>>> >> >>>> >>> a compilation problem.
>>> >> >> >> >> >>>> >> >>>> >>>
>>> >> >> >> >> >>>> >> >>>> >>> I repeat that there was no error at
>>> compilation stage. The final stage
>>> >> >> >> >> >>>> >> >>>> >>> did present `gmake[3]: Nothing to be done
>>> for 'libs'.` but that's all.
>>> >> >> >> >> >>>> >> >>>> >>>
>>> >> >> >> >> >>>> >> >>>> >>> Again, running `./configure --with-hdf5`
>>> followed by a `make
>>> >> >> >> >> >>>> >> >>>> >>> PETSC_DIR=/usr/local/petsc
>>> PETSC-ARCH=linux-gnu-real-32 all` does not
>>> >> >> >> >> >>>> >> >>>> >>> change the problem. I get the same error at
>>> the same position as
>>> >> >> >> >> >>>> >> >>>> >>> before.
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >> If you reconfigured and rebuilt, it is
>>> impossible to get the same error, so
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >> a) You did not reconfigure
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >> b) Your new build is somewhere else on the
>>> machine
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >> Thanks,
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >> Matt
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >>>
>>> >> >> >> >> >>>> >> >>>> >>> I will comment I am running on OpenSUSE.
>>> >> >> >> >> >>>> >> >>>> >>>
>>> >> >> >> >> >>>> >> >>>> >>> Quentin
>>> >> >> >> >> >>>> >> >>>> >>>
>>> >> >> >> >> >>>> >> >>>> >>> On Mon, 6 Dec 2021 at 19:09, Matthew
>>> Knepley <knepley at gmail.com> wrote:
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> > On Mon, Dec 6, 2021 at 1:08 PM Quentin
>>> Chevalier <quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> Hello Matthew and thanks for your quick
>>> response.
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> I'm afraid I did try to snoop around the
>>> container and rerun PETSc's
>>> >> >> >> >> >>>> >> >>>> >>> >> configure with the --with-hdf5 option,
>>> to absolutely no avail.
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> I didn't see any errors during config or
>>> make, but it failed the tests
>>> >> >> >> >> >>>> >> >>>> >>> >> (which aren't included in the minimal
>>> container I suppose)
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> > Failed which tests? What was the error?
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> > Thanks,
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> > Matt
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> Quentin
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> Quentin CHEVALIER – IA parcours recherche
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> LadHyX - Ecole polytechnique
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> __________
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> On Mon, 6 Dec 2021 at 19:02, Matthew
>>> Knepley <knepley at gmail.com> wrote:
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> > On Mon, Dec 6, 2021 at 11:28 AM
>>> Quentin Chevalier <quentin.chevalier at polytechnique.edu> wrote:
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> Hello PETSc users,
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> This email is a duplicata of this
>>> gitlab issue, sorry for any inconvenience caused.
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> I want to compute a PETSc vector in
>>> real mode, than perform calculations with it in complex mode. I want as
>>> much of this process to be parallel as possible. Right now, I compile PETSc
>>> in real mode, compute my vector and save it to a file, then switch to
>>> complex mode, read it, and move on.
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> This creates unexpected behaviour
>>> using MPIIO, so on Lisandro Dalcinl's advice I'm moving to HDF5 format. My
>>> code is as follows (taking inspiration from petsc4py doc, a bitbucket
>>> example and another one, all top Google results for 'petsc hdf5') :
>>> >> >> >> >> >>>> >> >>>> >>> >> >>>
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> viewer =
>>> PETSc.Viewer().createHDF5(file_name, 'r', COMM_WORLD)
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> q.load(viewer)
>>> >> >> >> >> >>>> >> >>>> >>> >> >>>
>>> q.ghostUpdate(addv=PETSc.InsertMode.INSERT, mode=PETSc.ScatterMode.FORWARD)
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> This crashes my code. I obtain
>>> traceback :
>>> >> >> >> >> >>>> >> >>>> >>> >> >>>
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> File "/home/shared/code.py", line
>>> 121, in Load
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> viewer =
>>> PETSc.Viewer().createHDF5(file_name, 'r', COMM_WORLD)
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> File "PETSc/Viewer.pyx", line 182,
>>> in petsc4py.PETSc.Viewer.createHDF5
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> petsc4py.PETSc.Error: error code 86
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> [0] PetscViewerSetType() at
>>> /usr/local/petsc/src/sys/classes/viewer/interface/viewreg.c:442
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> [0] Unknown type. Check for
>>> miss-spelling or missing package:
>>> https://petsc.org/release/install/install/#external-packages
>>> >> >> >> >> >>>> >> >>>> >>> >> >>> [0] Unknown PetscViewer type given:
>>> hdf5
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> > This means that PETSc has not been
>>> configured with HDF5 (--with-hdf5 or --download-hdf5), so the container
>>> should be updated.
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> > THanks,
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> > Matt
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> I have petsc4py 3.16 from this docker
>>> container (list of dependencies include PETSc and petsc4py).
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> I'm pretty sure this is not intended
>>> behaviour. Any insight as to how to fix this issue (I tried running
>>> ./configure --with-hdf5 to no avail) or more generally to perform this
>>> jiggling between real and complex would be much appreciated,
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> Kind regards.
>>> >> >> >> >> >>>> >> >>>> >>> >> >>
>>> >> >> >> >> >>>> >> >>>> >>> >> >> Quentin
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> >
>>> >> >> >> >> >>>> >> >>>> >>> >> > --
>>> >> >> >> >> >>>> >> >>>> >>> >> > 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/
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> >
>>> >> >> >> >> >>>> >> >>>> >>> > --
>>> >> >> >> >> >>>> >> >>>> >>> > 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/
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >>
>>> >> >> >> >> >>>> >> >>>> >> --
>>> >> >> >> >> >>>> >> >>>> >> 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/
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> > <image003.jpg>
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>> >
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>>
>>> >> >> >> >> >>>> >> >>> --
>>> >> >> >> >> >>>> >> >>> 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/
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> >
>>> >> >> >> >> >>>> >> > --
>>> >> >> >> >> >>>> >> > 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/
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> >
>>> >> >> >> >> >>>> > --
>>> >> >> >> >> >>>> > 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/
>>> >> >> >> >> >>>
>>> >> >> >> >> >>>
>>> >> >> >> >> >>>
>>> >> >> >> >> >>> --
>>> >> >> >> >> >>> 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/
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > --
>>> >> >> >> >> > 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/
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > --
>>> >> >> >> > 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/
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > 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/
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > 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/
>>> >
>>> >
>>> >
>>> > --
>>> > 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/
>>>
>>
>>
>> --
>> 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-users/attachments/20211210/5bd2c9d1/attachment-0001.html>
More information about the petsc-users
mailing list