Wednesday, April 06, 2005

Install PETSC on Intel Microsoft Windows 2000

This note describes how to install PETSC on a machine with following specs:

CPU: Pentium 4
OS: Windows 2000
Compiler : Intel Compiler
Math : Intel MKL
Shell: cygwin

install MKL: MKL should be in C:\Program Files\intel, with directory name MKL70, MKL61 or MKL, make sure ia32/mkl_c_dll.lib should be the only one library needed
install MPICH: MPICH should be in C:\Program Files\MPICH

edit :

search in *.py for 'C:\Program' and 'cygdrive', change drive letter for your pre-installed software

edit : ${PETSC_DIR}/makefile
search for the FIRST "MINFO_", change MINFO_ to ${MINFO}
remove the next few lines until line: -@$(RM) MINFO MINFO_
change this line to: -@$(RM) MINFO
This is because unknown problem with sed

adding the MKL DLL directorty to PATH
before entering cygwin, run vcvars32 first to set the environment

entering cygwin
go to root of PETSC
run following commands:
PETSC_DIR=`pwd`; export PETSC_DIR
config/ --with-fc=0 -with-vendor-compilers=intel
make BOPT=O_c++ all
make BOPT=O_c++ test
NOTE: will use flag -TP for compiling both .c and .cpp files.

If everything is right, should automatically locate pre-installed
MKL and MPICH. The end of ${PETSC_DIR}/configure.log should look like

C Compiler: /cygdrive/c/users/xw/work/petsc-2.2.1/bin/win32fe/win32fe icl --nodetect -MT
C++ Compiler: /cygdrive/c/users/xw/work/petsc-2.2.1/bin/win32fe/win32fe icl --nodetect -MT -GX -GR -TP
** Configure has determined that your PETSC_ARCH must be specified as:
** ** PETSC_ARCH: cygwin-intel
** Configure has determined that your PETSC_DIR must be specified as:
** ** PETSC_DIR: /cygdrive/c/users/xw/work/petsc-2.2.1
** Please make the above changes to your environment or on the command line for make.
BLAS/LAPACK: /cygdrive/c/Program\ Files/Intel/MKL70/ia32/lib/mkl_c_dll.lib
Type: Default MPICH install location (C:\Program Files\MPICH with MS compatible SDK
Version: 1.2
Includes: ['/cygdrive/c/Program\\ Files/MPICH/SDK/include']
Library: ['/cygdrive/c/Program\\ Files/MPICH/SDK/lib/mpich.lib', 'ws2_32.lib']
Python Configure Actions
These are the actions performed by configure on the filesystem
Build : Set default architecture to cygwin-intel in bmake/variables
Build : Set default optimization to g in bmake/common/bopt_
File creation : Generated list of jobs for testing in bmake/cygwin-intel/jobs
File creation : Generated list of jobs for testing in bmake/cygwin-intel/ejobs
File creation : Generated list of jobs for testing in bmake/cygwin-intel/rjobs
File creation : Created bmake/cygwin-intel/ for automatic reconfiguration
Substitution : bmake/config/ was substituted to produce bmake/cygwin-intel/rules
Substitution : bmake/config/ was substituted to produce bmake/cygwin-intel/packages
Substitution : bmake/config/ was substituted to produce bmake/cygwin-intel/variables
File creation : Created configure header bmake/cygwin-intel/petscconf.h
File creation : Created C specific configure header bmake/cygwin-intel/petscfix.h

1 comment:

mohamad said...

I have Microsoft visual studio compiler on the Windows OS and I want to use the PETSC library, but I cant run configure with win32fe which is written in the official site of PETSC
can you help me?

thanks a lot