[petsc-users] Eigenvalue solver method in Petsc

Satish Balay balay at mcs.anl.gov
Mon Mar 18 16:08:17 CDT 2013


On Mon, 18 Mar 2013, Satish Balay wrote:

> But if you mean gnu compilers that don't need cygwin.dll - then I
> believe mingw compilers are also distributed as part of cygwin. [but I
> have not tired that]

Appears to work fine [using mingw compilers from cygwin with petsc 'stable'].

- install mingw compilers from cygwin setup.exe
- setup PATH to mingw dlls
export PATH=/usr/i686-pc-mingw32/sys-root/mingw/bin/:$PATH

- build PETSc
./configure CC=i686-pc-mingw32-gcc --with-cxx=0 FC=i686-pc-mingw32-gfortran --with-mpi=0 --download-f-blas-lapack=1
make

Satish
-----------
balay at Win7-KVM ~/petsc.clone/src/ksp/ksp/examples/tutorials
$ make ex2
i686-pc-mingw32-gcc -o ex2.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -fno-inline -O0   -I/home/balay/petsc.clone/include -I/home/balay/petsc.clone/arch-mswin-c-debug/include -I/home/balay/petsc.clone/include/mpiuni    -D__INSDIR__=src/ksp/ksp/examples/tutorials/ ex2.c
i686-pc-mingw32-gcc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -fno-inline -O0  -o ex2 ex2.o  -L/home/balay/petsc.clone/arch-mswin-c-debug/lib  -lpetsc -Wl,-rpath,/home/balay/petsc.clone/arch-mswin-c-debug/lib -lflapack -lfblas -lpthread -L/usr/lib/gcc/i686-pc-mingw32/4.5.2 -L/usr/i686-pc-mingw32/lib -L/usr/i686-pc-mingw32/sys-root/mingw/lib -lgfortran -lgcc_s -lgdi32 -luser32 -ladvapi32 -lkernel32 -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -ladvapi32 -lshell32 
/usr/bin/rm -f ex2.o

balay at Win7-KVM ~/petsc.clone/src/ksp/ksp/examples/tutorials
$ ./ex2
Norm of error 0.000156044 iterations 6

balay at Win7-KVM ~/petsc.clone/src/ksp/ksp/examples/tutorials
$ ldd ex2
  ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x77630000)
  kernel32.dll => /cygdrive/c/Windows/system32/kernel32.dll (0x76240000)
  KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x75a50000)
  ADVAPI32.DLL => /cygdrive/c/Windows/system32/ADVAPI32.DLL (0x75b70000)
  msvcrt.dll => /cygdrive/c/Windows/system32/msvcrt.dll (0x75c10000)
  sechost.dll => /cygdrive/c/Windows/SYSTEM32/sechost.dll (0x75cf0000)
  RPCRT4.dll => /cygdrive/c/Windows/system32/RPCRT4.dll (0x75ac0000)
  GDI32.dll => /cygdrive/c/Windows/system32/GDI32.dll (0x764f0000)
  USER32.dll => /cygdrive/c/Windows/system32/USER32.dll (0x76410000)
  LPK.dll => /cygdrive/c/Windows/system32/LPK.dll (0x77770000)
  USP10.dll => /cygdrive/c/Windows/system32/USP10.dll (0x75e80000)
  libgcc_s_dw2-1.dll => /usr/i686-pc-mingw32/sys-root/mingw/bin/libgcc_s_dw2-1.dll (0x6e940000)
  libgfortran-3.dll => /usr/i686-pc-mingw32/sys-root/mingw/bin/libgfortran-3.dll (0x6f600000)
  IMM32.DLL => /cygdrive/c/Windows/system32/IMM32.DLL (0x76320000)
  MSCTF.dll => /cygdrive/c/Windows/system32/MSCTF.dll (0x765c0000)

balay at Win7-KVM ~/petsc.clone/src/ksp/ksp/examples/tutorials
$ i686-pc-mingw32-gcc --version
i686-pc-mingw32-gcc (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



More information about the petsc-users mailing list