[petsc-users] petsc under cygwin
Balay, Satish
balay at mcs.anl.gov
Fri Dec 6 07:58:48 CST 2019
Are you sure this is cygwin from OpenMPI? I don't see it refer to -lmpi_cxx
balay at ps5 ~/petsc
$ which mpicxx
/usr/bin/mpicxx
balay at ps5 ~/petsc
$ mpicxx -show
g++ -L/usr/lib -lmpi -lopen-rte -lopen-pal -lm -lgdi32 -lz
Here is what I get with cygwin/openmpi,lapack,blas
Satish
-------
balay at ps5 ~/petsc
$ ./configure --with-scalar-type=real --with-x=0 --with-hdf5 --download-hdf5=1 --with-single-library=1 --with-shared-libraries=0 --with-log=0 --with-clanguage=C++ --with-cxx-d
ialect=C++11 --CXXFLAGS="-fopenmp -fPIC" --CFLAGS="-fopenmp -fPIC" --with-fortran=0 --FFLAGS="-fopenmp -fPIC" --with-64-bit-indices=0 --with-debugging=0 --with-cc=mpicc --with
-fc=mpif77 --with-cxx=mpicxx COPTFLAGS=-O3 CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 --with-fortran-kernels=0
===============================================================================
Configuring PETSc to compile on your system
===============================================================================
=============================================================================== WARNING -with-clanguage=C++ is a developer feature and is *not* required for regular usage of PETSc either from C or C++ =============================================================================== =============================================================================== Trying to download git://https://bitbucket.org/petsc/pkg-sowing.git for SOWING =============================================================================== =============================================================================== Running configure on SOWING; this may take several minutes =============================================================================== =============================================================================== Running make on SOWING; this may take several minutes =============================================================================== =============================================================================== Running make install on SOWING; this may take several minutes =============================================================================== =============================================================================== Trying to download https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.5/src/hdf5-1.10.5.tar.gz for HDF5 =============================================================================== =============================================================================== Running configure on HDF5; this may take several minutes =============================================================================== =============================================================================== Running make on HDF5; this may take several minutes =============================================================================== =============================================================================== Running make install on HDF5; this may take several minutes =============================================================================== Compilers:
C Compiler: mpicc -fopenmp -fPIC -O3
Version: gcc (GCC) 7.4.0
C++ Compiler: mpicxx -fopenmp -fPIC -O3
Version: g++ (GCC) 7.4.0
Fortran Compiler: mpif77 -fopenmp -fPIC -O3
Version: GNU Fortran (GCC) 7.4.0
Linkers:
Static linker: /usr/bin/ar cr
Dynamic linker: /usr/bin/ar
Libraries linked against: -lgdi32 -luser32 -ladvapi32 -lkernel32 -lquadmath -lstdc++ -ldl
make:
Version: 4.2
/usr/bin/make
BlasLapack:
Library: -llapack -lblas
uses 4 byte integers
MPI:
Version: 3
Mpiexec: mpiexec --oversubscribe
OMPI_VERSION: 3.1.3
pthread:
hdf5:
Version: 1.10.5
Includes: -I/home/balay/petsc/arch-mswin-cxx-opt/include
Library: -Wl,-rpath,/home/balay/petsc/arch-mswin-cxx-opt/lib -L/home/balay/petsc/arch-mswin-cxx-opt/lib -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5
cmake:
Version: 3.14.5
/usr/bin/cmake
sowing:
Version: 1.1.25
/home/balay/petsc/arch-mswin-cxx-opt/bin/bfort
Language used to compile PETSc: Cxx
PETSc:
PETSC_ARCH: arch-mswin-cxx-opt
PETSC_DIR: /home/balay/petsc
Scalar type: real
Precision: double
Support for __float128
Integer size: 4 bytes
shared libraries: disabled
Memory alignment from malloc(): 16 bytes
xxx=========================================================================xxx
Configure stage complete. Now build PETSc libraries with:
make PETSC_DIR=/home/balay/petsc PETSC_ARCH=arch-mswin-cxx-opt all
xxx=========================================================================xxx
balay at ps5 ~/petsc
$
On Fri, 6 Dec 2019, Povolotskyi, Mykhailo wrote:
> I checked:
>
> I cannot build C++ programs with MPI, but I can build and run C programs
> with MPI.
>
> I have -with-log=0 because there is an overhead if many small objects
> are created, which is my case.
>
> As for the fortran, I will remove --with-fortran=0
>
> On 12/5/2019 11:53 PM, Smith, Barry F. wrote:
> > Can you actually build and run C++ programs with the MPI?
> >
> > Executing: mpicxx -o /tmp/petsc-Llvze6/config.setCompilers/conftest.exe -fopenmp -fPIC /tmp/petsc-Llvze6/config.setCompilers/conftest.o
> > Possible ERROR while running linker: exit code 1
> > stderr:
> > /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmpi_cxx
> > collect2: error: ld returned 1 exit status
> > Error testing C++ compiler: Cannot compile/link Cxx with mpicxx.
> > MPI installation mpicxx is likely incorrect.
> > Use --with-mpi-dir to indicate an alternate MPI.
> >
> > Also you have --with-fortran=0
> >
> > but --download-fblaslapack and FOPTFLAGS=-O3
> >
> > and why do you have --with-log=0 it costs no overhead if you do not use it and is always useful for tracking performance.
> >
> > Barry
> >
> >
> >> On Dec 5, 2019, at 9:19 PM, Povolotskyi, Mykhailo <mpovolot at purdue.edu> wrote:
> >>
> >> Dear Petsc support team,
> >>
> >> for some reasons I have to build petsc under Windows.
> >>
> >> I have installed Cygwin with GNU compilers and OpenMPI.
> >>
> >> Unfortunately, the configuration fails with the following message:
> >>
> >> TESTING: checkCxxCompiler from
> >> config.setCompilers(config/BuildSystem/config/setCompilers.py:814)
> >> *******************************************************************************
> >> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log
> >> for details):
> >> -------------------------------------------------------------------------------
> >> C++ compiler you provided with -with-cxx=mpicxx does not work.
> >> Cannot compile/link Cxx with mpicxx.
> >>
> >> I'm attaching the *.log file.
> >>
> >> Please advise,
> >>
> >> Michael.
> >>
> >> <configure.log>
>
More information about the petsc-users
mailing list