mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-18 03:42:09 +00:00
base/Makefile base/comm/psb_cgather.f90 base/comm/psb_chalo.f90 base/comm/psb_covrl.f90 base/comm/psb_dgather.f90 base/comm/psb_dhalo.f90 base/comm/psb_dovrl.f90 base/comm/psb_sgather.f90 base/comm/psb_shalo.f90 base/comm/psb_sovrl.f90 base/comm/psb_zgather.f90 base/comm/psb_zhalo.f90 base/comm/psb_zovrl.f90 base/internals/psi_cswapdata.F90 base/internals/psi_cswaptran.F90 base/internals/psi_dswapdata.F90 base/internals/psi_dswaptran.F90 base/internals/psi_idx_ins_cnv.f90 base/internals/psi_ovrl_restr.f90 base/internals/psi_ovrl_save.f90 base/internals/psi_ovrl_upd.f90 base/internals/psi_sswapdata.F90 base/internals/psi_sswaptran.F90 base/internals/psi_zswapdata.F90 base/internals/psi_zswaptran.F90 base/modules/Makefile base/modules/psb_base_mat_mod.f90 base/modules/psb_base_mod.f90 base/modules/psb_c_base_mat_mod.f90 base/modules/psb_c_base_vect_mod.f90 base/modules/psb_c_comm_mod.f90 base/modules/psb_c_csc_mat_mod.f90 base/modules/psb_c_csr_mat_mod.f90 base/modules/psb_c_linmap_mod.f90 base/modules/psb_c_mat_mod.f90 base/modules/psb_c_psblas_mod.f90 base/modules/psb_c_tools_mod.f90 base/modules/psb_c_vect_mod.f90 base/modules/psb_check_mod.f90 base/modules/psb_comm_mod.f90 base/modules/psb_const_mod.F90 base/modules/psb_d_base_mat_mod.f90 base/modules/psb_d_base_vect_mod.f90 base/modules/psb_d_comm_mod.f90 base/modules/psb_d_csc_mat_mod.f90 base/modules/psb_d_csr_mat_mod.f90 base/modules/psb_d_linmap_mod.f90 base/modules/psb_d_mat_mod.f90 base/modules/psb_d_psblas_mod.f90 base/modules/psb_d_tools_mod.f90 base/modules/psb_d_vect_mod.f90 base/modules/psb_error_impl.F90 base/modules/psb_error_mod.F90 base/modules/psb_i_comm_mod.f90 base/modules/psb_ip_reord_mod.f90 base/modules/psb_linmap_mod.f90 base/modules/psb_linmap_type_mod.f90 base/modules/psb_s_base_mat_mod.f90 base/modules/psb_s_base_vect_mod.f90 base/modules/psb_s_comm_mod.f90 base/modules/psb_s_csc_mat_mod.f90 base/modules/psb_s_csr_mat_mod.f90 base/modules/psb_s_linmap_mod.f90 base/modules/psb_s_mat_mod.f90 base/modules/psb_s_psblas_mod.f90 base/modules/psb_s_tools_mod.f90 base/modules/psb_s_vect_mod.f90 base/modules/psb_serial_mod.f90 base/modules/psb_vect_mod.f90 base/modules/psb_z_base_mat_mod.f90 base/modules/psb_z_base_vect_mod.f90 base/modules/psb_z_comm_mod.f90 base/modules/psb_z_csc_mat_mod.f90 base/modules/psb_z_csr_mat_mod.f90 base/modules/psb_z_linmap_mod.f90 base/modules/psb_z_mat_mod.f90 base/modules/psb_z_psblas_mod.f90 base/modules/psb_z_tools_mod.f90 base/modules/psb_z_vect_mod.f90 base/modules/psi_c_mod.f90 base/modules/psi_d_mod.f90 base/modules/psi_i_mod.f90 base/modules/psi_mod.f90 base/modules/psi_penv_mod.F90 base/modules/psi_s_mod.f90 base/modules/psi_z_mod.f90 base/psblas/psb_camax.f90 base/psblas/psb_casum.f90 base/psblas/psb_caxpby.f90 base/psblas/psb_cdot.f90 base/psblas/psb_cnrm2.f90 base/psblas/psb_cspmm.f90 base/psblas/psb_cspsm.f90 base/psblas/psb_damax.f90 base/psblas/psb_dasum.f90 base/psblas/psb_daxpby.f90 base/psblas/psb_ddot.f90 base/psblas/psb_dnrm2.f90 base/psblas/psb_dnrmi.f90 base/psblas/psb_dspmm.f90 base/psblas/psb_dspnrm1.f90 base/psblas/psb_dspsm.f90 base/psblas/psb_samax.f90 base/psblas/psb_sasum.f90 base/psblas/psb_saxpby.f90 base/psblas/psb_sdot.f90 base/psblas/psb_snrm2.f90 base/psblas/psb_sspmm.f90 base/psblas/psb_sspsm.f90 base/psblas/psb_zamax.f90 base/psblas/psb_zasum.f90 base/psblas/psb_zaxpby.f90 base/psblas/psb_zdot.f90 base/psblas/psb_znrm2.f90 base/psblas/psb_zspmm.f90 base/psblas/psb_zspsm.f90 base/serial/Makefile base/serial/impl/psb_c_base_mat_impl.f90 base/serial/impl/psb_c_coo_impl.f90 base/serial/impl/psb_c_csc_impl.f90 base/serial/impl/psb_c_csr_impl.f90 base/serial/impl/psb_c_mat_impl.F90 base/serial/impl/psb_d_base_mat_impl.f90 base/serial/impl/psb_d_coo_impl.f90 base/serial/impl/psb_d_csc_impl.f90 base/serial/impl/psb_d_csr_impl.f90 base/serial/impl/psb_d_mat_impl.F90 base/serial/impl/psb_s_base_mat_impl.f90 base/serial/impl/psb_s_coo_impl.f90 base/serial/impl/psb_s_csc_impl.f90 base/serial/impl/psb_s_csr_impl.f90 base/serial/impl/psb_s_mat_impl.F90 base/serial/impl/psb_z_base_mat_impl.f90 base/serial/impl/psb_z_coo_impl.f90 base/serial/impl/psb_z_csc_impl.f90 base/serial/impl/psb_z_csr_impl.f90 base/serial/impl/psb_z_mat_impl.F90 base/serial/psb_cgelp.f90 base/serial/psb_dgelp.f90 base/serial/psb_sgelp.f90 base/serial/psb_spdot_srtd.f90 base/serial/psb_zgelp.f90 base/tools/Makefile base/tools/psb_c_map.f90 base/tools/psb_callc.f90 base/tools/psb_casb.f90 base/tools/psb_cdins.f90 base/tools/psb_cfree.f90 base/tools/psb_cins.f90 base/tools/psb_d_map.f90 base/tools/psb_dallc.f90 base/tools/psb_dasb.f90 base/tools/psb_dcdbldext.F90 base/tools/psb_dfree.f90 base/tools/psb_dins.f90 base/tools/psb_dspalloc.f90 base/tools/psb_dspasb.f90 base/tools/psb_dspfree.f90 base/tools/psb_dsphalo.F90 base/tools/psb_dspins.f90 base/tools/psb_dsprn.f90 base/tools/psb_linmap.f90 base/tools/psb_map.f90 base/tools/psb_s_map.f90 base/tools/psb_sallc.f90 base/tools/psb_sasb.f90 base/tools/psb_sfree.f90 base/tools/psb_sins.f90 base/tools/psb_z_map.f90 base/tools/psb_zallc.f90 base/tools/psb_zasb.f90 base/tools/psb_zfree.f90 base/tools/psb_zins.f90 config/pac.m4 configure.ac configure docs/html/footnode.html docs/html/img1.png docs/html/img10.png docs/html/img100.png docs/html/img101.png docs/html/img102.png docs/html/img103.png docs/html/img104.png docs/html/img105.png docs/html/img106.png docs/html/img107.png docs/html/img108.png docs/html/img109.png docs/html/img11.png docs/html/img110.png docs/html/img111.png docs/html/img112.png docs/html/img113.png docs/html/img114.png docs/html/img115.png docs/html/img116.png docs/html/img117.png docs/html/img118.png docs/html/img119.png docs/html/img12.png docs/html/img120.png docs/html/img121.png docs/html/img122.png docs/html/img123.png docs/html/img124.png docs/html/img125.png docs/html/img126.png docs/html/img127.png docs/html/img128.png docs/html/img129.png docs/html/img13.png docs/html/img130.png docs/html/img131.png docs/html/img132.png docs/html/img133.png docs/html/img134.png docs/html/img135.png docs/html/img136.png docs/html/img137.png docs/html/img138.png docs/html/img14.png docs/html/img140.png docs/html/img141.png docs/html/img142.png docs/html/img143.png docs/html/img144.png docs/html/img145.png docs/html/img146.png docs/html/img147.png docs/html/img148.png docs/html/img149.png docs/html/img15.png docs/html/img16.png docs/html/img17.png docs/html/img18.png docs/html/img2.png docs/html/img20.png docs/html/img22.png docs/html/img23.png docs/html/img24.png docs/html/img26.png docs/html/img27.png docs/html/img28.png docs/html/img29.png docs/html/img3.png docs/html/img30.png docs/html/img31.png docs/html/img32.png docs/html/img33.png docs/html/img34.png docs/html/img35.png docs/html/img36.png docs/html/img37.png docs/html/img38.png docs/html/img39.png docs/html/img4.png docs/html/img40.png docs/html/img41.png docs/html/img42.png docs/html/img43.png docs/html/img44.png docs/html/img45.png docs/html/img46.png docs/html/img47.png docs/html/img48.png docs/html/img49.png docs/html/img5.png docs/html/img50.png docs/html/img51.png docs/html/img52.png docs/html/img53.png docs/html/img54.png docs/html/img55.png docs/html/img56.png docs/html/img57.png docs/html/img58.png docs/html/img59.png docs/html/img6.png docs/html/img60.png docs/html/img61.png docs/html/img62.png docs/html/img63.png docs/html/img64.png docs/html/img65.png docs/html/img66.png docs/html/img67.png docs/html/img68.png docs/html/img69.png docs/html/img7.png docs/html/img70.png docs/html/img71.png docs/html/img72.png docs/html/img73.png docs/html/img74.png docs/html/img75.png docs/html/img76.png docs/html/img77.png docs/html/img78.png docs/html/img79.png docs/html/img8.png docs/html/img80.png docs/html/img81.png docs/html/img82.png docs/html/img83.png docs/html/img84.png docs/html/img85.png docs/html/img86.png docs/html/img87.png docs/html/img88.png docs/html/img89.png docs/html/img9.png docs/html/img90.png docs/html/img91.png docs/html/img92.png docs/html/img93.png docs/html/img94.png docs/html/img95.png docs/html/img96.png docs/html/img97.png docs/html/img98.png docs/html/img99.png docs/html/index.html docs/html/node1.html docs/html/node10.html docs/html/node100.html docs/html/node101.html docs/html/node102.html docs/html/node103.html docs/html/node104.html docs/html/node105.html docs/html/node106.html docs/html/node107.html docs/html/node108.html docs/html/node109.html docs/html/node11.html docs/html/node12.html docs/html/node13.html docs/html/node14.html docs/html/node15.html docs/html/node16.html docs/html/node17.html docs/html/node18.html docs/html/node19.html docs/html/node2.html docs/html/node20.html docs/html/node21.html docs/html/node22.html docs/html/node23.html docs/html/node24.html docs/html/node25.html docs/html/node26.html docs/html/node27.html docs/html/node28.html docs/html/node29.html docs/html/node3.html docs/html/node30.html docs/html/node31.html docs/html/node32.html docs/html/node33.html docs/html/node34.html docs/html/node35.html docs/html/node36.html docs/html/node37.html docs/html/node38.html docs/html/node39.html docs/html/node4.html docs/html/node40.html docs/html/node41.html docs/html/node42.html docs/html/node43.html docs/html/node44.html docs/html/node45.html docs/html/node46.html docs/html/node47.html docs/html/node48.html docs/html/node49.html docs/html/node5.html docs/html/node50.html docs/html/node51.html docs/html/node52.html docs/html/node53.html docs/html/node54.html docs/html/node55.html docs/html/node56.html docs/html/node57.html docs/html/node58.html docs/html/node59.html docs/html/node6.html docs/html/node60.html docs/html/node61.html docs/html/node62.html docs/html/node63.html docs/html/node64.html docs/html/node65.html docs/html/node66.html docs/html/node67.html docs/html/node68.html docs/html/node69.html docs/html/node7.html docs/html/node70.html docs/html/node71.html docs/html/node72.html docs/html/node73.html docs/html/node74.html docs/html/node75.html docs/html/node76.html docs/html/node77.html docs/html/node78.html docs/html/node79.html docs/html/node8.html docs/html/node80.html docs/html/node81.html docs/html/node82.html docs/html/node83.html docs/html/node84.html docs/html/node85.html docs/html/node86.html docs/html/node87.html docs/html/node88.html docs/html/node89.html docs/html/node9.html docs/html/node90.html docs/html/node91.html docs/html/node92.html docs/html/node93.html docs/html/node94.html docs/html/node95.html docs/html/node96.html docs/html/node97.html docs/html/node98.html docs/html/node99.html docs/html/userhtml.html docs/psblas-3.0.pdf docs/src/datastruct.tex krylov/Makefile krylov/psb_base_inner_krylov_mod.f90 krylov/psb_c_inner_krylov_mod.f90 krylov/psb_cbicg.f90 krylov/psb_ccg.f90 krylov/psb_ccgs.f90 krylov/psb_ccgstab.f90 krylov/psb_ccgstabl.f90 krylov/psb_ckrylov.f90 krylov/psb_crgmres.f90 krylov/psb_d_inner_krylov_mod.f90 krylov/psb_dbicg.f90 krylov/psb_dcg.F90 krylov/psb_dcgs.f90 krylov/psb_dcgstab.F90 krylov/psb_dcgstabl.f90 krylov/psb_dkrylov.f90 krylov/psb_drgmres.f90 krylov/psb_krylov_mod.f90 krylov/psb_s_inner_krylov_mod.f90 krylov/psb_sbicg.f90 krylov/psb_scg.F90 krylov/psb_scgs.f90 krylov/psb_scgstab.F90 krylov/psb_scgstabl.f90 krylov/psb_skrylov.f90 krylov/psb_srgmres.f90 krylov/psb_z_inner_krylov_mod.f90 krylov/psb_zbicg.f90 krylov/psb_zcg.F90 krylov/psb_zcgs.f90 krylov/psb_zcgstab.f90 krylov/psb_zcgstabl.f90 krylov/psb_zkrylov.f90 krylov/psb_zrgmres.f90 opt/Makefile opt/psb_c_rsb_mat_mod.F90 opt/psb_d_rsb_mat_mod.F90 opt/psb_s_rsb_mat_mod.F90 opt/psb_z_rsb_mat_mod.F90 opt/rsb_c_mod.f90 opt/rsb_d_mod.f90 opt/rsb_s_mod.f90 opt/rsb_z_mod.f90 prec/Makefile prec/psb_c_base_prec_mod.f90 prec/psb_c_bjacprec.f90 prec/psb_c_diagprec.f90 prec/psb_c_nullprec.f90 prec/psb_c_prec_type.f90 prec/psb_cprecbld.f90 prec/psb_d_base_prec_mod.f90 prec/psb_d_bjacprec.f90 prec/psb_d_diagprec.f90 prec/psb_d_nullprec.f90 prec/psb_d_prec_type.f90 prec/psb_dprecbld.f90 prec/psb_s_base_prec_mod.f90 prec/psb_s_bjacprec.f90 prec/psb_s_diagprec.f90 prec/psb_s_nullprec.f90 prec/psb_s_prec_type.f90 prec/psb_sprecbld.f90 prec/psb_z_base_prec_mod.f90 prec/psb_z_bjacprec.f90 prec/psb_z_diagprec.f90 prec/psb_z_nullprec.f90 prec/psb_z_prec_type.f90 prec/psb_zprecbld.f90 test/fileread/cf_sample.f90 test/fileread/df_sample.f90 test/fileread/runs/dfs.inp test/fileread/runs/sfs.inp test/fileread/sf_sample.f90 test/fileread/zf_sample.f90 test/kernel/d_file_spmv.f90 test/kernel/s_file_spmv.f90 test/newfmt/ppde.F90 test/newfmt/spde.f90 test/pargen/ppde.f90 test/pargen/runs/ppde.inp test/pargen/spde.f90 test/serial/Makefile test/serial/d_matgen.F90 test/serial/psb_d_czz_mat_mod.f90 util/Makefile util/psb_c_hbio_impl.f90 util/psb_c_mat_dist_impl.f90 util/psb_c_mmio_impl.f90 util/psb_c_renum_impl.F90 util/psb_d_hbio_impl.f90 util/psb_d_mat_dist_impl.f90 util/psb_d_mmio_impl.f90 util/psb_d_renum_impl.F90 util/psb_hbio_impl.f90 util/psb_mat_dist_mod.f90 util/psb_mmio_impl.f90 util/psb_renum_impl.F90 util/psb_renum_mod.f90 util/psb_s_hbio_impl.f90 util/psb_s_mat_dist_impl.f90 util/psb_s_mmio_impl.f90 util/psb_s_renum_impl.F90 util/psb_z_hbio_impl.f90 util/psb_z_mat_dist_impl.f90 util/psb_z_mmio_impl.f90 util/psb_z_renum_impl.F90 Merged vect-state branch. Now need to: 1. Update MLD 2. Fix documentation 3. Take out older Krylov interfaces.
846 lines
27 KiB
Plaintext
Executable File
846 lines
27 KiB
Plaintext
Executable File
dnl $Id$
|
|
|
|
dnl
|
|
dnl Michele Martone's proposal for a transition towards the GNU build system for the PSBLAS library
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
dnl
|
|
dnl usage : aclocal -I config/ && autoconf && ./configure && make
|
|
|
|
dnl then : VAR=VAL ./configure
|
|
|
|
dnl In some configurations (AIX) the next line is needed:
|
|
dnl MPIFC=mpxlf95 ./configure
|
|
|
|
dnl then : ./configure VAR=VAL
|
|
dnl then : ./configure --help=short
|
|
dnl then : ./configure --help
|
|
|
|
dnl the PSBLAS modules get this task difficult to accomplish!
|
|
dnl SEE : --module-path --include-path
|
|
|
|
dnl NOTE : There is no cross compilation support.
|
|
|
|
|
|
|
|
###############################################################################
|
|
###############################################################################
|
|
#
|
|
# This script is used by the PSBLAS to determine the compilers, linkers, and
|
|
# libraries to build its libraries executable code.
|
|
# Its behaviour is driven on the compiler it finds or it is dictated to work
|
|
# with.
|
|
#
|
|
###############################################################################
|
|
###############################################################################
|
|
|
|
# NOTE: the literal for version (the second argument to AC_INIT should be a literal!)
|
|
AC_INIT([PSBLAS],3.0, salvatore.filippone@uniroma2.it)
|
|
|
|
# VERSION is the file containing the PSBLAS version code
|
|
# FIXME
|
|
psblas_cv_version="3.0"
|
|
|
|
# A sample source file
|
|
AC_CONFIG_SRCDIR([base/modules/psb_base_mod.f90])
|
|
dnl AC_CONFIG_AUX_DIR(config)
|
|
|
|
# Our custom M4 macros are in the 'config' directory
|
|
AC_CONFIG_MACRO_DIR([config])
|
|
AC_MSG_NOTICE([
|
|
--------------------------------------------------------------------------------
|
|
Welcome to the $PACKAGE_NAME $psblas_cv_version configure Script.
|
|
|
|
This creates Make.inc, but if you read carefully the
|
|
documentation, you can make your own by hand for your needs.
|
|
|
|
Be sure to specify the library paths of your interest. Examples:
|
|
./configure --with-libs=-L/some/directory/LIB <- will append to LIBS
|
|
FC=mpif90 F77=$FC CC=mpicc ./configure <- will force FC,CC,F77
|
|
|
|
See ./configure --help=short fore more info.
|
|
--------------------------------------------------------------------------------
|
|
])
|
|
###############################################################################
|
|
# Compilers detection: FC,F77,CC should be set, if found.
|
|
###############################################################################
|
|
#
|
|
# Installation.
|
|
#
|
|
#
|
|
AC_PROG_INSTALL
|
|
|
|
AC_MSG_CHECKING([where to install])
|
|
case $prefix in
|
|
\/* ) eval "INSTALL_DIR=$prefix";;
|
|
* ) eval "INSTALL_DIR=/usr/local/psblas";;
|
|
esac
|
|
case $libdir in
|
|
\/* ) eval "INSTALL_LIBDIR=$libdir";;
|
|
* ) eval "INSTALL_LIBDIR=$INSTALL_DIR/lib";;
|
|
esac
|
|
case $includedir in
|
|
\/* ) eval "INSTALL_INCLUDEDIR=$includedir";;
|
|
* ) eval "INSTALL_INCLUDEDIR=$INSTALL_DIR/include";;
|
|
esac
|
|
case $docsdir in
|
|
\/* ) eval "INSTALL_DOCSDIR=$docsdir";;
|
|
* ) eval "INSTALL_DOCSDIR=$INSTALL_DIR/docs";;
|
|
esac
|
|
AC_MSG_RESULT([$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR])
|
|
|
|
# Note that the following line won't save from troubles.
|
|
AC_PROG_FC([xlf2003_r xlf2003 xlf95_r xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran])
|
|
AC_PROG_F77([xlf pgf77 ifort ifc nagfor gfortran])
|
|
AC_PROG_CC([xlc pgcc icc gcc ])
|
|
dnl AC_PROG_CXX
|
|
|
|
dnl AC_PROG_F90 doesn't exist, at the time of writing this !
|
|
dnl AC_PROG_F90
|
|
|
|
# Sanity checks, although redundant (useful when debugging this configure.ac)!
|
|
if test "X$FC" == "X" ; then
|
|
AC_MSG_ERROR([Problem : No Fortran compiler specified nor found!])
|
|
fi
|
|
|
|
if test "X$CC" == "X" ; then
|
|
AC_MSG_ERROR([Problem : No C compiler specified nor found!])
|
|
fi
|
|
|
|
###############################################################################
|
|
# Suitable MPI compilers detection
|
|
###############################################################################
|
|
# Note: Someday we will contemplate a fake MPI - configured version of PSBLAS
|
|
###############################################################################
|
|
# First check whether the user required our serial (fake) mpi.
|
|
PAC_ARG_SERIAL_MPI
|
|
|
|
#Note : we miss the name of the Intel C compiler
|
|
if test x"$pac_cv_serial_mpi" == x"yes" ; then
|
|
FAKEMPI="fakempi.o";
|
|
MPIFC="$FC";
|
|
MPIF77="$F77";
|
|
MPICC="$CC";
|
|
else
|
|
AC_LANG([C])
|
|
if test "X$MPICC" = "X" ; then
|
|
# This is our MPICC compiler preference: it will override ACX_MPI's first try.
|
|
AC_CHECK_PROGS([MPICC],[mpxlc mpcc mpicc])
|
|
fi
|
|
ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for C]])])
|
|
|
|
|
|
AC_LANG([Fortran])
|
|
|
|
if test "X$MPIFC" = "X" ; then
|
|
# This is our MPIFC compiler preference: it will override ACX_MPI's first try.
|
|
AC_CHECK_PROGS([MPIFC],[mpxlf2003_r mpxlf2003 mpxlf95_r mpxlf90 mpf95 mpf90 mpif95 mpif90 ])
|
|
fi
|
|
|
|
ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for Fortran]])])
|
|
|
|
AC_LANG(Fortran 77)
|
|
if test "X$MPIF77" = "X" ; then
|
|
# This is our MPIFC compiler preference: it will override ACX_MPI's first try.
|
|
AC_CHECK_PROGS([MPIF77],[mpxlf mpf77 mpif77])
|
|
fi
|
|
ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for Fortran 77]])])
|
|
FC="$MPIFC" ;
|
|
F77="$MPIF77";
|
|
CC="$MPICC";
|
|
fi
|
|
|
|
# We leave a default language for the next checks.
|
|
dnl AC_LANG([Fortran 77])
|
|
AC_LANG([C])
|
|
|
|
dnl Now on, MPIFC should be set, as MPIF77 and MPICC
|
|
|
|
###############################################################################
|
|
# Sanity checks, although redundant (useful when debugging this configure.ac)!
|
|
###############################################################################
|
|
|
|
if test "X$MPIFC" == "X" ; then
|
|
AC_MSG_ERROR([Problem : No MPI Fortran compiler specified nor found!])
|
|
fi
|
|
|
|
if test "X$MPICC" == "X" ; then
|
|
AC_MSG_ERROR([Problem : No MPI C compiler specified nor found!])
|
|
fi
|
|
|
|
###############################################################################
|
|
# FLAGS and LIBS user customization
|
|
###############################################################################
|
|
|
|
dnl NOTE : no spaces before the comma, and no brackets before the second argument!
|
|
PAC_ARG_WITH_FLAGS(ccopt,CCOPT)
|
|
PAC_ARG_WITH_FLAGS(fcopt,FCOPT)
|
|
PAC_ARG_WITH_FLAGS(f90copt,F90COPT)
|
|
#PAC_ARG_WITH_FLAGS(ldflags,LDFLAGS)
|
|
PAC_ARG_WITH_LIBS
|
|
PAC_ARG_WITH_FLAGS(clibs,CLIBS)
|
|
PAC_ARG_WITH_FLAGS(flibs,FLIBS)
|
|
|
|
dnl candidates for removal:
|
|
PAC_ARG_WITH_FLAGS(library-path,LIBRARYPATH)
|
|
PAC_ARG_WITH_FLAGS(include-path,INCLUDEPATH)
|
|
PAC_ARG_WITH_FLAGS(module-path,MODULE_PATH)
|
|
|
|
# we just gave the user the chance to append values to these variables
|
|
|
|
###############################################################################
|
|
|
|
dnl Library oriented Autotools facilities (we don't care about this for now)
|
|
dnl AC_PROG_LIBTOOL
|
|
dnl AM_MAINTAINER_MODE
|
|
AC_PROG_RANLIB
|
|
dnl system's ranlib will be found, too
|
|
|
|
AM_INIT_AUTOMAKE
|
|
dnl Specify required version of autoconf.
|
|
AC_PREREQ(2.59)
|
|
|
|
|
|
###############################################################################
|
|
# Compiler identification (sadly, it is necessary)
|
|
###############################################################################
|
|
psblas_cv_fc=""
|
|
|
|
dnl Do we use gfortran & co ? Compiler identification.
|
|
dnl NOTE : in /autoconf/autoconf/fortran.m4 there are plenty of better tests!
|
|
|
|
PAC_CHECK_HAVE_GFORTRAN(
|
|
[psblas_cv_fc="gcc"],
|
|
)
|
|
|
|
if test x"$psblas_cv_fc" == "x" ; then
|
|
if eval "$MPIFC -qversion 2>&1 | grep XL 2>/dev/null" ; then
|
|
psblas_cv_fc="xlf"
|
|
# Some configurations of the XLF want "-WF," prepended to -D.. flags.
|
|
# TODO : discover the exact conditions when the usage of -WF is needed.
|
|
psblas_cv_define_prepend="-WF,"
|
|
if eval "$MPIFC -qversion 2>&1 | grep -e\"Version: 10\.\" 2>/dev/null"; then
|
|
FDEFINES="$psblas_cv_define_prepend-DXLF_10 $FDEFINES"
|
|
fi
|
|
|
|
# Note : there could be problems with old xlf compiler versions ( <10.1 )
|
|
# since (as far as it is known to us) -WF, is not used in earlier versions.
|
|
# More problems could be undocumented yet.
|
|
elif eval "$MPIFC -V 2>&1 | grep Sun 2>/dev/null" ; then
|
|
# Sun compiler detection
|
|
|
|
psblas_cv_fc="sun"
|
|
elif eval "$MPIFC -V 2>&1 | grep Portland 2>/dev/null" ; then
|
|
# Portland group compiler detection
|
|
|
|
psblas_cv_fc="pg"
|
|
elif eval "$MPIFC -V 2>&1 | grep Intel.*Fortran.*Compiler 2>/dev/null" ; then
|
|
# Intel compiler identification
|
|
|
|
psblas_cv_fc="ifc"
|
|
elif eval "$MPIFC -v 2>&1 | grep NAG 2>/dev/null" ; then
|
|
psblas_cv_fc="nag"
|
|
FC="$MPIFC"
|
|
F77="$MPIFC"
|
|
else
|
|
psblas_cv_fc=""
|
|
# unsupported MPI Fortran compiler
|
|
AC_MSG_NOTICE([[Unknown Fortran compiler, proceeding with fingers crossed !]])
|
|
fi
|
|
fi
|
|
if test "X$psblas_cv_fc" == "Xgcc" ; then
|
|
PAC_HAVE_MODERN_GFORTRAN(
|
|
[],
|
|
[AC_MSG_ERROR([Sorry, we require GNU Fortran 4.6 or later.])]
|
|
)
|
|
fi
|
|
# TODO : SEE _AC_PROG_FC_V
|
|
# TODO : AC_MSG_ERROR(see "$ac_cv_prog_FC_fc")
|
|
# AC_MSG_NOTICE( "ac_cv_prog_FC_fc : $ac_cv_prog_FC_fc")
|
|
###############################################################################
|
|
|
|
###############################################################################
|
|
# Linking, symbol mangling, and misc tests
|
|
###############################################################################
|
|
|
|
# Note : This is functional to Make.inc rules and structure (see below).
|
|
AC_LANG([C])
|
|
AC_CHECK_SIZEOF(void *)
|
|
# Define for platforms with 64 bit (void * ) pointers
|
|
if test X"$ac_cv_sizeof_void_p" == X"8" ; then
|
|
CDEFINES="-DPtr64Bits $CDEFINES"
|
|
fi
|
|
AC_LANG([Fortran])
|
|
if test "X$psblas_cv_fc" == X"pg" ; then
|
|
save_FC=$FC
|
|
FC=$F77
|
|
fi
|
|
__AC_FC_NAME_MANGLING
|
|
if test "X$psblas_cv_fc" == X"pg" ; then
|
|
FC=$save_FC
|
|
fi
|
|
AC_LANG([C])
|
|
dnl AC_MSG_NOTICE([Fortran name mangling: $ac_cv_fc_mangling])
|
|
[pac_fc_case=${ac_cv_fc_mangling%%,*}]
|
|
[pac_fc_under=${ac_cv_fc_mangling#*,}]
|
|
[pac_fc_sec_under=${pac_fc_under#*,}]
|
|
[pac_fc_sec_under=${pac_fc_sec_under# }]
|
|
[pac_fc_under=${pac_fc_under%%,*}]
|
|
[pac_fc_under=${pac_fc_under# }]
|
|
AC_MSG_CHECKING([defines for C/Fortran name interfaces])
|
|
if test "x$pac_fc_case" == "xlower case"; then
|
|
if test "x$pac_fc_under" == "xunderscore"; then
|
|
if test "x$pac_fc_sec_under" == "xno extra underscore"; then
|
|
pac_f_c_names="-DLowerUnderscore"
|
|
elif test "x$pac_fc_sec_under" == "xextra underscore"; then
|
|
pac_f_c_names="-DLowerDoubleUnderscore"
|
|
else
|
|
pac_f_c_names="-DUNKNOWN"
|
|
dnl AC_MSG_NOTICE([Fortran name mangling extra underscore unknown case])
|
|
fi
|
|
elif test "x$pac_fc_under" == "xno underscore"; then
|
|
pac_f_c_names="-DLowerCase"
|
|
else
|
|
pac_f_c_names="-DUNKNOWN"
|
|
dnl AC_MSG_NOTICE([Fortran name mangling underscore unknown case])
|
|
fi
|
|
elif test "x$pac_fc_case" == "xupper case"; then
|
|
if test "x$pac_fc_under" == "xunderscore"; then
|
|
if test "x$pac_fc_sec_under" == "xno extra underscore"; then
|
|
pac_f_c_names="-DUpperUnderscore"
|
|
elif test "x$pac_fc_sec_under" == "xextra underscore"; then
|
|
pac_f_c_names="-DUpperDoubleUnderscore"
|
|
else
|
|
pac_f_c_names="-DUNKNOWN"
|
|
dnl AC_MSG_NOTICE([Fortran name mangling extra underscore unknown case])
|
|
fi
|
|
elif test "x$pac_fc_under" == "xno underscore"; then
|
|
pac_f_c_names="-DUpperCase"
|
|
else
|
|
pac_f_c_names="-DUNKNOWN"
|
|
dnl AC_MSG_NOTICE([Fortran name mangling underscore unknown case])
|
|
fi
|
|
dnl AC_MSG_NOTICE([Fortran name mangling UPPERCASE not handled])
|
|
else
|
|
pac_f_c_names="-DUNKNOWN"
|
|
dnl AC_MSG_NOTICE([Fortran name mangling unknown case])
|
|
fi
|
|
CDEFINES="$pac_f_c_names $CDEFINES"
|
|
|
|
AC_MSG_RESULT([ $pac_f_c_names ])
|
|
|
|
###############################################################################
|
|
# Make.inc generation logic
|
|
###############################################################################
|
|
|
|
|
|
if test "X$CCOPT" == "X" ; then
|
|
if test "X$psblas_cv_fc" == "Xgcc" ; then
|
|
# note that no space should be placed around the equality symbol in assignements
|
|
# Note : 'native' is valid _only_ on GCC/x86 (32/64 bits)
|
|
CCOPT="-O3 $CCOPT"
|
|
|
|
elif test "X$psblas_cv_fc" == X"xlf" ; then
|
|
# XL compiler : consider using -qarch=auto
|
|
CCOPT="-O3 -qarch=auto $CCOPT"
|
|
elif test "X$psblas_cv_fc" == X"ifc" ; then
|
|
# other compilers ..
|
|
CCOPT="-O3 $CCOPT"
|
|
elif test "X$psblas_cv_fc" == X"pg" ; then
|
|
# other compilers ..
|
|
CCOPT="-fast $CCOPT"
|
|
# NOTE : PG & Sun use -fast instead -O3
|
|
elif test "X$psblas_cv_fc" == X"sun" ; then
|
|
# other compilers ..
|
|
CCOPT="-fast $CCOPT"
|
|
# NOTE : PG & Sun use -fast instead -O3
|
|
elif test "X$psblas_cv_fc" == X"nag" ; then
|
|
# using GCC in conjunction with NAG.
|
|
CCOPT="-O2"
|
|
else
|
|
CCOPT="-O2 $CCOPT"
|
|
fi
|
|
fi
|
|
#CFLAGS="${CCOPT}"
|
|
|
|
if test "X$FCOPT" == "X" ; then
|
|
if test "X$psblas_cv_fc" == "Xgcc" ; then
|
|
# note that no space should be placed around the equality symbol in assignations
|
|
# Note : 'native' is valid _only_ on GCC/x86 (32/64 bits)
|
|
FCOPT="-O3 $FCOPT"
|
|
elif test "X$psblas_cv_fc" == X"xlf" ; then
|
|
# XL compiler : consider using -qarch=auto
|
|
FCOPT="-O3 -qarch=auto -qfixed -qsuffix=f=f:cpp=F $FCOPT"
|
|
elif test "X$psblas_cv_fc" == X"ifc" ; then
|
|
# other compilers ..
|
|
FCOPT="-O3 $FCOPT"
|
|
elif test "X$psblas_cv_fc" == X"pg" ; then
|
|
# other compilers ..
|
|
FCOPT="-fast $FCOPT"
|
|
# NOTE : PG & Sun use -fast instead -O3
|
|
elif test "X$psblas_cv_fc" == X"sun" ; then
|
|
# other compilers ..
|
|
FCOPT="-fast $FCOPT"
|
|
elif test "X$psblas_cv_fc" == X"nag" ; then
|
|
# NAG compiler ..
|
|
FCOPT="-O2 "
|
|
# NOTE : PG & Sun use -fast instead -O3
|
|
else
|
|
FCOPT="-O2 $FCOPT"
|
|
fi
|
|
fi
|
|
if test "X$psblas_cv_fc" == X"nag" ; then
|
|
# Add needed options
|
|
FCOPT="$FCOPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv"
|
|
fi
|
|
#FFLAGS="${FCOPT}"
|
|
|
|
if test "X$F90COPT" == "X" ; then
|
|
if test "X$psblas_cv_fc" == "Xgcc" ; then
|
|
# note that no space should be placed around the equality symbol in assignations
|
|
# Note : 'native' is valid _only_ on GCC/x86 (32/64 bits)
|
|
F90COPT="-O3 $F90COPT"
|
|
elif test "X$psblas_cv_fc" == X"xlf" ; then
|
|
# XL compiler : consider using -qarch=auto
|
|
F90COPT="-O3 -qarch=auto -qsuffix=f=f90:cpp=F90 $F90COPT"
|
|
elif test "X$psblas_cv_fc" == X"ifc" ; then
|
|
# other compilers ..
|
|
F90COPT="-O3 $F90COPT"
|
|
elif test "X$psblas_cv_fc" == X"pg" ; then
|
|
# other compilers ..
|
|
F90COPT="-fast $F90COPT"
|
|
elif test "X$psblas_cv_fc" == X"sun" ; then
|
|
F90COPT="-fast $F90COPT"
|
|
elif test "X$psblas_cv_fc" == X"nag" ; then
|
|
# NAG compiler
|
|
F90COPT="-O2"
|
|
else
|
|
# other compilers ..
|
|
F90COPT="-O2 $F90COPT"
|
|
fi
|
|
else
|
|
echo "Found FCFLAGS $F90COPT"
|
|
#F90COPT="${FCFLAGS}"
|
|
fi
|
|
if test "X$psblas_cv_fc" == X"nag" ; then
|
|
# Add needed options
|
|
F90COPT="$F90COPT -dcfuns -f2003 -wmismatch=mpi_scatterv,mpi_alltoallv,mpi_gatherv,mpi_allgatherv"
|
|
EXTRA_OPT="-mismatch_all"
|
|
fi
|
|
|
|
#FCFLAGS="${F90COPT}"
|
|
|
|
# COPT,FCOPT, F90COPT are aliases for FFLAGS,CFLAGS,FCFLAGS .
|
|
|
|
##############################################################################
|
|
# Compilers variables selection
|
|
##############################################################################
|
|
F90=${FC}
|
|
MPF90=${MPIFC}
|
|
FC=${FC}
|
|
MPF77=${MPIFC}
|
|
CC=${CC}
|
|
MPCC=${MPICC}
|
|
|
|
|
|
|
|
##############################################################################
|
|
# Choice of our compilers, needed by Make.inc
|
|
##############################################################################
|
|
if test "X$FLINK" == "X" ; then
|
|
FLINK=${MPF77}
|
|
fi
|
|
|
|
if test "X$F90LINK" == "X" ; then
|
|
F90LINK=${MPF90}
|
|
fi
|
|
##############################################################################
|
|
##############################################################################
|
|
# Include flags
|
|
##############################################################################
|
|
AX_F90_MODULE_EXTENSION
|
|
AX_F90_MODULE_FLAG
|
|
MODEXT=".$ax_cv_f90_modext"
|
|
FMFLAG="${ax_cv_f90_modflag%%[ ]*}"
|
|
FIFLAG=-I
|
|
|
|
###############################################################################
|
|
|
|
###############################################################################
|
|
# NOTE :
|
|
# Missing stuff :
|
|
# In the case the detected fortran compiler is ifort, icc or gcc
|
|
# should be valid options.
|
|
# The same for pg (Portland Group compilers).
|
|
###############################################################################
|
|
|
|
|
|
###############################################################################
|
|
# Custom test : do we have a module or include for MPI Fortran interface?
|
|
if test x"$pac_cv_serial_mpi" == x"yes" ; then
|
|
FDEFINES="$psblas_cv_define_prepend-DSERIAL_MPI $psblas_cv_define_prepend-DMPI_MOD $FDEFINES";
|
|
else
|
|
PAC_FORTRAN_CHECK_HAVE_MPI_MOD(
|
|
[FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES"],
|
|
[FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES"]
|
|
)
|
|
fi
|
|
|
|
|
|
#
|
|
# Tests for support of various Fortran features; some of them are critical,
|
|
# some optional
|
|
#
|
|
|
|
#
|
|
# Critical features
|
|
#
|
|
PAC_FORTRAN_TEST_TR15581(
|
|
[],
|
|
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for TR15581.
|
|
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6.])]
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_EXTENDS(
|
|
[],
|
|
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for EXTENDS.
|
|
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6.])]
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_CLASS_TBP(
|
|
[],
|
|
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for CLASS and type bound procedures.
|
|
Please get a Fortran compiler that supports them, e.g. GNU Fortran 4.6.])]
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_SOURCE(
|
|
[],
|
|
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for SOURCE= allocation.
|
|
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6.])]
|
|
)
|
|
|
|
PAC_FORTRAN_HAVE_MOVE_ALLOC(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_MOVE_ALLOC $FDEFINES"],
|
|
[AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for MOVE_ALLOC.
|
|
Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.6.])]
|
|
)
|
|
|
|
#
|
|
# Optional features
|
|
#
|
|
|
|
PAC_FORTRAN_TEST_VOLATILE(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES"],
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_FLUSH(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_FLUSH_STMT $FDEFINES"],
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_ISO_FORTRAN_ENV(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_ISO_FORTRAN_ENV $FDEFINES"],
|
|
)
|
|
|
|
|
|
PAC_FORTRAN_TEST_FINAL(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_FINAL $FDEFINES"],
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_SAME_TYPE(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_SAME_TYPE_AS $FDEFINES"],
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_EXTENDS_TYPE(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_EXTENDS_TYPE_OF $FDEFINES"],
|
|
)
|
|
|
|
PAC_FORTRAN_TEST_MOLD(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_MOLD $FDEFINES"],
|
|
)
|
|
|
|
###############################################################################
|
|
# Additional pathname stuff (yes, it is redundant and confusing...)
|
|
###############################################################################
|
|
|
|
# -I
|
|
if test x"$INCLUDEPATH" != "x" ; then
|
|
FINCLUDES="$FINCLUDES $INCLUDEPATH"
|
|
CINCLUDES="$CINCLUDES $INCLUDEPATH"
|
|
fi
|
|
|
|
# -L
|
|
if test x"$LIBRARYPATH" != "x" ; then
|
|
FINCLUDES="$FINCLUDES $LIBRARYPATH"
|
|
fi
|
|
|
|
# -I
|
|
if test x"$MODULE_PATH" != "x" ; then
|
|
FINCLUDES="$FINCLUDES $MODULE_PATH"
|
|
fi
|
|
|
|
###############################################################################
|
|
# Parachute rules for ar and ranlib ... (could cause problems)
|
|
###############################################################################
|
|
|
|
if test "X$AR" == "X" ; then
|
|
AR="ar"
|
|
fi
|
|
|
|
if test "X$RANLIB" == "X" ; then
|
|
RANLIB="ranlib"
|
|
fi
|
|
|
|
# This should be portable
|
|
AR="${AR} -cur"
|
|
|
|
|
|
###############################################################################
|
|
# BLAS library presence checks
|
|
###############################################################################
|
|
|
|
# Note : The libmkl.a (Intel Math Kernel Library) library could be used, too.
|
|
# It is sufficient to specify it as -lmkl in the CLIBS or FLIBS or LIBS
|
|
# and specify its path adjusting -L/path in CFLAGS.
|
|
|
|
# Right now it is a matter of user's taste when linking custom applications.
|
|
# But PSBLAS examples could take advantage of these libraries, too.
|
|
|
|
AC_LANG([C])
|
|
PAC_BLAS([], [AC_MSG_ERROR([[Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)]])])
|
|
PAC_LAPACK(
|
|
[FDEFINES="$psblas_cv_define_prepend-DHAVE_LAPACK $FDEFINES"],
|
|
)
|
|
|
|
|
|
###############################################################################
|
|
# BLACS library presence checks
|
|
###############################################################################
|
|
#AC_LANG([C])
|
|
#if test x"$pac_cv_serial_mpi" == x"no" ; then
|
|
#save_FC="$FC";
|
|
#save_CC="$CC";
|
|
#FC="$MPIFC";
|
|
#CC="$MPICC";
|
|
#PAC_CHECK_BLACS
|
|
#FC="$save_FC";
|
|
#CC="$save_CC";
|
|
#fi
|
|
|
|
PAC_MAKE_IS_GNUMAKE
|
|
|
|
###############################################################################
|
|
# METIS, SuperLU, SuperLU_Dist UMFPack libraries presence checks
|
|
###############################################################################
|
|
|
|
# Note : also SuperLUStat,superlu_gridexit,..
|
|
# Note : SuperLU_Dist produces superlu.a by default..
|
|
# Note : THESE WERE NOT TESTED
|
|
#AC_CHECK_LIB(superlu,[superlu_malloc_dist],psblas_cv_have_superludist=yes,psblas_cv_have_superludist=no)
|
|
#AC_CHECK_LIB(superlu,[superlu_malloc],psblas_cv_have_superlu=yes,psblas_cv_have_superlu=no)
|
|
# Note : also umfdi_local_search, ...
|
|
#AC_CHECK_LIB(umf,umfpack_di_solve,psblas_cv_have_umfpack=yes,psblas_cv_have_umfpack=no,[amd])
|
|
|
|
AC_ARG_WITH(rsb, AC_HELP_STRING([--with-rsb], [Specify Recursive Sparse BLAS library linkage info (that is, the output of librsb-config --static --ldflags, or a directory where the usual bin/include/lib subdirs with a regular RSB installation resides, or nothing to make the configure script invoke librsb-config)]), [if test x"$withval" = xno; then
|
|
want_rsb_libs= ; else if test x"$withval" = xyes ; then want_rsb_libs=yes ; else want_rsb_libs="$withval" ; fi ; fi], [want_rsb_libs=""])
|
|
if test x"$want_rsb_libs" != x ; then
|
|
if test x"$want_rsb_libs" = xyes ; then
|
|
want_rsb_libs="`librsb-config --static --ldflags`"
|
|
else
|
|
if test -d "$want_rsb_libs" ; then
|
|
want_rsb_libs="`$want_rsb_libs/bin/librsb-config --static --ldflags`"
|
|
else
|
|
true;
|
|
# we assume want_rsb_libs are linkage parameters
|
|
fi
|
|
fi
|
|
FDEFINES="$FDEFINES $psblas_cv_define_prepend-DHAVE_LIBRSB"
|
|
fi
|
|
RSB_LIBS="$want_rsb_libs"
|
|
LIBS="$RSB_LIBS ${LIBS}"
|
|
dnl AC_CHECK_HEADERS([rsb.h], [ LIBS="${LIBS} $want_rsb_libs"], [])
|
|
|
|
AC_ARG_WITH(metis, AC_HELP_STRING([--with-metis=LIB], [Specify -lMETISLIBNAME or the absolute library filename.]),
|
|
[psblas_cv_metis="$withval"],
|
|
[psblas_cv_metis=''])
|
|
|
|
|
|
if test "x$psblas_cv_metis" != "x" ; then
|
|
AC_CHECK_LIB("m",METIS_PartGraphRecursive, psblas_cv_have_metis=yes; METIS_LIBS="$psblas_cv_metis", psblas_cv_have_metis=no,["$psblas_cv_metis"])
|
|
else
|
|
save_LIBS="$LIBS";
|
|
LIBS="-lm $LIBS";
|
|
AC_CHECK_LIB(metis,METIS_PartGraphRecursive,psblas_cv_have_metis=yes;METIS_LIBS="-lmetis", psblas_cv_have_metis=no)
|
|
LIBS="$save_LIBS";
|
|
fi
|
|
if test "x$psblas_cv_have_metis" == "xyes" ; then
|
|
FDEFINES="$FDEFINES $psblas_cv_define_prepend-DHAVE_METIS"
|
|
fi
|
|
|
|
|
|
|
|
# Note : We would like to detect PSBLAS, but this is complicated by the
|
|
# module symbols mangling rules, which are compiler specific !
|
|
#
|
|
# Moreover, the PSBLAS doesn't have an installer, currently.
|
|
|
|
###############################################################################
|
|
# Library target directory and archive files.
|
|
###############################################################################
|
|
|
|
LIBDIR=lib
|
|
BASELIBNAME=libpsb_base.a
|
|
PRECLIBNAME=libpsb_prec.a
|
|
METHDLIBNAME=libpsb_krylov.a
|
|
|
|
# Note: psb_util code will be compiled conditionally for METIS functionalities.. using HAVE_METIS
|
|
UTILLIBNAME=libpsb_util.a
|
|
|
|
|
|
###############################################################################
|
|
# Variable substitutions : the Make.inc.in will have these @VARIABLES@
|
|
# substituted.
|
|
|
|
AC_SUBST(FDEFINES)
|
|
AC_SUBST(CDEFINES)
|
|
AC_SUBST(BASELIBNAME)
|
|
AC_SUBST(F90)
|
|
AC_SUBST(F90COPT)
|
|
AC_SUBST(MPF90)
|
|
AC_SUBST(MPF77)
|
|
AC_SUBST(MPCC)
|
|
AC_SUBST(FCOPT)
|
|
AC_SUBST(CCOPT)
|
|
AC_SUBST(EXTRA_OPT)
|
|
AC_SUBST(FAKEMPI)
|
|
AC_SUBST(FIFLAG)
|
|
AC_SUBST(FMFLAG)
|
|
AC_SUBST(MODEXT)
|
|
AC_SUBST(MPIF77)
|
|
AC_SUBST(FLINK)
|
|
AC_SUBST(F90LINK)
|
|
AC_SUBST(LIBS)
|
|
AC_SUBST(AR)
|
|
AC_SUBST(RANLIB)
|
|
AC_SUBST(MPIFC)
|
|
AC_SUBST(MPIFCC)
|
|
|
|
AC_SUBST(INSTALL)
|
|
AC_SUBST(INSTALL_DATA)
|
|
AC_SUBST(INSTALL_DIR)
|
|
AC_SUBST(INSTALL_LIBDIR)
|
|
AC_SUBST(INSTALL_INCLUDEDIR)
|
|
AC_SUBST(INSTALL_DOCSDIR)
|
|
|
|
AC_SUBST(BLAS_LIBS)
|
|
#AC_SUBST(BLACS_LIBS)
|
|
AC_SUBST(METIS_LIBS)
|
|
AC_SUBST(LAPACK_LIBS)
|
|
|
|
AC_SUBST(CINCLUDES)
|
|
AC_SUBST(FINCLUDES)
|
|
|
|
|
|
PSBLASRULES='
|
|
PSBLDLIBS=$(LAPACK) $(BLAS) $(METIS_LIB) $(LIBS)
|
|
CDEFINES=$(PSBCDEFINES)
|
|
FDEFINES=$(PSBFDEFINES)
|
|
|
|
|
|
# These should be portable rules, arent they?
|
|
.c.o:
|
|
$(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $<
|
|
.f.o:
|
|
$(FC) $(FCOPT) $(FINCLUDES) -c $<
|
|
.f90.o:
|
|
$(F90) $(F90COPT) $(FINCLUDES) -c $<
|
|
.F.o:
|
|
$(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $<
|
|
.F90.o:
|
|
$(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<'
|
|
|
|
|
|
AC_SUBST(PSBLASRULES)
|
|
AC_SUBST(LIBDIR)
|
|
AC_SUBST(RSB_LIBS)
|
|
AC_SUBST(BASELIBNAME)
|
|
AC_SUBST(PRECLIBNAME)
|
|
AC_SUBST(METHDLIBNAME)
|
|
AC_SUBST(UTILLIBNAME)
|
|
|
|
###############################################################################
|
|
# the following files will be created by Automake
|
|
|
|
AC_CONFIG_FILES([Make.inc])
|
|
AC_OUTPUT()
|
|
#AC_OUTPUT(Make.inc Makefile)
|
|
###############################################################################
|
|
|
|
dnl Please note that brackets around variable identifiers are absolutely needed for compatibility..
|
|
AC_MSG_NOTICE([
|
|
${PACKAGE_NAME} ${psblas_cv_version} has been configured as follows:
|
|
|
|
MPF90 : ${MPF90}
|
|
MPF77 : ${MPF77}
|
|
MPCC : ${MPICC}
|
|
dnl F90LINK : ${F90LINK}
|
|
FLINK : ${FLINK}
|
|
|
|
FDEFINES : ${FDEFINES}
|
|
CDEFINES : ${CDEFINES}
|
|
dnl CFLAGS : ${CFLAGS}
|
|
dnl FFLAGS : ${FFLAGS}
|
|
dnl FCFLAGS : ${FCFLAGS}
|
|
MODEXT : ${MODEXT}
|
|
FMFLAG : ${FMFLAG}
|
|
F90COPT : ${F90COPT}
|
|
FCOPT : ${FCOPT}
|
|
CCOPT : ${CCOPT}
|
|
|
|
dnl ESSL/PESSL : ${psblas_cv_have_essl} / ${psblas_cv_have_pessl}
|
|
|
|
BLAS : ${BLAS_LIBS}
|
|
dnl BLACS : ${BLACS_LIBS}
|
|
|
|
METIS detected : ${psblas_cv_have_metis}
|
|
dnl SuperLU detected : ${psblas_cv_have_superlu}
|
|
dnl SuperLU_Dist detected : ${psblas_cv_have_superludist}
|
|
dnl UMFPack detected : ${psblas_cv_have_umfpack}
|
|
dnl F90 : ${F90}
|
|
dnl FC : ${FC}
|
|
dnl CC : ${CC}
|
|
dnl F77 : ${F77}
|
|
dnl FMFLAG : ${FMFLAG}
|
|
dnl FIFLAG : ${FIFLAG}
|
|
|
|
dnl MPICXX : ${MPICXX}
|
|
dnl MPIF77 : ${MPIF77}
|
|
dnl MPIFC : ${MPIFC}
|
|
dnl MPIF90 : ${MPIF90}
|
|
dnl MPCC : ${MPCC}
|
|
dnl AR : ${AR}
|
|
dnl RANLIB : ${RANLIB}
|
|
LIBS : ${LIBS}
|
|
dnl FIXME : CLIBS seems an useless variable..
|
|
dnl FIXME : FLIBS seems an useless variable..
|
|
dnl FIXME : LIBS seems an useless variable..
|
|
dnl CLIBS : ${CLIBS}
|
|
dnl FLIBS : ${CLIBS}
|
|
dnl LIBS : ${LIBS}
|
|
|
|
dnl Note : we should use LDLIBS sooner or later!
|
|
LDLIBS : ${LDLIBS}
|
|
|
|
LIBRARYPATH : ${LIBRARYPATH}
|
|
INCLUDEPATH : ${INCLUDEPATH}
|
|
MODULE_PATH : ${MODULE_PATH}
|
|
|
|
If you are satisfied, run 'make' to build ${PACKAGE_NAME} and its documentation; otherwise
|
|
type ./configure --help=short for a complete list of configure options specific to ${PACKAGE_NAME}.
|
|
dnl To install the program and its documentation, run 'make install' if you are root,
|
|
dnl or run 'su -c "make install"' if you are not root.
|
|
])
|
|
|
|
###############################################################################
|
|
|