Compile p_arpack and arpack-ng in mingw

1 arpack-ng


The configure script of  arpack-ng is not that smart. You need define several settings by hand like



export MPIF77=gfortran
export FFLAGS=-I/c/mpich2/include
./configure --with-blas=/c/libs/libblas.a --with-lapack=/c/libs/liblapack.a --enable-mpi

where absolute location of blas and lapack is needed. Besides, the MPICH2 library libfmpich2g.a is not considered in the configure script, you need add something like




LIBS="-lfmpich2g  $LIBS"
cat > conftest.$ac_ext <<_ACEOF
      program main
      call MPI_Init
      end
_ACEOF
if ac_fn_f77_try_link "$LINENO"; then :
  ac_cv_lib_fmpich_MPI_Init=yes
else
  ac_cv_lib_fmpich_MPI_Init=no
fi




to check the existence of MPILIBS


2. Pararpack
   The "mpif.h" file in the pararpack pakage is too outdated to be used. You must delete this files and modify ARmake.inc to indicate MPI settings. Like


MPIDIR  = /c/MPICH2
MPILIBDIR = $(MPIDIR)/lib
MPILIBS = -L$(MPILIBDIR) -lfmpich2g -lmpi


FFLAGS = -O -I/c/MPICH2/include






没有评论:

发表评论

VS Code下cmake, c++编译,调试环境的构成步骤

1   下载必须extension      按[Ctrl+Shift+X]打开extension窗口,选择安装"C/C++", "CMake", "CMake Tools" 2   在VSCode下打开作业目录 ...