From 8766c1003b1634c6d73a1f45eb4561faf34dc2de Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Fri, 29 May 2009 09:07:07 +0000 Subject: [PATCH] psblas3: Changelog LICENSE Make.inc.in README base/Makefile base/internals/psi_bld_tmphalo.f90 base/internals/psi_bld_tmpovrl.f90 base/internals/psi_crea_bnd_elem.f90 base/internals/psi_crea_index.f90 base/internals/psi_crea_ovr_elem.f90 base/internals/psi_fnd_owner.F90 base/modules/Makefile base/modules/psb_base_mod.f90 base/modules/psb_desc_type.f90 base/modules/psb_hash_mod.f90 base/modules/psb_linmap_mod.f90 base/modules/psb_linmap_type_mod.f90 base/modules/psb_penv_mod.F90 base/modules/psb_psblas_mod.f90 base/modules/psb_realloc_mod.F90 base/modules/psb_serial_mod.f90 base/modules/psb_sort_mod.f90 base/modules/psb_spmat_type.f03 base/modules/psb_spmat_type.f90 base/modules/psb_tools_mod.f90 base/modules/psi_mod.f90 base/psblas/Makefile base/psblas/psb_cspmm.f90 base/psblas/psb_dspmm.f90 base/psblas/psb_sspmm.f90 base/psblas/psb_zspmm.f90 base/serial/Makefile base/serial/aux/Makefile base/serial/psb_ccoins.f90 base/serial/psb_ccsprt.f90 base/serial/psb_cgelp.f90 base/serial/psb_cipcoo2csc.f90 base/serial/psb_cipcoo2csr.f90 base/serial/psb_cipcsr2coo.f90 base/serial/psb_cneigh.f90 base/serial/psb_ctransc.f90 base/serial/psb_ctransp.f90 base/serial/psb_dcoins.f90 base/serial/psb_dcsmm.f90 base/serial/psb_dcsprt.f90 base/serial/psb_dcsrp.f90 base/serial/psb_dgelp.f90 base/serial/psb_dipcoo2csc.f90 base/serial/psb_dipcoo2csr.f90 base/serial/psb_dipcsr2coo.f90 base/serial/psb_dneigh.f90 base/serial/psb_dtransp.f90 base/serial/psb_getrow_mod.f90 base/serial/psb_scoins.f90 base/serial/psb_scsnmi.f90 base/serial/psb_scsprt.f90 base/serial/psb_sgelp.f90 base/serial/psb_sipcoo2csc.f90 base/serial/psb_sipcoo2csr.f90 base/serial/psb_sipcsr2coo.f90 base/serial/psb_sneigh.f90 base/serial/psb_stransp.f90 base/serial/psb_update_mod.f90 base/serial/psb_zcoins.f90 base/serial/psb_zcsprt.f90 base/serial/psb_zcsrp.f90 base/serial/psb_zgelp.f90 base/serial/psb_zipcoo2csc.f90 base/serial/psb_zipcoo2csr.f90 base/serial/psb_zipcsr2coo.f90 base/serial/psb_zneigh.f90 base/serial/psb_ztransc.f90 base/serial/psb_ztransp.f90 base/tools/Makefile base/tools/psb_ccdbldext.F90 base/tools/psb_cd_lstext.f90 base/tools/psb_cd_reinit.f90 base/tools/psb_cdals.f90 base/tools/psb_cdren.f90 base/tools/psb_dcdbldext.F90 base/tools/psb_icdasb.F90 base/tools/psb_inter_desc.f90 base/tools/psb_linmap.f90 base/tools/psb_map.f90 base/tools/psb_scdbldext.F90 base/tools/psb_zcdbldext.F90 config/pac.m4 configure.ac configure krylov/psb_scgstab.F90 prec/psb_cdiagsc_bld.f90 prec/psb_cprc_aply.f90 prec/psb_cprecbld.f90 prec/psb_ddiagsc_bld.f90 prec/psb_dprc_aply.f90 prec/psb_dprecbld.f90 prec/psb_sdiagsc_bld.f90 prec/psb_sprc_aply.f90 prec/psb_sprecbld.f90 prec/psb_zdiagsc_bld.f90 prec/psb_zprc_aply.f90 prec/psb_zprecbld.f90 test/fileread/cf_sample.f90 test/fileread/df_sample.f90 test/fileread/sf_sample.f90 test/fileread/zf_sample.f90 test/pargen/ppde.f90 test/pargen/runs/ppde.inp test/pargen/spde.f90 util/psb_mat_dist_mod.f90 psblas3: first batch of changes to accommodate NAG compiler. Now the real work is about to start... --- Changelog | 376 + LICENSE | 5 +- Make.inc.in | 2 +- README | 14 +- base/Makefile | 3 +- base/internals/psi_bld_tmphalo.f90 | 2 +- base/internals/psi_bld_tmpovrl.f90 | 4 +- base/internals/psi_crea_bnd_elem.f90 | 4 +- base/internals/psi_crea_index.f90 | 10 +- base/internals/psi_crea_ovr_elem.f90 | 2 +- base/internals/psi_fnd_owner.F90 | 6 +- base/modules/Makefile | 22 +- base/modules/psb_base_mod.f90 | 7 +- base/modules/psb_desc_type.f90 | 50 +- base/modules/psb_hash_mod.f90 | 4 +- base/modules/psb_linmap_mod.f90 | 661 + base/modules/psb_linmap_type_mod.f90 | 86 + base/modules/psb_penv_mod.F90 | 42 +- base/modules/psb_psblas_mod.f90 | 17 - base/modules/psb_realloc_mod.F90 | 92 +- base/modules/psb_serial_mod.f90 | 26 +- base/modules/psb_sort_mod.f90 | 60 +- base/modules/psb_spmat_type.f03 | 100 +- base/modules/psb_spmat_type.f90 | 3144 ----- base/modules/psb_tools_mod.f90 | 21 +- base/modules/psi_mod.f90 | 97 +- base/psblas/Makefile | 1 - base/psblas/psb_cspmm.f90 | 10 +- base/psblas/psb_dspmm.f90 | 10 +- base/psblas/psb_sspmm.f90 | 10 +- base/psblas/psb_zspmm.f90 | 10 +- base/serial/Makefile | 4 +- base/serial/aux/Makefile | 2 +- base/serial/psb_ccoins.f90 | 4 +- base/serial/psb_ccsprt.f90 | 40 +- base/serial/psb_cgelp.f90 | 19 +- base/serial/psb_cipcoo2csc.f90 | 6 +- base/serial/psb_cipcoo2csr.f90 | 6 +- base/serial/psb_cipcsr2coo.f90 | 6 +- base/serial/psb_cneigh.f90 | 2 +- base/serial/psb_ctransc.f90 | 10 +- base/serial/psb_ctransp.f90 | 16 +- base/serial/psb_dcoins.f90 | 4 +- base/serial/psb_dcsmm.f90 | 8 +- base/serial/psb_dcsprt.f90 | 40 +- base/serial/psb_dcsrp.f90 | 14 +- base/serial/psb_dgelp.f90 | 20 +- base/serial/psb_dipcoo2csc.f90 | 6 +- base/serial/psb_dipcoo2csr.f90 | 6 +- base/serial/psb_dipcsr2coo.f90 | 6 +- base/serial/psb_dneigh.f90 | 2 +- base/serial/psb_dtransp.f90 | 12 +- base/serial/psb_getrow_mod.f90 | 30 +- base/serial/psb_scoins.f90 | 4 +- base/serial/psb_scsnmi.f90 | 2 +- base/serial/psb_scsprt.f90 | 40 +- base/serial/psb_sgelp.f90 | 20 +- base/serial/psb_sipcoo2csc.f90 | 6 +- base/serial/psb_sipcoo2csr.f90 | 6 +- base/serial/psb_sipcsr2coo.f90 | 8 +- base/serial/psb_sneigh.f90 | 2 +- base/serial/psb_stransp.f90 | 16 +- base/serial/psb_update_mod.f90 | 112 +- base/serial/psb_zcoins.f90 | 4 +- base/serial/psb_zcsprt.f90 | 40 +- base/serial/psb_zcsrp.f90 | 16 +- base/serial/psb_zgelp.f90 | 20 +- base/serial/psb_zipcoo2csc.f90 | 6 +- base/serial/psb_zipcoo2csr.f90 | 6 +- base/serial/psb_zipcsr2coo.f90 | 8 +- base/serial/psb_zneigh.f90 | 2 +- base/serial/psb_ztransc.f90 | 10 +- base/serial/psb_ztransp.f90 | 16 +- base/tools/Makefile | 2 +- base/tools/psb_ccdbldext.F90 | 30 +- base/tools/psb_cd_lstext.f90 | 11 +- base/tools/psb_cd_reinit.f90 | 6 +- base/tools/psb_cdals.f90 | 6 +- base/tools/psb_cdren.f90 | 86 +- base/tools/psb_dcdbldext.F90 | 40 +- base/tools/psb_icdasb.F90 | 9 +- base/tools/psb_inter_desc.f90 | 408 - base/tools/psb_linmap.f90 | 345 + base/tools/psb_map.f90 | 657 +- base/tools/psb_scdbldext.F90 | 30 +- base/tools/psb_zcdbldext.F90 | 44 +- config/pac.m4 | 12 +- configure | 17004 ++++++++++++++++++++++--- configure.ac | 185 +- krylov/psb_scgstab.F90 | 8 +- prec/psb_cdiagsc_bld.f90 | 10 +- prec/psb_cprc_aply.f90 | 2 +- prec/psb_cprecbld.f90 | 2 +- prec/psb_ddiagsc_bld.f90 | 10 +- prec/psb_dprc_aply.f90 | 2 +- prec/psb_dprecbld.f90 | 2 +- prec/psb_sdiagsc_bld.f90 | 10 +- prec/psb_sprc_aply.f90 | 2 +- prec/psb_sprecbld.f90 | 2 +- prec/psb_zdiagsc_bld.f90 | 10 +- prec/psb_zprc_aply.f90 | 2 +- prec/psb_zprecbld.f90 | 2 +- test/fileread/cf_sample.f90 | 26 +- test/fileread/df_sample.f90 | 12 +- test/fileread/sf_sample.f90 | 12 +- test/fileread/zf_sample.f90 | 26 +- test/pargen/ppde.f90 | 2 +- test/pargen/runs/ppde.inp | 2 - test/pargen/spde.f90 | 2 +- util/psb_mat_dist_mod.f90 | 1970 +-- 110 files changed, 18013 insertions(+), 8483 deletions(-) create mode 100644 base/modules/psb_linmap_mod.f90 create mode 100644 base/modules/psb_linmap_type_mod.f90 delete mode 100644 base/modules/psb_spmat_type.f90 delete mode 100644 base/tools/psb_inter_desc.f90 create mode 100644 base/tools/psb_linmap.f90 diff --git a/Changelog b/Changelog index 41e0fbc3..382dbe54 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,381 @@ +2008/09/18: Defined psb_sizeof to be integer(8). Added support + into psb_sum, psb_amx and other reductions for long int + scalars. + +2008/09/16: Implemented new scheme for index conversion. + Changed cdall with an option to suppress global checks. + +2008/09/02: Improved psi_fnd_owner performace. + +2008/09/01: Better timings in the pargen test cases. + +2008/08/28: Changed CDALL in case of VL to handle overlapped indices. + +2008/07/28: New sorting/reordering modules. + +2008/07/24: Addded HTML version of user's guide. + +2008/07/22: Fixed I/O for Harwell-Boeing and Matrix Market examples + +2008/05/27: Merged single precision branch. + +2008/04/28: Fixed trimming space in sparse matrix conversion. + Fixed performance issue in cdins. + +2008/03/25: Fix performance bug in psi_idx_ins_cnv. Changed names of + some internal components of preconditioner data structure. + +======= +2009/01/27: Renamed psb_transfer into psb_move_alloc. +2009/01/08: Require GNU Fortran 4.3 or later. +2008/11/04: Repackaged and streamlined linear maps. + +2008/10/16: Fixed internal structure of psb_inter_desc. + +2008/09/23: Fix borderline cases where one process does not own any + indices from the global space. + +2008/09/18: Defined psb_sizeof to be integer(8). Added support + into psb_sum, psb_amx and other reductions for long int + scalars. + +2008/09/16: Implemented new scheme for index conversion. + Changed cdall with an option to suppress global checks. + +2008/09/02: Improved psi_fnd_owner performace. + +2008/09/01: Better timings in the pargen test cases. + +2008/08/28: Changed CDALL in case of VL to handle overlapped indices. + +2008/07/28: New sorting/reordering modules. + +2008/07/24: Addded HTML version of user's guide. + +2008/07/22: Fixed I/O for Harwell-Boeing and Matrix Market examples + +2008/05/27: Merged single precision branch. + +2008/04/28: Fixed trimming space in sparse matrix conversion. + Fixed performance issue in cdins. + +2008/03/25: Fix performance bug in psi_idx_ins_cnv. Changed names of + some internal components of preconditioner data structure. + +>>>>>>> .merge-dx.r3587 +2008/03/27: Merged the experimental branch for implementing the AVL tree + data structure in Fortran instead of relying on C and passing + functions around to perform comparisons. There seems to be + some performance advantage, although not very large. + +2008/03/25: Merged in changes from the 2.2-maint branch re: error + messages, performance bug in psi_idx_ins_cnv. + +2008/02/26: New psb_linmap_init, psb_linmap_ins, psb_linmap_asb for a + general linear operator mapping among index spaces. + +2008/02/18: Branched off for Version 2.2 + +2008/02/08: Merged changes from intermesh branch: we now have an + inter_desc_type object. Currently we only implement the + version needed for aggregation algorithms in the algebraic + multigrid preconditioners, but we'll define more general + (linear) maps soon enough. + +2008/01/25: Various changes to variables controlling conditional + compilation on the Fortran side: removed NETLIB_BLACS, now + HAVE_METIS HAVE_ESSL_BLACS HAVE_KSENDID. + Files impacted: Make.inc.XXX, base/modules/psb_penv_mod, + util/psb_metispart_mod + + +2008/01/18: Centralized convergence checks. Still partial for RGMRES. + +2008/01/14: Merged changes for handling of transpose vs. overlap. + +2008/01/10: Changed name of GMRESR into RGMRES for consistency. + +2007/12/21: Merged in debug infrastructure, internal and html docs. + +2007/11/14: Fix INTENT(IN) on X vector in preconditioner routines. + +2007/10/15: Repackaged the sorting routines in a submodule of their + own, adding some heap management and heapsort utilities for the + benefit of the multilevel preconditioners. + +2007/09/28: Moved gelp and csrp to serial. Changed interface to + sphalo: the new one makes more sense. + Updated documentation. + +2007/09/14: Second round of serial changes: merged into trunk, fixed + JAD regeneration and srch_upd now works. + +2007/09/10: First round of serial changes: implemented serial + psb_spcnv unifying multiple functionalities. + +2007/09/04: Implemented RGMRES for complex data. + +2007/06/04: Fixed implementation of fctint and coins: assume size + arrays caused troubles on some compilers. Documentation of + set_large_threshold. + +2007/05/22: Defined psb_precinit. + +2007/05/15: Defined psb_sizeof. + +2007/05/15: Merged in various fixes coming from tests on SP5 and + HP-Itanium. + +2007/04/08: Changed the implementation of psb_sp_getrow & friends. + +2007/03/27: Merged in changes for enabling compilation on SUN. + +2007/02/22: Fixed various misalignments between real and complex. + Defined new psb_sp_clip routines. + Fixed psb_rwextd. + Changed the USE statements, minimizing size of modules and + maximizing consistency checks. + +2007/02/01: Merged serial version: we provide a minimal fake mpi to + allow compiling and running without mpi and blacs. Only + tested with gnu42 so far. + +2007/01/23: Defined new field ext_index in desc_type, and + fixed long standing inconsistency in usage of overlap for + AS preconditioners. Modified halo to accept selector for + halo_index vs. ext_index. + +2007/01/11: Migrated repository to SVN. + +2007/01/11: MLD2P4 has been moved to the new org. Now tackling the + test dirs. + +2007/01/09: First try at reorganizing directories. Subdir MLD2P4 still + to be fixed. Documentation still to be updated. + +2006/12/11: Documented options in glob_to_loc. + +2006/12/06: Fixed raw aggregation. + +2006/12/05: Taken out extra interfaces; inserted use modules with ONLY + clauses where appropriate. + +2006/11/30: Fixed a bug in raw aggregation. Note: raw aggregation + gives different results from smoothed with omega=0.0, + because in the latter we have explicitly stored zero + coefficients that would be absent in the first, thus + generating different ILU factorizations. + +2006/11/28: Merged the mods for descriptors of large index spaces to + avoid having the GLOB_TO_LOC array. Took the chance to + reorganize the descriptor build routines and define some + access functions for descriptor features and entries, so + as not to use the descriptor components directly. Tested + with AS, 2- and 3- level Post smoothers. + +2006/11/09: The allocatable version works, but under gcc42 there is a + compiler bug when using -fbounds-check. + +2006/11/08: Merged the allocatable version; hope everything works! + +2006/11/08: Branched version psblas2-2-0-maint, and defined tag + 2.0.2.6 + +2006/11/02: Done in the allocatable branch: repackaging of cdasb and + friends, taking out AVL trees where they were not + absolutely needed, and new dcsrmv routine. + +2006/11/01: Merged changes in the handling of data exchange. + +2006/10/03: Merged in the multilevel preconditioner stuff. This is + still experimental, especially the interfaces are not + stable yet. + +2006/10/03: Declared version 2.0.2.5 for reference purposes. + +2006/10/03: Fixed a bunch of minor bugs, incuding the sorting routines + imsr and imsrx. Added a default call to blacs_exit inside + psb_exit fixed a bad termination in test/pargen/ppde90.f90 + +2006/09/02: Declared version 2.0.2, after having fixed a lot of + details in the environment routines. + +2006/07/25: Defined a new psb_wtime function. Modified precset to + have a non-optional INFO dummy argument. + +2006/07/06: Fixed bug in swaptran. Added psb_krylov generic interface. + +2006/07/04: Ooops, the GetRow mod in SMMP is a performance hit. + Need to investigate further. + +2006/06/21: Bug fix in hb_read when dealing with symmetric matrices. + +2006/06/20: Rewritten symbmm and numbmm from SMMP to be intependent of + CSR storage by using GetRow. Still need to test for + performance. + +2006/06/16: Defined GetRow. This way we may close the mat objects. + Next we will rewrite SMMP to only make use of GetRow, + not to rely on CSR storage format. + +2006/05/29: Added BLACS-like routines for data communication, + broadcasts, reductions, send/receive. + +2006/05/25: Added environment management routines. + +2006/05/03: Bug fixes, plus some change in the internals for SPINS, + preparing hooks for insertion with local numbering. + +2006/04/24: Minor changes to the interface of dense tools routines, + trying to achieve a uniform look & feel. + Rewritten documentation; it is now reasonable, though not + perfect, except for the preconditioner routines. + We can now declare RC3. + +2006/04/21: A bunch of fixes related to various matrix initialization + problems that were revealed while testing on SP5. + +2006/04/18: Changed interface to spasb and csdp: better handling of + regeneration. To be tested further for sophisticated uses. + +2006/03/31: We declare RC2 now. Improved I/O routines in test/Fileread. + +2006/03/24: We have a complex version now, working (not necessarily bug free). + +2006/03/15: Started move to complex version. + +2006/03/01: Complete restructure of PREC section. + +2006/02/01: New naming scheme. + +2006/01/01: New multilevel preconditioning wih smoothed aggregation. + +2005/09 : Now enabled UMFPACK complete factorization as basis for AS. + +2005/05/04: Now enabled SuperLU complete factorization as basis for AS. + +2005/04/29: First version with decoupled 2-level. + +2005/04/06: Started work on decoupling the preconditioner aggregation + for 2-level from the main factorization. + +2005/03/30: First version of new DSC/SP allocate/insert/assembly + routines. +2005/03/17: First version of RGMRES. To be refined. + +2005/03/08: dSwapTran aligned with dSwapData. Taken out SwapOverlap. + also moved onto iSwapX. + +2005/03/07: dSwapData rewritten to achieve: 1. better performance; + 2. more flexible functionality. It is now possible to + avoid SwapOvrlap entirely, relying on just SwapData. + SwapTran is still alive, since it reads the descriptors in + "transpose" mode. Also, added work areas to preconditioner + routine, to avoid excessive allocation in the halo/overlap + exchange. + +2005/03/04: Had to put in a workaround for a gfortran bug: + tolower/toupper cannot be functions. + +2005/02/09: Explicit storage choice for the smoother. This seems + to be changing a little bit the actual preconditioner. + To be evaluated further. + +2005/02/08: Renamed F90_PSPREC to PSB_PRCAPLY and Preconditioner to + PSB_PRCBLD. Changed the way PRCAPLY decides what to do. + Still needs a PSB_PRCSET to be called before PRCBLD. + +2005/01/28: Started moving functionalities to a SERIAL F90 layer. Also + defined a new COMM layer, to enable implementing SPMM + directly in F90. + +2005/01/20: Finally taken out a direct call to the F77 DCSDP from + SPASB. + +2005/01/18: After much work, we now have 2-level Additive Schwarz + prototype implemented and working. We now start a major + code cleanup that will take some time. Mainly we want to + move a lot of the serial F77 functionality into a new F95 + serial layer, to simplify the parallel F95 code. + +2004/11/25: Following the introduction of Additive Shwarz and + variants, we have now renamed DECOMP_ and friends as + DESC_; this makes things more readable. Sooner or later + we're going to merge this into mainline, but this version + is still very much in a state of flux. + +2004/07/18: For use with gfortran we need to declare the pointer + components with NULL() initialization. This rules out + VAST and PGI. + +2004/07/15: First development version with gfortran from the current + snapshot of gcc 3.5.0. + It is now possible in PSI_dSwapData to opt for + SEND|RECEIVE|SYNC data exchange; plan is to extend to all + data exchange functions, plus making it available as an + option from the F90 level. + +2004/07/06: Merged in a lot of stuff coming mainly from the ASM + development; full merge will have to wait a little more. + Among other things: + use of psimod + new choice parms for overlap + new data exchange for swapdata, to be extended. + multicolumn CSMM. + use psrealloc + new format for marking a matrix as suitable for update. + + +2003/12/09: Changed DSALLOC and DSASB to make sure whenever a dense + matrix is allocated it is also zeroed out. + +2003/10/13: Added call to BLACS_SET in the solvers to ensure global + heterogeneous coherence in the combine operations. + +2003/09/30: Added LOC_TO_GLOB and GLOB_TO_LOC support routines. + +2003/09/30: Changed interface for smart update capabilities: choose + with optional parameters in ASB routines. + +2003/09/16: IFC 7.0 had a strange behaviour in the test programs: + sometimes the declaration of PARTS dummy argument with an + INTERFACE would not work, requiring an EXTERNAL + declaration. The proper INTERFACE works now with 7.1. + +2003/03/10: Halo data exchange in F90_PSHALO can now be applied to + integer data; create appropriate support routines. + +2002/12/05: Initial version of Fileread sample programs. + +2002/11/19: Fixes for JAD preconditioner. + +2002/11/19: Methods for patterns: create a descriptor without a + matrix. + +2001/11/16: Reviewed the interfaces: in the tools section we really + need the POINTER attribute for dense vectors, but not in + the computational routines; taking it out allows more + flexibility. + +2001/09/16: Smart update capabilities. + +2001/03/16: Renumbering routines. + +2001/01/14: Added extensions to compute multiple DOTs and AMAXs at once; + +======= Changelog. A lot less detailed than usual, at least for past history. +2009/01/27: Renamed psb_transfer into psb_move_alloc. +2009/01/08: Require GNU Fortran 4.3 or later. +2008/11/04: Repackaged and streamlined linear maps. + +2008/10/16: Fixed internal structure of psb_inter_desc. + +2008/09/23: Fix borderline cases where one process does not own any + indices from the global space. + 2008/09/18: Defined psb_sizeof to be integer(8). Added support into psb_sum, psb_amx and other reductions for long int scalars. @@ -328,3 +703,4 @@ history. 2001/01/14: Added extensions to compute multiple DOTs and AMAXs at once; +>>>>>>> .merge-dx.r3592 diff --git a/LICENSE b/LICENSE index c7be4271..e01ff668 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ - Parallel Sparse BLAS v2.3 - (C) Copyright 2006/2007/2008 + Parallel Sparse BLAS v 3.0 + (C) Copyright 2006/2007/2008/2009/2010 + Salvatore Filippone University of Rome Tor Vergata Alfredo Buttari University of Rome Tor Vergata diff --git a/Make.inc.in b/Make.inc.in index 4af7c56e..80d634d2 100755 --- a/Make.inc.in +++ b/Make.inc.in @@ -1,4 +1,3 @@ - # This is Make.inc file generated automatically by the PSBLAS configure script. # It should be ready to use, included by Makefile. # If it gives problems, consider editing it. @@ -21,6 +20,7 @@ FCOPT=@FCOPT@ CCOPT=@CCOPT@ FMFLAG=@FMFLAG@ FIFLAG=@FIFLAG@ +EXTRA_OPT=@EXTRA_OPT@ # These three should be always set! MPF90=@MPF90@ diff --git a/README b/README index 44fe36c0..a465a4e0 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This directory contains the PSBLAS library, version 2.3 +This directory contains the PSBLAS library, version 3.0 Version 1.0 of the library was described in: @@ -16,16 +16,6 @@ compiling with other compiler/operating systems please let us know. LINUX: -On Linux we work with the GCC compiler; note that we require version -4.2.0 (or later) as it contains support for ALLOCATABLEs (as -specified in TR15581). - -For the Intel compilers, we recommend version 9.1 or later. - -IBM SP: -The library has been tested on an IBM SP5, with XLC and XLF -version 10.1 and the IBM ESSL/PESSL versions of the BLAS and the -BLACS. UTILITIES @@ -149,4 +139,4 @@ Dario Pascucci - +k \ No newline at end of file diff --git a/base/Makefile b/base/Makefile index 26c33de2..64f03ca0 100644 --- a/base/Makefile +++ b/base/Makefile @@ -5,7 +5,7 @@ LIBDIR=../lib LIBNAME=$(BASELIBNAME) LIBMOD=psb_base_mod$(.mod) lib: - (cd modules; make lib LIBNAME=$(BASELIBNAME)) + (cd modules; make lib LIBNAME=$(BASELIBNAME) F90=$(MPF90) F90COPT="$(F90COPT) $(MPI_OPT)") (cd comm; make lib LIBNAME=$(BASELIBNAME)) (cd internals; make lib LIBNAME=$(BASELIBNAME)) (cd tools; make lib LIBNAME=$(BASELIBNAME)) @@ -24,4 +24,3 @@ clean: veryclean: clean /bin/rm -f $(HERE)/$(LIBNAME) $(LIBMOD) *$(.mod) - \ No newline at end of file diff --git a/base/internals/psi_bld_tmphalo.f90 b/base/internals/psi_bld_tmphalo.f90 index f998bcda..fff63a3d 100644 --- a/base/internals/psi_bld_tmphalo.f90 +++ b/base/internals/psi_bld_tmphalo.f90 @@ -133,7 +133,7 @@ subroutine psi_bld_tmphalo(desc,info) lhalo = j nhalo = (lhalo-1)/3 - call psb_transfer(tmphl,desc%halo_index,info) + call psb_move_alloc(tmphl,desc%halo_index,info) call psb_erractionrestore(err_act) return diff --git a/base/internals/psi_bld_tmpovrl.f90 b/base/internals/psi_bld_tmpovrl.f90 index 75da29d3..189932a3 100644 --- a/base/internals/psi_bld_tmpovrl.f90 +++ b/base/internals/psi_bld_tmpovrl.f90 @@ -136,8 +136,8 @@ subroutine psi_bld_tmpovrl(iv,desc,info) enddo l_ov_ix = l_ov_ix + 1 ov_idx(l_ov_ix) = -1 - call psb_transfer(ov_idx,desc%ovrlap_index,info) - if (info == 0) call psb_transfer(ov_el,desc%ovrlap_elem,info) + call psb_move_alloc(ov_idx,desc%ovrlap_index,info) + if (info == 0) call psb_move_alloc(ov_el,desc%ovrlap_elem,info) call psb_erractionrestore(err_act) diff --git a/base/internals/psi_crea_bnd_elem.f90 b/base/internals/psi_crea_bnd_elem.f90 index fbf386ee..8ef767e2 100644 --- a/base/internals/psi_crea_bnd_elem.f90 +++ b/base/internals/psi_crea_bnd_elem.f90 @@ -52,7 +52,7 @@ subroutine psi_crea_bnd_elem(bndel,desc_a,info) implicit none integer, allocatable :: bndel(:) - type(psb_desc_type) :: desc_a + type(psb_desc_type), intent(in) :: desc_a integer, intent(out) :: info integer, allocatable :: work(:) @@ -86,7 +86,7 @@ subroutine psi_crea_bnd_elem(bndel,desc_a,info) call psb_msort_unique(work(1:i),j) if (.true.) then - if (j>0) then + if (j>=0) then call psb_realloc(j,bndel,info) if (info /= 0) then call psb_errpush(4010,name,a_err='Allocate') diff --git a/base/internals/psi_crea_index.f90 b/base/internals/psi_crea_index.f90 index f9246c74..a13c966b 100644 --- a/base/internals/psi_crea_index.f90 +++ b/base/internals/psi_crea_index.f90 @@ -61,11 +61,11 @@ subroutine psi_crea_index(desc_a,index_in,index_out,glob_idx,nxch,nsnd,nrcv,info use psi_mod, psb_protect_name => psi_crea_index implicit none - type(psb_desc_type), intent(in) :: desc_a - integer, intent(out) :: info,nxch,nsnd,nrcv - integer, intent(in) :: index_in(:) - integer, allocatable :: index_out(:) - logical :: glob_idx + type(psb_desc_type), intent(in) :: desc_a + integer, intent(out) :: info,nxch,nsnd,nrcv + integer, intent(in) :: index_in(:) + integer, allocatable, intent(inout) :: index_out(:) + logical :: glob_idx ! ....local scalars... integer :: ictxt, me, np, mode, err_act, dl_lda diff --git a/base/internals/psi_crea_ovr_elem.f90 b/base/internals/psi_crea_ovr_elem.f90 index 93ac4ec5..fa22fc00 100644 --- a/base/internals/psi_crea_ovr_elem.f90 +++ b/base/internals/psi_crea_ovr_elem.f90 @@ -134,7 +134,7 @@ subroutine psi_crea_ovr_elem(me,desc_overlap,ovr_elem,info) nel = ix call psb_realloc(nel,3,telem,info) - call psb_transfer(telem,ovr_elem,info) + call psb_move_alloc(telem,ovr_elem,info) call psb_erractionrestore(err_act) return diff --git a/base/internals/psi_fnd_owner.F90 b/base/internals/psi_fnd_owner.F90 index 835c8442..6086e6f7 100644 --- a/base/internals/psi_fnd_owner.F90 +++ b/base/internals/psi_fnd_owner.F90 @@ -74,7 +74,7 @@ subroutine psi_fnd_owner(nv,idx,iprc,desc,info) integer :: i,n_row,n_col,err_act,ih,icomm,hsize,ip,isz,k,j,& & last_ih, last_j integer :: ictxt,np,me - logical, parameter :: gettime=.true. + logical, parameter :: gettime=.false. real(psb_dpk_) :: t0, t1, t2, t3, t4, tamx, tidx character(len=20) :: name @@ -237,7 +237,7 @@ subroutine psi_fnd_owner(nv,idx,iprc,desc,info) do if (j > size(answers,1)) then ! Last resort attempt. - call ibsrch(j,ih,size(answers,1),answers(:,1)) + j = psb_ibsrch(ih,size(answers,1),answers(:,1)) if (j == -1) then write(0,*) me,'psi_fnd_owner: searching for ',ih, & & 'not found : ',size(answers,1),':',answers(:,1) @@ -249,7 +249,7 @@ subroutine psi_fnd_owner(nv,idx,iprc,desc,info) if (answers(j,1) == ih) exit if (answers(j,1) > ih) then k = j - call ibsrch(j,ih,k,answers(1:k,1)) + j = psb_ibsrch(ih,k,answers(1:k,1)) if (j == -1) then write(0,*) me,'psi_fnd_owner: searching for ',ih, & & 'not found : ',size(answers,1),':',answers(:,1) diff --git a/base/modules/Makefile b/base/modules/Makefile index 0c73a3a2..4c6b89b3 100644 --- a/base/modules/Makefile +++ b/base/modules/Makefile @@ -1,22 +1,21 @@ include ../../Make.inc MODULES = psb_realloc_mod.o psb_string_mod.o psb_spmat_type.o \ - psb_desc_type.o psb_sort_mod.o\ + psb_desc_type.o psb_sort_mod.o psb_penv_mod.o \ psb_serial_mod.o psb_tools_mod.o psb_blacs_mod.o \ - psb_error_mod.o psb_const_mod.o psb_inter_desc_type.o \ + psb_error_mod.o psb_const_mod.o psb_linmap_type_mod.o \ psb_comm_mod.o psb_psblas_mod.o psi_serial_mod.o psi_mod.o \ - psb_check_mod.o psb_gps_mod.o psb_inter_desc_mod.o psb_hash_mod.o + psb_check_mod.o psb_gps_mod.o psb_linmap_mod.o psb_hash_mod.o LIBMOD=psb_base_mod$(.mod) -MPFOBJS=psb_penv_mod.o OBJS = error.o psb_base_mod.o $(EXTRA_COBJS) cutil.o LIBDIR=.. CINCLUDES=-I. FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). $(FIFLAG). -lib: mpfobjs $(MODULES) $(OBJS) $(LIBMOD) +lib: blacsmod $(MODULES) $(OBJS) $(LIBMOD) $(AR) $(LIBDIR)/$(LIBNAME) $(MODULES) $(OBJS) $(MPFOBJS) $(RANLIB) $(LIBDIR)/$(LIBNAME) /bin/cp -p $(LIBMOD) $(LIBDIR) @@ -28,22 +27,23 @@ psb_error_mod.o: psb_const_mod.o psb_penv_mod.o: psb_const_mod.o psb_error_mod.o psb_realloc_mod.o psb_blacs_mod.o psb_blacs_mod.o: psb_const_mod.o psi_serial_mod.o: psb_const_mod.o psb_realloc_mod.o -psi_mod.o: psb_penv_mod.o psb_error_mod.o psb_desc_type.o psb_const_mod.o psi_serial_mod.o +psi_mod.o: psb_penv_mod.o psb_error_mod.o psb_desc_type.o psb_const_mod.o psi_serial_mod.o psb_serial_mod.o psb_desc_type.o: psb_const_mod.o psb_error_mod.o psb_penv_mod.o psb_realloc_mod.o psb_hash_mod.o -psb_inter_desc_type.o: psb_desc_type.o psb_spmat_type.o psb_error_mod.o psb_serial_mod.o psb_comm_mod.o -psb_inter_desc_mod.o: psb_inter_desc_type.o +psb_linmap_mod.o: psb_linmap_type_mod.o +psb_linmap_type_mod.o: psb_desc_type.o psb_spmat_type.o psb_error_mod.o psb_serial_mod.o psb_comm_mod.o psb_check_mod.o: psb_desc_type.o psb_serial_mod.o: psb_spmat_type.o psb_string_mod.o psb_sort_mod.o psi_serial_mod.o psb_sort_mod.o: psb_error_mod.o psb_realloc_mod.o psb_const_mod.o psb_methd_mod.o: psb_serial_mod.o psb_desc_type.o psb_prec_type.o -psb_tools_mod.o: psb_spmat_type.o psb_desc_type.o psi_mod.o psb_gps_mod.o psb_inter_desc_mod.o +psb_tools_mod.o: psb_spmat_type.o psb_desc_type.o psi_mod.o psb_gps_mod.o psb_linmap_mod.o psb_gps_mod.o: psb_realloc_mod.o psb_hash_mod.o: psb_const_mod.o psb_realloc_mod.o psb_base_mod.o: $(MODULES) -mpfobjs: - (make $(MPFOBJS) F90="$(MPF90)" FC="$(MPF90)" FCOPT="$(F90COPT)") +blacsmod: + (make psb_blacs_mod.o F90COPT="$(F90COPT) $(EXTRA_OPT)") + clean: /bin/rm -f $(MODULES) $(OBJS) $(MPFOBJS) *$(.mod) diff --git a/base/modules/psb_base_mod.f90 b/base/modules/psb_base_mod.f90 index 5d7d8c36..c6e58a8a 100644 --- a/base/modules/psb_base_mod.f90 +++ b/base/modules/psb_base_mod.f90 @@ -35,15 +35,10 @@ module psb_base_mod use psb_penv_mod use psb_check_mod use psb_descriptor_type - use psb_inter_desc_mod + use psb_linmap_mod use psb_serial_mod use psb_comm_mod use psb_psblas_mod use psb_gps_mod use psb_tools_mod end module psb_base_mod - - - - - diff --git a/base/modules/psb_desc_type.f90 b/base/modules/psb_desc_type.f90 index dd9c7481..1d1b37fd 100644 --- a/base/modules/psb_desc_type.f90 +++ b/base/modules/psb_desc_type.f90 @@ -359,7 +359,7 @@ module psb_descriptor_type end interface - interface psb_transfer + interface psb_move_alloc module procedure psb_cdtransfer, psb_idxmap_transfer end interface @@ -978,7 +978,7 @@ contains !locals integer :: np,me,ictxt, err_act - integer :: debug_level, debug_unit + integer :: debug_level, debug_unit character(len=20) :: name if (psb_get_errstatus()/=0) return @@ -988,36 +988,29 @@ contains debug_unit = psb_get_debug_unit() debug_level = psb_get_debug_level() - ictxt=psb_cd_get_context(desc_in) + ! Should not require ictxt to be present: this + ! function might be called even when desc_in is + ! empty. - call psb_info(ictxt, me, np) - if (debug_level >= psb_debug_outer_)& - & write(debug_unit,*) me,' ',trim(name),': start.' - if (np == -1) then - info = 2010 - call psb_errpush(info,name) - goto 9999 - endif - - call psb_transfer( desc_in%matrix_data , desc_out%matrix_data , info) + call psb_move_alloc( desc_in%matrix_data , desc_out%matrix_data , info) if (info == 0) & - & call psb_transfer( desc_in%halo_index , desc_out%halo_index , info) + & call psb_move_alloc( desc_in%halo_index , desc_out%halo_index , info) if (info == 0) & - & call psb_transfer( desc_in%bnd_elem , desc_out%bnd_elem , info) + & call psb_move_alloc( desc_in%bnd_elem , desc_out%bnd_elem , info) if (info == 0) & - & call psb_transfer( desc_in%ovrlap_elem , desc_out%ovrlap_elem , info) + & call psb_move_alloc( desc_in%ovrlap_elem , desc_out%ovrlap_elem , info) if (info == 0) & - & call psb_transfer( desc_in%ovrlap_index, desc_out%ovrlap_index , info) + & call psb_move_alloc( desc_in%ovrlap_index, desc_out%ovrlap_index , info) if (info == 0) & - & call psb_transfer( desc_in%ovr_mst_idx , desc_out%ovr_mst_idx , info) + & call psb_move_alloc( desc_in%ovr_mst_idx , desc_out%ovr_mst_idx , info) if (info == 0) & - & call psb_transfer( desc_in%ext_index , desc_out%ext_index , info) + & call psb_move_alloc( desc_in%ext_index , desc_out%ext_index , info) if (info == 0) & - & call psb_transfer( desc_in%lprm , desc_out%lprm , info) + & call psb_move_alloc( desc_in%lprm , desc_out%lprm , info) if (info == 0) & - & call psb_transfer( desc_in%idx_space , desc_out%idx_space , info) + & call psb_move_alloc( desc_in%idx_space , desc_out%idx_space , info) if (info == 0) & - & call psb_transfer(desc_in%idxmap, desc_out%idxmap,info) + & call psb_move_alloc(desc_in%idxmap, desc_out%idxmap,info) if (info /= 0) then info = 4010 call psb_errpush(info,name) @@ -1035,7 +1028,7 @@ contains if (err_act == psb_act_ret_) then return else - call psb_error(ictxt) + call psb_error() end if return @@ -1072,15 +1065,15 @@ contains map_out%hashvmask = map_in%hashvmask if (info == 0) & - & call psb_transfer( map_in%loc_to_glob , map_out%loc_to_glob , info) + & call psb_move_alloc( map_in%loc_to_glob , map_out%loc_to_glob , info) if (info == 0) & - & call psb_transfer( map_in%glob_to_loc , map_out%glob_to_loc , info) + & call psb_move_alloc( map_in%glob_to_loc , map_out%glob_to_loc , info) if (info == 0) & - & call psb_transfer( map_in%hashv , map_out%hashv , info) + & call psb_move_alloc( map_in%hashv , map_out%hashv , info) if (info == 0) & - & call psb_transfer( map_in%glb_lc , map_out%glb_lc , info) + & call psb_move_alloc( map_in%glb_lc , map_out%glb_lc , info) if (info == 0) & - & call psb_transfer( map_in%hash , map_out%hash , info) + & call psb_move_alloc( map_in%hash , map_out%hash , info) if (info /= 0) then info = 4010 @@ -1270,6 +1263,7 @@ contains end subroutine psb_map_l2g_v2 + Subroutine psb_cd_get_recv_idx(tmp,desc,data,info,toglob) use psb_error_mod diff --git a/base/modules/psb_hash_mod.f90 b/base/modules/psb_hash_mod.f90 index da8a1efb..edc56acc 100644 --- a/base/modules/psb_hash_mod.f90 +++ b/base/modules/psb_hash_mod.f90 @@ -72,7 +72,7 @@ module psb_hash_mod end interface - interface psb_transfer + interface psb_move_alloc module procedure HashTransfer end interface @@ -149,7 +149,7 @@ contains hashout%nk = hashin%nk hashout%nsrch = hashin%nsrch hashout%nacc = hashin%nacc - call psb_transfer(hashin%table, hashout%table,info) + call psb_move_alloc(hashin%table, hashout%table,info) end subroutine HashTransfer diff --git a/base/modules/psb_linmap_mod.f90 b/base/modules/psb_linmap_mod.f90 new file mode 100644 index 00000000..5389b3f6 --- /dev/null +++ b/base/modules/psb_linmap_mod.f90 @@ -0,0 +1,661 @@ +!!$ +!!$ Parallel Sparse BLAS version 2.2 +!!$ (C) Copyright 2006/2007/2008 +!!$ Salvatore Filippone University of Rome Tor Vergata +!!$ Alfredo Buttari University of Rome Tor Vergata +!!$ +!!$ Redistribution and use in source and binary forms, with or without +!!$ modification, are permitted provided that the following conditions +!!$ are met: +!!$ 1. Redistributions of source code must retain the above copyright +!!$ notice, this list of conditions and the following disclaimer. +!!$ 2. Redistributions in binary form must reproduce the above copyright +!!$ notice, this list of conditions, and the following disclaimer in the +!!$ documentation and/or other materials provided with the distribution. +!!$ 3. The name of the PSBLAS group or the names of its contributors may +!!$ not be used to endorse or promote products derived from this +!!$ software without specific written permission. +!!$ +!!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +!!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +!!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS +!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +!!$ POSSIBILITY OF SUCH DAMAGE. +!!$ +!!$ +! +! +! package: psb_linmap_mod +! Defines facilities for mapping between vectors belonging +! to different spaces. +! +module psb_linmap_mod + + use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type, & + & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_, psb_sizeof + use psb_descriptor_type + use psb_linmap_type_mod + + + interface psb_map_X2Y + subroutine psb_s_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_slinmap_type), intent(in) :: map + real(psb_spk_), intent(in) :: alpha,beta + real(psb_spk_), intent(inout) :: x(:) + real(psb_spk_), intent(out) :: y(:) + integer, intent(out) :: info + real(psb_spk_), optional :: work(:) + end subroutine psb_s_map_X2Y + subroutine psb_d_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_dlinmap_type), intent(in) :: map + real(psb_dpk_), intent(in) :: alpha,beta + real(psb_dpk_), intent(inout) :: x(:) + real(psb_dpk_), intent(out) :: y(:) + integer, intent(out) :: info + real(psb_dpk_), optional :: work(:) + end subroutine psb_d_map_X2Y + subroutine psb_c_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_clinmap_type), intent(in) :: map + complex(psb_spk_), intent(in) :: alpha,beta + complex(psb_spk_), intent(inout) :: x(:) + complex(psb_spk_), intent(out) :: y(:) + integer, intent(out) :: info + complex(psb_spk_), optional :: work(:) + end subroutine psb_c_map_X2Y + subroutine psb_z_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_zlinmap_type), intent(in) :: map + complex(psb_dpk_), intent(in) :: alpha,beta + complex(psb_dpk_), intent(inout) :: x(:) + complex(psb_dpk_), intent(out) :: y(:) + integer, intent(out) :: info + complex(psb_dpk_), optional :: work(:) + end subroutine psb_z_map_X2Y + end interface + + interface psb_map_Y2X + subroutine psb_s_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_slinmap_type), intent(in) :: map + real(psb_spk_), intent(in) :: alpha,beta + real(psb_spk_), intent(inout) :: x(:) + real(psb_spk_), intent(out) :: y(:) + integer, intent(out) :: info + real(psb_spk_), optional :: work(:) + end subroutine psb_s_map_Y2X + subroutine psb_d_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_dlinmap_type), intent(in) :: map + real(psb_dpk_), intent(in) :: alpha,beta + real(psb_dpk_), intent(inout) :: x(:) + real(psb_dpk_), intent(out) :: y(:) + integer, intent(out) :: info + real(psb_dpk_), optional :: work(:) + end subroutine psb_d_map_Y2X + subroutine psb_c_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_clinmap_type), intent(in) :: map + complex(psb_spk_), intent(in) :: alpha,beta + complex(psb_spk_), intent(inout) :: x(:) + complex(psb_spk_), intent(out) :: y(:) + integer, intent(out) :: info + complex(psb_spk_), optional :: work(:) + end subroutine psb_c_map_Y2X + subroutine psb_z_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_linmap_type_mod + implicit none + type(psb_zlinmap_type), intent(in) :: map + complex(psb_dpk_), intent(in) :: alpha,beta + complex(psb_dpk_), intent(inout) :: x(:) + complex(psb_dpk_), intent(out) :: y(:) + integer, intent(out) :: info + complex(psb_dpk_), optional :: work(:) + end subroutine psb_z_map_Y2X + end interface + + + interface psb_is_ok_map + module procedure psb_is_ok_slinmap, psb_is_ok_dlinmap, & + & psb_is_ok_clinmap, psb_is_ok_zlinmap + end interface + + interface psb_get_map_kind + module procedure psb_get_smap_kind, psb_get_dmap_kind, & + & psb_get_cmap_kind, psb_get_zmap_kind + end interface + + interface psb_set_map_kind + module procedure psb_set_smap_kind, psb_set_dmap_kind, & + & psb_set_cmap_kind, psb_set_zmap_kind + end interface + + interface psb_is_asb_map + module procedure psb_is_asb_slinmap, psb_is_asb_dlinmap, & + & psb_is_asb_clinmap, psb_is_asb_zlinmap + end interface + + interface psb_linmap_sub + module procedure psb_s_linmap_sub, psb_d_linmap_sub, & + & psb_c_linmap_sub, psb_z_linmap_sub + end interface + + interface psb_move_alloc + module procedure psb_slinmap_transfer, psb_dlinmap_transfer, & + & psb_clinmap_transfer, psb_zlinmap_transfer + end interface + + interface psb_linmap + function psb_s_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_slinmap_type) :: psb_s_linmap + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_sspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + end function psb_s_linmap + function psb_d_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_dlinmap_type) :: psb_d_linmap + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_dspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + end function psb_d_linmap + function psb_c_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_clinmap_type) :: psb_c_linmap + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_cspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + end function psb_c_linmap + function psb_z_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_zlinmap_type) :: psb_z_linmap + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_zspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + end function psb_z_linmap + end interface + + interface psb_sizeof + module procedure psb_slinmap_sizeof, psb_dlinmap_sizeof, & + & psb_clinmap_sizeof, psb_zlinmap_sizeof + end interface + +contains + + function psb_get_smap_kind(map) + implicit none + type(psb_slinmap_type), intent(in) :: map + Integer :: psb_get_smap_kind + if (allocated(map%itd_data)) then + psb_get_smap_kind = map%itd_data(psb_map_kind_) + else + psb_get_smap_kind = -1 + end if + end function psb_get_smap_kind + + function psb_get_dmap_kind(map) + implicit none + type(psb_dlinmap_type), intent(in) :: map + Integer :: psb_get_dmap_kind + if (allocated(map%itd_data)) then + psb_get_dmap_kind = map%itd_data(psb_map_kind_) + else + psb_get_dmap_kind = -1 + end if + end function psb_get_dmap_kind + function psb_get_cmap_kind(map) + implicit none + type(psb_clinmap_type), intent(in) :: map + Integer :: psb_get_cmap_kind + if (allocated(map%itd_data)) then + psb_get_cmap_kind = map%itd_data(psb_map_kind_) + else + psb_get_cmap_kind = -1 + end if + end function psb_get_cmap_kind + function psb_get_zmap_kind(map) + implicit none + type(psb_zlinmap_type), intent(in) :: map + Integer :: psb_get_zmap_kind + if (allocated(map%itd_data)) then + psb_get_zmap_kind = map%itd_data(psb_map_kind_) + else + psb_get_zmap_kind = -1 + end if + end function psb_get_zmap_kind + + subroutine psb_set_smap_kind(map_kind,map) + implicit none + integer, intent(in) :: map_kind + type(psb_slinmap_type), intent(inout) :: map + + map%itd_data(psb_map_kind_) = map_kind + + end subroutine psb_set_smap_kind + subroutine psb_set_dmap_kind(map_kind,map) + implicit none + integer, intent(in) :: map_kind + type(psb_dlinmap_type), intent(inout) :: map + + map%itd_data(psb_map_kind_) = map_kind + + end subroutine psb_set_dmap_kind + subroutine psb_set_cmap_kind(map_kind,map) + implicit none + integer, intent(in) :: map_kind + type(psb_clinmap_type), intent(inout) :: map + + map%itd_data(psb_map_kind_) = map_kind + + end subroutine psb_set_cmap_kind + subroutine psb_set_zmap_kind(map_kind,map) + implicit none + integer, intent(in) :: map_kind + type(psb_zlinmap_type), intent(inout) :: map + + map%itd_data(psb_map_kind_) = map_kind + + end subroutine psb_set_zmap_kind + + + function psb_is_asb_slinmap(map) result(this) + implicit none + type(psb_slinmap_type), intent(in) :: map + logical :: this + + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_asb_desc(map%p_desc_X).and.psb_is_asb_desc(map%p_desc_Y) + + case(psb_map_gen_linear_) + + this = & + & psb_is_asb_desc(map%desc_X).and.psb_is_asb_desc(map%desc_Y) + + end select + + end function psb_is_asb_slinmap + + function psb_is_asb_dlinmap(map) result(this) + implicit none + type(psb_dlinmap_type), intent(in) :: map + logical :: this + + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_asb_desc(map%p_desc_X).and.psb_is_asb_desc(map%p_desc_Y) + + case(psb_map_gen_linear_) + + this = & + & psb_is_asb_desc(map%desc_X).and.psb_is_asb_desc(map%desc_Y) + + end select + + end function psb_is_asb_dlinmap + + function psb_is_asb_clinmap(map) result(this) + implicit none + type(psb_clinmap_type), intent(in) :: map + logical :: this + + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_asb_desc(map%p_desc_X).and.psb_is_asb_desc(map%p_desc_Y) + + case(psb_map_gen_linear_) + + this = & + & psb_is_asb_desc(map%desc_X).and.psb_is_asb_desc(map%desc_Y) + + end select + + end function psb_is_asb_clinmap + + function psb_is_asb_zlinmap(map) result(this) + implicit none + type(psb_zlinmap_type), intent(in) :: map + logical :: this + + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_asb_desc(map%p_desc_X).and.psb_is_asb_desc(map%p_desc_Y) + + case(psb_map_gen_linear_) + + this = & + & psb_is_asb_desc(map%desc_X).and.psb_is_asb_desc(map%desc_Y) + + end select + + end function psb_is_asb_zlinmap + + function psb_is_ok_slinmap(map) result(this) + implicit none + type(psb_slinmap_type), intent(in) :: map + logical :: this + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_ok_desc(map%p_desc_X).and.psb_is_ok_desc(map%p_desc_Y) + case(psb_map_gen_linear_) + this = & + & psb_is_ok_desc(map%desc_X).and.psb_is_ok_desc(map%desc_Y) + end select + + end function psb_is_ok_slinmap + + function psb_is_ok_dlinmap(map) result(this) + implicit none + type(psb_dlinmap_type), intent(in) :: map + logical :: this + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_ok_desc(map%p_desc_X).and.psb_is_ok_desc(map%p_desc_Y) + case(psb_map_gen_linear_) + this = & + & psb_is_ok_desc(map%desc_X).and.psb_is_ok_desc(map%desc_Y) + end select + + end function psb_is_ok_dlinmap + + function psb_is_ok_clinmap(map) result(this) + implicit none + type(psb_clinmap_type), intent(in) :: map + logical :: this + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_ok_desc(map%p_desc_X).and.psb_is_ok_desc(map%p_desc_Y) + case(psb_map_gen_linear_) + this = & + & psb_is_ok_desc(map%desc_X).and.psb_is_ok_desc(map%desc_Y) + end select + + end function psb_is_ok_clinmap + + function psb_is_ok_zlinmap(map) result(this) + implicit none + type(psb_zlinmap_type), intent(in) :: map + logical :: this + this = .false. + if (.not.allocated(map%itd_data)) return + select case(psb_get_map_kind(map)) + case (psb_map_aggr_) + if (.not.associated(map%p_desc_X)) return + if (.not.associated(map%p_desc_Y)) return + this = & + & psb_is_ok_desc(map%p_desc_X).and.psb_is_ok_desc(map%p_desc_Y) + case(psb_map_gen_linear_) + this = & + & psb_is_ok_desc(map%desc_X).and.psb_is_ok_desc(map%desc_Y) + end select + + end function psb_is_ok_zlinmap + + + function psb_slinmap_sizeof(map) result(val) + implicit none + type(psb_slinmap_type), intent(in) :: map + integer(psb_long_int_k_) :: val + + val = 0 + if (allocated(map%itd_data)) & + & val = val + psb_sizeof_int*size(map%itd_data) + if (allocated(map%iaggr)) & + & val = val + psb_sizeof_int*size(map%iaggr) + if (allocated(map%naggr)) & + & val = val + psb_sizeof_int*size(map%naggr) + val = val + psb_sizeof(map%desc_X) + val = val + psb_sizeof(map%desc_Y) + val = val + psb_sizeof(map%map_X2Y) + val = val + psb_sizeof(map%map_Y2X) + + end function psb_slinmap_sizeof + + function psb_dlinmap_sizeof(map) result(val) + implicit none + type(psb_dlinmap_type), intent(in) :: map + integer(psb_long_int_k_) :: val + + val = 0 + if (allocated(map%itd_data)) & + & val = val + psb_sizeof_int*size(map%itd_data) + if (allocated(map%iaggr)) & + & val = val + psb_sizeof_int*size(map%iaggr) + if (allocated(map%naggr)) & + & val = val + psb_sizeof_int*size(map%naggr) + val = val + psb_sizeof(map%desc_X) + val = val + psb_sizeof(map%desc_Y) + val = val + psb_sizeof(map%map_X2Y) + val = val + psb_sizeof(map%map_Y2X) + + end function psb_dlinmap_sizeof + + function psb_clinmap_sizeof(map) result(val) + implicit none + type(psb_clinmap_type), intent(in) :: map + integer(psb_long_int_k_) :: val + + val = 0 + if (allocated(map%itd_data)) & + & val = val + psb_sizeof_int*size(map%itd_data) + if (allocated(map%iaggr)) & + & val = val + psb_sizeof_int*size(map%iaggr) + if (allocated(map%naggr)) & + & val = val + psb_sizeof_int*size(map%naggr) + val = val + psb_sizeof(map%desc_X) + val = val + psb_sizeof(map%desc_Y) + val = val + psb_sizeof(map%map_X2Y) + val = val + psb_sizeof(map%map_Y2X) + + end function psb_clinmap_sizeof + + function psb_zlinmap_sizeof(map) result(val) + implicit none + type(psb_zlinmap_type), intent(in) :: map + integer(psb_long_int_k_) :: val + + val = 0 + if (allocated(map%itd_data)) & + & val = val + psb_sizeof_int*size(map%itd_data) + if (allocated(map%iaggr)) & + & val = val + psb_sizeof_int*size(map%iaggr) + if (allocated(map%naggr)) & + & val = val + psb_sizeof_int*size(map%naggr) + val = val + psb_sizeof(map%desc_X) + val = val + psb_sizeof(map%desc_Y) + val = val + psb_sizeof(map%map_X2Y) + val = val + psb_sizeof(map%map_Y2X) + + end function psb_zlinmap_sizeof + + + subroutine psb_s_linmap_sub(out_map,map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_slinmap_type), intent(out) :: out_map + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_sspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + out_map = psb_linmap(map_kind,desc_X,desc_Y,map_X2Y,map_Y2X,iaggr,naggr) + end subroutine psb_s_linmap_sub + + subroutine psb_d_linmap_sub(out_map,map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_dlinmap_type), intent(out) :: out_map + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_dspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + out_map = psb_linmap(map_kind,desc_X,desc_Y,map_X2Y,map_Y2X,iaggr,naggr) + end subroutine psb_d_linmap_sub + + subroutine psb_c_linmap_sub(out_map,map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_clinmap_type), intent(out) :: out_map + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_cspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + out_map = psb_linmap(map_kind,desc_X,desc_Y,map_X2Y,map_Y2X,iaggr,naggr) + end subroutine psb_c_linmap_sub + + subroutine psb_z_linmap_sub(out_map,map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) + use psb_linmap_type_mod + implicit none + type(psb_zlinmap_type), intent(out) :: out_map + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_zspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + out_map = psb_linmap(map_kind,desc_X,desc_Y,map_X2Y,map_Y2X,iaggr,naggr) + end subroutine psb_z_linmap_sub + + + subroutine psb_slinmap_transfer(mapin,mapout,info) + use psb_spmat_type + use psb_descriptor_type + implicit none + type(psb_slinmap_type) :: mapin,mapout + integer, intent(out) :: info + + call psb_move_alloc(mapin%itd_data,mapout%itd_data,info) + call psb_move_alloc(mapin%iaggr,mapout%iaggr,info) + call psb_move_alloc(mapin%naggr,mapout%naggr,info) + mapout%p_desc_X => mapin%p_desc_X + mapin%p_desc_X => null() + mapout%p_desc_Y => mapin%p_desc_Y + mapin%p_desc_Y => null() + call psb_move_alloc(mapin%desc_X,mapout%desc_X,info) + call psb_move_alloc(mapin%desc_Y,mapout%desc_Y,info) + call psb_move_alloc(mapin%map_X2Y,mapout%map_X2Y,info) + call psb_move_alloc(mapin%map_Y2X,mapout%map_Y2X,info) + + end subroutine psb_slinmap_transfer + + subroutine psb_dlinmap_transfer(mapin,mapout,info) + use psb_spmat_type + use psb_descriptor_type + implicit none + type(psb_dlinmap_type) :: mapin,mapout + integer, intent(out) :: info + + call psb_move_alloc(mapin%itd_data,mapout%itd_data,info) + call psb_move_alloc(mapin%iaggr,mapout%iaggr,info) + call psb_move_alloc(mapin%naggr,mapout%naggr,info) + mapout%p_desc_X => mapin%p_desc_X + mapin%p_desc_X => null() + mapout%p_desc_Y => mapin%p_desc_Y + mapin%p_desc_Y => null() + call psb_move_alloc(mapin%desc_X,mapout%desc_X,info) + call psb_move_alloc(mapin%desc_Y,mapout%desc_Y,info) + call psb_move_alloc(mapin%map_X2Y,mapout%map_X2Y,info) + call psb_move_alloc(mapin%map_Y2X,mapout%map_Y2X,info) + + end subroutine psb_dlinmap_transfer + + subroutine psb_clinmap_transfer(mapin,mapout,info) + use psb_spmat_type + use psb_descriptor_type + implicit none + type(psb_clinmap_type) :: mapin,mapout + integer, intent(out) :: info + + call psb_move_alloc(mapin%itd_data,mapout%itd_data,info) + call psb_move_alloc(mapin%iaggr,mapout%iaggr,info) + call psb_move_alloc(mapin%naggr,mapout%naggr,info) + mapout%p_desc_X => mapin%p_desc_X + mapin%p_desc_X => null() + mapout%p_desc_Y => mapin%p_desc_Y + mapin%p_desc_Y => null() + call psb_move_alloc(mapin%desc_X,mapout%desc_X,info) + call psb_move_alloc(mapin%desc_Y,mapout%desc_Y,info) + call psb_move_alloc(mapin%map_X2Y,mapout%map_X2Y,info) + call psb_move_alloc(mapin%map_Y2X,mapout%map_Y2X,info) + + end subroutine psb_clinmap_transfer + + subroutine psb_zlinmap_transfer(mapin,mapout,info) + use psb_spmat_type + use psb_descriptor_type + implicit none + type(psb_zlinmap_type) :: mapin,mapout + integer, intent(out) :: info + + call psb_move_alloc(mapin%itd_data,mapout%itd_data,info) + call psb_move_alloc(mapin%iaggr,mapout%iaggr,info) + call psb_move_alloc(mapin%naggr,mapout%naggr,info) + mapout%p_desc_X => mapin%p_desc_X + mapin%p_desc_X => null() + mapout%p_desc_Y => mapin%p_desc_Y + mapin%p_desc_Y => null() + call psb_move_alloc(mapin%desc_X,mapout%desc_X,info) + call psb_move_alloc(mapin%desc_Y,mapout%desc_Y,info) + call psb_move_alloc(mapin%map_X2Y,mapout%map_X2Y,info) + call psb_move_alloc(mapin%map_Y2X,mapout%map_Y2X,info) + + end subroutine psb_zlinmap_transfer + + +end module psb_linmap_mod diff --git a/base/modules/psb_linmap_type_mod.f90 b/base/modules/psb_linmap_type_mod.f90 new file mode 100644 index 00000000..5f2c3c69 --- /dev/null +++ b/base/modules/psb_linmap_type_mod.f90 @@ -0,0 +1,86 @@ +!!$ +!!$ Parallel Sparse BLAS version 2.2 +!!$ (C) Copyright 2006/2007/2008 +!!$ Salvatore Filippone University of Rome Tor Vergata +!!$ Alfredo Buttari University of Rome Tor Vergata +!!$ +!!$ Redistribution and use in source and binary forms, with or without +!!$ modification, are permitted provided that the following conditions +!!$ are met: +!!$ 1. Redistributions of source code must retain the above copyright +!!$ notice, this list of conditions and the following disclaimer. +!!$ 2. Redistributions in binary form must reproduce the above copyright +!!$ notice, this list of conditions, and the following disclaimer in the +!!$ documentation and/or other materials provided with the distribution. +!!$ 3. The name of the PSBLAS group or the names of its contributors may +!!$ not be used to endorse or promote products derived from this +!!$ software without specific written permission. +!!$ +!!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +!!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +!!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS +!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +!!$ POSSIBILITY OF SUCH DAMAGE. +!!$ +!!$ +! +! +! package: psb_linmap_type_mod +! Defines data types for mapping between vectors belonging +! to different spaces. +! +module psb_linmap_type_mod + use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type, & + & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_, psb_sizeof + + use psb_descriptor_type, only: psb_desc_type + + + ! Inter-descriptor mapping data structures. + integer, parameter :: psb_map_kind_ = 1 + integer, parameter :: psb_map_data_ = 2 + integer, parameter :: psb_map_integer_ = 1 + integer, parameter :: psb_map_single_ = 2 + integer, parameter :: psb_map_double_ = 3 + integer, parameter :: psb_map_complex_ = 4 + integer, parameter :: psb_map_double_complex_ = 5 + + integer, parameter :: psb_itd_data_size_=20 + + + type psb_slinmap_type + integer, allocatable :: itd_data(:), iaggr(:), naggr(:) + type(psb_desc_type), pointer :: p_desc_X=>null(), p_desc_Y=>null() + type(psb_desc_type) :: desc_X, desc_Y + type(psb_sspmat_type) :: map_X2Y, map_Y2X + end type psb_slinmap_type + + type psb_dlinmap_type + integer, allocatable :: itd_data(:), iaggr(:), naggr(:) + type(psb_desc_type), pointer :: p_desc_X=>null(), p_desc_Y=>null() + type(psb_desc_type) :: desc_X, desc_Y + type(psb_dspmat_type) :: map_X2Y, map_Y2X + end type psb_dlinmap_type + + type psb_clinmap_type + integer, allocatable :: itd_data(:), iaggr(:), naggr(:) + type(psb_desc_type), pointer :: p_desc_X=>null(), p_desc_Y=>null() + type(psb_desc_type) :: desc_X, desc_Y + type(psb_cspmat_type) :: map_X2Y, map_Y2X + end type psb_clinmap_type + + type psb_zlinmap_type + integer, allocatable :: itd_data(:), iaggr(:), naggr(:) + type(psb_desc_type), pointer :: p_desc_X=>null(), p_desc_Y=>null() + type(psb_desc_type) :: desc_X, desc_Y + type(psb_zspmat_type) :: map_X2Y, map_Y2X + end type psb_zlinmap_type + +end module psb_linmap_type_mod + diff --git a/base/modules/psb_penv_mod.F90 b/base/modules/psb_penv_mod.F90 index ac7ff9a1..380f848d 100644 --- a/base/modules/psb_penv_mod.F90 +++ b/base/modules/psb_penv_mod.F90 @@ -134,7 +134,7 @@ module psb_penv_mod interface psb_sum module procedure psb_isums, psb_isumv, psb_isumm,& - & psb_i8sums, & + & psb_i8sums, psb_i8sumv,& & psb_ssums, psb_ssumv, psb_ssumm,& & psb_csums, psb_csumv, psb_csumm,& & psb_dsums, psb_dsumv, psb_dsumm,& @@ -2331,6 +2331,46 @@ contains + subroutine psb_i8sumv(ictxt,dat,root) +#ifdef MPI_MOD + use mpi +#endif +#ifdef MPI_H + include 'mpif.h' +#endif + integer, intent(in) :: ictxt + integer(psb_long_int_k_), intent(inout) :: dat(:) + integer, intent(in), optional :: root + integer :: mpi_int8_type, info, icomm + + integer :: root_, iam, np, isz + integer(psb_long_int_k_), allocatable :: dat_(:) + + if (present(root)) then + root_ = root + else + root_ = -1 + endif + call psb_info(ictxt,iam,np) + call psb_get_mpicomm(ictxt,icomm) + mpi_int8_type = mpi_integer8 + isz = size(dat) + allocate(dat_(isz),stat=info) + if (root_ == -1) then + dat_=dat + call mpi_allreduce(dat_,dat,isz,mpi_int8_type,mpi_sum,icomm,info) + else + if (iam==root_) then + dat_=dat + call mpi_reduce(dat_,dat,isz,mpi_int8_type,mpi_sum,root_,icomm,info) + else + call mpi_reduce(dat,dat_,isz,mpi_int8_type,mpi_sum,root_,icomm,info) + end if + endif + + end subroutine psb_i8sumv + + subroutine psb_i8sums(ictxt,dat,root) #ifdef MPI_MOD use mpi diff --git a/base/modules/psb_psblas_mod.f90 b/base/modules/psb_psblas_mod.f90 index 35c3ef8c..23ad814f 100644 --- a/base/modules/psb_psblas_mod.f90 +++ b/base/modules/psb_psblas_mod.f90 @@ -94,23 +94,6 @@ module psb_psblas_mod end function psb_zdot end interface - interface psb_gexdot - function psb_sxdotv(x, y, desc_a,info) - use psb_descriptor_type - real(psb_dpk_) :: psb_sxdotv - real(psb_spk_), intent(in) :: x(:), y(:) - type(psb_desc_type), intent(in) :: desc_a - integer, intent(out) :: info - end function psb_sxdotv - function psb_sxdot(x, y, desc_a, info, jx, jy) - use psb_descriptor_type - real(psb_dpk_) :: psb_sxdot - real(psb_spk_), intent(in) :: x(:,:), y(:,:) - type(psb_desc_type), intent(in) :: desc_a - integer, optional, intent(in) :: jx, jy - integer, intent(out) :: info - end function psb_sxdot - end interface interface psb_gedots subroutine psb_sdotvs(res,x, y, desc_a, info) diff --git a/base/modules/psb_realloc_mod.F90 b/base/modules/psb_realloc_mod.F90 index 63e2569e..3162d0da 100644 --- a/base/modules/psb_realloc_mod.F90 +++ b/base/modules/psb_realloc_mod.F90 @@ -55,17 +55,17 @@ module psb_realloc_mod module procedure psb_dreallocatec2 end Interface - interface psb_transfer - module procedure psb_stransfer1d - module procedure psb_stransfer2d - module procedure psb_dtransfer1d - module procedure psb_dtransfer2d - module procedure psb_itransfer1d - module procedure psb_itransfer2d - module procedure psb_ctransfer1d - module procedure psb_ctransfer2d - module procedure psb_ztransfer1d - module procedure psb_ztransfer2d + interface psb_move_alloc + module procedure psb_smove_alloc1d + module procedure psb_smove_alloc2d + module procedure psb_dmove_alloc1d + module procedure psb_dmove_alloc2d + module procedure psb_imove_alloc1d + module procedure psb_imove_alloc2d + module procedure psb_cmove_alloc1d + module procedure psb_cmove_alloc2d + module procedure psb_zmove_alloc1d + module procedure psb_zmove_alloc2d end interface Interface psb_safe_ab_cpy @@ -1593,9 +1593,9 @@ Contains goto 9999 end if tmp(lb_:lb_-1+min(len,dim))=rrax(lbi:lbi-1+min(len,dim)) - if (debug) write(0,*) 'reallocate : calling transfer ' - call psb_transfer(tmp,rrax,info) - if (debug) write(0,*) 'reallocate : from transfer ',info + if (debug) write(0,*) 'reallocate : calling move_alloc ' + call psb_move_alloc(tmp,rrax,info) + if (debug) write(0,*) 'reallocate : from move_alloc ',info end if else dim = 0 @@ -1672,7 +1672,7 @@ Contains goto 9999 end if tmp(lb_:lb_-1+min(len,dim))=rrax(lbi:lbi-1+min(len,dim)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) End If else dim = 0 @@ -1746,7 +1746,7 @@ Contains goto 9999 end if tmp(lb_:lb_-1+min(len,dim))=rrax(lbi:lbi-1+min(len,dim)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) End If else dim = 0 @@ -1820,7 +1820,7 @@ Contains goto 9999 end if tmp(lb_:lb_-1+min(len,dim))=rrax(lbi:lbi-1+min(len,dim)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) end if else dim = 0 @@ -1893,7 +1893,7 @@ Contains goto 9999 end if tmp(lb_:lb_-1+min(len,dim))=rrax(lbi:lbi-1+min(len,dim)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) end if else dim = 0 @@ -1984,7 +1984,7 @@ Contains end if tmp(lb1_:lb1_-1+min(len1,dim),lb2_:lb2_-1+min(len2,dim2)) = & & rrax(lbi1:lbi1-1+min(len1,dim),lbi2:lbi2-1+min(len2,dim2)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) End If else dim = 0 @@ -2076,7 +2076,7 @@ Contains end if tmp(lb1_:lb1_-1+min(len1,dim),lb2_:lb2_-1+min(len2,dim2)) = & & rrax(lbi1:lbi1-1+min(len1,dim),lbi2:lbi2-1+min(len2,dim2)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) End If else dim = 0 @@ -2168,7 +2168,7 @@ Contains end if tmp(lb1_:lb1_-1+min(len1,dim),lb2_:lb2_-1+min(len2,dim2)) = & & rrax(lbi1:lbi1-1+min(len1,dim),lbi2:lbi2-1+min(len2,dim2)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) End If else dim = 0 @@ -2260,7 +2260,7 @@ Contains end if tmp(lb1_:lb1_-1+min(len1,dim),lb2_:lb2_-1+min(len2,dim2)) = & & rrax(lbi1:lbi1-1+min(len1,dim),lbi2:lbi2-1+min(len2,dim2)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) End If else dim = 0 @@ -2351,7 +2351,7 @@ Contains end if tmp(lb1_:lb1_-1+min(len1,dim),lb2_:lb2_-1+min(len2,dim2)) = & & rrax(lbi1:lbi1-1+min(len1,dim),lbi2:lbi2-1+min(len2,dim2)) - call psb_transfer(tmp,rrax,info) + call psb_move_alloc(tmp,rrax,info) End If else dim = 0 @@ -2625,7 +2625,7 @@ Contains return End Subroutine psb_dreallocate2i1z - Subroutine psb_stransfer1d(vin,vout,info) + Subroutine psb_smove_alloc1d(vin,vout,info) use psb_error_mod real(psb_spk_), allocatable, intent(inout) :: vin(:),vout(:) integer, intent(out) :: info @@ -2637,7 +2637,7 @@ Contains if (allocated(vin)) then call move_alloc(vin,vout) else if (allocated(vout)) then -!!$ write(0,*) 'transfer: Clearing output' +!!$ write(0,*) 'move_alloc: Clearing output' deallocate(vout) end if @@ -2651,9 +2651,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_stransfer1d + end Subroutine psb_smove_alloc1d - Subroutine psb_stransfer2d(vin,vout,info) + Subroutine psb_smove_alloc2d(vin,vout,info) use psb_error_mod real(psb_spk_), allocatable, intent(inout) :: vin(:,:),vout(:,:) integer, intent(out) :: info @@ -2678,9 +2678,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_stransfer2d + end Subroutine psb_smove_alloc2d - Subroutine psb_dtransfer1d(vin,vout,info) + Subroutine psb_dmove_alloc1d(vin,vout,info) use psb_error_mod real(psb_dpk_), allocatable, intent(inout) :: vin(:),vout(:) integer, intent(out) :: info @@ -2692,7 +2692,7 @@ Contains if (allocated(vin)) then call move_alloc(vin,vout) else if (allocated(vout)) then -!!$ write(0,*) 'transfer: Clearing output' +!!$ write(0,*) 'move_alloc: Clearing output' deallocate(vout) end if @@ -2706,9 +2706,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_dtransfer1d + end Subroutine psb_dmove_alloc1d - Subroutine psb_dtransfer2d(vin,vout,info) + Subroutine psb_dmove_alloc2d(vin,vout,info) use psb_error_mod real(psb_dpk_), allocatable, intent(inout) :: vin(:,:),vout(:,:) integer, intent(out) :: info @@ -2733,9 +2733,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_dtransfer2d + end Subroutine psb_dmove_alloc2d - Subroutine psb_ctransfer1d(vin,vout,info) + Subroutine psb_cmove_alloc1d(vin,vout,info) use psb_error_mod complex(psb_spk_), allocatable, intent(inout) :: vin(:),vout(:) integer, intent(out) :: info @@ -2758,9 +2758,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_ctransfer1d + end Subroutine psb_cmove_alloc1d - Subroutine psb_ctransfer2d(vin,vout,info) + Subroutine psb_cmove_alloc2d(vin,vout,info) use psb_error_mod complex(psb_spk_), allocatable, intent(inout) :: vin(:,:),vout(:,:) integer, intent(out) :: info @@ -2785,9 +2785,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_ctransfer2d + end Subroutine psb_cmove_alloc2d - Subroutine psb_ztransfer1d(vin,vout,info) + Subroutine psb_zmove_alloc1d(vin,vout,info) use psb_error_mod complex(psb_dpk_), allocatable, intent(inout) :: vin(:),vout(:) integer, intent(out) :: info @@ -2810,9 +2810,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_ztransfer1d + end Subroutine psb_zmove_alloc1d - Subroutine psb_ztransfer2d(vin,vout,info) + Subroutine psb_zmove_alloc2d(vin,vout,info) use psb_error_mod complex(psb_dpk_), allocatable, intent(inout) :: vin(:,:),vout(:,:) integer, intent(out) :: info @@ -2837,9 +2837,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_ztransfer2d + end Subroutine psb_zmove_alloc2d - Subroutine psb_itransfer1d(vin,vout,info) + Subroutine psb_imove_alloc1d(vin,vout,info) use psb_error_mod integer, allocatable, intent(inout) :: vin(:),vout(:) integer, intent(out) :: info @@ -2850,7 +2850,7 @@ Contains if (allocated(vin)) then call move_alloc(vin,vout) else if (allocated(vout)) then -!!$ write(0,*) 'transfer: Clearing output' +!!$ write(0,*) 'move_alloc: Clearing output' deallocate(vout) end if #else @@ -2863,9 +2863,9 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_itransfer1d + end Subroutine psb_imove_alloc1d - Subroutine psb_itransfer2d(vin,vout,info) + Subroutine psb_imove_alloc2d(vin,vout,info) use psb_error_mod integer, allocatable, intent(inout) :: vin(:,:),vout(:,:) integer, intent(out) :: info @@ -2890,6 +2890,6 @@ Contains vout = vin deallocate(vin,stat=info) #endif - end Subroutine psb_itransfer2d + end Subroutine psb_imove_alloc2d end module psb_realloc_mod diff --git a/base/modules/psb_serial_mod.f90 b/base/modules/psb_serial_mod.f90 index 85dc5fd9..25a488f6 100644 --- a/base/modules/psb_serial_mod.f90 +++ b/base/modules/psb_serial_mod.f90 @@ -591,56 +591,60 @@ module psb_serial_mod subroutine psb_stransp(a,b,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_sspmat_type) :: a,b + type(psb_sspmat_type), intent(in) :: a + type(psb_sspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt end subroutine psb_stransp subroutine psb_dtransp(a,b,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_dspmat_type) :: a,b + type(psb_dspmat_type), intent(in) :: a + type(psb_dspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt end subroutine psb_dtransp subroutine psb_ctransp(a,b,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_cspmat_type) :: a,b + type(psb_cspmat_type), intent(in) :: a + type(psb_cspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt end subroutine psb_ctransp subroutine psb_ztransp(a,b,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_zspmat_type) :: a,b + type(psb_zspmat_type), intent(in) :: a + type(psb_zspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt end subroutine psb_ztransp subroutine psb_stransp1(a,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_sspmat_type) :: a + type(psb_sspmat_type), intent(inout) :: a integer, optional :: c character(len=*), optional :: fmt end subroutine psb_stransp1 subroutine psb_dtransp1(a,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_dspmat_type) :: a + type(psb_dspmat_type), intent(inout) :: a integer, optional :: c character(len=*), optional :: fmt end subroutine psb_dtransp1 subroutine psb_ctransp1(a,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_cspmat_type) :: a + type(psb_cspmat_type), intent(inout) :: a integer, optional :: c character(len=*), optional :: fmt end subroutine psb_ctransp1 subroutine psb_ztransp1(a,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_zspmat_type) :: a + type(psb_zspmat_type), intent(inout) :: a integer, optional :: c character(len=*), optional :: fmt end subroutine psb_ztransp1 @@ -650,14 +654,16 @@ module psb_serial_mod subroutine psb_ctransc(a,b,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_cspmat_type) :: a,b + type(psb_cspmat_type), intent(in) :: a + type(psb_cspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt end subroutine psb_ctransc subroutine psb_ztransc(a,b,c,fmt) use psb_spmat_type, only : psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_zspmat_type) :: a,b + type(psb_zspmat_type), intent(in) :: a + type(psb_zspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt end subroutine psb_ztransc diff --git a/base/modules/psb_sort_mod.f90 b/base/modules/psb_sort_mod.f90 index 1dcad451..a1673ed6 100644 --- a/base/modules/psb_sort_mod.f90 +++ b/base/modules/psb_sort_mod.f90 @@ -138,8 +138,66 @@ module psb_sort_mod module procedure psb_issrch end interface + interface psb_isaperm + module procedure psb_isaperm + end interface + contains + logical function psb_isaperm(n,eip) + implicit none + + integer, intent(in) :: n + integer, intent(in) :: eip(n) + integer, allocatable :: ip(:) + integer i,j,m, info + + + psb_isaperm = .true. + if (n <= 0) return + allocate(ip(n), stat=info) + if (info /= 0) return + ! + ! sanity check first + ! + do i=1, n + ip(i) = eip(i) + if ((ip(i) < 1).or.(ip(i) > n)) then + write(0,*) 'Out of bounds in isaperm' ,ip(i), n + psb_isaperm = .false. + return + endif + enddo + + ! + ! now work through the cycles, by marking each successive item as negative. + ! no cycle should intersect with any other, hence the >= 1 check. + ! + do m = 1, n + i = ip(m) + if (i < 0) then + ip(m) = -i + else if (i /= m) then + j = ip(i) + ip(i) = -j + i = j + do while ((j >= 1).and.(j /= m)) + j = ip(i) + ip(i) = -j + i = j + enddo + ip(m) = iabs(ip(m)) + if (j /= m) then + psb_isaperm = .false. + goto 9999 + endif + end if + enddo +9999 continue + + return + end function psb_isaperm + function psb_ibsrch(key,n,v) result(ipos) implicit none integer ipos, key, n @@ -156,7 +214,7 @@ contains if (key.eq.v(m)) then ipos = m lb = ub + 1 - else if (key.lt.v(m)) then + else if (key < v(m)) then ub = m-1 else lb = m + 1 diff --git a/base/modules/psb_spmat_type.f03 b/base/modules/psb_spmat_type.f03 index 2b20e7ec..144b7537 100644 --- a/base/modules/psb_spmat_type.f03 +++ b/base/modules/psb_spmat_type.f03 @@ -194,7 +194,7 @@ module psb_spmat_type & psb_dsp_getifld, psb_zsp_getifld end interface - interface psb_sp_transfer + interface psb_move_alloc module procedure psb_ssp_transfer, psb_csp_transfer,& & psb_dsp_transfer, psb_zsp_transfer end interface @@ -274,56 +274,56 @@ module psb_spmat_type interface psb_csmm subroutine psb_scsmv(alpha,a,b,beta,c,info,trans) import :: psb_sspmat_type, psb_spk_ - type(psb_sspmat_type) :: a + class(psb_sspmat_type) :: a real(psb_spk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans end subroutine psb_scsmv subroutine psb_scsmm(alpha,a,b,beta,c,info,trans) import :: psb_sspmat_type, psb_spk_ - type(psb_sspmat_type) :: a + class(psb_sspmat_type) :: a real(psb_spk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans end subroutine psb_scsmm subroutine psb_dcsmv(alpha,a,b,beta,c,info,trans) import :: psb_dspmat_type, psb_dpk_ - type(psb_dspmat_type) :: a + class(psb_dspmat_type) :: a real(psb_dpk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans end subroutine psb_dcsmv subroutine psb_dcsmm(alpha,a,b,beta,c,info,trans) import :: psb_dspmat_type, psb_dpk_ - type(psb_dspmat_type) :: a + class(psb_dspmat_type) :: a real(psb_dpk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans end subroutine psb_dcsmm subroutine psb_ccsmv(alpha,a,b,beta,c,info,trans) import :: psb_cspmat_type, psb_spk_ - type(psb_cspmat_type) :: a + class(psb_cspmat_type) :: a complex(psb_spk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans end subroutine psb_ccsmv subroutine psb_ccsmm(alpha,a,b,beta,c,info,trans) import :: psb_cspmat_type, psb_spk_ - type(psb_cspmat_type) :: a + class(psb_cspmat_type) :: a complex(psb_spk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans end subroutine psb_ccsmm subroutine psb_zcsmv(alpha,a,b,beta,c,info,trans) import :: psb_zspmat_type, psb_dpk_ - type(psb_zspmat_type) :: a + class(psb_zspmat_type) :: a complex(psb_dpk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans end subroutine psb_zcsmv subroutine psb_zcsmm(alpha,a,b,beta,c,info,trans) import :: psb_zspmat_type, psb_dpk_ - type(psb_zspmat_type) :: a + class(psb_zspmat_type) :: a complex(psb_dpk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans @@ -334,7 +334,7 @@ module psb_spmat_type subroutine psb_scssm(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_sspmat_type) :: t + class(psb_sspmat_type) :: t real(psb_spk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans, unitd @@ -343,7 +343,7 @@ module psb_spmat_type subroutine psb_scssv(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_sspmat_type) :: t + class(psb_sspmat_type) :: t real(psb_spk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans, unitd @@ -352,7 +352,7 @@ module psb_spmat_type subroutine psb_dcssm(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_dspmat_type) :: t + class(psb_dspmat_type) :: t real(psb_dpk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans, unitd @@ -361,7 +361,7 @@ module psb_spmat_type subroutine psb_dcssv(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_dspmat_type) :: t + class(psb_dspmat_type) :: t real(psb_dpk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans, unitd @@ -370,7 +370,7 @@ module psb_spmat_type subroutine psb_ccssm(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_cspmat_type) :: t + class(psb_cspmat_type) :: t complex(psb_spk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans, unitd @@ -379,7 +379,7 @@ module psb_spmat_type subroutine psb_ccssv(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_cspmat_type) :: t + class(psb_cspmat_type) :: t complex(psb_spk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans, unitd @@ -388,7 +388,7 @@ module psb_spmat_type subroutine psb_zcssm(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_zspmat_type) :: t + class(psb_zspmat_type) :: t complex(psb_dpk_) :: alpha, beta, b(:,:), c(:,:) integer :: info character, optional :: trans, unitd @@ -397,7 +397,7 @@ module psb_spmat_type subroutine psb_zcssv(alpha,t,b,beta,c,info,trans,unitd,d) import :: psb_sspmat_type, psb_dspmat_type,& & psb_cspmat_type, psb_zspmat_type, psb_spk_, psb_dpk_ - type(psb_zspmat_type) :: t + class(psb_zspmat_type) :: t complex(psb_dpk_) :: alpha, beta, b(:), c(:) integer :: info character, optional :: trans, unitd @@ -613,17 +613,7 @@ contains psb_get_zsp_nnz_row = 0 end if end function psb_get_zsp_nnz_row -!!$ -!!$ subroutine psb_nullify_base_sp(mat) -!!$ implicit none -!!$ class(psb_base_spmat_type), intent(inout) :: mat -!!$ mat%infoa(:)=0 -!!$ mat%m=0 -!!$ mat%k=0 -!!$ mat%fida='' -!!$ mat%descra='' -!!$ -!!$ end subroutine psb_nullify_base_sp + subroutine psb_nullify_ssp(mat) implicit none @@ -949,11 +939,11 @@ contains info = 0 - call psb_transfer( a%aspk, b%aspk , info) - call psb_transfer( a%ia1 , b%ia1 , info) - call psb_transfer( a%ia2 , b%ia2 , info) - call psb_transfer( a%pl , b%pl , info) - call psb_transfer( a%pr , b%pr , info) + call psb_move_alloc( a%aspk, b%aspk , info) + call psb_move_alloc( a%ia1 , b%ia1 , info) + call psb_move_alloc( a%ia2 , b%ia2 , info) + call psb_move_alloc( a%pl , b%pl , info) + call psb_move_alloc( a%pr , b%pr , info) b%infoa(:) = a%infoa(:) b%fida = a%fida b%descra = a%descra @@ -1098,11 +1088,9 @@ contains integer(psb_long_int_k_) :: val val = psb_sizeof_int*size(a%infoa) - if (allocated(a%aspk)) then val = val + psb_sizeof_sp * size(a%aspk) endif - if (allocated(a%ia1)) then val = val + psb_sizeof_int * size(a%ia1) endif @@ -1478,11 +1466,11 @@ contains info = 0 - call psb_transfer( a%aspk, b%aspk , info) - call psb_transfer( a%ia1 , b%ia1 , info) - call psb_transfer( a%ia2 , b%ia2 , info) - call psb_transfer( a%pl , b%pl , info) - call psb_transfer( a%pr , b%pr , info) + call psb_move_alloc( a%aspk, b%aspk , info) + call psb_move_alloc( a%ia1 , b%ia1 , info) + call psb_move_alloc( a%ia2 , b%ia2 , info) + call psb_move_alloc( a%pl , b%pl , info) + call psb_move_alloc( a%pr , b%pr , info) b%infoa(:) = a%infoa(:) b%fida = a%fida b%descra = a%descra @@ -1986,11 +1974,11 @@ contains info = 0 - call psb_transfer( a%aspk, b%aspk , info) - call psb_transfer( a%ia1 , b%ia1 , info) - call psb_transfer( a%ia2 , b%ia2 , info) - call psb_transfer( a%pl , b%pl , info) - call psb_transfer( a%pr , b%pr , info) + call psb_move_alloc( a%aspk, b%aspk , info) + call psb_move_alloc( a%ia1 , b%ia1 , info) + call psb_move_alloc( a%ia2 , b%ia2 , info) + call psb_move_alloc( a%pl , b%pl , info) + call psb_move_alloc( a%pr , b%pr , info) b%infoa(:) = a%infoa(:) b%fida = a%fida b%descra = a%descra @@ -2479,11 +2467,11 @@ contains info = 0 - call psb_transfer( a%aspk, b%aspk , info) - call psb_transfer( a%ia1 , b%ia1 , info) - call psb_transfer( a%ia2 , b%ia2 , info) - call psb_transfer( a%pl , b%pl , info) - call psb_transfer( a%pr , b%pr , info) + call psb_move_alloc( a%aspk, b%aspk , info) + call psb_move_alloc( a%ia1 , b%ia1 , info) + call psb_move_alloc( a%ia2 , b%ia2 , info) + call psb_move_alloc( a%pl , b%pl , info) + call psb_move_alloc( a%pr , b%pr , info) b%infoa(:) = a%infoa(:) b%fida = a%fida b%descra = a%descra @@ -2674,6 +2662,7 @@ contains use psb_const_mod use psb_error_mod use psb_string_mod + use psb_sort_mod implicit none type(psb_sspmat_type), intent(in), target :: a @@ -2730,7 +2719,7 @@ contains if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then ! In this case we can do a binary search. nz = a%infoa(psb_nnz_) - call ibsrch(ip,irw,nz,a%ia1) + ip = psb_ibsrch(irw,nz,a%ia1) jp = ip ! expand [ip,jp] to contain all row entries. do @@ -2833,6 +2822,7 @@ contains use psb_const_mod use psb_error_mod use psb_string_mod + use psb_sort_mod implicit none type(psb_dspmat_type), intent(in), target :: a @@ -2889,7 +2879,7 @@ contains if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then ! In this case we can do a binary search. nz = a%infoa(psb_nnz_) - call ibsrch(ip,irw,nz,a%ia1) + ip = psb_ibsrch(irw,nz,a%ia1) jp = ip ! expand [ip,jp] to contain all row entries. do @@ -2992,6 +2982,7 @@ contains use psb_const_mod use psb_error_mod use psb_string_mod + use psb_sort_mod implicit none type(psb_cspmat_type), intent(in), target :: a @@ -3043,7 +3034,7 @@ contains if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then ! In this case we can do a binary search. nz = a%infoa(psb_nnz_) - call ibsrch(ip,irw,nz,a%ia1) + ip = psb_ibsrch(irw,nz,a%ia1) jp = ip ! expand [ip,jp] to contain all row entries. do @@ -3143,6 +3134,7 @@ contains end subroutine psb_cspinfo subroutine psb_zspinfo(ireq,a,ires,info,iaux) + use psb_sort_mod use psb_const_mod use psb_error_mod use psb_string_mod @@ -3197,7 +3189,7 @@ contains if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then ! In this case we can do a binary search. nz = a%infoa(psb_nnz_) - call ibsrch(ip,irw,nz,a%ia1) + ip = psb_ibsrch(irw,nz,a%ia1) jp = ip ! expand [ip,jp] to contain all row entries. do diff --git a/base/modules/psb_spmat_type.f90 b/base/modules/psb_spmat_type.f90 deleted file mode 100644 index f9bdb633..00000000 --- a/base/modules/psb_spmat_type.f90 +++ /dev/null @@ -1,3144 +0,0 @@ - -!!$ -!!$ Parallel Sparse BLAS version 2.2 -!!$ (C) Copyright 2006/2007/2008 -!!$ Salvatore Filippone University of Rome Tor Vergata -!!$ Alfredo Buttari University of Rome Tor Vergata -!!$ -!!$ Redistribution and use in source and binary forms, with or without -!!$ modification, are permitted provided that the following conditions -!!$ are met: -!!$ 1. Redistributions of source code must retain the above copyright -!!$ notice, this list of conditions and the following disclaimer. -!!$ 2. Redistributions in binary form must reproduce the above copyright -!!$ notice, this list of conditions, and the following disclaimer in the -!!$ documentation and/or other materials provided with the distribution. -!!$ 3. The name of the PSBLAS group or the names of its contributors may -!!$ not be used to endorse or promote products derived from this -!!$ software without specific written permission. -!!$ -!!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -!!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -!!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS -!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -!!$ POSSIBILITY OF SUCH DAMAGE. -!!$ -!!$ -! -! package: psb_spmat_type -! Data structure(s) for sparse matrices -! -module psb_spmat_type - use psb_error_mod - use psb_realloc_mod - use psb_const_mod - implicit none - ! - ! - ! Queries into spmat%info - ! - integer, parameter :: psb_nztotreq_=1, psb_nzrowreq_=2 - integer, parameter :: psb_nzsizereq_=3 - ! - ! Entries and values for spmat%info - ! - integer, parameter :: psb_nnz_=1 - integer, parameter :: psb_del_bnd_=7, psb_srtd_=8 - integer, parameter :: psb_state_=9 - integer, parameter :: psb_upd_pnt_=10 - integer, parameter :: psb_dupl_=11, psb_upd_=12 - integer, parameter :: psb_ifasize_=16 - ! - ! Types: psb_dspmat_type, psb_zspmat_type - ! - !| type psb_dspmat_type - !| integer :: m, k ! Row & column size - !| character(len=5) :: fida ! Storage format: CSR,COO etc. - !| character(len=11) :: descra ! Matrix type: encodes general, triang. - !| integer :: infoa(psb_ifasize_) ! Additional integer info - !| real(psb_dpk_), allocatable :: aspk(:) ! Coefficients - !| integer, allocatable :: ia1(:), ia2(:) ! Row/column indices encoded - !| integer, allocatable :: pl(:), pr(:) ! Row/column permutation - !| end type psb_dspmat_type - !| type psb_zspmat_type - !| integer :: m, k - !| character(len=5) :: fida - !| character(len=11) :: descra - !| integer :: infoa(psb_ifasize_) - !| complex(psb_dpk_), allocatable :: aspk(:) - !| integer, allocatable :: ia1(:), ia2(:) - !| integer, allocatable :: pl(:), pr(:) - !| end type psb_zspmat_type - ! - ! A sparse matrix can move between states according to the - ! following state transition table. - !| In Out Routine - !| ---------------------------------- - !| Null Build psb_sp_all - !| Build Build psb_coins - !| Build Assembled psb_spcnv - !| Assembled Assembled psb_spcnv - !| Assembled Update psb_sp_reinit - !| Update Update psb_coins - !| Update Assembled psb_spcnv - !| * unchanged psb_sp_reall - !| Assembled Null psb_sp_free - ! - ! Note that psb_spcnv is overloaded in two flavours, - ! psb_spcnv(a,info) - ! psb_spcnv(a,b,info) - ! in the second variant, the IN state applies to A and - ! the OUT state applies to B. - ! - ! - integer, parameter :: psb_spmat_null_=0, psb_spmat_bld_=1 - integer, parameter :: psb_spmat_asb_=2, psb_spmat_upd_=4 - - integer, parameter :: psb_ireg_flgs_=10, psb_ip2_=0 - integer, parameter :: psb_iflag_=2, psb_ichk_=3 - integer, parameter :: psb_nnzt_=4, psb_zero_=5,psb_ipc_=6 - ! Duplicate coefficients handling - ! These are usually set while calling spcnv as one of its - ! optional arugments. - integer, parameter :: psb_dupl_ovwrt_ = 0 - integer, parameter :: psb_dupl_add_ = 1 - integer, parameter :: psb_dupl_err_ = 2 - integer, parameter :: psb_dupl_def_ = psb_dupl_ovwrt_ - ! Matrix update mode - integer, parameter :: psb_upd_srch_ = 98764 - integer, parameter :: psb_upd_perm_ = 98765 - integer, parameter :: psb_upd_dflt_ = psb_upd_srch_ - ! Mark a COO matrix with sorted entries. - integer, parameter :: psb_isrtdcoo_ = 98761 - integer, parameter :: psb_maxjdrows_=8, psb_minjdrows_=4 - integer, parameter :: psb_dbleint_=2 - character(len=5) :: psb_fidef_='CSR' - - - - type psb_sspmat_type - integer :: m, k - character(len=5) :: fida - character(len=11) :: descra - integer :: infoa(psb_ifasize_) - real(psb_spk_), allocatable :: aspk(:) - integer, allocatable :: ia1(:), ia2(:) - integer, allocatable :: pl(:), pr(:) - end type psb_sspmat_type - - type psb_cspmat_type - integer :: m, k - character(len=5) :: fida - character(len=11) :: descra - integer :: infoa(psb_ifasize_) - complex(psb_spk_), allocatable :: aspk(:) - integer, allocatable :: ia1(:), ia2(:) - integer, allocatable :: pl(:), pr(:) - end type psb_cspmat_type - - type psb_dspmat_type - integer :: m, k - character(len=5) :: fida - character(len=11) :: descra - integer :: infoa(psb_ifasize_) - real(psb_dpk_), allocatable :: aspk(:) - integer, allocatable :: ia1(:), ia2(:) - integer, allocatable :: pl(:), pr(:) - end type psb_dspmat_type - - type psb_zspmat_type - integer :: m, k - character(len=5) :: fida - character(len=11) :: descra - integer :: infoa(psb_ifasize_) - complex(psb_dpk_), allocatable :: aspk(:) - integer, allocatable :: ia1(:), ia2(:) - integer, allocatable :: pl(:), pr(:) - end type psb_zspmat_type - - interface psb_nullify_sp - module procedure psb_nullify_ssp, psb_nullify_csp,& - & psb_nullify_dsp, psb_nullify_zsp - end interface - - interface psb_sp_clone - module procedure psb_sspclone, psb_cspclone,& - & psb_dspclone, psb_zspclone - end interface - - interface psb_sp_setifld - module procedure psb_ssp_setifld, psb_csp_setifld,& - & psb_dsp_setifld, psb_zsp_setifld - end interface - - interface psb_sp_getifld - module procedure psb_ssp_getifld, psb_csp_getifld,& - & psb_dsp_getifld, psb_zsp_getifld - end interface - - interface psb_move_alloc - module procedure psb_ssp_transfer, psb_csp_transfer,& - & psb_dsp_transfer, psb_zsp_transfer - end interface - - interface psb_sp_trim - module procedure psb_ssp_trim, psb_csp_trim,& - & psb_dsp_trim, psb_zsp_trim - end interface - - interface psb_sp_trimsize - module procedure psb_ssp_trimsize, psb_csp_trimsize,& - & psb_dsp_trimsize, psb_zsp_trimsize - end interface - - interface psb_sp_reall - module procedure psb_sspreallocate, psb_sspreall3, & - & psb_cspreall3, psb_cspreallocate,& - & psb_dspreallocate, psb_dspreall3, & - & psb_zspreall3, psb_zspreallocate - end interface - - interface psb_sp_all - module procedure psb_sspallocate, psb_sspall3, psb_sspallmk, psb_sspallmknz, & - & psb_cspallocate, psb_cspall3, psb_cspallmk, psb_cspallmknz, & - & psb_dspallocate, psb_dspall3, psb_dspallmk, psb_dspallmknz, & - & psb_zspallocate, psb_zspall3, psb_zspallmk, psb_zspallmknz - end interface - - interface psb_sp_free - module procedure psb_ssp_free, psb_csp_free,& - & psb_dsp_free, psb_zsp_free - end interface - - interface psb_sp_reinit - module procedure psb_sspreinit, psb_cspreinit, & - & psb_dspreinit, psb_zspreinit - end interface - - interface psb_sizeof - module procedure psb_sspsizeof, psb_cspsizeof,& - & psb_dspsizeof, psb_zspsizeof - end interface - - interface psb_sp_get_nrows - module procedure psb_get_ssp_nrows, psb_get_csp_nrows,& - & psb_get_dsp_nrows, psb_get_zsp_nrows - end interface - - interface psb_sp_get_ncols - module procedure psb_get_ssp_ncols, psb_get_csp_ncols,& - & psb_get_dsp_ncols, psb_get_zsp_ncols - end interface - - interface psb_sp_get_nnzeros - module procedure psb_get_ssp_nnzeros, psb_get_csp_nnzeros,& - & psb_get_dsp_nnzeros, psb_get_zsp_nnzeros - end interface - - interface psb_sp_get_nzsize - module procedure psb_get_ssp_nzsize, psb_get_csp_nzsize,& - & psb_get_dsp_nzsize, psb_get_zsp_nzsize - end interface - - interface psb_sp_get_nnz_row - module procedure psb_get_ssp_nnz_row, psb_get_csp_nnz_row,& - & psb_get_dsp_nnz_row, psb_get_zsp_nnz_row - end interface - - - - interface psb_sp_info - module procedure psb_sspinfo, psb_cspinfo, & - & psb_dspinfo, psb_zspinfo - end interface - - - -contains - - integer function psb_get_ssp_nrows(a) - type(psb_sspmat_type), intent(in) :: a - psb_get_ssp_nrows = a%m - - return - end function psb_get_ssp_nrows - - integer function psb_get_ssp_ncols(a) - type(psb_sspmat_type), intent(in) :: a - psb_get_ssp_ncols = a%k - - return - end function psb_get_ssp_ncols - integer function psb_get_csp_nrows(a) - type(psb_cspmat_type), intent(in) :: a - psb_get_csp_nrows = a%m - - return - end function psb_get_csp_nrows - - integer function psb_get_csp_ncols(a) - type(psb_cspmat_type), intent(in) :: a - psb_get_csp_ncols = a%k - - return - end function psb_get_csp_ncols - - - integer function psb_get_dsp_nrows(a) - type(psb_dspmat_type), intent(in) :: a - psb_get_dsp_nrows = a%m - - return - end function psb_get_dsp_nrows - - integer function psb_get_dsp_ncols(a) - type(psb_dspmat_type), intent(in) :: a - psb_get_dsp_ncols = a%k - - return - end function psb_get_dsp_ncols - integer function psb_get_zsp_nrows(a) - type(psb_zspmat_type), intent(in) :: a - psb_get_zsp_nrows = a%m - - return - end function psb_get_zsp_nrows - - integer function psb_get_zsp_ncols(a) - type(psb_zspmat_type), intent(in) :: a - psb_get_zsp_ncols = a%k - - return - end function psb_get_zsp_ncols - - - integer function psb_get_ssp_nnzeros(a) - type(psb_sspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nztotreq_,a,ires,info) - if (info == 0) then - psb_get_ssp_nnzeros = ires - else - psb_get_ssp_nnzeros = 0 - end if - end function psb_get_ssp_nnzeros - - integer function psb_get_csp_nnzeros(a) - type(psb_cspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nztotreq_,a,ires,info) - if (info == 0) then - psb_get_csp_nnzeros = ires - else - psb_get_csp_nnzeros = 0 - end if - end function psb_get_csp_nnzeros - - integer function psb_get_dsp_nnzeros(a) - type(psb_dspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nztotreq_,a,ires,info) - if (info == 0) then - psb_get_dsp_nnzeros = ires - else - psb_get_dsp_nnzeros = 0 - end if - end function psb_get_dsp_nnzeros - - integer function psb_get_zsp_nnzeros(a) - type(psb_zspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nztotreq_,a,ires,info) - if (info == 0) then - psb_get_zsp_nnzeros = ires - else - psb_get_zsp_nnzeros = 0 - end if - end function psb_get_zsp_nnzeros - - integer function psb_get_ssp_nzsize(a) - type(psb_sspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzsizereq_,a,ires,info) - if (info == 0) then - psb_get_ssp_nzsize = ires - else - psb_get_ssp_nzsize = 0 - end if - end function psb_get_ssp_nzsize - - integer function psb_get_csp_nzsize(a) - type(psb_cspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzsizereq_,a,ires,info) - if (info == 0) then - psb_get_csp_nzsize = ires - else - psb_get_csp_nzsize = 0 - end if - end function psb_get_csp_nzsize - - integer function psb_get_dsp_nzsize(a) - type(psb_dspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzsizereq_,a,ires,info) - if (info == 0) then - psb_get_dsp_nzsize = ires - else - psb_get_dsp_nzsize = 0 - end if - end function psb_get_dsp_nzsize - - integer function psb_get_zsp_nzsize(a) - type(psb_zspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzsizereq_,a,ires,info) - if (info == 0) then - psb_get_zsp_nzsize = ires - else - psb_get_zsp_nzsize = 0 - end if - end function psb_get_zsp_nzsize - - integer function psb_get_ssp_nnz_row(ir,a) - integer, intent(in) :: ir - type(psb_sspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzrowreq_,a,ires,info,iaux=ir) - if (info == 0) then - psb_get_ssp_nnz_row = ires - else - psb_get_ssp_nnz_row = 0 - end if - end function psb_get_ssp_nnz_row - - integer function psb_get_csp_nnz_row(ir,a) - integer, intent(in) :: ir - type(psb_cspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzrowreq_,a,ires,info,iaux=ir) - if (info == 0) then - psb_get_csp_nnz_row = ires - else - psb_get_csp_nnz_row = 0 - end if - end function psb_get_csp_nnz_row - - integer function psb_get_dsp_nnz_row(ir,a) - integer, intent(in) :: ir - type(psb_dspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzrowreq_,a,ires,info,iaux=ir) - if (info == 0) then - psb_get_dsp_nnz_row = ires - else - psb_get_dsp_nnz_row = 0 - end if - end function psb_get_dsp_nnz_row - - integer function psb_get_zsp_nnz_row(ir,a) - integer, intent(in) :: ir - type(psb_zspmat_type), intent(in) :: a - integer :: ires,info - - call psb_sp_info(psb_nzrowreq_,a,ires,info,iaux=ir) - if (info == 0) then - psb_get_zsp_nnz_row = ires - else - psb_get_zsp_nnz_row = 0 - end if - end function psb_get_zsp_nnz_row - - - subroutine psb_nullify_ssp(mat) - implicit none - type(psb_sspmat_type), intent(inout) :: mat - -!!$ nullify(mat%aspk,mat%ia1,mat%ia2,mat%pl,mat%pr) - - mat%infoa(:)=0 - mat%m=0 - mat%k=0 - mat%fida='' - mat%descra='' - - end subroutine psb_nullify_ssp - - Subroutine psb_sspreinit(a,info,clear) - use psb_string_mod - Implicit None - - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: a - integer, intent(out) :: info - logical, intent(in), optional :: clear - - !locals - logical, parameter :: debug=.false. - logical :: clear_ - character(len=20) :: name - - info = 0 - name = 'psb_sp_reinit' - - if (present(clear)) then - clear_ = clear - else - clear_ = .true. - end if - - select case(psb_sp_getifld(psb_state_,a,info)) - case(psb_spmat_asb_) - - if (clear_) a%aspk(:) = dzero - - if (psb_sp_getifld(psb_upd_,a,info)==psb_upd_perm_) then - if(psb_toupper(a%fida(1:3)) == 'JAD') then - a%ia1(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - else - a%ia2(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - endif - endif - a%infoa(psb_state_) = psb_spmat_upd_ - case(psb_spmat_bld_) - ! in this case do nothing. this allows sprn to be called - ! right after allocate, with spins doing the right thing. - ! hopefully :-) - - case( psb_spmat_upd_) - - case default - info=591 - call psb_errpush(info,name) - end select - - end Subroutine psb_sspreinit - - Subroutine psb_sspallocate(a, nnz,info) - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(in) :: nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - Endif - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - call psb_nullify_sp(a) - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_sspallocate - - Subroutine psb_sspallmk(m,k,a,info) - implicit none - !....Parameters... - - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(in) :: m,k - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - integer :: nnz - - INFO = 0 - call psb_nullify_sp(a) - nnz = 2*max(1,m,k) - a%m=max(0,m) - a%k=max(0,k) - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - call psb_sp_reall(a,nnz,info) - if (debug) write(0,*) 'Check in ALLOCATE ',info,allocated(a%pl),allocated(a%pr) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'SPALL : end' - Return - - end subroutine psb_sspallmk - - Subroutine psb_sspallmknz(m,k,a, nnz,info) - implicit none - !....parameters... - - type(psb_sspmat_type), intent(inout) :: a - integer, intent(in) :: m,k,nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - endif - call psb_nullify_sp(a) - if (debug) write(0,*) 'spallmknz : nnz ',nnz,a%m,a%k,psb_get_errstatus() - a%m=max(0,m) - a%k=max(0,k) - call psb_sp_reall(a,nnz,info) - if (debug) write(0,*) 'Check in ALLOCATE ',info,allocated(a%pl),allocated(a%pr) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set infoa fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'spall : end' - return - - end subroutine psb_sspallmknz - - - subroutine psb_sspall3(a, ni1,ni2,nd,info) - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nd - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - call psb_nullify_sp(a) - call psb_sp_reall(a, ni1,ni2,nd,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_sspall3 - - - subroutine psb_sspreallocate(a, nnz,info,ifc) - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(in) :: NNZ - Integer, intent(out) :: info - ! - ! ifc is used here to allocate space in IA1 for smart - ! regeneration. This probably ought to be changed, - ! by adding a new component to d_spmat, or by making - ! infoa a pointer. - ! - Integer, intent(in), optional :: ifc - integer :: ifc_ - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - endif - if (present(ifc)) then - ifc_ = max(1,ifc) - else - ifc_ = 1 - endif - - if (ifc_ == 1) then - if (debug) write(0,*) 'sspreallocate: calling realloc',max(nnz,a%m+1,a%k+1) - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia1,a%ia2,a%aspk,info) - if (debug) write(0,*) 'sspreallocate: done realloc',info, psb_get_errstatus() - else - call psb_realloc(max(nnz,a%m+1,a%k+1),a%aspk,info) - if (info /= 0) return - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia2,info) - if (info /= 0) return - call psb_realloc(max(ifc*nnz+200,a%m+1,a%k+1),a%ia1,info) - if (info /= 0) return - end if - if (info /= 0) return - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - call psb_realloc(max(1,a%k),a%pr,info) - if (debug) write(0,*) 'sspreallocate:',allocated(a%ia1),allocated(a%ia2),& - & allocated(a%aspk),allocated(a%pl),allocated(a%pr),info - if (info /= 0) return - - Return - - End Subroutine psb_sspreallocate - - subroutine psb_sspreall3(a, ni1,ni2,nd,info) - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nd - Integer, intent(inout) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (debug) write(0,*) 'Before realloc',nd,size(a%aspk),ni1,ni2 - call psb_realloc(nd,a%aspk,info) - if (debug) write(0,*) 'After realloc',nd,size(a%aspk),info - if (info /= 0) return - if (debug) write(0,*) 'Before realloc2',ni2,allocated(a%ia2),size(a%ia2) - call psb_realloc(ni2,a%ia2,info) - if (info /= 0) return - if (debug) write(0,*) 'Before realloc3',ni1,allocated(a%ia1),size(a%ia1) - call psb_realloc(ni1,a%ia1,info) - if (info /= 0) return - if (debug) write(0,*) 'Before realloc4',max(1,a%m),allocated(a%pl),size(a%pl) - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - if (debug) write(0,*) 'Before realloc5',max(1,a%k),allocated(a%pr),size(a%pr) - call psb_realloc(max(1,a%k),a%pr,info) - if (info /= 0) return - - Return - - End Subroutine psb_sspreall3 - - - subroutine psb_sspclone(a, b,info) - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(in) :: A - Type(psb_sspmat_type), intent(out) :: B - Integer, intent(out) :: info - - !locals - - INFO = 0 - call psb_nullify_sp(b) - call psb_safe_ab_cpy(a%aspk,b%aspk,info) - if (info == 0) call psb_safe_ab_cpy(a%ia1,b%ia1,info) - if (info == 0) call psb_safe_ab_cpy(a%ia2,b%ia2,info) - if (info == 0) call psb_safe_ab_cpy(a%pl,b%pl,info) - if (info == 0) call psb_safe_ab_cpy(a%pr,b%pr,info) - if (info /= 0) then - info=2023 - return - Endif - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - Return - - End Subroutine psb_sspclone - - - - ! Will be changed to use MOVE_ALLOC - subroutine psb_ssp_transfer(a, b,info) - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: A - Type(psb_sspmat_type), intent(inout) :: B - Integer, intent(out) :: info - - info = 0 - - - call psb_move_alloc( a%aspk, b%aspk , info) - call psb_move_alloc( a%ia1 , b%ia1 , info) - call psb_move_alloc( a%ia2 , b%ia2 , info) - call psb_move_alloc( a%pl , b%pl , info) - call psb_move_alloc( a%pr , b%pr , info) - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - call psb_nullify_sp(a) - - Return - - End Subroutine psb_ssp_transfer - - - Subroutine psb_ssp_setifld(val,field,a,info) - implicit none - !....Parameters... - - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(in) :: field,val - Integer, intent(out) :: info - - info = 0 - - - if (info == 0) & - & call psb_setifield(val,field,a%infoa,psb_ifasize_,info) - - - Return - - end subroutine psb_ssp_setifld - - - ! - ! Reduce the size of A to the barest minimum necessary. - ! - ! - - - subroutine psb_ssp_trim(a,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(out) :: info - - !locals - Integer :: i1, i2, ia - - info = 0 - call psb_sp_trimsize(a,i1,i2,ia,info) - i1 = max(i1,1); i2 = max(i2,1); ia = max(ia,1) - if (info == 0) call psb_sp_reall(a,i1,i2,ia,info) - - Return - - End Subroutine psb_ssp_trim - - - subroutine psb_ssp_trimsize(a, i1,i2,ia,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(in) :: A - Integer, intent(out) :: i1, i2, ia, info - - !locals - Integer :: nza - - info = 0 - if (psb_sp_getifld(psb_upd_,a,info) == psb_upd_perm_) then - info = -1 - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - return - endif - select case(psb_tolower(a%fida)) - case('csr') - nza = a%ia2(a%m+1)-1 - ia = nza - i1 = nza - i2 = a%m + 1 - case('csc') - nza = a%ia2(a%k+1)-1 - ia = nza - i1 = nza - i2 = a%k + 1 - case('coo','coi') - nza = a%infoa(psb_nnz_) - i1 = nza - i2 = nza - ia = nza - case('jad') - ! Feeling lazy today - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - case default - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - end select - - Return - - End Subroutine psb_ssp_trimsize - - function psb_ssp_getifld(field,a,info) - implicit none - !....Parameters... - - Type(psb_sspmat_type), intent(in) :: A - Integer, intent(in) :: field - Integer :: psb_ssp_getifld - Integer, intent(out) :: info - - !locals - integer :: val - - info = 0 - val = -1 - - if ((field < 1).or.(field > psb_ifasize_)) then - info = -1 - psb_ssp_getifld = val - return - endif - - call psb_getifield(val,field,a%infoa,psb_ifasize_,info) - - psb_ssp_getifld = val - Return - - end function psb_ssp_getifld - - function psb_sspsizeof(a) result(val) - implicit none - !....Parameters... - - Type(psb_sspmat_type), intent(in) :: A - integer(psb_long_int_k_) :: val - - val = psb_sizeof_int*size(a%infoa) - if (allocated(a%aspk)) then - val = val + psb_sizeof_sp * size(a%aspk) - endif - if (allocated(a%ia1)) then - val = val + psb_sizeof_int * size(a%ia1) - endif - if (allocated(a%ia2)) then - val = val + psb_sizeof_int * size(a%ia2) - endif - if (allocated(a%pl)) then - val = val + psb_sizeof_int * size(a%pl) - endif - if (allocated(a%pr)) then - val = val + psb_sizeof_int * size(a%pr) - endif - - end function psb_sspsizeof - - - subroutine psb_ssp_free(a,info) - implicit none - !....Parameters... - Type(psb_sspmat_type), intent(inout) :: A - Integer, intent(out) :: info - !locals - integer :: iret - info = 0 - - if (allocated(a%aspk)) then -!!$ write(0,*) 'Deallocating aspk' - deallocate(a%aspk,STAT=IRET) -!!$ write(0,*) 'Deallocated aspk',iret - if (iret /= 0) info = max(info,1) - endif - if (allocated(a%ia1)) then - deallocate(a%ia1,STAT=IRET) - if (iret /= 0) info = max(info,2) - endif - if (allocated(a%ia2)) then - deallocate(a%ia2,STAT=IRET) - if (iret /= 0) info = max(info,3) - endif - if (allocated(a%pr)) then - deallocate(a%pr,STAT=IRET) - if (iret /= 0) info = max(info,4) - endif - if (allocated(a%pl)) then - deallocate(a%pl,STAT=IRET) - if (iret /= 0) info = max(info,5) - endif - call psb_nullify_sp(a) -!!$ write(0,*) 'End of sp_free ',info - Return - End Subroutine psb_ssp_free - - subroutine psb_nullify_dsp(mat) - implicit none - type(psb_dspmat_type), intent(inout) :: mat - -!!$ nullify(mat%aspk,mat%ia1,mat%ia2,mat%pl,mat%pr) - - mat%infoa(:)=0 - mat%m=0 - mat%k=0 - mat%fida='' - mat%descra='' - - end subroutine psb_nullify_dsp - - Subroutine psb_dspreinit(a,info,clear) - use psb_string_mod - use psb_string_mod - Implicit None - - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: a - integer, intent(out) :: info - logical, intent(in), optional :: clear - - !locals - logical, parameter :: debug=.false. - logical :: clear_ - character(len=20) :: name - - info = 0 - name = 'psb_sp_reinit' - - if (present(clear)) then - clear_ = clear - else - clear_ = .true. - end if - - select case(psb_sp_getifld(psb_state_,a,info)) - case(psb_spmat_asb_) - - if (clear_) a%aspk(:) = dzero - - if (psb_sp_getifld(psb_upd_,a,info)==psb_upd_perm_) then - if(psb_toupper(a%fida(1:3)) == 'JAD') then - a%ia1(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - else - a%ia2(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - endif - endif - a%infoa(psb_state_) = psb_spmat_upd_ - case(psb_spmat_bld_) - ! in this case do nothing. this allows sprn to be called - ! right after allocate, with spins doing the right thing. - ! hopefully :-) - - case( psb_spmat_upd_) - - case default - info=591 - call psb_errpush(info,name) - end select - - end Subroutine psb_dspreinit - - Subroutine psb_dspallocate(a, nnz,info) - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(in) :: nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - Endif - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - call psb_nullify_sp(a) - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_dspallocate - - Subroutine psb_dspallmk(m,k,a,info) - implicit none - !....Parameters... - - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(in) :: m,k - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - integer :: nnz - - INFO = 0 - call psb_nullify_sp(a) - nnz = 2*max(1,m,k) - a%m=max(0,m) - a%k=max(0,k) - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - call psb_sp_reall(a,nnz,info) - if (debug) write(0,*) 'Check in ALLOCATE ',info,allocated(a%pl),allocated(a%pr) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'SPALL : end' - Return - - end subroutine psb_dspallmk - - Subroutine psb_dspallmknz(m,k,a, nnz,info) - implicit none - !....parameters... - - type(psb_dspmat_type), intent(inout) :: a - integer, intent(in) :: m,k,nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - endif - call psb_nullify_sp(a) - if (debug) write(0,*) 'spall : nnz ',nnz,a%m,a%k - a%m=max(0,m) - a%k=max(0,k) - call psb_sp_reall(a,nnz,info) - if (debug) write(0,*) 'Check in ALLOCATE ',info,allocated(a%pl),allocated(a%pr) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set infoa fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'spall : end' - return - - end subroutine psb_dspallmknz - - - subroutine psb_dspall3(a, ni1,ni2,nd,info) - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nd - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - call psb_nullify_sp(a) - call psb_sp_reall(a, ni1,ni2,nd,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_dspall3 - - - subroutine psb_dspreallocate(a, nnz,info,ifc) - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(in) :: NNZ - Integer, intent(out) :: info - ! - ! ifc is used here to allocate space in IA1 for smart - ! regeneration. This probably ought to be changed, - ! by adding a new component to d_spmat, or by making - ! infoa a pointer. - ! - Integer, intent(in), optional :: ifc - integer :: ifc_ - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - endif - if (present(ifc)) then - ifc_ = max(1,ifc) - else - ifc_ = 1 - endif - - if (ifc_ == 1) then - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia1,a%ia2,a%aspk,info) - else - call psb_realloc(max(nnz,a%m+1,a%k+1),a%aspk,info) - if (info /= 0) return - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia2,info) - if (info /= 0) return - call psb_realloc(max(ifc*nnz+200,a%m+1,a%k+1),a%ia1,info) - if (info /= 0) return - end if - if (info /= 0) return - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - call psb_realloc(max(1,a%k),a%pr,info) - if (debug) write(0,*) allocated(a%ia1),allocated(a%ia2),& - & allocated(a%aspk),allocated(a%pl),allocated(a%pr),info - if (info /= 0) return - - Return - - End Subroutine psb_dspreallocate - - subroutine psb_dspreall3(a, ni1,ni2,nd,info) - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nd - Integer, intent(inout) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (debug) write(0,*) 'Before realloc',nd,size(a%aspk),ni1,ni2 - call psb_realloc(nd,a%aspk,info) - if (debug) write(0,*) 'After realloc',nd,size(a%aspk),info - if (info /= 0) return - if (debug) write(0,*) 'Before realloc2',ni2,allocated(a%ia2),size(a%ia2) - call psb_realloc(ni2,a%ia2,info) - if (info /= 0) return - if (debug) write(0,*) 'Before realloc3',ni1,allocated(a%ia1),size(a%ia1) - call psb_realloc(ni1,a%ia1,info) - if (info /= 0) return - if (debug) write(0,*) 'Before realloc4',max(1,a%m),allocated(a%pl),size(a%pl) - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - if (debug) write(0,*) 'Before realloc5',max(1,a%k),allocated(a%pr),size(a%pr) - call psb_realloc(max(1,a%k),a%pr,info) - if (info /= 0) return - - Return - - End Subroutine psb_dspreall3 - - - subroutine psb_dspclone(a, b,info) - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(in) :: A - Type(psb_dspmat_type), intent(out) :: B - Integer, intent(out) :: info - - !locals - - INFO = 0 - call psb_nullify_sp(b) - call psb_safe_ab_cpy(a%aspk,b%aspk,info) - if (info == 0) call psb_safe_ab_cpy(a%ia1,b%ia1,info) - if (info == 0) call psb_safe_ab_cpy(a%ia2,b%ia2,info) - if (info == 0) call psb_safe_ab_cpy(a%pl,b%pl,info) - if (info == 0) call psb_safe_ab_cpy(a%pr,b%pr,info) - if (info /= 0) then - info=2023 - return - Endif - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - Return - - End Subroutine psb_dspclone - - - - ! Will be changed to use MOVE_ALLOC - subroutine psb_dsp_transfer(a, b,info) - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: A - Type(psb_dspmat_type), intent(inout) :: B - Integer, intent(out) :: info - - info = 0 - - - call psb_move_alloc( a%aspk, b%aspk , info) - call psb_move_alloc( a%ia1 , b%ia1 , info) - call psb_move_alloc( a%ia2 , b%ia2 , info) - call psb_move_alloc( a%pl , b%pl , info) - call psb_move_alloc( a%pr , b%pr , info) - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - call psb_nullify_sp(a) - - Return - - End Subroutine psb_dsp_transfer - - - Subroutine psb_dsp_setifld(val,field,a,info) - implicit none - !....Parameters... - - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(in) :: field,val - Integer, intent(out) :: info - - info = 0 - - - if (info == 0) & - & call psb_setifield(val,field,a%infoa,psb_ifasize_,info) - - - Return - - end subroutine psb_dsp_setifld - - - ! - ! Reduce the size of A to the barest minimum necessary. - ! - ! - - - subroutine psb_dsp_trim(a,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(out) :: info - - !locals - Integer :: i1, i2, ia - - info = 0 - call psb_sp_trimsize(a,i1,i2,ia,info) - i1 = max(i1,1); i2 = max(i2,1); ia = max(ia,1) - if (info == 0) call psb_sp_reall(a,i1,i2,ia,info) - - Return - - End Subroutine psb_dsp_trim - - - subroutine psb_dsp_trimsize(a, i1,i2,ia,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(in) :: A - Integer, intent(out) :: i1, i2, ia, info - - !locals - Integer :: nza - - info = 0 - if (psb_sp_getifld(psb_upd_,a,info) == psb_upd_perm_) then - info = -1 - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - return - endif - select case(psb_tolower(a%fida)) - case('csr') - nza = a%ia2(a%m+1)-1 - ia = nza - i1 = nza - i2 = a%m + 1 - case('csc') - nza = a%ia2(a%k+1)-1 - ia = nza - i1 = nza - i2 = a%k + 1 - case('coo','coi') - nza = a%infoa(psb_nnz_) - i1 = nza - i2 = nza - ia = nza - case('jad') - ! Feeling lazy today - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - case default - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - end select - - Return - - End Subroutine psb_dsp_trimsize - - function psb_dsp_getifld(field,a,info) - implicit none - !....Parameters... - - Type(psb_dspmat_type), intent(in) :: A - Integer, intent(in) :: field - Integer :: psb_dsp_getifld - Integer, intent(out) :: info - - !locals - integer :: val - - info = 0 - val = -1 - - if ((field < 1).or.(field > psb_ifasize_)) then - info = -1 - psb_dsp_getifld = val - return - endif - - call psb_getifield(val,field,a%infoa,psb_ifasize_,info) - - psb_dsp_getifld = val - Return - - end function psb_dsp_getifld - - function psb_dspsizeof(a) result(val) - implicit none - !....Parameters... - - Type(psb_dspmat_type), intent(in) :: A - integer(psb_long_int_k_) :: val - - val = psb_sizeof_int*size(a%infoa) - if (allocated(a%aspk)) then - val = val + psb_sizeof_dp * size(a%aspk) - endif - if (allocated(a%ia1)) then - val = val + psb_sizeof_int * size(a%ia1) - endif - if (allocated(a%ia2)) then - val = val + psb_sizeof_int * size(a%ia2) - endif - if (allocated(a%pl)) then - val = val + psb_sizeof_int * size(a%pl) - endif - if (allocated(a%pr)) then - val = val + psb_sizeof_int * size(a%pr) - endif - - end function psb_dspsizeof - - - subroutine psb_dsp_free(a,info) - implicit none - !....Parameters... - Type(psb_dspmat_type), intent(inout) :: A - Integer, intent(out) :: info - !locals - integer :: iret - info = 0 - - if (allocated(a%aspk)) then -!!$ write(0,*) 'Deallocating aspk' - deallocate(a%aspk,STAT=IRET) -!!$ write(0,*) 'Deallocated aspk',iret - if (iret /= 0) info = max(info,1) - endif - if (allocated(a%ia1)) then - deallocate(a%ia1,STAT=IRET) - if (iret /= 0) info = max(info,2) - endif - if (allocated(a%ia2)) then - deallocate(a%ia2,STAT=IRET) - if (iret /= 0) info = max(info,3) - endif - if (allocated(a%pr)) then - deallocate(a%pr,STAT=IRET) - if (iret /= 0) info = max(info,4) - endif - if (allocated(a%pl)) then - deallocate(a%pl,STAT=IRET) - if (iret /= 0) info = max(info,5) - endif - call psb_nullify_sp(a) -!!$ write(0,*) 'End of sp_free ',info - Return - End Subroutine psb_dsp_free - - - subroutine psb_nullify_csp(mat) - implicit none - type(psb_cspmat_type), intent(inout) :: mat - - mat%infoa(:)=0 - mat%m=0 - mat%k=0 - mat%fida='' - mat%descra='' - - end subroutine psb_nullify_csp - - Subroutine psb_cspreinit(a,info,clear) - use psb_string_mod - Implicit None - - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: a - integer, intent(out) :: info - logical, intent(in), optional :: clear - - !locals - logical :: clear_ - character(len=20) :: name - - info = 0 - name = 'psb_sp_reinit' - - if (present(clear)) then - clear_ = clear - else - clear_ = .true. - end if - - select case(psb_sp_getifld(psb_state_,a,info)) - case(psb_spmat_asb_) - - if (clear_) a%aspk(:) = zzero - - if (psb_sp_getifld(psb_upd_,a,info)==psb_upd_perm_) then - if(psb_toupper(a%fida(1:3)) == 'JAD') then - a%ia1(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - else - a%ia2(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - endif - endif - a%infoa(psb_state_) = psb_spmat_upd_ - case(psb_spmat_bld_) - ! in this case do nothing. this allows sprn to be called - ! right after allocate, with spins doing the right thing. - ! hopefully :-) - - case( psb_spmat_upd_) - - case default - info=591 - call psb_errpush(info,name) - end select - - end Subroutine psb_cspreinit - - Subroutine psb_cspallocate(a, nnz,info) - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(in) :: nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - Endif - call psb_nullify_sp(a) - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_cspallocate - - Subroutine psb_cspallmk(m,k,a,info) - implicit none - !....Parameters... - - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(in) :: m,k - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - integer :: nnz - - INFO = 0 - nnz = 2*max(1,m,k) - call psb_nullify_sp(a) - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - a%m=max(0,m) - a%k=max(0,k) - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'SPALL : end' - Return - - end subroutine psb_cspallmk - - Subroutine psb_cspallmknz(m,k,a, nnz,info) - implicit none - !....parameters... - - type(psb_cspmat_type), intent(inout) :: a - integer, intent(in) :: m,k,nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - endif - call psb_nullify_sp(a) - if (debug) write(0,*) 'spall : nnz ',nnz,a%m,a%k - a%m=max(0,m) - a%k=max(0,k) - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set infoa fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'spall : end' - return - - end subroutine psb_cspallmknz - - - subroutine psb_cspall3(a, ni1,ni2,nd,info) - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nd - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - - call psb_nullify_sp(a) - call psb_sp_reall(a, ni1,ni2,nd,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_cspall3 - - subroutine psb_cspreall3(a, ni1,ni2,nz,info) - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nz - Integer, intent(inout) :: info - - - info = 0 - call psb_realloc(nz,a%aspk,info) - if (info /= 0) return - call psb_realloc(ni2,a%ia2,info) - if (info /= 0) return - call psb_realloc(ni1,a%ia1,info) - if (info /= 0) return - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - call psb_realloc(max(1,a%k),a%pr,info) - if (info /= 0) return - - Return - - End Subroutine psb_cspreall3 - - - subroutine psb_cspreallocate(a, nnz,info,ifc) - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(in) :: NNZ - Integer, intent(out) :: info - ! - ! ifc is used here to allocate space in IA1 for smart - ! regeneration. This probably ought to be changed, - ! by adding a new component to d_spmat, or by making - ! infoa a pointer. - ! - Integer, intent(in), optional :: ifc - integer :: ifc_ - - info = 0 - if (nnz < 0) then - info=45 - return - endif - if (present(ifc)) then - ifc_ = max(1,ifc) - else - ifc_ = 1 - endif - - if (ifc_ == 1) then - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia1,a%ia2,a%aspk,info) - else - call psb_realloc(max(nnz,a%m+1,a%k+1),a%aspk,info) - if (info /= 0) return - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia2,info) - if (info /= 0) return - call psb_realloc(ifc*nnz+200,a%ia1,info) - if (info /= 0) return - end if - if (info /= 0) return - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - call psb_realloc(max(1,a%k),a%pr,info) - if (info /= 0) return - - Return - - End Subroutine psb_cspreallocate - - subroutine psb_cspclone(a, b,info) - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(in) :: A - Type(psb_cspmat_type), intent(out) :: B - Integer, intent(out) :: info - - - INFO = 0 - call psb_nullify_sp(b) - call psb_safe_ab_cpy(a%aspk,b%aspk,info) - if (info == 0) call psb_safe_ab_cpy(a%ia1,b%ia1,info) - if (info == 0) call psb_safe_ab_cpy(a%ia2,b%ia2,info) - if (info == 0) call psb_safe_ab_cpy(a%pl,b%pl,info) - if (info == 0) call psb_safe_ab_cpy(a%pr,b%pr,info) - if (info /= 0) then - info=2023 - return - Endif - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - Return - - End Subroutine psb_cspclone - - - ! This is done with pointer assignments, but it - ! will be feasible with MOVE_ALLOC when we move - ! to ALLOCATABLE components. - subroutine psb_csp_transfer(a, b,info) - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: A - Type(psb_cspmat_type), intent(inout) :: B - Integer, intent(out) :: info - - info = 0 - - call psb_move_alloc( a%aspk, b%aspk , info) - call psb_move_alloc( a%ia1 , b%ia1 , info) - call psb_move_alloc( a%ia2 , b%ia2 , info) - call psb_move_alloc( a%pl , b%pl , info) - call psb_move_alloc( a%pr , b%pr , info) - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - call psb_nullify_sp(a) - - Return - - End Subroutine psb_csp_transfer - - Subroutine psb_csp_setifld(val,field,a,info) - implicit none - !....Parameters... - - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(in) :: field,val - Integer, intent(out) :: info - - - info = 0 - - - if (info == 0) & - & call psb_setifield(val,field,a%infoa,psb_ifasize_,info) - - - Return - - end subroutine psb_csp_setifld - - - subroutine psb_csp_trim(a,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(out) :: info - !locals - Integer :: i1, i2, ia - - info = 0 - call psb_sp_trimsize(a,i1,i2,ia,info) - i1 = max(i1,1); i2 = max(i2,1); ia = max(ia,1) - if (info == 0) call psb_sp_reall(a,i1,i2,ia,info) - - Return - - End Subroutine psb_csp_trim - - subroutine psb_csp_trimsize(a, i1,i2,ia,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(in) :: A - Integer, intent(out) :: i1, i2, ia, info - - !locals - Integer :: nza - - info = 0 - if (psb_sp_getifld(psb_upd_,a,info) == psb_upd_perm_) then - info = -1 - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - return - endif - select case(psb_tolower(a%fida)) - case('csr') - nza = a%ia2(a%m+1)-1 - ia = nza - i1 = nza - i2 = a%m + 1 - case('csc') - nza = a%ia2(a%k+1)-1 - ia = nza - i1 = nza - i2 = a%k + 1 - case('coo','coi') - nza = a%infoa(psb_nnz_) - i1 = nza - i2 = nza - ia = nza - case('jad') - ! Feeling lazy today - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - case default - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - end select - - Return - - End Subroutine psb_csp_trimsize - - function psb_csp_getifld(field,a,info) - implicit none - !....Parameters... - - Type(psb_cspmat_type), intent(in) :: A - Integer, intent(in) :: field - Integer :: psb_csp_getifld - Integer, intent(out) :: info - - !locals - integer :: val - - info = 0 - val = -1 - - if ((field < 1).or.(field > psb_ifasize_)) then - info = -1 - psb_csp_getifld = val - return - endif - - call psb_getifield(val,field,a%infoa,psb_ifasize_,info) - - psb_csp_getifld = val - Return - - end function psb_csp_getifld - - function psb_cspsizeof(a) result(val) - implicit none - - Type(psb_cspmat_type), intent(in) :: A - integer(psb_long_int_k_) :: val - - val = psb_sizeof_int*size(a%infoa) - if (allocated(a%aspk)) then - val = val + 2 * psb_sizeof_sp * size(a%aspk) - endif - - if (allocated(a%ia1)) then - val = val + psb_sizeof_int * size(a%ia1) - endif - if (allocated(a%ia2)) then - val = val + psb_sizeof_int * size(a%ia2) - endif - if (allocated(a%pl)) then - val = val + psb_sizeof_int * size(a%pl) - endif - if (allocated(a%pr)) then - val = val + psb_sizeof_int * size(a%pr) - endif - - end function psb_cspsizeof - - - - - subroutine psb_csp_free(a,info) - implicit none - !....Parameters... - Type(psb_cspmat_type), intent(inout) :: A - Integer, intent(out) :: info - - info = 0 - - if (allocated(a%aspk)) then - deallocate(a%aspk,STAT=INFO) - endif - if (allocated(a%ia1)) then - deallocate(a%ia1,STAT=INFO) - endif - if ( allocated(a%ia2)) then - deallocate(a%ia2,STAT=INFO) - endif - if ( allocated(a%pr)) then - deallocate(a%pr,STAT=INFO) - endif - if ( allocated(a%pl)) then - deallocate(a%pl,STAT=INFO) - endif - call psb_nullify_sp(a) - Return - End Subroutine psb_csp_free - - - subroutine psb_nullify_zsp(mat) - implicit none - type(psb_zspmat_type), intent(inout) :: mat - - mat%infoa(:)=0 - mat%m=0 - mat%k=0 - mat%fida='' - mat%descra='' - - end subroutine psb_nullify_zsp - - Subroutine psb_zspreinit(a,info,clear) - use psb_string_mod - Implicit None - - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: a - integer, intent(out) :: info - logical, intent(in), optional :: clear - - !locals - logical :: clear_ - character(len=20) :: name - - info = 0 - name = 'psb_sp_reinit' - - if (present(clear)) then - clear_ = clear - else - clear_ = .true. - end if - - select case(psb_sp_getifld(psb_state_,a,info)) - case(psb_spmat_asb_) - - if (clear_) a%aspk(:) = zzero - - if (psb_sp_getifld(psb_upd_,a,info)==psb_upd_perm_) then - if(psb_toupper(a%fida(1:3)) == 'JAD') then - a%ia1(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - else - a%ia2(a%infoa(psb_upd_pnt_)+psb_nnz_) = 0 - endif - endif - a%infoa(psb_state_) = psb_spmat_upd_ - case(psb_spmat_bld_) - ! in this case do nothing. this allows sprn to be called - ! right after allocate, with spins doing the right thing. - ! hopefully :-) - - case( psb_spmat_upd_) - - case default - info=591 - call psb_errpush(info,name) - end select - - end Subroutine psb_zspreinit - - Subroutine psb_zspallocate(a, nnz,info) - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(in) :: nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - Endif - call psb_nullify_sp(a) - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_zspallocate - - Subroutine psb_zspallmk(m,k,a,info) - implicit none - !....Parameters... - - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(in) :: m,k - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - integer :: nnz - - INFO = 0 - nnz = 2*max(1,m,k) - call psb_nullify_sp(a) - if (debug) write(0,*) 'SPALL : NNZ ',nnz,a%m,a%k - a%m=max(0,m) - a%k=max(0,k) - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'SPALL : end' - Return - - end subroutine psb_zspallmk - - Subroutine psb_zspallmknz(m,k,a, nnz,info) - implicit none - !....parameters... - - type(psb_zspmat_type), intent(inout) :: a - integer, intent(in) :: m,k,nnz - integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - if (nnz < 0) then - info=45 - return - endif - call psb_nullify_sp(a) - if (debug) write(0,*) 'spall : nnz ',nnz,a%m,a%k - a%m=max(0,m) - a%k=max(0,k) - call psb_sp_reall(a,nnz,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set infoa fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - if (debug) write(0,*) 'spall : end' - return - - end subroutine psb_zspallmknz - - - subroutine psb_zspall3(a, ni1,ni2,nd,info) - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nd - Integer, intent(out) :: info - - !locals - logical, parameter :: debug=.false. - - info = 0 - - call psb_nullify_sp(a) - call psb_sp_reall(a, ni1,ni2,nd,info) - if (info /= 0) return - a%pl(:)=0 - a%pr(:)=0 - ! set INFOA fields - a%fida = 'COO' - a%descra = 'GUN' - a%infoa(:) = 0 - a%infoa(psb_state_) = psb_spmat_bld_ - a%m = 0 - a%k = 0 - if (debug) write(0,*) 'SPALL : end' - Return - - End Subroutine psb_zspall3 - - subroutine psb_zspreall3(a, ni1,ni2,nz,info) - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(in) :: ni1,ni2,nz - Integer, intent(inout) :: info - - - info = 0 - call psb_realloc(nz,a%aspk,info) - if (info /= 0) return - call psb_realloc(ni2,a%ia2,info) - if (info /= 0) return - call psb_realloc(ni1,a%ia1,info) - if (info /= 0) return - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - call psb_realloc(max(1,a%k),a%pr,info) - if (info /= 0) return - - Return - - End Subroutine psb_zspreall3 - - - subroutine psb_zspreallocate(a, nnz,info,ifc) - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(in) :: NNZ - Integer, intent(out) :: info - ! - ! ifc is used here to allocate space in IA1 for smart - ! regeneration. This probably ought to be changed, - ! by adding a new component to d_spmat, or by making - ! infoa a pointer. - ! - Integer, intent(in), optional :: ifc - integer :: ifc_ - - info = 0 - if (nnz < 0) then - info=45 - return - endif - if (present(ifc)) then - ifc_ = max(1,ifc) - else - ifc_ = 1 - endif - - if (ifc_ == 1) then - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia1,a%ia2,a%aspk,info) - else - call psb_realloc(max(nnz,a%m+1,a%k+1),a%aspk,info) - if (info /= 0) return - call psb_realloc(max(nnz,a%m+1,a%k+1),a%ia2,info) - if (info /= 0) return - call psb_realloc(ifc*nnz+200,a%ia1,info) - if (info /= 0) return - end if - if (info /= 0) return - call psb_realloc(max(1,a%m),a%pl,info) - if (info /= 0) return - call psb_realloc(max(1,a%k),a%pr,info) - if (info /= 0) return - - Return - - End Subroutine psb_zspreallocate - - subroutine psb_zspclone(a, b,info) - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(in) :: A - Type(psb_zspmat_type), intent(out) :: B - Integer, intent(out) :: info - - - INFO = 0 - call psb_nullify_sp(b) - call psb_safe_ab_cpy(a%aspk,b%aspk,info) - if (info == 0) call psb_safe_ab_cpy(a%ia1,b%ia1,info) - if (info == 0) call psb_safe_ab_cpy(a%ia2,b%ia2,info) - if (info == 0) call psb_safe_ab_cpy(a%pl,b%pl,info) - if (info == 0) call psb_safe_ab_cpy(a%pr,b%pr,info) - if (info /= 0) then - info=2023 - return - Endif - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - Return - - End Subroutine psb_zspclone - - - ! This is done with pointer assignments, but it - ! will be feasible with MOVE_ALLOC when we move - ! to ALLOCATABLE components. - subroutine psb_zsp_transfer(a, b,info) - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: A - Type(psb_zspmat_type), intent(inout) :: B - Integer, intent(out) :: info - - info = 0 - - call psb_move_alloc( a%aspk, b%aspk , info) - call psb_move_alloc( a%ia1 , b%ia1 , info) - call psb_move_alloc( a%ia2 , b%ia2 , info) - call psb_move_alloc( a%pl , b%pl , info) - call psb_move_alloc( a%pr , b%pr , info) - b%infoa(:) = a%infoa(:) - b%fida = a%fida - b%descra = a%descra - b%m = a%m - b%k = a%k - - call psb_nullify_sp(a) - - Return - - End Subroutine psb_zsp_transfer - - Subroutine psb_zsp_setifld(val,field,a,info) - implicit none - !....Parameters... - - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(in) :: field,val - Integer, intent(out) :: info - - - info = 0 - - - if (info == 0) & - & call psb_setifield(val,field,a%infoa,psb_ifasize_,info) - - - Return - - end subroutine psb_zsp_setifld - - - subroutine psb_zsp_trim(a,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(out) :: info - !locals - Integer :: i1, i2, ia - - info = 0 - call psb_sp_trimsize(a,i1,i2,ia,info) - i1 = max(i1,1); i2 = max(i2,1); ia = max(ia,1) - if (info == 0) call psb_sp_reall(a,i1,i2,ia,info) - - Return - - End Subroutine psb_zsp_trim - - subroutine psb_zsp_trimsize(a, i1,i2,ia,info) - use psb_string_mod - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(in) :: A - Integer, intent(out) :: i1, i2, ia, info - - !locals - Integer :: nza - - info = 0 - if (psb_sp_getifld(psb_upd_,a,info) == psb_upd_perm_) then - info = -1 - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - return - endif - select case(psb_tolower(a%fida)) - case('csr') - nza = a%ia2(a%m+1)-1 - ia = nza - i1 = nza - i2 = a%m + 1 - case('csc') - nza = a%ia2(a%k+1)-1 - ia = nza - i1 = nza - i2 = a%k + 1 - case('coo','coi') - nza = a%infoa(psb_nnz_) - i1 = nza - i2 = nza - ia = nza - case('jad') - ! Feeling lazy today - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - case default - i1 = size(a%ia1) - i2 = size(a%ia2) - ia = size(a%aspk) - end select - - Return - - End Subroutine psb_zsp_trimsize - - function psb_zsp_getifld(field,a,info) - implicit none - !....Parameters... - - Type(psb_zspmat_type), intent(in) :: A - Integer, intent(in) :: field - Integer :: psb_zsp_getifld - Integer, intent(out) :: info - - !locals - integer :: val - - info = 0 - val = -1 - - if ((field < 1).or.(field > psb_ifasize_)) then - info = -1 - psb_zsp_getifld = val - return - endif - - call psb_getifield(val,field,a%infoa,psb_ifasize_,info) - - psb_zsp_getifld = val - Return - - end function psb_zsp_getifld - - function psb_zspsizeof(a) result(val) - implicit none - !....Parameters... - - Type(psb_zspmat_type), intent(in) :: A - integer(psb_long_int_k_) :: val - - val = psb_sizeof_int*size(a%infoa) - - if (allocated(a%aspk)) then - val = val + 2 * psb_sizeof_dp * size(a%aspk) - endif - if (allocated(a%ia1)) then - val = val + psb_sizeof_int * size(a%ia1) - endif - if (allocated(a%ia2)) then - val = val + psb_sizeof_int * size(a%ia2) - endif - if (allocated(a%pl)) then - val = val + psb_sizeof_int * size(a%pl) - endif - if (allocated(a%pr)) then - val = val + psb_sizeof_int * size(a%pr) - endif - - end function psb_zspsizeof - - - - - subroutine psb_zsp_free(a,info) - implicit none - !....Parameters... - Type(psb_zspmat_type), intent(inout) :: A - Integer, intent(out) :: info - - info = 0 - - if (allocated(a%aspk)) then - deallocate(a%aspk,STAT=INFO) - endif - if (allocated(a%ia1)) then - deallocate(a%ia1,STAT=INFO) - endif - if ( allocated(a%ia2)) then - deallocate(a%ia2,STAT=INFO) - endif - if ( allocated(a%pr)) then - deallocate(a%pr,STAT=INFO) - endif - if ( allocated(a%pl)) then - deallocate(a%pl,STAT=INFO) - endif - call psb_nullify_sp(a) - Return - End Subroutine psb_zsp_free - - - subroutine psb_sspinfo(ireq,a,ires,info,iaux) - use psb_const_mod - use psb_error_mod - use psb_string_mod - use psb_sort_mod - implicit none - - type(psb_sspmat_type), intent(in), target :: a - integer, intent(in) :: ireq - integer, intent(out) :: ires, info - integer, intent(in), optional :: iaux - - integer :: j,ip,jp,nr,irw,nz, err_act, row, ipx, pia, pja, rb,idx, nc - integer, pointer :: ia1(:), ia2(:), ia3(:), ja(:) - character(len=20) :: name, ch_err - - name='psb_sspinfo' - info = 0 - call psb_erractionsave(err_act) - - - if (ireq == psb_nztotreq_) then - ! The number of nonzeroes - if (psb_toupper(a%fida) == 'CSR') then - nr = a%m - ires = a%ia2(nr+1)-1 - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'CSC') then - nc = a%k - ires = a%ia2(nc+1)-1 - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzrowreq_) then - ! The number of nonzeroes in row iaux - if (.not.present(iaux)) then - write(0,*) 'Need IAUX when ireq=nzrowreq' - ires=-1 - return - endif - irw = iaux - if (irw > a%m) then - write(0,*) 'SPINFO: Accessing out of bounds? ',irw,a%m - ires = 0 - return - endif - if (psb_toupper(a%fida) == 'CSR') then - ires = a%ia2(irw+1)-a%ia2(irw) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - - if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then - ! In this case we can do a binary search. - nz = a%infoa(psb_nnz_) - ip = psb_ibsrch(irw,nz,a%ia1) - jp = ip - ! expand [ip,jp] to contain all row entries. - do - if (ip < 2) exit - if (a%ia1(ip-1) == irw) then - ip = ip -1 - else - exit - end if - end do - - do - if (jp > nz) exit - if (a%ia1(jp) == irw) then - jp =jp + 1 - else - exit - endif - end do - ires = jp-ip - else - ires = count(a%ia1(1:a%infoa(psb_nnz_))==irw) - endif -!!$ ires = 0 -!!$ do i=1, a%infoa(psb_nnz_) -!!$ if (a%ia1(i) == irw) ires = ires + 1 -!!$ enddo - else if (psb_toupper(a%fida) == 'JAD') then - pia = a%ia2(2) ! points to the beginning of ia(3,png) - pja = a%ia2(3) ! points to the beginning of ja(:) - ja => a%ia2(pja:) ! the array containing the pointers to ka and aspk - ia1 => a%ia2(pia:pja-1:3) ! the array containing the first row index of each block - ia2 => a%ia2(pia+1:pja-1:3) ! the array containing a pointer to the pos. in ja to the first jad column - ia3 => a%ia2(pia+2:pja-1:3) ! the array containing a pointer to the pos. in ja to the first csr column - - idx=a%pl(irw) - j=0 - nz=0 - blkfnd: do - j=j+1 - if(ia1(j) == idx) then - nz=nz+ia3(j)-ia2(j) - ipx = ia1(j) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - else if(ia1(j) > idx) then - nz=nz+ia3(j-1)-ia2(j-1) - ipx = ia1(j-1) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j-1)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - end if - end do blkfnd - ires=nz - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzsizereq_) then - if (psb_toupper(a%fida) == 'CSR') then - ires = size(a%aspk) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = size(a%aspk) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else - write(0,*) 'Unknown request into SPINFO' - ires=-1 - endif - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if - return - - end subroutine psb_sspinfo - - subroutine psb_dspinfo(ireq,a,ires,info,iaux) - use psb_const_mod - use psb_error_mod - use psb_string_mod - use psb_sort_mod - implicit none - - type(psb_dspmat_type), intent(in), target :: a - integer, intent(in) :: ireq - integer, intent(out) :: ires, info - integer, intent(in), optional :: iaux - - integer :: j,ip,jp,nr,irw,nz, err_act, row, ipx, pia, pja, rb,idx, nc - integer, pointer :: ia1(:), ia2(:), ia3(:), ja(:) - character(len=20) :: name, ch_err - - name='psb_dspinfo' - info = 0 - call psb_erractionsave(err_act) - - - if (ireq == psb_nztotreq_) then - ! The number of nonzeroes - if (psb_toupper(a%fida) == 'CSR') then - nr = a%m - ires = a%ia2(nr+1)-1 - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'CSC') then - nc = a%k - ires = a%ia2(nc+1)-1 - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzrowreq_) then - ! The number of nonzeroes in row iaux - if (.not.present(iaux)) then - write(0,*) 'Need IAUX when ireq=nzrowreq' - ires=-1 - return - endif - irw = iaux - if (irw > a%m) then - write(0,*) 'SPINFO: Accessing out of bounds? ',irw,a%m - ires = 0 - return - endif - if (psb_toupper(a%fida) == 'CSR') then - ires = a%ia2(irw+1)-a%ia2(irw) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - - if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then - ! In this case we can do a binary search. - nz = a%infoa(psb_nnz_) - ip = psb_ibsrch(irw,nz,a%ia1) - jp = ip - ! expand [ip,jp] to contain all row entries. - do - if (ip < 2) exit - if (a%ia1(ip-1) == irw) then - ip = ip -1 - else - exit - end if - end do - - do - if (jp > nz) exit - if (a%ia1(jp) == irw) then - jp =jp + 1 - else - exit - endif - end do - ires = jp-ip - else - ires = count(a%ia1(1:a%infoa(psb_nnz_))==irw) - endif -!!$ ires = 0 -!!$ do i=1, a%infoa(psb_nnz_) -!!$ if (a%ia1(i) == irw) ires = ires + 1 -!!$ enddo - else if (psb_toupper(a%fida) == 'JAD') then - pia = a%ia2(2) ! points to the beginning of ia(3,png) - pja = a%ia2(3) ! points to the beginning of ja(:) - ja => a%ia2(pja:) ! the array containing the pointers to ka and aspk - ia1 => a%ia2(pia:pja-1:3) ! the array containing the first row index of each block - ia2 => a%ia2(pia+1:pja-1:3) ! the array containing a pointer to the pos. in ja to the first jad column - ia3 => a%ia2(pia+2:pja-1:3) ! the array containing a pointer to the pos. in ja to the first csr column - - idx=a%pl(irw) - j=0 - nz=0 - blkfnd: do - j=j+1 - if(ia1(j) == idx) then - nz=nz+ia3(j)-ia2(j) - ipx = ia1(j) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - else if(ia1(j) > idx) then - nz=nz+ia3(j-1)-ia2(j-1) - ipx = ia1(j-1) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j-1)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - end if - end do blkfnd - ires=nz - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzsizereq_) then - if (psb_toupper(a%fida) == 'CSR') then - ires = size(a%aspk) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = size(a%aspk) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else - write(0,*) 'Unknown request into SPINFO' - ires=-1 - endif - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if - return - - end subroutine psb_dspinfo - - subroutine psb_cspinfo(ireq,a,ires,info,iaux) - use psb_const_mod - use psb_error_mod - use psb_string_mod - use psb_sort_mod - implicit none - - type(psb_cspmat_type), intent(in), target :: a - integer, intent(in) :: ireq - integer, intent(out) :: ires, info - integer, intent(in), optional :: iaux - - integer :: j,ip,jp,nr,irw,nz, err_act, row, ipx, pia, pja, rb,idx, nc - integer, pointer :: ia1(:), ia2(:), ia3(:), ja(:) - character(len=20) :: name, ch_err - - name='psb_cspinfo' - info = 0 - call psb_erractionsave(err_act) - - - if (ireq == psb_nztotreq_) then - ! The number of nonzeroes - if (psb_toupper(a%fida) == 'CSR') then - nr = a%m - ires = a%ia2(nr+1)-1 - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'CSC') then - nc = a%k - ires = a%ia2(nc+1)-1 - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzrowreq_) then - ! The number of nonzeroes in row iaux - if (.not.present(iaux)) then - write(0,*) 'Need IAUX when ireq=nzrowreq' - ires=-1 - return - endif - irw = iaux - if (psb_toupper(a%fida) == 'CSR') then - ires = a%ia2(irw+1)-a%ia2(irw) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - - if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then - ! In this case we can do a binary search. - nz = a%infoa(psb_nnz_) - ip = psb_ibsrch(irw,nz,a%ia1) - jp = ip - ! expand [ip,jp] to contain all row entries. - do - if (ip < 2) exit - if (a%ia1(ip-1) == irw) then - ip = ip -1 - else - exit - end if - end do - - do - if (jp > nz) exit - if (a%ia1(jp) == irw) then - jp =jp + 1 - else - exit - endif - end do - ires = jp-ip - else - ires = count(a%ia1(1:a%infoa(psb_nnz_))==irw) - endif -!!$ ires = 0 -!!$ do i=1, a%infoa(psb_nnz_) -!!$ if (a%ia1(i) == irw) ires = ires + 1 -!!$ enddo - else if (psb_toupper(a%fida) == 'JAD') then - pia = a%ia2(2) ! points to the beginning of ia(3,png) - pja = a%ia2(3) ! points to the beginning of ja(:) - ja => a%ia2(pja:) ! the array containing the pointers to ka and aspk - ia1 => a%ia2(pia:pja-1:3) ! the array containing the first row index of each block - ia2 => a%ia2(pia+1:pja-1:3) ! the array containing a pointer to the pos. in ja to the first jad column - ia3 => a%ia2(pia+2:pja-1:3) ! the array containing a pointer to the pos. in ja to the first csr column - - idx=a%pl(irw) - j=0 - nz=0 - blkfnd: do - j=j+1 - if(ia1(j) == idx) then - nz=nz+ia3(j)-ia2(j) - ipx = ia1(j) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - else if(ia1(j) > idx) then - nz=nz+ia3(j-1)-ia2(j-1) - ipx = ia1(j-1) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j-1)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - end if - end do blkfnd - ires=nz - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzsizereq_) then - if (psb_toupper(a%fida) == 'CSR') then - ires = size(a%aspk) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = size(a%aspk) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else - write(0,*) 'Unknown request into SPINFO' - ires=-1 - endif - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if - return - - end subroutine psb_cspinfo - - subroutine psb_zspinfo(ireq,a,ires,info,iaux) - use psb_sort_mod - use psb_const_mod - use psb_error_mod - use psb_string_mod - implicit none - - type(psb_zspmat_type), intent(in), target :: a - integer, intent(in) :: ireq - integer, intent(out) :: ires, info - integer, intent(in), optional :: iaux - - integer :: j,ip,jp,nr,irw,nz, err_act, row, ipx, pia, pja, rb,idx, nc - integer, pointer :: ia1(:), ia2(:), ia3(:), ja(:) - character(len=20) :: name, ch_err - - name='psb_zspinfo' - info = 0 - call psb_erractionsave(err_act) - - - if (ireq == psb_nztotreq_) then - ! The number of nonzeroes - if (psb_toupper(a%fida) == 'CSR') then - nr = a%m - ires = a%ia2(nr+1)-1 - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else if (psb_toupper(a%fida) == 'CSC') then - nc = a%k - ires = a%ia2(nc+1)-1 - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzrowreq_) then - ! The number of nonzeroes in row iaux - if (.not.present(iaux)) then - write(0,*) 'Need IAUX when ireq=nzrowreq' - ires=-1 - return - endif - irw = iaux - if (psb_toupper(a%fida) == 'CSR') then - ires = a%ia2(irw+1)-a%ia2(irw) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - - if (a%infoa(psb_srtd_) == psb_isrtdcoo_) then - ! In this case we can do a binary search. - nz = a%infoa(psb_nnz_) - ip = psb_ibsrch(irw,nz,a%ia1) - jp = ip - ! expand [ip,jp] to contain all row entries. - do - if (ip < 2) exit - if (a%ia1(ip-1) == irw) then - ip = ip -1 - else - exit - end if - end do - - do - if (jp > nz) exit - if (a%ia1(jp) == irw) then - jp =jp + 1 - else - exit - endif - end do - ires = jp-ip - else - ires = count(a%ia1(1:a%infoa(psb_nnz_))==irw) - endif -!!$ ires = 0 -!!$ do i=1, a%infoa(psb_nnz_) -!!$ if (a%ia1(i) == irw) ires = ires + 1 -!!$ enddo - else if (psb_toupper(a%fida) == 'JAD') then - pia = a%ia2(2) ! points to the beginning of ia(3,png) - pja = a%ia2(3) ! points to the beginning of ja(:) - ja => a%ia2(pja:) ! the array containing the pointers to ka and aspk - ia1 => a%ia2(pia:pja-1:3) ! the array containing the first row index of each block - ia2 => a%ia2(pia+1:pja-1:3) ! the array containing a pointer to the pos. in ja to the first jad column - ia3 => a%ia2(pia+2:pja-1:3) ! the array containing a pointer to the pos. in ja to the first csr column - - idx=a%pl(irw) - j=0 - nz=0 - blkfnd: do - j=j+1 - if(ia1(j) == idx) then - nz=nz+ia3(j)-ia2(j) - ipx = ia1(j) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - else if(ia1(j) > idx) then - nz=nz+ia3(j-1)-ia2(j-1) - ipx = ia1(j-1) ! the first row index of the block - rb = idx-ipx ! the row offset within the block - row = ia3(j-1)+rb - nz = nz+ja(row+1)-ja(row) - exit blkfnd - end if - end do blkfnd - ires=nz - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else if (ireq == psb_nzsizereq_) then - if (psb_toupper(a%fida) == 'CSR') then - ires = size(a%aspk) - else if ((psb_toupper(a%fida) == 'COO').or.(psb_toupper(a%fida) == 'COI')) then - ires = size(a%aspk) - else if (psb_toupper(a%fida) == 'JAD') then - ires = a%infoa(psb_nnz_) - else - ires=-1 - info=136 - ch_err=a%fida(1:3) - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - else - write(0,*) 'Unknown request into SPINFO' - ires=-1 - endif - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error() - return - end if - return - - end subroutine psb_zspinfo - -end module psb_spmat_type - diff --git a/base/modules/psb_tools_mod.f90 b/base/modules/psb_tools_mod.f90 index a0a5a87b..dcc1a7c4 100644 --- a/base/modules/psb_tools_mod.f90 +++ b/base/modules/psb_tools_mod.f90 @@ -666,7 +666,7 @@ Module psb_tools_mod type(psb_desc_type), intent(inout) :: desc_ac type(psb_sspmat_type), intent(inout) :: a integer, intent(in) :: nz,ia(:),ja(:) - real(kind(1.d0)), intent(in) :: val(:) + real(psb_spk_), intent(in) :: val(:) integer, intent(out) :: info end subroutine psb_sspins_2desc subroutine psb_dspins(nz,ia,ja,val,a,desc_a,info,rebuild) @@ -859,6 +859,16 @@ Module psb_tools_mod end subroutine psb_get_ovrlap end interface + interface psb_icdasb + subroutine psb_icdasb(desc,info,ext_hv) + use psb_descriptor_type + Type(psb_desc_type), intent(inout) :: desc + integer, intent(out) :: info + logical, intent(in),optional :: ext_hv + end subroutine psb_icdasb + end interface + + interface psb_linmap_init module procedure psb_dlinmap_init, psb_zlinmap_init end interface @@ -1136,15 +1146,6 @@ contains subroutine psb_cdasb(desc,info) use psb_descriptor_type - interface - subroutine psb_icdasb(desc,info,ext_hv) - use psb_descriptor_type - Type(psb_desc_type), intent(inout) :: desc - integer, intent(out) :: info - logical, intent(in),optional :: ext_hv - end subroutine psb_icdasb - end interface - Type(psb_desc_type), intent(inout) :: desc integer, intent(out) :: info diff --git a/base/modules/psi_mod.f90 b/base/modules/psi_mod.f90 index 486a782a..3ea7668b 100644 --- a/base/modules/psi_mod.f90 +++ b/base/modules/psi_mod.f90 @@ -80,7 +80,7 @@ module psi_mod use psb_descriptor_type, only : psb_desc_type, psb_spk_, psb_dpk_ type(psb_desc_type) :: desc integer :: index_in(:),dep_list(:) - integer,allocatable, intent(inout) :: desc_index(:) + integer,allocatable :: desc_index(:) integer :: length_dl,nsnd,nrcv,info logical :: isglob_in end subroutine psi_desc_index @@ -584,6 +584,10 @@ module psi_mod module procedure psi_cnv_dsc end interface + interface psi_renum_index + module procedure psi_renum_index + end interface + interface psi_inner_cnv module procedure psi_inner_cnv1, psi_inner_cnv2,& & psi_inner_cnvs, psi_inner_cnvs2 @@ -617,6 +621,83 @@ module psi_mod contains + subroutine psi_renum_index(iperm,idx,info) + use psb_serial_mod + implicit none + + integer, intent(out) :: info + integer, intent(in) :: iperm(:) + integer, intent(inout) :: idx(:) + + integer :: i,j,k,nh + + i=1 + k=idx(i) + do while (k /= -1) + i = i+1 + nh = idx(i) + do j = i+1, i+nh + idx(j) = iperm(idx(j)) + enddo + i = i + nh + 1 + nh = idx(i) + do j = i+1, i+nh + idx(j) = iperm(idx(j)) + enddo + i = i + nh + 1 + k = idx(i) + enddo + + end subroutine psi_renum_index + + subroutine psi_renum_idxmap(nc,iperm,idxmap,info) + use psb_serial_mod + implicit none + + integer, intent(out) :: info + integer, intent(in) :: nc,iperm(:) + type(psb_idxmap_type), intent(inout) :: idxmap + + integer, allocatable :: itmp(:) + integer :: i,j,k,nh + + if (nc > size(iperm)) then + info = 2 + return + endif + + if (idxmap%state == psb_desc_large_) then + + allocate(itmp(size(idxmap%loc_to_glob)), stat=i) + if (i/=0) then + info = 4001 + return + end if + do i=1,nc + itmp(i) = idxmap%loc_to_glob(iperm(i)) + end do + do i=1, size(idxmap%glb_lc,1) + idxmap%glb_lc(i,2) = iperm(idxmap%glb_lc(i,2)) + end do + do i=1, nc + idxmap%loc_to_glob(i) = itmp(i) + end do + + else + + do i=1, nc + idxmap%glob_to_loc(idxmap%loc_to_glob(iperm(i))) = i + enddo + do i=1,size(idxmap%glob_to_loc) + j = idxmap%glob_to_loc(i) + if (j>0) then + idxmap%loc_to_glob(j) = i + endif + enddo + end if + + end subroutine psi_renum_idxmap + subroutine psi_cnv_dsc(halo_in,ovrlap_in,ext_in,cdesc, info) use psb_realloc_mod @@ -662,7 +743,7 @@ contains call psb_errpush(4010,name,a_err='psi_crea_index') goto 9999 end if - call psb_transfer(idx_out,cdesc%halo_index,info) + call psb_move_alloc(idx_out,cdesc%halo_index,info) cdesc%matrix_data(psb_thal_xch_) = nxch cdesc%matrix_data(psb_thal_snd_) = nsnd cdesc%matrix_data(psb_thal_rcv_) = nrcv @@ -678,7 +759,7 @@ contains call psb_errpush(4010,name,a_err='psi_crea_index') goto 9999 end if - call psb_transfer(idx_out,cdesc%ext_index,info) + call psb_move_alloc(idx_out,cdesc%ext_index,info) cdesc%matrix_data(psb_text_xch_) = nxch cdesc%matrix_data(psb_text_snd_) = nsnd cdesc%matrix_data(psb_text_rcv_) = nrcv @@ -692,9 +773,9 @@ contains call psb_errpush(4010,name,a_err='psi_crea_index') goto 9999 end if - call psb_transfer(idx_out,cdesc%ovrlap_index,info) + call psb_move_alloc(idx_out,cdesc%ovrlap_index,info) if (info /= 0) then - call psb_errpush(4010,name,a_err='psb_transfer') + call psb_errpush(4010,name,a_err='psb_move_alloc') goto 9999 end if @@ -720,9 +801,9 @@ contains call psb_errpush(4010,name,a_err='psi_bld_ovr_mst') goto 9999 end if - call psb_transfer(idx_out,cdesc%ovr_mst_idx,info) + call psb_move_alloc(idx_out,cdesc%ovr_mst_idx,info) if (info /= 0) then - call psb_errpush(4010,name,a_err='psb_transfer') + call psb_errpush(4010,name,a_err='psb_move_alloc') goto 9999 end if @@ -732,7 +813,7 @@ contains ! finally bnd_elem call psi_crea_bnd_elem(idx_out,cdesc,info) - if (info == 0) call psb_transfer(idx_out,cdesc%bnd_elem,info) + if (info == 0) call psb_move_alloc(idx_out,cdesc%bnd_elem,info) if (info /= 0) then call psb_errpush(4010,name,a_err='psi_crea_bnd_elem') diff --git a/base/psblas/Makefile b/base/psblas/Makefile index 70d2894f..49c6120d 100644 --- a/base/psblas/Makefile +++ b/base/psblas/Makefile @@ -8,7 +8,6 @@ OBJS= psb_ddot.o psb_damax.o psb_dasum.o psb_daxpby.o\ psb_znrm2.o psb_znrmi.o psb_zspmm.o psb_zspsm.o\ psb_saxpby.o psb_sdot.o psb_sasum.o psb_samax.o\ psb_snrm2.o psb_snrmi.o psb_sspmm.o psb_sspsm.o\ - psb_sxdot.o\ psb_camax.o psb_casum.o psb_caxpby.o psb_cdot.o \ psb_cnrm2.o psb_cnrmi.o psb_cspmm.o psb_cspsm.o diff --git a/base/psblas/psb_cspmm.f90 b/base/psblas/psb_cspmm.f90 index 40ae82e6..d61f8553 100644 --- a/base/psblas/psb_cspmm.f90 +++ b/base/psblas/psb_cspmm.f90 @@ -242,7 +242,7 @@ subroutine psb_cspmm(alpha,a,x,beta,y,desc_a,info,& blk: do i=1, ik, nb ib=ib1 ib1 = max(0,min(nb,(ik)-(i-1+ib))) - xp => x(iix:lldx,jjx+i+ib-1:jjx+i+ib+ib1-2) + xp => x(iix:lldx,jjx+i-1+ib:jjx+i-1+ib+ib1-1) if ((ib1 > 0).and.(doswap_)) & & call psi_swapdata(psb_swap_send_,ib1,& & czero,xp,desc_a,iwork,info) @@ -250,8 +250,8 @@ subroutine psb_cspmm(alpha,a,x,beta,y,desc_a,info,& if(info /= 0) exit blk ! local Matrix-vector product - call a%csmm(alpha,x(:,jjx+i-1:jjx+i+ib-1),& - & beta,y(:,jjy+i-1:jjy+i+ib-1),info,trans=trans_) + call a%csmm(alpha,x(:,jjx+i-1:jjx+i-1+ib-1),& + & beta,y(:,jjy+i-1:jjy+i-1+ib-1),info,trans=trans_) if(info /= 0) exit blk @@ -306,6 +306,8 @@ subroutine psb_cspmm(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x(:,1:ik),xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) @@ -622,6 +624,8 @@ subroutine psb_cspmv(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x,xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) diff --git a/base/psblas/psb_dspmm.f90 b/base/psblas/psb_dspmm.f90 index 2985a551..8b58728b 100644 --- a/base/psblas/psb_dspmm.f90 +++ b/base/psblas/psb_dspmm.f90 @@ -242,7 +242,7 @@ subroutine psb_dspmm(alpha,a,x,beta,y,desc_a,info,& blk: do i=1, ik, nb ib=ib1 ib1 = max(0,min(nb,(ik)-(i-1+ib))) - xp => x(iix:lldx,jjx+i+ib-1:jjx+i+ib+ib1-2) + xp => x(iix:lldx,jjx+i-1+ib:jjx+i-1+ib+ib1-1) if ((ib1 > 0).and.(doswap_)) & & call psi_swapdata(psb_swap_send_,ib1,& & dzero,xp,desc_a,iwork,info) @@ -250,8 +250,8 @@ subroutine psb_dspmm(alpha,a,x,beta,y,desc_a,info,& if(info /= 0) exit blk ! local Matrix-vector product - call a%csmm(alpha,x(:,jjx+i-1:jjx+i+ib-1),& - & beta,y(:,jjy+i-1:jjy+i+ib-1),info,trans=trans_) + call a%csmm(alpha,x(:,jjx+i-1:jjx+i-1+ib-1),& + & beta,y(:,jjy+i-1:jjy+i-1+ib-1),info,trans=trans_) if(info /= 0) exit blk @@ -305,6 +305,8 @@ subroutine psb_dspmm(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x(:,1:ik),xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) @@ -620,6 +622,8 @@ subroutine psb_dspmv(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x,xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) diff --git a/base/psblas/psb_sspmm.f90 b/base/psblas/psb_sspmm.f90 index 77a8fdb4..20e725df 100644 --- a/base/psblas/psb_sspmm.f90 +++ b/base/psblas/psb_sspmm.f90 @@ -242,7 +242,7 @@ subroutine psb_sspmm(alpha,a,x,beta,y,desc_a,info,& blk: do i=1, ik, nb ib=ib1 ib1 = max(0,min(nb,(ik)-(i-1+ib))) - xp => x(iix:lldx,jjx+i+ib-1:jjx+i+ib+ib1-2) + xp => x(iix:lldx,jjx+i-1+ib:jjx+i-1+ib+ib1-1) if ((ib1 > 0).and.(doswap_)) & & call psi_swapdata(psb_swap_send_,ib1,& & szero,xp,desc_a,iwork,info) @@ -250,8 +250,8 @@ subroutine psb_sspmm(alpha,a,x,beta,y,desc_a,info,& if(info /= 0) exit blk ! local Matrix-vector product - call a%csmm(alpha,x(:,jjx+i-1:jjx+i+ib-1),& - & beta,y(:,jjy+i-1:jjy+i+ib-1),info,trans=trans_) + call a%csmm(alpha,x(:,jjx+i-1:jjx+i-1+ib-1),& + & beta,y(:,jjy+i-1:jjy+i-1+ib-1),info,trans=trans_) if(info /= 0) exit blk @@ -305,6 +305,8 @@ subroutine psb_sspmm(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x(:,1:ik),xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) @@ -621,6 +623,8 @@ subroutine psb_sspmv(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x,xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) diff --git a/base/psblas/psb_zspmm.f90 b/base/psblas/psb_zspmm.f90 index 44b0deef..1e44dc89 100644 --- a/base/psblas/psb_zspmm.f90 +++ b/base/psblas/psb_zspmm.f90 @@ -242,7 +242,7 @@ subroutine psb_zspmm(alpha,a,x,beta,y,desc_a,info,& blk: do i=1, ik, nb ib=ib1 ib1 = max(0,min(nb,(ik)-(i-1+ib))) - xp => x(iix:lldx,jjx+i+ib-1:jjx+i+ib+ib1-2) + xp => x(iix:lldx,jjx+i-1+ib:jjx+i-1+ib+ib1-1) if ((ib1 > 0).and.(doswap_)) & & call psi_swapdata(psb_swap_send_,ib1,& & zzero,xp,desc_a,iwork,info) @@ -250,8 +250,8 @@ subroutine psb_zspmm(alpha,a,x,beta,y,desc_a,info,& if(info /= 0) exit blk ! local Matrix-vector product - call a%csmm(alpha,x(:,jjx+i-1:jjx+i+ib-1),& - & beta,y(:,jjy+i-1:jjy+i+ib-1),info,trans=trans_) + call a%csmm(alpha,x(:,jjx+i-1:jjx+i-1+ib-1),& + & beta,y(:,jjy+i-1:jjy+i-1+ib-1),info,trans=trans_) if(info /= 0) exit blk @@ -306,6 +306,8 @@ subroutine psb_zspmm(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x(:,1:ik),xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) @@ -622,6 +624,8 @@ subroutine psb_zspmv(alpha,a,x,beta,y,desc_a,info,& ! ! Non-empty overlap, need a buffer to hold ! the entries updated with average operator. + ! Why the average? because in this way they will contribute + ! with a proper scale factor (1/np) to the overall product. ! call psi_ovrl_save(x,xvsave,desc_a,info) if (info == 0) call psi_ovrl_upd(x,desc_a,psb_avg_,info) diff --git a/base/serial/Makefile b/base/serial/Makefile index c4dc0fea..7cf0b11a 100644 --- a/base/serial/Makefile +++ b/base/serial/Makefile @@ -13,7 +13,7 @@ FOBJS = psb_cest.o psb_dcoins.o psb_dcsmm.o psb_dcsmv.o \ psb_zcoins.o psb_zcsprt.o psb_zneigh.o psb_ztransp.o psb_ztransc.o\ psb_zrwextd.o psb_zsymbmm.o psb_znumbmm.o psb_zspscal.o psb_zspclip.o\ psb_getifield.o psb_setifield.o psb_update_mod.o psb_getrow_mod.o\ - psb_dgelp.o psb_zgelp.o psb_dcsrp.o psb_zcsrp.o\ + psb_dgelp.o psb_zgelp.o\ psb_dspshift.o psb_dspsetbld.o psb_zspshift.o psb_zspsetbld.o\ psb_scsprt.o psb_sspcnv.o psb_scoins.o psb_scsmm.o psb_scsmv.o \ psb_scssm.o psb_scssv.o psb_sneigh.o psb_sspgtblk.o psb_sspgetrow.o \ @@ -27,7 +27,7 @@ FOBJS = psb_cest.o psb_dcoins.o psb_dcsmm.o psb_dcsmv.o \ psb_ccssm.o psb_ccssv.o psb_ccsmm.o psb_ccsmv.o psb_ctransp.o psb_ctransc.o\ psb_cspclip.o psb_crwextd.o psb_cspscal.o\ psb_cnumbmm.o psb_csymbmm.o psb_cneigh.o psb_ip_reord_mod.o -# +# psb_dcsrp.o psb_zcsrp.o\ LIBDIR=.. MODDIR=../modules diff --git a/base/serial/aux/Makefile b/base/serial/aux/Makefile index ebfe0661..05f83793 100644 --- a/base/serial/aux/Makefile +++ b/base/serial/aux/Makefile @@ -4,7 +4,7 @@ include ../../../Make.inc # FOBJS = isr.o isrx.o iasr.o iasrx.o msort_up.o msort_dw.o\ - isaperm.o ibsrch.o issrch.o imsr.o imsrx.o imsru.o\ + imsr.o imsrx.o imsru.o\ dsr.o dsrx.o dasr.o dasrx.o dmsr.o dmsrx.o dmsort_up.o dmsort_dw.o \ ssr.o ssrx.o sasr.o sasrx.o smsr.o smsrx.o smsort_up.o smsort_dw.o \ clcmp_mod.o clsr.o clsrx.o \ diff --git a/base/serial/psb_ccoins.f90 b/base/serial/psb_ccoins.f90 index c892f15d..78914e73 100644 --- a/base/serial/psb_ccoins.f90 +++ b/base/serial/psb_ccoins.f90 @@ -235,7 +235,7 @@ subroutine psb_ccoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) if(info /= izero) then info=4010 ch_err='psb_sp_transfer' @@ -404,7 +404,7 @@ subroutine psb_ccoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) call psb_sp_info(psb_nztotreq_,a,nza,info) call psb_sp_info(psb_nzsizereq_,a,isza,info) if(info /= izero) then diff --git a/base/serial/psb_ccsprt.f90 b/base/serial/psb_ccsprt.f90 index 0797ee1d..39d9d9c0 100644 --- a/base/serial/psb_ccsprt.f90 +++ b/base/serial/psb_ccsprt.f90 @@ -58,8 +58,8 @@ subroutine psb_ccsprt(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) - character(len=*), parameter :: frmtr='(2(i6,1x),2(es16.8,1x),2(i6,1x))' - integer :: irs,ics,i,j + character(len=80) :: frmtv + integer :: irs,ics,i,j, nmx, ni if (present(eirs)) then irs = eirs @@ -79,6 +79,12 @@ subroutine psb_ccsprt(iout,a,iv,eirs,eics,head,ivr,ivc) write(iout,'(a,a)') '% ',psb_toupper(a%fida) endif + nmx = max(a%m,a%k,1) + ni = floor(log10(1.0*nmx)) + 1 + + write(frmtv,'(a,i3.3,a,i3.3,a)') '(2(i',ni,',1x),2(es16.8,1x),2(i',ni,',1x))' + + select case(psb_toupper(a%fida)) case ('CSR') @@ -88,32 +94,32 @@ subroutine psb_ccsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo endif @@ -126,32 +132,32 @@ subroutine psb_ccsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) + write(iout,frmtv) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo endif @@ -161,28 +167,28 @@ subroutine psb_ccsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if(present(iv)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) + write(iout,frmtv) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) enddo else if (present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) enddo else if (present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j) + write(iout,frmtv) a%ia1(j),a%ia2(j),a%aspk(j) enddo endif endif diff --git a/base/serial/psb_cgelp.f90 b/base/serial/psb_cgelp.f90 index 2892783e..ac38586b 100644 --- a/base/serial/psb_cgelp.f90 +++ b/base/serial/psb_cgelp.f90 @@ -70,14 +70,6 @@ subroutine psb_cgelp(trans,iperm,x,info) end subroutine cgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - character(len=20) :: name, ch_err name = 'psb_cgelp' @@ -97,7 +89,7 @@ subroutine psb_cgelp(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) @@ -205,13 +197,6 @@ subroutine psb_cgelpv(trans,iperm,x,info) end subroutine cgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface character(len=20) :: name, ch_err name = 'psb_cgelpv' @@ -232,7 +217,7 @@ subroutine psb_cgelpv(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) diff --git a/base/serial/psb_cipcoo2csc.f90 b/base/serial/psb_cipcoo2csc.f90 index c7d05a36..619d4d47 100644 --- a/base/serial/psb_cipcoo2csc.f90 +++ b/base/serial/psb_cipcoo2csc.f90 @@ -89,11 +89,11 @@ subroutine psb_cipcoo2csc(a,info,clshr) if(debug_level >= psb_debug_serial_) write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nc,size(a%ia2),size(iaux) - call psb_transfer(a%ia2,itemp,info) - if (info == 0) call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia2,itemp,info) + if (info == 0) call psb_move_alloc(iaux,a%ia2,info) if (info /= 0) then info=4010 - call psb_errpush(info,name,a_err='psb_transfer') + call psb_errpush(info,name,a_err='psb_move_alloc') goto 9999 end if diff --git a/base/serial/psb_cipcoo2csr.f90 b/base/serial/psb_cipcoo2csr.f90 index 83d163f9..189ca7cc 100644 --- a/base/serial/psb_cipcoo2csr.f90 +++ b/base/serial/psb_cipcoo2csr.f90 @@ -89,9 +89,9 @@ subroutine psb_cipcoo2csr(a,info,rwshr) & write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nr,size(a%ia2),size(iaux) - call psb_transfer(a%ia1,itemp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia1,itemp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(iaux,a%ia2,info) ! ! This routine can be used in two modes: diff --git a/base/serial/psb_cipcsr2coo.f90 b/base/serial/psb_cipcsr2coo.f90 index 0c3f3758..d7f97f54 100644 --- a/base/serial/psb_cipcsr2coo.f90 +++ b/base/serial/psb_cipcsr2coo.f90 @@ -70,9 +70,9 @@ Subroutine psb_cipcsr2coo(a,info) goto 9999 end if !!$ write(0,*) 'ipcsr2coo ',a%m - call psb_transfer(a%ia2,itemp,info) - call psb_transfer(a%ia1,a%ia2,info) - call psb_transfer(iaux,a%ia1,info) + call psb_move_alloc(a%ia2,itemp,info) + call psb_move_alloc(a%ia1,a%ia2,info) + call psb_move_alloc(iaux,a%ia1,info) do i=1, nr do j=itemp(i),itemp(i+1)-1 diff --git a/base/serial/psb_cneigh.f90 b/base/serial/psb_cneigh.f90 index e09644d1..105dcbea 100644 --- a/base/serial/psb_cneigh.f90 +++ b/base/serial/psb_cneigh.f90 @@ -46,7 +46,7 @@ subroutine psb_cneigh(a,idx,neigh,n,info,lev) integer, intent(in) :: idx ! the index whose neighbours we want to find integer, intent(out) :: n, info ! the number of neighbours and the info integer, allocatable :: neigh(:) ! the neighbours - integer, optional :: lev ! level of neighbours to find + integer, optional, intent(in) :: lev ! level of neighbours to find integer :: lev_, i, nl, ifl,ill,& & n1, err_act, nn, nidx,ntl diff --git a/base/serial/psb_ctransc.f90 b/base/serial/psb_ctransc.f90 index 52640f85..40b45cf7 100644 --- a/base/serial/psb_ctransc.f90 +++ b/base/serial/psb_ctransc.f90 @@ -40,8 +40,8 @@ subroutine psb_ctransc(a,b,c,fmt) use psb_serial_mod, psb_protect_name => psb_ctransc implicit none - type(psb_cspmat_type), intent(inout) :: a - type(psb_cspmat_type), intent(out) :: b + type(psb_cspmat_type), intent(in) :: a + type(psb_cspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt @@ -68,9 +68,9 @@ subroutine psb_ctransc(a,b,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(b%ia1,itmp,info) - call psb_transfer(b%ia2,b%ia1,info) - call psb_transfer(itmp,b%ia2,info) + call psb_move_alloc(b%ia1,itmp,info) + call psb_move_alloc(b%ia2,b%ia1,info) + call psb_move_alloc(itmp,b%ia2,info) do i=1, b%infoa(psb_nnz_) b%aspk(i) = conjg(b%aspk(i)) diff --git a/base/serial/psb_ctransp.f90 b/base/serial/psb_ctransp.f90 index d58f809c..d015d7f3 100644 --- a/base/serial/psb_ctransp.f90 +++ b/base/serial/psb_ctransp.f90 @@ -40,8 +40,8 @@ subroutine psb_ctransp(a,b,c,fmt) use psb_serial_mod, psb_protect_name => psb_ctransp implicit none - type(psb_cspmat_type), intent(inout) :: a - type(psb_cspmat_type), intent(out) :: b + type(psb_cspmat_type), intent(in) :: a + type(psb_cspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt @@ -68,9 +68,9 @@ subroutine psb_ctransp(a,b,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(b%ia1,itmp,info) - call psb_transfer(b%ia2,b%ia1,info) - call psb_transfer(itmp,b%ia2,info) + call psb_move_alloc(b%ia1,itmp,info) + call psb_move_alloc(b%ia2,b%ia1,info) + call psb_move_alloc(itmp,b%ia2,info) b%m = a%k b%k = a%m @@ -111,9 +111,9 @@ subroutine psb_ctransp1(a,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(a%ia1,itmp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(itmp,a%ia2,info) + call psb_move_alloc(a%ia1,itmp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(itmp,a%ia2,info) call psb_spcnv(a,info,afmt=fmt_) diff --git a/base/serial/psb_dcoins.f90 b/base/serial/psb_dcoins.f90 index e84394f8..3706f23d 100644 --- a/base/serial/psb_dcoins.f90 +++ b/base/serial/psb_dcoins.f90 @@ -235,7 +235,7 @@ subroutine psb_dcoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) if(info /= izero) then info=4010 ch_err='psb_sp_transfer' @@ -404,7 +404,7 @@ subroutine psb_dcoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) call psb_sp_info(psb_nztotreq_,a,nza,info) call psb_sp_info(psb_nzsizereq_,a,isza,info) if(info /= izero) then diff --git a/base/serial/psb_dcsmm.f90 b/base/serial/psb_dcsmm.f90 index 7f40d068..0a9369ad 100644 --- a/base/serial/psb_dcsmm.f90 +++ b/base/serial/psb_dcsmm.f90 @@ -37,10 +37,10 @@ subroutine psb_dcsmm(alpha,a,b,beta,c,info,trans) use psb_error_mod implicit none - type(psb_dspmat_type) :: a - real(psb_dpk_) :: alpha, beta, b(:,:), c(:,:) - integer :: info - character, optional :: trans + class(psb_dspmat_type) :: a + real(psb_dpk_) :: alpha, beta, b(:,:), c(:,:) + integer :: info + character, optional :: trans real(psb_dpk_), allocatable :: work(:) character :: trans_ diff --git a/base/serial/psb_dcsprt.f90 b/base/serial/psb_dcsprt.f90 index c93f670d..00505767 100644 --- a/base/serial/psb_dcsprt.f90 +++ b/base/serial/psb_dcsprt.f90 @@ -58,8 +58,8 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) - character(len=*), parameter :: frmtr='(2(i6,1x),es26.18,2(i6,1x))' - integer :: irs,ics,i,j + character(len=80) :: frmtv + integer :: irs,ics,i,j, nmx, ni if (present(eirs)) then irs = eirs @@ -79,6 +79,12 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) write(iout,'(a,a)') '% ',psb_toupper(a%fida) endif + nmx = max(a%m,a%k,1) + ni = floor(log10(1.0*nmx)) + 1 + + write(frmtv,'(a,i3.3,a,i3.3,a)') '(2(i',ni,',1x),es26.18,1x,2(i',ni,',1x))' + + select case(psb_toupper(a%fida)) case ('CSR') @@ -88,32 +94,32 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo endif @@ -126,32 +132,32 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) + write(iout,frmtv) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo endif @@ -161,28 +167,28 @@ subroutine psb_dcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if(present(iv)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) + write(iout,frmtv) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) enddo else if (present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) enddo else if (present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j) + write(iout,frmtv) a%ia1(j),a%ia2(j),a%aspk(j) enddo endif endif diff --git a/base/serial/psb_dcsrp.f90 b/base/serial/psb_dcsrp.f90 index e645c5a8..0f25555a 100644 --- a/base/serial/psb_dcsrp.f90 +++ b/base/serial/psb_dcsrp.f90 @@ -64,14 +64,6 @@ subroutine psb_dcsrp(trans,iperm,a, info) end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - !...parameters.... type(psb_dspmat_type), intent(inout) :: a integer, intent(inout) :: iperm(:), info @@ -83,8 +75,8 @@ subroutine psb_dcsrp(trans,iperm,a, info) integer :: n_row,err_act, int_err(5) character(len=20) :: name, char_err - n_row = psb_get_sp_nrows(a) - n_col = psb_get_sp_ncols(a) + n_row = psb_sp_get_nrows(a) + n_col = psb_sp_get_ncols(a) if(psb_get_errstatus() /= 0) return info=0 @@ -99,7 +91,7 @@ subroutine psb_dcsrp(trans,iperm,a, info) call psb_errpush(info,name,int_err) goto 9999 else - if (.not.isaperm(ipsize,iperm)) then + if (.not.psb_isaperm(ipsize,iperm)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,int_err) diff --git a/base/serial/psb_dgelp.f90 b/base/serial/psb_dgelp.f90 index 704bd0f7..85ad775d 100644 --- a/base/serial/psb_dgelp.f90 +++ b/base/serial/psb_dgelp.f90 @@ -70,14 +70,6 @@ subroutine psb_dgelp(trans,iperm,x,info) end subroutine dgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - character(len=20) :: name, ch_err name = 'psb_dgelp' @@ -101,7 +93,7 @@ subroutine psb_dgelp(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) @@ -206,14 +198,6 @@ subroutine psb_dgelpv(trans,iperm,x,info) end subroutine dgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - character(len=20) :: name, ch_err name = 'psb_dgelpv' @@ -235,7 +219,7 @@ subroutine psb_dgelpv(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) diff --git a/base/serial/psb_dipcoo2csc.f90 b/base/serial/psb_dipcoo2csc.f90 index f72be4ad..324657ce 100644 --- a/base/serial/psb_dipcoo2csc.f90 +++ b/base/serial/psb_dipcoo2csc.f90 @@ -89,11 +89,11 @@ subroutine psb_dipcoo2csc(a,info,clshr) if(debug_level >= psb_debug_serial_) write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nc,size(a%ia2),size(iaux) - call psb_transfer(a%ia2,itemp,info) - if (info == 0) call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia2,itemp,info) + if (info == 0) call psb_move_alloc(iaux,a%ia2,info) if (info /= 0) then info=4010 - call psb_errpush(info,name,a_err='psb_transfer') + call psb_errpush(info,name,a_err='psb_move_alloc') goto 9999 end if diff --git a/base/serial/psb_dipcoo2csr.f90 b/base/serial/psb_dipcoo2csr.f90 index f8640307..9a0679b3 100644 --- a/base/serial/psb_dipcoo2csr.f90 +++ b/base/serial/psb_dipcoo2csr.f90 @@ -89,9 +89,9 @@ subroutine psb_dipcoo2csr(a,info,rwshr) & write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nr,size(a%ia2),size(iaux) - call psb_transfer(a%ia1,itemp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia1,itemp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(iaux,a%ia2,info) ! ! This routine can be used in two modes: diff --git a/base/serial/psb_dipcsr2coo.f90 b/base/serial/psb_dipcsr2coo.f90 index 122d7a1f..9777681b 100644 --- a/base/serial/psb_dipcsr2coo.f90 +++ b/base/serial/psb_dipcsr2coo.f90 @@ -70,9 +70,9 @@ Subroutine psb_dipcsr2coo(a,info) goto 9999 end if !!$ write(0,*) 'ipcsr2coo ',a%m - call psb_transfer(a%ia2,itemp,info) - call psb_transfer(a%ia1,a%ia2,info) - call psb_transfer(iaux,a%ia1,info) + call psb_move_alloc(a%ia2,itemp,info) + call psb_move_alloc(a%ia1,a%ia2,info) + call psb_move_alloc(iaux,a%ia1,info) do i=1, nr do j=itemp(i),itemp(i+1)-1 diff --git a/base/serial/psb_dneigh.f90 b/base/serial/psb_dneigh.f90 index 73043848..71a9c120 100644 --- a/base/serial/psb_dneigh.f90 +++ b/base/serial/psb_dneigh.f90 @@ -46,7 +46,7 @@ subroutine psb_dneigh(a,idx,neigh,n,info,lev) integer, intent(in) :: idx ! the index whose neighbours we want to find integer, intent(out) :: n, info ! the number of neighbours and the info integer, allocatable :: neigh(:) ! the neighbours - integer, optional :: lev ! level of neighbours to find + integer, optional, intent(in) :: lev ! level of neighbours to find integer :: lev_, i, nl, ifl,ill,& & n1, err_act, nn, nidx,ntl diff --git a/base/serial/psb_dtransp.f90 b/base/serial/psb_dtransp.f90 index b3cfa028..436291d2 100644 --- a/base/serial/psb_dtransp.f90 +++ b/base/serial/psb_dtransp.f90 @@ -68,9 +68,9 @@ subroutine psb_dtransp(a,b,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(b%ia1,itmp,info) - call psb_transfer(b%ia2,b%ia1,info) - call psb_transfer(itmp,b%ia2,info) + call psb_move_alloc(b%ia1,itmp,info) + call psb_move_alloc(b%ia2,b%ia1,info) + call psb_move_alloc(itmp,b%ia2,info) b%m = a%k b%k = a%m @@ -111,9 +111,9 @@ subroutine psb_dtransp1(a,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(a%ia1,itmp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(itmp,a%ia2,info) + call psb_move_alloc(a%ia1,itmp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(itmp,a%ia2,info) call psb_spcnv(a,info,afmt=fmt_) diff --git a/base/serial/psb_getrow_mod.f90 b/base/serial/psb_getrow_mod.f90 index 518e5687..ad771f54 100644 --- a/base/serial/psb_getrow_mod.f90 +++ b/base/serial/psb_getrow_mod.f90 @@ -44,7 +44,8 @@ module psb_getrow_mod contains subroutine csr_sspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) - + + use psb_sort_mod use psb_spmat_type use psb_const_mod implicit none @@ -159,6 +160,7 @@ contains subroutine coo_sspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod use psb_error_mod @@ -204,7 +206,7 @@ contains if (debug_level >= psb_debug_serial_)& & write(debug_unit,*) trim(name), ': srtdcoo ' do - call ibsrch(ip,irw,nza,a%ia1) + ip = psb_ibsrch(irw,nza,a%ia1) if (ip /= -1) exit irw = irw + 1 if (irw > lrw) then @@ -229,7 +231,7 @@ contains end if do - call ibsrch(jp,lrw,nza,a%ia1) + jp = psb_ibsrch(lrw,nza,a%ia1) if (jp /= -1) exit lrw = lrw - 1 if (irw > lrw) then @@ -335,6 +337,7 @@ contains subroutine jad_sspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod @@ -467,6 +470,7 @@ contains subroutine csr_dspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod implicit none @@ -581,6 +585,7 @@ contains subroutine coo_dspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod use psb_error_mod @@ -626,7 +631,7 @@ contains if (debug_level >= psb_debug_serial_)& & write(debug_unit,*) trim(name), ': srtdcoo ' do - call ibsrch(ip,irw,nza,a%ia1) + ip = psb_ibsrch(irw,nza,a%ia1) if (ip /= -1) exit irw = irw + 1 if (irw > lrw) then @@ -651,7 +656,7 @@ contains end if do - call ibsrch(jp,lrw,nza,a%ia1) + jp = psb_ibsrch(lrw,nza,a%ia1) if (jp /= -1) exit lrw = lrw - 1 if (irw > lrw) then @@ -757,6 +762,7 @@ contains subroutine jad_dspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod @@ -889,6 +895,7 @@ contains subroutine csr_cspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod use psb_error_mod @@ -1005,6 +1012,7 @@ contains subroutine coo_cspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod use psb_error_mod @@ -1052,7 +1060,7 @@ contains if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),': srtdcoo ' do - call ibsrch(ip,irw,nza,a%ia1) + ip = psb_ibsrch(irw,nza,a%ia1) if (ip /= -1) exit irw = irw + 1 if (irw > lrw) then @@ -1077,7 +1085,7 @@ contains end if do - call ibsrch(jp,lrw,nza,a%ia1) + jp = psb_ibsrch(lrw,nza,a%ia1) if (jp /= -1) exit lrw = lrw - 1 if (irw > lrw) then @@ -1183,6 +1191,7 @@ contains subroutine jad_cspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod implicit none @@ -1314,6 +1323,7 @@ contains subroutine csr_zspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod use psb_error_mod @@ -1430,6 +1440,7 @@ contains subroutine coo_zspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod use psb_error_mod @@ -1477,7 +1488,7 @@ contains if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),': srtdcoo ' do - call ibsrch(ip,irw,nza,a%ia1) + ip = psb_ibsrch(irw,nza,a%ia1) if (ip /= -1) exit irw = irw + 1 if (irw > lrw) then @@ -1502,7 +1513,7 @@ contains end if do - call ibsrch(jp,lrw,nza,a%ia1) + jp = psb_ibsrch(lrw,nza,a%ia1) if (jp /= -1) exit lrw = lrw - 1 if (irw > lrw) then @@ -1608,6 +1619,7 @@ contains subroutine jad_zspgtrow(irw,a,nz,ia,ja,val,nzin,append,lrw,info,iren) + use psb_sort_mod use psb_spmat_type use psb_const_mod implicit none diff --git a/base/serial/psb_scoins.f90 b/base/serial/psb_scoins.f90 index b25c34a8..54821c8c 100644 --- a/base/serial/psb_scoins.f90 +++ b/base/serial/psb_scoins.f90 @@ -235,7 +235,7 @@ subroutine psb_scoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) if(info /= izero) then info=4010 ch_err='psb_sp_transfer' @@ -404,7 +404,7 @@ subroutine psb_scoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) call psb_sp_info(psb_nztotreq_,a,nza,info) call psb_sp_info(psb_nzsizereq_,a,isza,info) if(info /= izero) then diff --git a/base/serial/psb_scsnmi.f90 b/base/serial/psb_scsnmi.f90 index c0ed9765..aed7195d 100644 --- a/base/serial/psb_scsnmi.f90 +++ b/base/serial/psb_scsnmi.f90 @@ -47,7 +47,7 @@ function psb_scsnmi(a,info,trans) function scsnmi(trans,m,n,fida,descra,a,ia1,ia2,& & infoa,ierror) use psb_const_mod - real(psb_spk_) :: dcsnmi + real(psb_spk_) :: scsnmi integer :: m,n, ierror character :: trans integer :: ia1(*),ia2(*),infoa(*) diff --git a/base/serial/psb_scsprt.f90 b/base/serial/psb_scsprt.f90 index ce1abd98..2fd34c2b 100644 --- a/base/serial/psb_scsprt.f90 +++ b/base/serial/psb_scsprt.f90 @@ -58,8 +58,8 @@ subroutine psb_scsprt(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) - character(len=*), parameter :: frmtr='(2(i6,1x),es16.8,2(i6,1x))' - integer :: irs,ics,i,j + character(len=80) :: frmtv + integer :: irs,ics,i,j, nmx, ni if (present(eirs)) then irs = eirs @@ -79,6 +79,12 @@ subroutine psb_scsprt(iout,a,iv,eirs,eics,head,ivr,ivc) write(iout,'(a,a)') '% ',psb_toupper(a%fida) endif + nmx = max(a%m,a%k,1) + ni = floor(log10(1.0*nmx)) + 1 + + write(frmtv,'(a,i3.3,a,i3.3,a)') '(2(i',ni,',1x),es16.8,1x,2(i',ni,',1x))' + + select case(psb_toupper(a%fida)) case ('CSR') @@ -88,32 +94,32 @@ subroutine psb_scsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo endif @@ -126,32 +132,32 @@ subroutine psb_scsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) + write(iout,frmtv) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo endif @@ -161,28 +167,28 @@ subroutine psb_scsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if(present(iv)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) + write(iout,frmtv) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) enddo else if (present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) enddo else if (present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j) + write(iout,frmtv) a%ia1(j),a%ia2(j),a%aspk(j) enddo endif endif diff --git a/base/serial/psb_sgelp.f90 b/base/serial/psb_sgelp.f90 index 9bbe87cb..1e59b6f9 100644 --- a/base/serial/psb_sgelp.f90 +++ b/base/serial/psb_sgelp.f90 @@ -70,14 +70,6 @@ subroutine psb_sgelp(trans,iperm,x,info) end subroutine sgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - character(len=20) :: name, ch_err name = 'psb_sgelp' @@ -101,7 +93,7 @@ subroutine psb_sgelp(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) @@ -206,14 +198,6 @@ subroutine psb_sgelpv(trans,iperm,x,info) end subroutine sgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - character(len=20) :: name, ch_err name = 'psb_sgelpv' @@ -235,7 +219,7 @@ subroutine psb_sgelpv(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) diff --git a/base/serial/psb_sipcoo2csc.f90 b/base/serial/psb_sipcoo2csc.f90 index ea04484b..c51ac5b0 100644 --- a/base/serial/psb_sipcoo2csc.f90 +++ b/base/serial/psb_sipcoo2csc.f90 @@ -89,11 +89,11 @@ subroutine psb_sipcoo2csc(a,info,clshr) if(debug_level >= psb_debug_serial_) write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nc,size(a%ia2),size(iaux) - call psb_transfer(a%ia2,itemp,info) - if (info == 0) call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia2,itemp,info) + if (info == 0) call psb_move_alloc(iaux,a%ia2,info) if (info /= 0) then info=4010 - call psb_errpush(info,name,a_err='psb_transfer') + call psb_errpush(info,name,a_err='psb_move_alloc') goto 9999 end if diff --git a/base/serial/psb_sipcoo2csr.f90 b/base/serial/psb_sipcoo2csr.f90 index 3c1df84f..c532c25b 100644 --- a/base/serial/psb_sipcoo2csr.f90 +++ b/base/serial/psb_sipcoo2csr.f90 @@ -89,9 +89,9 @@ subroutine psb_sipcoo2csr(a,info,rwshr) & write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nr,size(a%ia2),size(iaux) - call psb_transfer(a%ia1,itemp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia1,itemp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(iaux,a%ia2,info) ! ! This routine can be used in two modes: diff --git a/base/serial/psb_sipcsr2coo.f90 b/base/serial/psb_sipcsr2coo.f90 index 3d4b040f..d5a7ba59 100644 --- a/base/serial/psb_sipcsr2coo.f90 +++ b/base/serial/psb_sipcsr2coo.f90 @@ -69,10 +69,10 @@ Subroutine psb_sipcsr2coo(a,info) call psb_errpush(info,name,a_err='integer',i_err=(/max(nza,1),0,0,0,0/)) goto 9999 end if -!!$ write(0,*) 'ipcsr2coo ',a%m - call psb_transfer(a%ia2,itemp,info) - call psb_transfer(a%ia1,a%ia2,info) - call psb_transfer(iaux,a%ia1,info) + + call psb_move_alloc(a%ia2,itemp,info) + call psb_move_alloc(a%ia1,a%ia2,info) + call psb_move_alloc(iaux,a%ia1,info) do i=1, nr do j=itemp(i),itemp(i+1)-1 diff --git a/base/serial/psb_sneigh.f90 b/base/serial/psb_sneigh.f90 index 1dec1f7a..ed7490e4 100644 --- a/base/serial/psb_sneigh.f90 +++ b/base/serial/psb_sneigh.f90 @@ -46,7 +46,7 @@ subroutine psb_sneigh(a,idx,neigh,n,info,lev) integer, intent(in) :: idx ! the index whose neighbours we want to find integer, intent(out) :: n, info ! the number of neighbours and the info integer, allocatable :: neigh(:) ! the neighbours - integer, optional :: lev ! level of neighbours to find + integer, optional, intent(in) :: lev ! level of neighbours to find integer :: lev_, i, nl, ifl,ill,& & n1, err_act, nn, nidx,ntl diff --git a/base/serial/psb_stransp.f90 b/base/serial/psb_stransp.f90 index 62e44a55..59112910 100644 --- a/base/serial/psb_stransp.f90 +++ b/base/serial/psb_stransp.f90 @@ -40,8 +40,8 @@ subroutine psb_stransp(a,b,c,fmt) use psb_serial_mod, psb_protect_name => psb_stransp implicit none - type(psb_sspmat_type), intent(inout) :: a - type(psb_sspmat_type), intent(out) :: b + type(psb_sspmat_type), intent(in) :: a + type(psb_sspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt @@ -68,9 +68,9 @@ subroutine psb_stransp(a,b,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(b%ia1,itmp,info) - call psb_transfer(b%ia2,b%ia1,info) - call psb_transfer(itmp,b%ia2,info) + call psb_move_alloc(b%ia1,itmp,info) + call psb_move_alloc(b%ia2,b%ia1,info) + call psb_move_alloc(itmp,b%ia2,info) b%m = a%k b%k = a%m @@ -111,9 +111,9 @@ subroutine psb_stransp1(a,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(a%ia1,itmp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(itmp,a%ia2,info) + call psb_move_alloc(a%ia1,itmp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(itmp,a%ia2,info) call psb_spcnv(a,info,afmt=fmt_) diff --git a/base/serial/psb_update_mod.f90 b/base/serial/psb_update_mod.f90 index 631185e0..709ce25a 100644 --- a/base/serial/psb_update_mod.f90 +++ b/base/serial/psb_update_mod.f90 @@ -318,7 +318,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -353,7 +353,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -398,7 +398,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -429,7 +429,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -508,7 +508,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -526,7 +526,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -551,7 +551,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -569,7 +569,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -603,7 +603,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -621,7 +621,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -639,7 +639,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -657,7 +657,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -780,7 +780,7 @@ contains ir = gtl(ir) if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) @@ -869,7 +869,7 @@ contains ir = ia(ii) ic = ja(ii) if ((ir >=1).and.(ir<=a%m).and.(ic>=1).and.(ic<=a%k)) then - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) @@ -969,7 +969,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1004,7 +1004,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -1050,7 +1050,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1081,7 +1081,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -1160,7 +1160,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1178,7 +1178,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1203,7 +1203,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1221,7 +1221,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -1255,7 +1255,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1273,7 +1273,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1291,7 +1291,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1309,7 +1309,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -1432,7 +1432,7 @@ contains ir = gtl(ir) if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) @@ -1521,7 +1521,7 @@ contains ir = ia(ii) ic = ja(ii) if ((ir >=1).and.(ir<=a%m).and.(ic>=1).and.(ic<=a%k)) then - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) @@ -1622,7 +1622,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1656,7 +1656,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call issrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_issrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -1701,7 +1701,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1732,7 +1732,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -1812,7 +1812,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1830,7 +1830,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1855,7 +1855,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1873,7 +1873,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -1907,7 +1907,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1925,7 +1925,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -1943,7 +1943,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -1961,7 +1961,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -2086,7 +2086,7 @@ contains ir = gtl(ir) if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) @@ -2175,7 +2175,7 @@ contains ir = ia(ii) ic = ja(ii) if ((ir >=1).and.(ir<=a%m).and.(ic>=1).and.(ic<=a%k)) then - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) @@ -2275,7 +2275,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -2309,7 +2309,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call issrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_issrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -2355,7 +2355,7 @@ contains i2 = a%ia2(ir+1) nc=i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -2386,7 +2386,7 @@ contains i1 = a%ia2(ir) i2 = a%ia2(ir+1) nc = i2-i1 - call ibsrch(ip,ic,nc,a%ia1(i1:i2-1)) + ip = psb_ibsrch(ic,nc,a%ia1(i1:i2-1)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -2466,7 +2466,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -2484,7 +2484,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -2509,7 +2509,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -2527,7 +2527,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -2561,7 +2561,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -2579,7 +2579,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = val(i) else @@ -2597,7 +2597,7 @@ contains if ((ir > 0).and.(ir <= a%m)) then if (ir /= ilr) then - call ibsrch(i1,ir,nnz,a%ia1) + i1 = psb_ibsrch(ir,nnz,a%ia1) i2 = i1 do if (i2+1 > nnz) exit @@ -2615,7 +2615,7 @@ contains i2 = 1 end if nc = i2-i1+1 - call issrch(ip,ic,nc,a%ia2(i1:i2)) + ip = psb_issrch(ic,nc,a%ia2(i1:i2)) if (ip>0) then a%aspk(i1+ip-1) = a%aspk(i1+ip-1) + val(i) else @@ -2740,7 +2740,7 @@ contains ir = gtl(ir) if ((ir > 0).and.(ir <= a%m)) then ic = gtl(ic) - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) @@ -2829,7 +2829,7 @@ contains ir = ia(ii) ic = ja(ii) if ((ir >=1).and.(ir<=a%m).and.(ic>=1).and.(ic<=a%k)) then - call ibsrch(i,ir,nr,rows) + i = psb_ibsrch(ir,nr,rows) ! find which block the row belongs to blk = blks(i) diff --git a/base/serial/psb_zcoins.f90 b/base/serial/psb_zcoins.f90 index c55578fd..4cfa6d91 100644 --- a/base/serial/psb_zcoins.f90 +++ b/base/serial/psb_zcoins.f90 @@ -235,7 +235,7 @@ subroutine psb_zcoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) if(info /= izero) then info=4010 ch_err='psb_sp_transfer' @@ -404,7 +404,7 @@ subroutine psb_zcoins(nz,ia,ja,val,a,imin,imax,jmin,jmax,info,gtl,rebuild) if (debug_level >= psb_debug_serial_) & & write(debug_unit,*) trim(name),& & ': Rebuild size',tmp%infoa(psb_nnz_) ,irst - call psb_sp_transfer(tmp,a,info) + call psb_move_alloc(tmp,a,info) call psb_sp_info(psb_nztotreq_,a,nza,info) call psb_sp_info(psb_nzsizereq_,a,isza,info) if(info /= izero) then diff --git a/base/serial/psb_zcsprt.f90 b/base/serial/psb_zcsprt.f90 index d5904f84..2e70f87e 100644 --- a/base/serial/psb_zcsprt.f90 +++ b/base/serial/psb_zcsprt.f90 @@ -58,8 +58,8 @@ subroutine psb_zcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) character(len=*), optional :: head integer, intent(in), optional :: ivr(:), ivc(:) - character(len=*), parameter :: frmtr='(2(i6,1x),2(es26.18,1x),2(i6,1x))' - integer :: irs,ics,i,j + character(len=80) :: frmtv + integer :: irs,ics,i,j, nmx, ni if (present(eirs)) then irs = eirs @@ -79,6 +79,12 @@ subroutine psb_zcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) write(iout,'(a,a)') '% ',psb_toupper(a%fida) endif + nmx = max(a%m,a%k,1) + ni = floor(log10(1.0*nmx)) + 1 + + write(frmtv,'(a,i3.3,a,i3.3,a)') '(2(i',ni,',1x),2(es26.18,1x),2(i',ni,',1x))' + + select case(psb_toupper(a%fida)) case ('CSR') @@ -88,32 +94,32 @@ subroutine psb_zcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) iv(irs+i),iv(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) ivr(irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),ivc(ics+a%ia1(j)),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+i),(ics+a%ia1(j)),a%aspk(j) + write(iout,frmtv) (irs+i),(ics+a%ia1(j)),a%aspk(j) enddo enddo endif @@ -126,32 +132,32 @@ subroutine psb_zcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if (present(iv)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) + write(iout,frmtv) iv(irs+a%ia1(j)),iv(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo else if (present(ivr).and.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) ivr(irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and.present(ivc)) then do i=1, a%m do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),ivc(ics+i),a%aspk(j) enddo enddo else if (.not.present(ivr).and..not.present(ivc)) then do i=1, a%k do j=a%ia2(i),a%ia2(i+1)-1 - write(iout,frmtr) (irs+a%ia1(j)),(ics+i),a%aspk(j) + write(iout,frmtv) (irs+a%ia1(j)),(ics+i),a%aspk(j) enddo enddo endif @@ -161,28 +167,28 @@ subroutine psb_zcsprt(iout,a,iv,eirs,eics,head,ivr,ivc) if(present(iv)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) + write(iout,frmtv) iv(a%ia1(j)),iv(a%ia2(j)),a%aspk(j) enddo else if (present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),a%ia2(j),a%aspk(j) enddo else if (present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) ivr(a%ia1(j)),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) + write(iout,frmtv) a%ia1(j),ivc(a%ia2(j)),a%aspk(j) enddo else if (.not.present(ivr).and..not.present(ivc)) then write(iout,*) a%m,a%k,a%infoa(psb_nnz_) do j=1,a%infoa(psb_nnz_) - write(iout,frmtr) a%ia1(j),a%ia2(j),a%aspk(j) + write(iout,frmtv) a%ia1(j),a%ia2(j),a%aspk(j) enddo endif endif diff --git a/base/serial/psb_zcsrp.f90 b/base/serial/psb_zcsrp.f90 index 6892fe38..5caba017 100644 --- a/base/serial/psb_zcsrp.f90 +++ b/base/serial/psb_zcsrp.f90 @@ -62,15 +62,6 @@ subroutine psb_zcsrp(trans,iperm,a, info) end subroutine zcsrp end interface - - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - !...parameters.... type(psb_zspmat_type), intent(inout) :: a integer, intent(inout) :: iperm(:), info @@ -83,8 +74,9 @@ subroutine psb_zcsrp(trans,iperm,a, info) character(len=20) :: name, char_err - n_row = psb_get_sp_nrows(a) - n_col = psb_get_sp_ncols(a) + + n_row = psb_sp_get_nrows(a) + n_col = psb_sp_get_ncols(a) if(psb_get_errstatus() /= 0) return info=0 @@ -99,7 +91,7 @@ subroutine psb_zcsrp(trans,iperm,a, info) call psb_errpush(info,name,int_err) goto 9999 else - if (.not.isaperm(ipsize,iperm)) then + if (.not.psb_isaperm(ipsize,iperm)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,int_err) diff --git a/base/serial/psb_zgelp.f90 b/base/serial/psb_zgelp.f90 index 030efcc6..78694dcc 100644 --- a/base/serial/psb_zgelp.f90 +++ b/base/serial/psb_zgelp.f90 @@ -70,14 +70,6 @@ subroutine psb_zgelp(trans,iperm,x,info) end subroutine zgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - character(len=20) :: name, ch_err name = 'psb_zgelp' @@ -97,7 +89,7 @@ subroutine psb_zgelp(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) @@ -205,14 +197,6 @@ subroutine psb_zgelpv(trans,iperm,x,info) end subroutine zgelp end interface - interface isaperm - - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface - character(len=20) :: name, ch_err name = 'psb_zgelpv' @@ -232,7 +216,7 @@ subroutine psb_zgelpv(trans,iperm,x,info) end if itemp(:) = iperm(:) - if (.not.isaperm(i1sz,itemp)) then + if (.not.psb_isaperm(i1sz,itemp)) then info = 70 int_err(1) = 1 call psb_errpush(info,name,i_err=int_err) diff --git a/base/serial/psb_zipcoo2csc.f90 b/base/serial/psb_zipcoo2csc.f90 index 1f8ba03b..99164ee3 100644 --- a/base/serial/psb_zipcoo2csc.f90 +++ b/base/serial/psb_zipcoo2csc.f90 @@ -89,11 +89,11 @@ subroutine psb_zipcoo2csc(a,info,clshr) if(debug_level >= psb_debug_serial_) write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nc,size(a%ia2),size(iaux) - call psb_transfer(a%ia2,itemp,info) - if (info == 0) call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia2,itemp,info) + if (info == 0) call psb_move_alloc(iaux,a%ia2,info) if (info /= 0) then info=4010 - call psb_errpush(info,name,a_err='psb_transfer') + call psb_errpush(info,name,a_err='psb_move_alloc') goto 9999 end if diff --git a/base/serial/psb_zipcoo2csr.f90 b/base/serial/psb_zipcoo2csr.f90 index c15fd1f3..e97a52cc 100644 --- a/base/serial/psb_zipcoo2csr.f90 +++ b/base/serial/psb_zipcoo2csr.f90 @@ -89,9 +89,9 @@ subroutine psb_zipcoo2csr(a,info,rwshr) & write(debug_unit,*) trim(name),& & ': out of fixcoo',nza,nr,size(a%ia2),size(iaux) - call psb_transfer(a%ia1,itemp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(iaux,a%ia2,info) + call psb_move_alloc(a%ia1,itemp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(iaux,a%ia2,info) ! ! This routine can be used in two modes: diff --git a/base/serial/psb_zipcsr2coo.f90 b/base/serial/psb_zipcsr2coo.f90 index bc2d4d4e..868fbdc4 100644 --- a/base/serial/psb_zipcsr2coo.f90 +++ b/base/serial/psb_zipcsr2coo.f90 @@ -69,10 +69,10 @@ Subroutine psb_zipcsr2coo(a,info) call psb_errpush(info,name,a_err='integer',i_err=(/max(nza,1),0,0,0,0/)) goto 9999 end if -!!$ write(0,*) 'ipcsr2coo ',a%m - call psb_transfer(a%ia2,itemp,info) - call psb_transfer(a%ia1,a%ia2,info) - call psb_transfer(iaux,a%ia1,info) + + call psb_move_alloc(a%ia2,itemp,info) + call psb_move_alloc(a%ia1,a%ia2,info) + call psb_move_alloc(iaux,a%ia1,info) do i=1, nr do j=itemp(i),itemp(i+1)-1 diff --git a/base/serial/psb_zneigh.f90 b/base/serial/psb_zneigh.f90 index 50fbd3ff..a4644a1d 100644 --- a/base/serial/psb_zneigh.f90 +++ b/base/serial/psb_zneigh.f90 @@ -46,7 +46,7 @@ subroutine psb_zneigh(a,idx,neigh,n,info,lev) integer, intent(in) :: idx ! the index whose neighbours we want to find integer, intent(out) :: n, info ! the number of neighbours and the info integer, allocatable :: neigh(:) ! the neighbours - integer, optional :: lev ! level of neighbours to find + integer, optional, intent(in) :: lev ! level of neighbours to find integer :: lev_, i, nl, ifl,ill,& & n1, err_act, nn, nidx,ntl diff --git a/base/serial/psb_ztransc.f90 b/base/serial/psb_ztransc.f90 index 4fa24fb6..a02647a9 100644 --- a/base/serial/psb_ztransc.f90 +++ b/base/serial/psb_ztransc.f90 @@ -40,8 +40,8 @@ subroutine psb_ztransc(a,b,c,fmt) use psb_serial_mod, psb_protect_name => psb_ztransc implicit none - type(psb_zspmat_type), intent(inout) :: a - type(psb_zspmat_type), intent(out) :: b + type(psb_zspmat_type), intent(in) :: a + type(psb_zspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt @@ -68,9 +68,9 @@ subroutine psb_ztransc(a,b,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(b%ia1,itmp,info) - call psb_transfer(b%ia2,b%ia1,info) - call psb_transfer(itmp,b%ia2,info) + call psb_move_alloc(b%ia1,itmp,info) + call psb_move_alloc(b%ia2,b%ia1,info) + call psb_move_alloc(itmp,b%ia2,info) do i=1, b%infoa(psb_nnz_) b%aspk(i) = conjg(b%aspk(i)) diff --git a/base/serial/psb_ztransp.f90 b/base/serial/psb_ztransp.f90 index abb6dd30..af9f0cce 100644 --- a/base/serial/psb_ztransp.f90 +++ b/base/serial/psb_ztransp.f90 @@ -40,8 +40,8 @@ subroutine psb_ztransp(a,b,c,fmt) use psb_serial_mod, psb_protect_name => psb_ztransp implicit none - type(psb_zspmat_type), intent(inout) :: a - type(psb_zspmat_type), intent(out) :: b + type(psb_zspmat_type), intent(in) :: a + type(psb_zspmat_type), intent(out) :: b integer, optional :: c character(len=*), optional :: fmt @@ -68,9 +68,9 @@ subroutine psb_ztransp(a,b,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(b%ia1,itmp,info) - call psb_transfer(b%ia2,b%ia1,info) - call psb_transfer(itmp,b%ia2,info) + call psb_move_alloc(b%ia1,itmp,info) + call psb_move_alloc(b%ia2,b%ia1,info) + call psb_move_alloc(itmp,b%ia2,info) b%m = a%k b%k = a%m @@ -111,9 +111,9 @@ subroutine psb_ztransp1(a,c,fmt) write(0,*) 'transp: info from CSDP ',info return end if - call psb_transfer(a%ia1,itmp,info) - call psb_transfer(a%ia2,a%ia1,info) - call psb_transfer(itmp,a%ia2,info) + call psb_move_alloc(a%ia1,itmp,info) + call psb_move_alloc(a%ia2,a%ia1,info) + call psb_move_alloc(itmp,a%ia2,info) call psb_spcnv(a,info,afmt=fmt_) diff --git a/base/tools/Makefile b/base/tools/Makefile index 9513c656..6196e9de 100644 --- a/base/tools/Makefile +++ b/base/tools/Makefile @@ -18,7 +18,7 @@ FOBJS = psb_sallc.o psb_sasb.o \ psb_zspins.o psb_zsprn.o \ psb_cspalloc.o psb_cspasb.o psb_cspfree.o\ psb_callc.o psb_casb.o psb_cfree.o psb_cins.o \ - psb_cspins.o psb_csprn.o psb_map.o psb_inter_desc.o psb_cd_set_bld.o + psb_cspins.o psb_csprn.o psb_map.o psb_cd_set_bld.o psb_linmap.o MPFOBJS = psb_ssphalo.o psb_csphalo.o psb_dsphalo.o psb_zsphalo.o psb_icdasb.o \ psb_dcdbldext.o psb_zcdbldext.o psb_scdbldext.o psb_ccdbldext.o diff --git a/base/tools/psb_ccdbldext.F90 b/base/tools/psb_ccdbldext.F90 index bdbb08d2..51653b26 100644 --- a/base/tools/psb_ccdbldext.F90 +++ b/base/tools/psb_ccdbldext.F90 @@ -61,7 +61,6 @@ ! Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) - use psb_tools_mod, psb_protect_name => psb_ccdbldext use psb_serial_mod use psb_descriptor_type @@ -85,15 +84,6 @@ Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) integer, intent(out) :: info integer, intent(in),optional :: extype - interface - subroutine psb_icdasb(desc_a,info,ext_hv) - use psb_descriptor_type - Type(psb_desc_type), intent(inout) :: desc_a - integer, intent(out) :: info - logical, intent(in),optional :: ext_hv - end subroutine psb_icdasb - end interface - integer icomm, err_act ! .. Local Scalars .. Integer :: i, j, np, me,m,nnzero,& @@ -103,6 +93,7 @@ Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) & n_elem_send,tot_recv,tot_elem,cntov_o,& & counter_t,n_elem,i_ovr,jj,proc_id,isz, & & idxr, idxs, iszr, iszs, nxch, nsnd, nrcv,lidx, extype_ + integer :: icomm, err_act type(psb_cspmat_type) :: blk Integer, allocatable :: tmp_halo(:),tmp_ovr_idx(:), orig_ovr(:) @@ -400,12 +391,6 @@ Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) ! Do j=0,n_elem_send-1 -!!$ idx = halo(counter+psb_elem_send_+j) -!!$ gidx = desc_ov%loc_to_glob(idx) -!!$ if (idx > psb_cd_get_local_rows(Desc_a)) & -!!$ & write(debug_unit,*) me,' ',trim(name),':Out of local rows ',i_ovr,& -!!$ & idx,psb_cd_get_local_rows(Desc_a) - idx = halo(counter+psb_elem_send_+j) call psb_map_l2g(idx,gidx,desc_ov%idxmap,info) If (gidx < 0) then @@ -669,7 +654,7 @@ Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) write(debug_unit,*) me,' ',trim(name),':Done Crea_Index' call psb_barrier(ictxt) end if - call psb_transfer(t_halo_out,halo,info) + call psb_move_alloc(t_halo_out,halo,info) ! ! At this point we have built the halo necessary for I_OVR+1. ! @@ -688,7 +673,7 @@ Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) ! 5. n_col(ov) current. ! desc_ov%matrix_data(psb_n_row_) = desc_a%matrix_data(psb_n_row_) - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) call psb_ensure_size((counter_h+counter_t+1),tmp_halo,info,pad=-1) if (info /= 0) then call psb_errpush(4010,name,a_err='psb_ensure_size') @@ -697,7 +682,7 @@ Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) tmp_halo(counter_h:counter_h+counter_t-1) = t_halo_in(1:counter_t) counter_h = counter_h+counter_t-1 tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%halo_index,info) + call psb_move_alloc(tmp_halo,desc_ov%halo_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') @@ -723,16 +708,15 @@ Subroutine psb_ccdbldext(a,desc_a,novr,desc_ov,info, extype) orig_ovr(cntov_o:cntov_o+counter_o-1) = tmp_ovr_idx(1:counter_o) cntov_o = cntov_o+counter_o-1 orig_ovr(cntov_o:) = -1 - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') goto 9999 end if tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%ext_index,info) - call psb_transfer(t_halo_in,desc_ov%halo_index,info) - + call psb_move_alloc(tmp_halo,desc_ov%ext_index,info) + call psb_move_alloc(t_halo_in,desc_ov%halo_index,info) case default call psb_errpush(30,name,i_err=(/5,extype_,0,0,0/)) goto 9999 diff --git a/base/tools/psb_cd_lstext.f90 b/base/tools/psb_cd_lstext.f90 index 5833fde2..d95af1fb 100644 --- a/base/tools/psb_cd_lstext.f90 +++ b/base/tools/psb_cd_lstext.f90 @@ -44,16 +44,6 @@ Subroutine psb_cd_lstext(desc_a,in_list,desc_ov,info, mask,extype) logical, intent(in), optional, target :: mask(:) integer, intent(in),optional :: extype - interface - subroutine psb_icdasb(desc_a,info,ext_hv) - use psb_descriptor_type - Type(psb_desc_type), intent(inout) :: desc_a - integer, intent(out) :: info - logical, intent(in),optional :: ext_hv - end subroutine psb_icdasb - end interface - integer icomm, err_act - ! .. Local Scalars .. Integer :: i, j, np, me,m,nnzero,& & ictxt, lovr, lworks,lworkr, n_row,n_col, int_err(5),& @@ -62,6 +52,7 @@ Subroutine psb_cd_lstext(desc_a,in_list,desc_ov,info, mask,extype) & n_elem_send,tot_recv,tot_elem,cntov_o,& & counter_t,n_elem,i_ovr,jj,proc_id,isz, nl, & & idxr, idxs, iszr, iszs, nxch, nsnd, nrcv,lidx, extype_ + integer :: icomm, err_act Integer, allocatable :: tmp_halo(:),tmp_ovr_idx(:), orig_ovr(:) Integer,allocatable :: halo(:),works(:),workr(:),t_halo_in(:),& diff --git a/base/tools/psb_cd_reinit.f90 b/base/tools/psb_cd_reinit.f90 index 5443862d..4bf88829 100644 --- a/base/tools/psb_cd_reinit.f90 +++ b/base/tools/psb_cd_reinit.f90 @@ -65,9 +65,9 @@ Subroutine psb_cd_reinit(desc,info) call psb_cd_get_recv_idx(tmp_halo,desc,psb_comm_halo_,info,toglob=.false.) call psb_cd_get_recv_idx(tmp_ext,desc,psb_comm_ext_,info,toglob=.false.) - call psb_transfer(tmp_ovr,desc%ovrlap_index,info) - call psb_transfer(tmp_halo,desc%halo_index,info) - call psb_transfer(tmp_ext,desc%ext_index,info) + call psb_move_alloc(tmp_ovr,desc%ovrlap_index,info) + call psb_move_alloc(tmp_halo,desc%halo_index,info) + call psb_move_alloc(tmp_ext,desc%ext_index,info) call psb_cd_set_bld(desc,info) if (debug_level >= psb_debug_outer_) & diff --git a/base/tools/psb_cdals.f90 b/base/tools/psb_cdals.f90 index 0792a0f8..e9fd4bac 100644 --- a/base/tools/psb_cdals.f90 +++ b/base/tools/psb_cdals.f90 @@ -168,9 +168,9 @@ subroutine psb_cdals(m, n, parts, ictxt, desc, info) ! ! Yes, we do have a large index space. Therefore we are ! keeping on the local process a map of only the global - ! indices ending up here; this map is stored in an AVL - ! tree during the build stage, so as to guarantee log-time - ! serch and insertion of new items. At assembly time it + ! indices ending up here; this map is stored partly in + ! a hash of sorted lists, part in a hash table. + ! At assembly time ! is transferred to a series of ordered linear lists, ! hashed by the low order bits of the entries. ! diff --git a/base/tools/psb_cdren.f90 b/base/tools/psb_cdren.f90 index 620c3061..8476e49b 100644 --- a/base/tools/psb_cdren.f90 +++ b/base/tools/psb_cdren.f90 @@ -48,22 +48,18 @@ subroutine psb_cdren(trans,iperm,desc_a,info) use psb_descriptor_type use psb_const_mod use psb_error_mod + use psb_serial_mod use psb_penv_mod + use psi_mod use psb_string_mod implicit none - interface isaperm - logical function isaperm(n,ip) - integer, intent(in) :: n - integer, intent(inout) :: ip(*) - end function isaperm - end interface !...parameters.... - type(psb_desc_type), intent(inout) :: desc_a - integer, intent(inout) :: iperm(:) - character, intent(in) :: trans - integer, intent(out) :: info + type(psb_desc_type), intent(inout) :: desc_a + integer, intent(inout) :: iperm(:) + character, intent(in) :: trans + integer, intent(out) :: info !....locals.... integer :: i,j,np,me, n_col, kh, nh integer :: dectype @@ -74,7 +70,7 @@ subroutine psb_cdren(trans,iperm,desc_a,info) if(psb_get_errstatus() /= 0) return info=0 call psb_erractionsave(err_act) - name = 'psb_dcren' + name = 'psb_cdren' debug_unit = psb_get_debug_unit() debug_level = psb_get_debug_level() @@ -99,7 +95,7 @@ subroutine psb_cdren(trans,iperm,desc_a,info) endif if (iperm(1) /= 0) then - if (.not.isaperm(n_row,iperm)) then + if (.not.psb_isaperm(n_row,iperm)) then info = 610 int_err(1) = iperm(1) call psb_errpush(info,name,int_err) @@ -132,62 +128,24 @@ subroutine psb_cdren(trans,iperm,desc_a,info) endif ! crossed fingers..... ! fix glob_to_loc/loc_to_glob mappings, then indices lists - ! hmm, maybe we should just moe all of this onto a different level, + ! hmm, maybe we should just move all of this onto a different level, ! have a specialized subroutine, and do it in the solver context???? - if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),': renumbering glob_to_loc' - do i=1, n_col - desc_a%idxmap%glob_to_loc(desc_a%idxmap%loc_to_glob(desc_a%lprm(i))) = i - enddo - if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),': renumbering loc_to_glob' - do i=1,psb_cd_get_global_rows(desc_a) - j = desc_a%idxmap%glob_to_loc(i) - if (j>0) then - desc_a%idxmap%loc_to_glob(j) = i - endif - enddo - if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),': renumbering halo_index' - i=1 - kh=desc_a%halo_index(i) - do while (kh /= -1) - i = i+1 - nh = desc_a%halo_index(i) - do j = i+1, i+nh - desc_a%halo_index(j) = & - &desc_a%lprm(desc_a%halo_index(j)) - enddo - i = i + nh + 1 - nh = desc_a%halo_index(i) - do j= i+1, i+nh - desc_a%halo_index(j) = & - &desc_a%lprm(desc_a%halo_index(j)) - enddo - i = i + nh + 1 - kh=desc_a%halo_index(i) - enddo - if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),': renumbering ovrlap_index' - i=1 - kh=desc_a%ovrlap_index(i) - do while (kh /= -1) - i = i + 1 - nh = desc_a%ovrlap_index(i) - do j= i+1, i+nh - desc_a%ovrlap_index(j) = & - &desc_a%lprm(desc_a%ovrlap_index(j)) - enddo - i = i + nh + 1 - kh=desc_a%ovrlap_index(i) - enddo - if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',& - & trim(name),': renumbering ovrlap_elem' - + call psi_renum_idxmap(n_col,desc_a%lprm,desc_a%idxmap,info) + if (allocated(desc_a%halo_index)) & + & call psi_renum_index(desc_a%lprm,desc_a%halo_index,info) + if (allocated(desc_a%ovrlap_index)) & + & call psi_renum_index(desc_a%lprm,desc_a%ovrlap_index,info) + if (allocated(desc_a%ovr_mst_idx)) & + & call psi_renum_index(desc_a%lprm,desc_a%ovr_mst_idx,info) + if (allocated(desc_a%ext_index)) & + & call psi_renum_index(desc_a%lprm,desc_a%ext_index,info) + do i=1, size(desc_a%ovrlap_elem,1) desc_a%ovrlap_elem(i,1) = desc_a%lprm(desc_a%ovrlap_elem(i,1)) end do + do i=1, size(desc_a%bnd_elem) + desc_a%bnd_elem(i) = desc_a%lprm(desc_a%bnd_elem(i)) + end do if (debug_level >= psb_debug_ext_) & & write(debug_unit,*) me,' ',trim(name),': done renumbering' diff --git a/base/tools/psb_dcdbldext.F90 b/base/tools/psb_dcdbldext.F90 index d3fbdbf0..12d8a18a 100644 --- a/base/tools/psb_dcdbldext.F90 +++ b/base/tools/psb_dcdbldext.F90 @@ -84,16 +84,6 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) integer, intent(out) :: info integer, intent(in),optional :: extype - interface - subroutine psb_icdasb(desc_a,info,ext_hv) - use psb_descriptor_type - Type(psb_desc_type), intent(inout) :: desc_a - integer, intent(out) :: info - logical, intent(in),optional :: ext_hv - end subroutine psb_icdasb - end interface - integer icomm, err_act - ! .. Local Scalars .. Integer :: i, j, np, me,m,nnzero,& & ictxt, lovr, lworks,lworkr, n_row,n_col, int_err(5),& @@ -102,6 +92,7 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) & n_elem_send,tot_recv,tot_elem,cntov_o,& & counter_t,n_elem,i_ovr,jj,proc_id,isz, & & idxr, idxs, iszr, iszs, nxch, nsnd, nrcv,lidx, extype_ + integer :: icomm, err_act type(psb_dspmat_type) :: blk Integer, allocatable :: tmp_halo(:),tmp_ovr_idx(:), orig_ovr(:) @@ -361,7 +352,7 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) info=-3 call psb_errpush(info,name) goto 9999 - endif + endif call psb_ensure_size((counter_o+3),tmp_ovr_idx,info,pad=-1) if (info /= 0) then info=4010 @@ -399,12 +390,6 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) ! Do j=0,n_elem_send-1 -!!$ idx = halo(counter+psb_elem_send_+j) -!!$ gidx = desc_ov%loc_to_glob(idx) -!!$ if (idx > psb_cd_get_local_rows(Desc_a)) & -!!$ & write(debug_unit,*) me,' ',trim(name),':Out of local rows ',i_ovr,& -!!$ & idx,psb_cd_get_local_rows(Desc_a) - idx = halo(counter+psb_elem_send_+j) call psb_map_l2g(idx,gidx,desc_ov%idxmap,info) If (gidx < 0) then @@ -657,18 +642,18 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) if (debug_level >= psb_debug_outer_) then - write(debug_unit,*) me,' ',trim(name),':Checktmp_o_i 1',tmp_ovr_idx(1:10) - write(debug_unit,*) me,' ',trim(name),':Calling Crea_index' - end if + write(debug_unit,*) me,' ',trim(name),':Checktmp_o_i 1',tmp_ovr_idx(1:10) + write(debug_unit,*) me,' ',trim(name),':Calling Crea_index' + end if call psi_crea_index(desc_ov,t_halo_in,t_halo_out,.false.,& & nxch,nsnd,nrcv,info) - + if (debug_level >= psb_debug_outer_) then write(debug_unit,*) me,' ',trim(name),':Done Crea_Index' call psb_barrier(ictxt) end if - call psb_transfer(t_halo_out,halo,info) + call psb_move_alloc(t_halo_out,halo,info) ! ! At this point we have built the halo necessary for I_OVR+1. ! @@ -687,7 +672,7 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) ! 5. n_col(ov) current. ! desc_ov%matrix_data(psb_n_row_) = desc_a%matrix_data(psb_n_row_) - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) call psb_ensure_size((counter_h+counter_t+1),tmp_halo,info,pad=-1) if (info /= 0) then call psb_errpush(4010,name,a_err='psb_ensure_size') @@ -696,7 +681,7 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) tmp_halo(counter_h:counter_h+counter_t-1) = t_halo_in(1:counter_t) counter_h = counter_h+counter_t-1 tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%halo_index,info) + call psb_move_alloc(tmp_halo,desc_ov%halo_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') @@ -722,16 +707,15 @@ Subroutine psb_dcdbldext(a,desc_a,novr,desc_ov,info, extype) orig_ovr(cntov_o:cntov_o+counter_o-1) = tmp_ovr_idx(1:counter_o) cntov_o = cntov_o+counter_o-1 orig_ovr(cntov_o:) = -1 - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') goto 9999 end if tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%ext_index,info) - call psb_transfer(t_halo_in,desc_ov%halo_index,info) - + call psb_move_alloc(tmp_halo,desc_ov%ext_index,info) + call psb_move_alloc(t_halo_in,desc_ov%halo_index,info) case default call psb_errpush(30,name,i_err=(/5,extype_,0,0,0/)) goto 9999 diff --git a/base/tools/psb_icdasb.F90 b/base/tools/psb_icdasb.F90 index ecc6e4ff..1045d962 100644 --- a/base/tools/psb_icdasb.F90 +++ b/base/tools/psb_icdasb.F90 @@ -135,7 +135,8 @@ subroutine psb_icdasb(desc_a,info,ext_hv) ! the list of halo indices as if it was in small index space if (psb_is_large_desc(desc_a)) then if (debug_level >= psb_debug_ext_) & - & write(debug_unit,*) me,' ',trim(name),': Large descriptor, calling ldsc_pre_halo' + & write(debug_unit,*) me,' ',trim(name),& + & ': Large descriptor, calling ldsc_pre_halo' call psi_ldsc_pre_halo(desc_a,ext_hv_,info) if (info /= 0) then call psb_errpush(4010,name,a_err='ldsc_pre_halo') @@ -144,9 +145,9 @@ subroutine psb_icdasb(desc_a,info,ext_hv) end if ! Take out the lists for ovrlap, halo and ext... - call psb_transfer(desc_a%ovrlap_index,ovrlap_index,info) - call psb_transfer(desc_a%halo_index,halo_index,info) - call psb_transfer(desc_a%ext_index,ext_index,info) + call psb_move_alloc(desc_a%ovrlap_index,ovrlap_index,info) + call psb_move_alloc(desc_a%halo_index,halo_index,info) + call psb_move_alloc(desc_a%ext_index,ext_index,info) if (debug_level >= psb_debug_ext_) & & write(debug_unit,*) me,' ',trim(name),': Final conversion' diff --git a/base/tools/psb_inter_desc.f90 b/base/tools/psb_inter_desc.f90 deleted file mode 100644 index 4c64f94b..00000000 --- a/base/tools/psb_inter_desc.f90 +++ /dev/null @@ -1,408 +0,0 @@ -!!$ -!!$ Parallel Sparse BLAS version 2.2 -!!$ (C) Copyright 2006/2007/2008 -!!$ Salvatore Filippone University of Rome Tor Vergata -!!$ Alfredo Buttari University of Rome Tor Vergata -!!$ -!!$ Redistribution and use in source and binary forms, with or without -!!$ modification, are permitted provided that the following conditions -!!$ are met: -!!$ 1. Redistributions of source code must retain the above copyright -!!$ notice, this list of conditions and the following disclaimer. -!!$ 2. Redistributions in binary form must reproduce the above copyright -!!$ notice, this list of conditions, and the following disclaimer in the -!!$ documentation and/or other materials provided with the distribution. -!!$ 3. The name of the PSBLAS group or the names of its contributors may -!!$ not be used to endorse or promote products derived from this -!!$ software without specific written permission. -!!$ -!!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -!!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -!!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS -!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -!!$ POSSIBILITY OF SUCH DAMAGE. -!!$ -!!$ -function psb_c_inter_desc(map_kind,desc1, desc2, map_fw, map_bk, idx_fw, idx_bk) - - use psb_base_mod, psb_protect_name => psb_c_inter_desc - - implicit none - type(psb_inter_desc_type) :: psb_c_inter_desc - type(psb_desc_type), target :: desc1, desc2 - type(psb_cspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind,idx_fw(:), idx_bk(:) - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%cmap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%cmap%map_bk,info) - if (info == 0) call psb_safe_cpy(idx_fw,this%exch_fw_idx,info) - if (info == 0) call psb_safe_cpy(idx_bk,this%exch_bk_idx,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_complex_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_c_inter_desc = this - -end function psb_c_inter_desc - - -function psb_c_inter_desc_noidx(map_kind,desc1, desc2, map_fw, map_bk) - - use psb_base_mod, psb_protect_name => psb_c_inter_desc_noidx - - implicit none - type(psb_inter_desc_type) :: psb_c_inter_desc_noidx - type(psb_desc_type), target :: desc1, desc2 - type(psb_cspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - select case(map_kind) - case (psb_map_aggr_) - ! OK - case default - write(0,*) 'Bad map kind into psb_inter_desc ',map_kind - info = 1 - end select - - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%cmap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%cmap%map_bk,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_complex_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_c_inter_desc_noidx = this - -end function psb_c_inter_desc_noidx - -function psb_d_inter_desc(map_kind,desc1,desc2,map_fw,map_bk,idx_fw,idx_bk) - - use psb_base_mod, psb_protect_name => psb_d_inter_desc - - implicit none - type(psb_inter_desc_type) :: psb_d_inter_desc - type(psb_desc_type), target :: desc1, desc2 - type(psb_dspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind,idx_fw(:), idx_bk(:) - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%dmap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%dmap%map_bk,info) - if (info == 0) call psb_safe_cpy(idx_fw,this%exch_fw_idx,info) - if (info == 0) call psb_safe_cpy(idx_bk,this%exch_bk_idx,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_double_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_d_inter_desc = this - -end function psb_d_inter_desc - -function psb_d_inter_desc_noidx(map_kind,desc1, desc2, map_fw, map_bk) - - use psb_base_mod, psb_protect_name => psb_d_inter_desc_noidx - - implicit none - type(psb_inter_desc_type) :: psb_d_inter_desc_noidx - type(psb_desc_type), target :: desc1, desc2 - type(psb_dspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - select case(map_kind) - case (psb_map_aggr_) - ! OK - case default - write(0,*) 'Bad map kind into psb_inter_desc ',map_kind - info = 1 - end select - - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%dmap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%dmap%map_bk,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_double_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_d_inter_desc_noidx = this - -end function psb_d_inter_desc_noidx - - -function psb_s_inter_desc(map_kind,desc1,desc2,map_fw,map_bk,idx_fw,idx_bk) - - use psb_base_mod, psb_protect_name => psb_s_inter_desc - - implicit none - type(psb_inter_desc_type) :: psb_s_inter_desc - type(psb_desc_type), target :: desc1, desc2 - type(psb_sspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind,idx_fw(:), idx_bk(:) - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%smap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%smap%map_bk,info) - if (info == 0) call psb_safe_cpy(idx_fw,this%exch_fw_idx,info) - if (info == 0) call psb_safe_cpy(idx_bk,this%exch_bk_idx,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_single_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_s_inter_desc = this - -end function psb_s_inter_desc - -function psb_s_inter_desc_noidx(map_kind,desc1, desc2, map_fw, map_bk) - - use psb_base_mod, psb_protect_name => psb_s_inter_desc_noidx - - implicit none - type(psb_inter_desc_type) :: psb_s_inter_desc_noidx - type(psb_desc_type), target :: desc1, desc2 - type(psb_sspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - select case(map_kind) - case (psb_map_aggr_) - ! OK - case default - write(0,*) 'Bad map kind into psb_inter_desc ',map_kind - info = 1 - end select - - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%smap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%smap%map_bk,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_single_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_s_inter_desc_noidx = this - -end function psb_s_inter_desc_noidx - -function psb_z_inter_desc(map_kind,desc1, desc2, map_fw, map_bk, idx_fw, idx_bk) - - use psb_base_mod, psb_protect_name => psb_z_inter_desc - - implicit none - type(psb_inter_desc_type) :: psb_z_inter_desc - type(psb_desc_type), target :: desc1, desc2 - type(psb_zspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind,idx_fw(:), idx_bk(:) - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%zmap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%zmap%map_bk,info) - if (info == 0) call psb_safe_cpy(idx_fw,this%exch_fw_idx,info) - if (info == 0) call psb_safe_cpy(idx_bk,this%exch_bk_idx,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_double_complex_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_z_inter_desc = this - -end function psb_z_inter_desc - -function psb_z_inter_desc_noidx(map_kind,desc1, desc2, map_fw, map_bk) - - use psb_base_mod, psb_protect_name => psb_z_inter_desc_noidx - - implicit none - type(psb_inter_desc_type) :: psb_z_inter_desc_noidx - type(psb_desc_type), target :: desc1, desc2 - type(psb_zspmat_type), intent(in) :: map_fw, map_bk - integer, intent(in) :: map_kind - ! - type(psb_inter_desc_type) :: this - integer :: info - character(len=20), parameter :: name='psb_inter_desc' - - info = 0 - select case(map_kind) - case (psb_map_aggr_) - ! OK - case default - write(0,*) 'Bad map kind into psb_inter_desc ',map_kind - info = 1 - end select - - if (psb_is_ok_desc(desc1)) then - this%desc_1=>desc1 - else - info = 2 - endif - if (psb_is_ok_desc(desc2)) then - this%desc_2=>desc2 - else - info = 3 - endif - - if (info == 0) call psb_sp_clone(map_fw,this%zmap%map_fw,info) - if (info == 0) call psb_sp_clone(map_bk,this%zmap%map_bk,info) - if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) - if (info == 0) then - call psb_cd_set_map_kind(map_kind, this) - call psb_cd_set_map_data(psb_map_double_complex_, this) - end if - if (info /= 0) then - write(0,*) trim(name),' Invalid descriptor input' - return - end if - - psb_z_inter_desc_noidx = this - -end function psb_z_inter_desc_noidx diff --git a/base/tools/psb_linmap.f90 b/base/tools/psb_linmap.f90 new file mode 100644 index 00000000..cb5ea07d --- /dev/null +++ b/base/tools/psb_linmap.f90 @@ -0,0 +1,345 @@ +!!$ +!!$ Parallel Sparse BLAS version 2.2 +!!$ (C) Copyright 2006/2007/2008 +!!$ Salvatore Filippone University of Rome Tor Vergata +!!$ Alfredo Buttari University of Rome Tor Vergata +!!$ +!!$ Redistribution and use in source and binary forms, with or without +!!$ modification, are permitted provided that the following conditions +!!$ are met: +!!$ 1. Redistributions of source code must retain the above copyright +!!$ notice, this list of conditions and the following disclaimer. +!!$ 2. Redistributions in binary form must reproduce the above copyright +!!$ notice, this list of conditions, and the following disclaimer in the +!!$ documentation and/or other materials provided with the distribution. +!!$ 3. The name of the PSBLAS group or the names of its contributors may +!!$ not be used to endorse or promote products derived from this +!!$ software without specific written permission. +!!$ +!!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +!!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +!!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS +!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +!!$ POSSIBILITY OF SUCH DAMAGE. +!!$ +!!$ + +function psb_c_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) result(this) + + use psb_base_mod, psb_protect_name => psb_c_linmap + + implicit none + type(psb_clinmap_type) :: this + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_cspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + ! + integer :: info + character(len=20), parameter :: name='psb_linmap' + + info = 0 + select case(map_kind) + case (psb_map_aggr_) + ! OK + if (psb_is_ok_desc(desc_X)) then + this%p_desc_X=>desc_X + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + this%p_desc_Y=>desc_Y + else + info = 3 + endif + if (present(iaggr)) then + if (.not.present(naggr)) then + info = 7 + else + allocate(this%iaggr(size(iaggr)),& + & this%naggr(size(naggr)), stat=info) + if (info == 0) then + this%iaggr = iaggr + this%naggr = naggr + end if + end if + else + allocate(this%iaggr(0), this%naggr(0), stat=info) + end if + + case(psb_map_gen_linear_) + + if (psb_is_ok_desc(desc_X)) then + call psb_cdcpy(desc_X, this%desc_X,info) + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + call psb_cdcpy(desc_Y, this%desc_Y,info) + else + info = 3 + endif + ! For a general linear map ignore iaggr,naggr + allocate(this%iaggr(0), this%naggr(0), stat=info) + + case default + write(0,*) 'Bad map kind into psb_linmap ',map_kind + info = 1 + end select + + if (info == 0) call psb_sp_clone(map_X2Y,this%map_X2Y,info) + if (info == 0) call psb_sp_clone(map_Y2X,this%map_Y2X,info) + if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) + if (info == 0) then + call psb_set_map_kind(map_kind, this) + end if + if (info /= 0) then + write(0,*) trim(name),' Invalid descriptor input' + return + end if + +end function psb_c_linmap + +function psb_d_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) result(this) + + use psb_base_mod, psb_protect_name => psb_d_linmap + + implicit none + type(psb_dlinmap_type) :: this + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_dspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + ! + integer :: info + character(len=20), parameter :: name='psb_linmap' + logical, parameter :: debug=.false. + + info = 0 + select case(map_kind) + case (psb_map_aggr_) + ! OK + + if (psb_is_ok_desc(desc_X)) then + this%p_desc_X=>desc_X + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + this%p_desc_Y=>desc_Y + else + info = 3 + endif + if (present(iaggr)) then + if (.not.present(naggr)) then + info = 7 + else + allocate(this%iaggr(size(iaggr)),& + & this%naggr(size(naggr)), stat=info) + if (info == 0) then + this%iaggr = iaggr + this%naggr = naggr + end if + end if + else + allocate(this%iaggr(0), this%naggr(0), stat=info) + end if + + case(psb_map_gen_linear_) + + if (psb_is_ok_desc(desc_X)) then + call psb_cdcpy(desc_X, this%desc_X,info) + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + call psb_cdcpy(desc_Y, this%desc_Y,info) + else + info = 3 + endif + ! For a general linear map ignore iaggr,naggr + allocate(this%iaggr(0), this%naggr(0), stat=info) + + case default + write(0,*) 'Bad map kind into psb_linmap ',map_kind + info = 1 + end select + + if (info == 0) call psb_sp_clone(map_X2Y,this%map_X2Y,info) + if (info == 0) call psb_sp_clone(map_Y2X,this%map_Y2X,info) + if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) + if (info == 0) then + call psb_set_map_kind(map_kind, this) + end if + if (info /= 0) then + write(0,*) trim(name),' Invalid descriptor input' + return + end if + if (debug) then + write(0,*) trim(name),' forward map:',allocated(this%map_X2Y%aspk) + write(0,*) trim(name),' backward map:',allocated(this%map_Y2X%aspk) + end if + +end function psb_d_linmap + +function psb_s_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) result(this) + + use psb_base_mod, psb_protect_name => psb_s_linmap + + implicit none + type(psb_slinmap_type) :: this + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_sspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + ! + integer :: info + character(len=20), parameter :: name='psb_linmap' + + info = 0 + + select case(map_kind) + case (psb_map_aggr_) + ! OK + + if (psb_is_ok_desc(desc_X)) then + this%p_desc_X=>desc_X + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + this%p_desc_Y=>desc_Y + else + info = 3 + endif + if (present(iaggr)) then + if (.not.present(naggr)) then + info = 7 + else + allocate(this%iaggr(size(iaggr)),& + & this%naggr(size(naggr)), stat=info) + if (info == 0) then + this%iaggr = iaggr + this%naggr = naggr + end if + end if + else + allocate(this%iaggr(0), this%naggr(0), stat=info) + end if + + case(psb_map_gen_linear_) + + if (psb_is_ok_desc(desc_X)) then + call psb_cdcpy(desc_X, this%desc_X,info) + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + call psb_cdcpy(desc_Y, this%desc_Y,info) + else + info = 3 + endif + ! For a general linear map ignore iaggr,naggr + allocate(this%iaggr(0), this%naggr(0), stat=info) + + case default + write(0,*) 'Bad map kind into psb_linmap ',map_kind + info = 1 + end select + + + if (info == 0) call psb_sp_clone(map_X2Y,this%map_X2Y,info) + if (info == 0) call psb_sp_clone(map_Y2X,this%map_Y2X,info) + if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) + if (info == 0) then + call psb_set_map_kind(map_kind, this) + end if + if (info /= 0) then + write(0,*) trim(name),' Invalid descriptor input' + return + end if + +end function psb_s_linmap + +function psb_z_linmap(map_kind,desc_X, desc_Y, map_X2Y, map_Y2X,iaggr,naggr) result(this) + + use psb_base_mod, psb_protect_name => psb_z_linmap + + implicit none + type(psb_zlinmap_type) :: this + type(psb_desc_type), target :: desc_X, desc_Y + type(psb_zspmat_type), intent(in) :: map_X2Y, map_Y2X + integer, intent(in) :: map_kind + integer, intent(in), optional :: iaggr(:), naggr(:) + ! + integer :: info + character(len=20), parameter :: name='psb_linmap' + + info = 0 + select case(map_kind) + case (psb_map_aggr_) + ! OK + + if (psb_is_ok_desc(desc_X)) then + this%p_desc_X=>desc_X + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + this%p_desc_Y=>desc_Y + else + info = 3 + endif + if (present(iaggr)) then + if (.not.present(naggr)) then + info = 7 + else + allocate(this%iaggr(size(iaggr)),& + & this%naggr(size(naggr)), stat=info) + if (info == 0) then + this%iaggr = iaggr + this%naggr = naggr + end if + end if + else + allocate(this%iaggr(0), this%naggr(0), stat=info) + end if + + case(psb_map_gen_linear_) + + if (psb_is_ok_desc(desc_X)) then + call psb_cdcpy(desc_X, this%desc_X,info) + else + info = 2 + endif + if (psb_is_ok_desc(desc_Y)) then + call psb_cdcpy(desc_Y, this%desc_Y,info) + else + info = 3 + endif + ! For a general linear map ignore iaggr,naggr + allocate(this%iaggr(0), this%naggr(0), stat=info) + + case default + write(0,*) 'Bad map kind into psb_linmap ',map_kind + info = 1 + end select + + if (info == 0) call psb_sp_clone(map_X2Y,this%map_X2Y,info) + if (info == 0) call psb_sp_clone(map_Y2X,this%map_Y2X,info) + if (info == 0) call psb_realloc(psb_itd_data_size_,this%itd_data,info) + if (info == 0) then + call psb_set_map_kind(map_kind, this) + end if + if (info /= 0) then + write(0,*) trim(name),' Invalid descriptor input' + return + end if + +end function psb_z_linmap diff --git a/base/tools/psb_map.f90 b/base/tools/psb_map.f90 index e13476b6..cb91bec5 100644 --- a/base/tools/psb_map.f90 +++ b/base/tools/psb_map.f90 @@ -31,54 +31,45 @@ !!$ !!$ ! -! Takes a vector X from space desc%desc_1 and maps it onto -! desc%desc_2 under desc%map_fw possibly with communication -! due to exch_fw_idx ! -subroutine psb_s_forward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_s_forward_map +subroutine psb_s_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_s_map_X2Y implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_slinmap_type), intent(in) :: map real(psb_spk_), intent(in) :: alpha,beta real(psb_spk_), intent(inout) :: x(:) real(psb_spk_), intent(out) :: y(:) - integer, intent(out) :: info + integer, intent(out) :: info real(psb_spk_), optional :: work(:) ! - real(psb_spk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + real(psb_spk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_forward_map' + character(len=20), parameter :: name='psb_map_X2Y' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end if - itsz = psb_cd_get_fw_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_single_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data', & - & map_data,psb_map_single_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update on the base desc - ! and a matrix-vector product. - call psb_halo(x,desc%desc_1,info,work=work) - if (info == 0) call psb_csmm(alpha,desc%smap%map_fw,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_2)) then - ictxt = psb_cd_get_context(desc%desc_2) - nr = psb_cd_get_global_rows(desc%desc_2) - call psb_sum(ictxt,y(1:nr)) + + ictxt = psb_cd_get_context(map%p_desc_Y) + nr2 = psb_cd_get_global_rows(map%p_desc_Y) + nc2 = psb_cd_get_local_cols(map%p_desc_Y) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_X,info,work=work) + if (info == 0) call psb_csmm(sone,map%map_X2Y,x,szero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 @@ -86,34 +77,44 @@ subroutine psb_s_forward_map(alpha,x,beta,y,desc,info,work) case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%smap%map_fw,& - & desc%desc_fw,desc%desc_1,desc%desc_2) - + ictxt = psb_cd_get_context(map%desc_Y) + nr1 = psb_cd_get_local_rows(map%desc_X) + nc1 = psb_cd_get_local_cols(map%desc_X) + nr2 = psb_cd_get_global_rows(map%desc_Y) + nc2 = psb_cd_get_local_cols(map%desc_Y) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_X,info,work=work) + if (info == 0) call psb_csmm(sone,map%map_X2Y,xt,szero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if - + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end select -end subroutine psb_s_forward_map +end subroutine psb_s_map_X2Y ! -! Takes a vector X from space desc%desc_2 and maps it onto -! desc%desc_1 under desc%map_bk possibly with communication +! Takes a vector x from space map%p_desc_Y and maps it onto +! map%p_desc_X under map%map_Y2X possibly with communication ! due to exch_bk_idx ! -subroutine psb_s_backward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_s_backward_map +subroutine psb_s_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_s_map_Y2X implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_slinmap_type), intent(in) :: map real(psb_spk_), intent(in) :: alpha,beta real(psb_spk_), intent(inout) :: x(:) real(psb_spk_), intent(out) :: y(:) @@ -121,70 +122,77 @@ subroutine psb_s_backward_map(alpha,x,beta,y,desc,info,work) real(psb_spk_), optional :: work(:) ! - real(psb_spk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + real(psb_spk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_backward_map' + character(len=20), parameter :: name='psb_map_Y2X' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end if - itsz = psb_cd_get_bk_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_single_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data',& - & map_data,psb_map_single_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update and a matrix-vector product. - call psb_halo(x,desc%desc_2,info,work=work) - if (info == 0) call psb_csmm(alpha,desc%smap%map_bk,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_1)) then - ictxt = psb_cd_get_context(desc%desc_1) - nr = psb_cd_get_global_rows(desc%desc_1) - call psb_sum(ictxt,y(1:nr)) + + ictxt = psb_cd_get_context(map%p_desc_X) + nr2 = psb_cd_get_global_rows(map%p_desc_X) + nc2 = psb_cd_get_local_cols(map%p_desc_X) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_Y,info,work=work) + if (info == 0) call psb_csmm(sone,map%map_Y2X,x,szero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if - case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%smap%map_bk,& - & desc%desc_bk,desc%desc_2,desc%desc_1) + + ictxt = psb_cd_get_context(map%desc_X) + nr1 = psb_cd_get_local_rows(map%desc_Y) + nc1 = psb_cd_get_local_cols(map%desc_Y) + nr2 = psb_cd_get_global_rows(map%desc_X) + nc2 = psb_cd_get_local_cols(map%desc_X) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_Y,info,work=work) + if (info == 0) call psb_csmm(sone,map%map_Y2X,xt,szero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end select -end subroutine psb_s_backward_map +end subroutine psb_s_map_Y2X ! -! Takes a vector X from space desc%desc_1 and maps it onto -! desc%desc_2 under desc%map_fw possibly with communication +! Takes a vector x from space map%p_desc_X and maps it onto +! map%p_desc_Y under map%map_X2Y possibly with communication ! due to exch_fw_idx ! -subroutine psb_d_forward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_d_forward_map +subroutine psb_d_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_d_map_X2Y implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_dlinmap_type), intent(in) :: map real(psb_dpk_), intent(in) :: alpha,beta real(psb_dpk_), intent(inout) :: x(:) real(psb_dpk_), intent(out) :: y(:) @@ -192,41 +200,33 @@ subroutine psb_d_forward_map(alpha,x,beta,y,desc,info,work) real(psb_dpk_), optional :: work(:) ! - real(psb_dpk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + real(psb_dpk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2 ,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_forward_map' + character(len=20), parameter :: name='psb_map_X2Y' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input: unassembled' info = 1 return end if - itsz = psb_cd_get_fw_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_double_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data', & - & map_data,psb_map_double_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update on the base desc - ! and a matrix-vector product. - call psb_halo(x,desc%desc_1,info,work=work) - if (info == 0) call desc%dmap%map_fw%spmm(alpha,x,beta,y,info) -!!$ if (info == 0) call psb_csmm(alpha,desc%dmap%map_fw,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_2)) then - ictxt = psb_cd_get_context(desc%desc_2) - nr = psb_cd_get_global_rows(desc%desc_2) - call psb_sum(ictxt,y(1:nr)) - end if + ictxt = psb_cd_get_context(map%p_desc_Y) + nr2 = psb_cd_get_global_rows(map%p_desc_Y) + nc2 = psb_cd_get_local_cols(map%p_desc_Y) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_X,info,work=work) + if (info == 0) call psb_csmm(done,map%map_X2Y,x,dzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 @@ -234,34 +234,45 @@ subroutine psb_d_forward_map(alpha,x,beta,y,desc,info,work) case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%dmap%map_fw,& - & desc%desc_fw,desc%desc_1,desc%desc_2) - + ictxt = psb_cd_get_context(map%desc_Y) + nr1 = psb_cd_get_local_rows(map%desc_X) + nc1 = psb_cd_get_local_cols(map%desc_X) + nr2 = psb_cd_get_global_rows(map%desc_Y) + nc2 = psb_cd_get_local_cols(map%desc_Y) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_X,info,work=work) + if (info == 0) call psb_csmm(done,map%map_X2Y,xt,dzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if - + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input', & + & map_kind, psb_map_aggr_, psb_map_gen_linear_ info = 1 return end select -end subroutine psb_d_forward_map +end subroutine psb_d_map_X2Y ! -! Takes a vector X from space desc%desc_2 and maps it onto -! desc%desc_1 under desc%map_bk possibly with communication +! Takes a vector x from space map%p_desc_Y and maps it onto +! map%p_desc_X under map%map_Y2X possibly with communication ! due to exch_bk_idx ! -subroutine psb_d_backward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_d_backward_map +subroutine psb_d_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_d_map_Y2X implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_dlinmap_type), intent(in) :: map real(psb_dpk_), intent(in) :: alpha,beta real(psb_dpk_), intent(inout) :: x(:) real(psb_dpk_), intent(out) :: y(:) @@ -269,73 +280,78 @@ subroutine psb_d_backward_map(alpha,x,beta,y,desc,info,work) real(psb_dpk_), optional :: work(:) ! - real(psb_dpk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + real(psb_dpk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_backward_map' + character(len=20), parameter :: name='psb_map_Y2X' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end if - itsz = psb_cd_get_bk_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_double_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data',& - & map_data,psb_map_double_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update and a matrix-vector product. - call psb_halo(x,desc%desc_2,info,work=work) -!!$ if (info == 0) call psb_csmm(alpha,desc%dmap%map_bk,x,beta,y,info) - if (info == 0) call desc%dmap%map_bk%spmm(alpha,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_1)) then - ictxt = psb_cd_get_context(desc%desc_1) - nr = psb_cd_get_global_rows(desc%desc_1) - call psb_sum(ictxt,y(1:nr)) - end if + ictxt = psb_cd_get_context(map%p_desc_X) + nr2 = psb_cd_get_global_rows(map%p_desc_X) + nc2 = psb_cd_get_local_cols(map%p_desc_X) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_Y,info,work=work) + if (info == 0) call psb_csmm(done,map%map_Y2X,x,dzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if - case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%dmap%map_bk,& - & desc%desc_bk,desc%desc_2,desc%desc_1) + + ictxt = psb_cd_get_context(map%desc_X) + nr1 = psb_cd_get_local_rows(map%desc_Y) + nc1 = psb_cd_get_local_cols(map%desc_Y) + nr2 = psb_cd_get_global_rows(map%desc_X) + nc2 = psb_cd_get_local_cols(map%desc_X) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_Y,info,work=work) + if (info == 0) call psb_csmm(done,map%map_Y2X,xt,dzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end select -end subroutine psb_d_backward_map +end subroutine psb_d_map_Y2X ! -! Takes a vector X from space desc%desc_1 and maps it onto -! desc%desc_2 under desc%map_fw possibly with communication +! Takes a vector x from space map%p_desc_X and maps it onto +! map%p_desc_Y under map%map_X2Y possibly with communication ! due to exch_fw_idx ! -subroutine psb_c_forward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_c_forward_map +subroutine psb_c_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_c_map_X2Y implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_clinmap_type), intent(in) :: map complex(psb_spk_), intent(in) :: alpha,beta complex(psb_spk_), intent(inout) :: x(:) complex(psb_spk_), intent(out) :: y(:) @@ -343,72 +359,78 @@ subroutine psb_c_forward_map(alpha,x,beta,y,desc,info,work) complex(psb_spk_), optional :: work(:) ! - complex(psb_spk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + complex(psb_spk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_forward_map' + character(len=20), parameter :: name='psb_map_X2Y' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end if - itsz = psb_cd_get_fw_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_complex_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data',& - & map_data,psb_map_complex_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update and a matrix-vector product. - call psb_halo(x,desc%desc_1,info,work=work) - if (info == 0) call psb_csmm(alpha,desc%cmap%map_fw,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_2)) then - ictxt = psb_cd_get_context(desc%desc_2) - nr = psb_cd_get_global_rows(desc%desc_2) - call psb_sum(ictxt,y(1:nr)) - end if + ictxt = psb_cd_get_context(map%p_desc_Y) + nr2 = psb_cd_get_global_rows(map%p_desc_Y) + nc2 = psb_cd_get_local_cols(map%p_desc_Y) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_X,info,work=work) + if (info == 0) call psb_csmm(cone,map%map_X2Y,x,czero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%cmap%map_fw,& - & desc%desc_fw,desc%desc_1,desc%desc_2) + ictxt = psb_cd_get_context(map%desc_Y) + nr1 = psb_cd_get_local_rows(map%desc_X) + nc1 = psb_cd_get_local_cols(map%desc_X) + nr2 = psb_cd_get_global_rows(map%desc_Y) + nc2 = psb_cd_get_local_cols(map%desc_Y) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_X,info,work=work) + if (info == 0) call psb_csmm(cone,map%map_X2Y,xt,czero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end select -end subroutine psb_c_forward_map +end subroutine psb_c_map_X2Y ! -! Takes a vector X from space desc%desc_2 and maps it onto -! desc%desc_1 under desc%map_bk possibly with communication +! Takes a vector x from space map%p_desc_Y and maps it onto +! map%p_desc_X under map%map_Y2X possibly with communication ! due to exch_bk_idx ! -subroutine psb_c_backward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_c_backward_map +subroutine psb_c_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_c_map_Y2X implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_clinmap_type), intent(in) :: map complex(psb_spk_), intent(in) :: alpha,beta complex(psb_spk_), intent(inout) :: x(:) complex(psb_spk_), intent(out) :: y(:) @@ -416,73 +438,78 @@ subroutine psb_c_backward_map(alpha,x,beta,y,desc,info,work) complex(psb_spk_), optional :: work(:) ! - complex(psb_spk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + complex(psb_spk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_backward_map' + character(len=20), parameter :: name='psb_map_Y2X' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end if - itsz = psb_cd_get_bk_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_complex_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data',& - & map_data,psb_map_complex_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update and a matrix-vector product. - call psb_halo(x,desc%desc_2,info,work=work) - if (info == 0) call psb_csmm(alpha,desc%cmap%map_bk,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_1)) then - ictxt = psb_cd_get_context(desc%desc_1) - nr = psb_cd_get_global_rows(desc%desc_1) - call psb_sum(ictxt,y(1:nr)) - end if + ictxt = psb_cd_get_context(map%p_desc_X) + nr2 = psb_cd_get_global_rows(map%p_desc_X) + nc2 = psb_cd_get_local_cols(map%p_desc_X) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_Y,info,work=work) + if (info == 0) call psb_csmm(cone,map%map_Y2X,x,czero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if - case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%cmap%map_bk,& - & desc%desc_bk,desc%desc_2,desc%desc_1) + ictxt = psb_cd_get_context(map%desc_X) + nr1 = psb_cd_get_local_rows(map%desc_Y) + nc1 = psb_cd_get_local_cols(map%desc_Y) + nr2 = psb_cd_get_global_rows(map%desc_X) + nc2 = psb_cd_get_local_cols(map%desc_X) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_Y,info,work=work) + if (info == 0) call psb_csmm(cone,map%map_Y2X,xt,czero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end select -end subroutine psb_c_backward_map +end subroutine psb_c_map_Y2X ! -! Takes a vector X from space desc%desc_1 and maps it onto -! desc%desc_2 under desc%map_fw possibly with communication +! Takes a vector x from space map%p_desc_X and maps it onto +! map%p_desc_Y under map%map_X2Y possibly with communication ! due to exch_fw_idx ! -subroutine psb_z_forward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_z_forward_map +subroutine psb_z_map_X2Y(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_z_map_X2Y implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_zlinmap_type), intent(in) :: map complex(psb_dpk_), intent(in) :: alpha,beta complex(psb_dpk_), intent(inout) :: x(:) complex(psb_dpk_), intent(out) :: y(:) @@ -490,71 +517,78 @@ subroutine psb_z_forward_map(alpha,x,beta,y,desc,info,work) complex(psb_dpk_), optional :: work(:) ! - complex(psb_dpk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + complex(psb_dpk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_forward_map' + character(len=20), parameter :: name='psb_map_X2Y' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end if - itsz = psb_cd_get_fw_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_double_complex_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data',& - & map_data,psb_map_double_complex_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update and a matrix-vector product. - call psb_halo(x,desc%desc_1,info,work=work) - if (info == 0) call psb_csmm(alpha,desc%zmap%map_fw,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_2)) then - ictxt = psb_cd_get_context(desc%desc_2) - nr = psb_cd_get_global_rows(desc%desc_2) - call psb_sum(ictxt,y(1:nr)) + + ictxt = psb_cd_get_context(map%p_desc_Y) + nr2 = psb_cd_get_global_rows(map%p_desc_Y) + nc2 = psb_cd_get_local_cols(map%p_desc_Y) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_X,info,work=work) + if (info == 0) call psb_csmm(zone,map%map_X2Y,x,zzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%zmap%map_fw,& - & desc%desc_fw,desc%desc_1,desc%desc_2) + ictxt = psb_cd_get_context(map%desc_Y) + nr1 = psb_cd_get_local_rows(map%desc_X) + nc1 = psb_cd_get_local_cols(map%desc_X) + nr2 = psb_cd_get_global_rows(map%desc_Y) + nc2 = psb_cd_get_local_cols(map%desc_Y) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_X,info,work=work) + if (info == 0) call psb_csmm(zone,map%map_X2Y,xt,zzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_Y)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_Y,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end select -end subroutine psb_z_forward_map +end subroutine psb_z_map_X2Y ! -! Takes a vector X from space desc%desc_2 and maps it onto -! desc%desc_1 under desc%map_bk possibly with communication +! Takes a vector x from space map%p_desc_Y and maps it onto +! map%p_desc_X under map%map_Y2X possibly with communication ! due to exch_bk_idx ! -subroutine psb_z_backward_map(alpha,x,beta,y,desc,info,work) - use psb_base_mod, psb_protect_name => psb_z_backward_map +subroutine psb_z_map_Y2X(alpha,x,beta,y,map,info,work) + use psb_base_mod, psb_protect_name => psb_z_map_Y2X implicit none - type(psb_inter_desc_type), intent(in) :: desc + type(psb_zlinmap_type), intent(in) :: map complex(psb_dpk_), intent(in) :: alpha,beta complex(psb_dpk_), intent(inout) :: x(:) complex(psb_dpk_), intent(out) :: y(:) @@ -562,160 +596,65 @@ subroutine psb_z_backward_map(alpha,x,beta,y,desc,info,work) complex(psb_dpk_), optional :: work(:) ! - complex(psb_dpk_), allocatable :: xt(:) - integer :: itsz, i, j,totxch,totsnd,totrcv,& + complex(psb_dpk_), allocatable :: xt(:), yt(:) + integer :: i, j, nr1, nc1,nr2, nc2,& & map_kind, map_data, nr, ictxt - character(len=20), parameter :: name='psb_backward_map' + character(len=20), parameter :: name='psb_map_Y2X' info = 0 - if (.not.psb_is_asb_desc(desc)) then - write(0,*) trim(name),' Invalid descriptor inupt' + if (.not.psb_is_asb_map(map)) then + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end if - itsz = psb_cd_get_bk_tmp_sz(desc) - map_kind = psb_cd_get_map_kind(desc) - map_data = psb_cd_get_map_data(desc) - if (map_data /= psb_map_double_complex_) then - write(0,*) trim(name),' Invalid descriptor inupt: map_data',& - & map_data,psb_map_double_complex_ - info = 1 - return - endif + map_kind = psb_get_map_kind(map) select case(map_kind) case(psb_map_aggr_) - ! Ok, we just need to call a halo update and a matrix-vector product. - call psb_halo(x,desc%desc_2,info,work=work) - if (info == 0) call psb_csmm(alpha,desc%zmap%map_bk,x,beta,y,info) - if ((info == 0) .and. psb_is_repl_desc(desc%desc_1)) then - ictxt = psb_cd_get_context(desc%desc_1) - nr = psb_cd_get_global_rows(desc%desc_1) - call psb_sum(ictxt,y(1:nr)) - end if + ictxt = psb_cd_get_context(map%p_desc_X) + nr2 = psb_cd_get_global_rows(map%p_desc_X) + nc2 = psb_cd_get_local_cols(map%p_desc_X) + allocate(yt(nc2),stat=info) + if (info == 0) call psb_halo(x,map%p_desc_Y,info,work=work) + if (info == 0) call psb_csmm(zone,map%map_Y2X,x,zzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%p_desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%p_desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if - case(psb_map_gen_linear_) - call psb_linmap(alpha,x,beta,y,desc%zmap%map_bk,& - & desc%desc_bk,desc%desc_2,desc%desc_1) + ictxt = psb_cd_get_context(map%desc_X) + nr1 = psb_cd_get_local_rows(map%desc_Y) + nc1 = psb_cd_get_local_cols(map%desc_Y) + nr2 = psb_cd_get_global_rows(map%desc_X) + nc2 = psb_cd_get_local_cols(map%desc_X) + allocate(xt(nc1),yt(nc2),stat=info) + xt(1:nr1) = x(1:nr1) + if (info == 0) call psb_halo(xt,map%desc_Y,info,work=work) + if (info == 0) call psb_csmm(zone,map%map_Y2X,xt,zzero,yt,info) + if ((info == 0) .and. psb_is_repl_desc(map%desc_X)) then + call psb_sum(ictxt,yt(1:nr2)) + end if + if (info == 0) call psb_geaxpby(alpha,yt,beta,y,map%desc_X,info) if (info /= 0) then write(0,*) trim(name),' Error from inner routines',info info = -1 end if + case default - write(0,*) trim(name),' Invalid descriptor inupt' + write(0,*) trim(name),' Invalid descriptor input' info = 1 return end select -end subroutine psb_z_backward_map - - - -subroutine psb_s_apply_linmap(alpha,x,beta,y,a_map,cd_xt,descin,descout) - use psb_base_mod, psb_protect_name => psb_s_apply_linmap - - implicit none - real(psb_spk_), intent(in) :: alpha,beta - real(psb_spk_), intent(inout) :: x(:),y(:) - type(psb_sspmat_type), intent(in) :: a_map - type(psb_desc_type), intent(in) :: cd_xt,descin, descout - - integer :: nrt, nct, info - real(psb_spk_), allocatable :: tmp(:) +end subroutine psb_z_map_Y2X - nrt = psb_cd_get_local_rows(cd_xt) - nct = psb_cd_get_local_cols(cd_xt) - allocate(tmp(nct),stat=info) - if (info == 0) tmp(1:nrt) = x(1:nrt) - if (info == 0) call psb_halo(tmp,cd_xt,info) - if (info == 0) call psb_csmm(alpha,a_map,tmp,beta,y,info) - if (info /= 0) then - write(0,*) 'Error in apply_map' - endif -end subroutine psb_s_apply_linmap - - -subroutine psb_d_apply_linmap(alpha,x,beta,y,a_map,cd_xt,descin,descout) - use psb_base_mod, psb_protect_name => psb_d_apply_linmap - - implicit none - real(psb_dpk_), intent(in) :: alpha,beta - real(psb_dpk_), intent(inout) :: x(:),y(:) - type(psb_dspmat_type), intent(in) :: a_map - type(psb_desc_type), intent(in) :: cd_xt,descin, descout - - integer :: nrt, nct, info - real(psb_dpk_), allocatable :: tmp(:) - - nrt = psb_cd_get_local_rows(cd_xt) - nct = psb_cd_get_local_cols(cd_xt) - allocate(tmp(nct),stat=info) - if (info == 0) tmp(1:nrt) = x(1:nrt) - if (info == 0) call psb_halo(tmp,cd_xt,info) - if (info == 0) call a_map%spmm(alpha,tmp,beta,y,info) -!!$ if (info == 0) call psb_csmm(alpha,a_map,tmp,beta,y,info) - if (info /= 0) then - write(0,*) 'Error in apply_map' - endif - -end subroutine psb_d_apply_linmap - - -subroutine psb_c_apply_linmap(alpha,x,beta,y,a_map,cd_xt,descin,descout) - use psb_base_mod, psb_protect_name => psb_c_apply_linmap - - implicit none - complex(psb_spk_), intent(in) :: alpha,beta - complex(psb_spk_), intent(inout) :: x(:),y(:) - type(psb_cspmat_type), intent(in) :: a_map - type(psb_desc_type), intent(in) :: cd_xt,descin, descout - - integer :: nrt, nct, info - complex(psb_spk_), allocatable :: tmp(:) - - nrt = psb_cd_get_local_rows(cd_xt) - nct = psb_cd_get_local_cols(cd_xt) - allocate(tmp(nct),stat=info) - if (info == 0) tmp(1:nrt) = x(1:nrt) - if (info == 0) call psb_halo(tmp,cd_xt,info) - if (info == 0) call psb_csmm(alpha,a_map,tmp,beta,y,info) - if (info /= 0) then - write(0,*) 'Error in apply_map' - endif - -end subroutine psb_c_apply_linmap - -subroutine psb_z_apply_linmap(alpha,x,beta,y,a_map,cd_xt,descin,descout) - - use psb_base_mod, psb_protect_name => psb_z_apply_linmap - - implicit none - complex(psb_dpk_), intent(in) :: alpha,beta - complex(psb_dpk_), intent(inout) :: x(:),y(:) - type(psb_zspmat_type), intent(in) :: a_map - type(psb_desc_type), intent(in) :: cd_xt,descin, descout - - integer :: nrt, nct, info - complex(psb_dpk_), allocatable :: tmp(:) - - nrt = psb_cd_get_local_rows(cd_xt) - nct = psb_cd_get_local_cols(cd_xt) - allocate(tmp(nct),stat=info) - if (info == 0) tmp(1:nrt) = x(1:nrt) - if (info == 0) call psb_halo(tmp,cd_xt,info) - if (info == 0) call psb_csmm(alpha,a_map,tmp,beta,y,info) - if (info /= 0) then - write(0,*) 'Error in apply_map' - endif - -end subroutine psb_z_apply_linmap diff --git a/base/tools/psb_scdbldext.F90 b/base/tools/psb_scdbldext.F90 index 4d897b9a..50e7b31a 100644 --- a/base/tools/psb_scdbldext.F90 +++ b/base/tools/psb_scdbldext.F90 @@ -84,16 +84,6 @@ Subroutine psb_scdbldext(a,desc_a,novr,desc_ov,info, extype) integer, intent(out) :: info integer, intent(in),optional :: extype - interface - subroutine psb_icdasb(desc_a,info,ext_hv) - use psb_descriptor_type - Type(psb_desc_type), intent(inout) :: desc_a - integer, intent(out) :: info - logical, intent(in),optional :: ext_hv - end subroutine psb_icdasb - end interface - integer icomm, err_act - ! .. Local Scalars .. Integer :: i, j, np, me,m,nnzero,& & ictxt, lovr, lworks,lworkr, n_row,n_col, int_err(5),& @@ -102,6 +92,7 @@ Subroutine psb_scdbldext(a,desc_a,novr,desc_ov,info, extype) & n_elem_send,tot_recv,tot_elem,cntov_o,& & counter_t,n_elem,i_ovr,jj,proc_id,isz, & & idxr, idxs, iszr, iszs, nxch, nsnd, nrcv,lidx, extype_ + integer :: icomm, err_act type(psb_sspmat_type) :: blk Integer, allocatable :: tmp_halo(:),tmp_ovr_idx(:), orig_ovr(:) @@ -399,12 +390,6 @@ Subroutine psb_scdbldext(a,desc_a,novr,desc_ov,info, extype) ! Do j=0,n_elem_send-1 -!!$ idx = halo(counter+psb_elem_send_+j) -!!$ gidx = desc_ov%loc_to_glob(idx) -!!$ if (idx > psb_cd_get_local_rows(Desc_a)) & -!!$ & write(debug_unit,*) me,' ',trim(name),':Out of local rows ',i_ovr,& -!!$ & idx,psb_cd_get_local_rows(Desc_a) - idx = halo(counter+psb_elem_send_+j) call psb_map_l2g(idx,gidx,desc_ov%idxmap,info) If (gidx < 0) then @@ -668,7 +653,7 @@ Subroutine psb_scdbldext(a,desc_a,novr,desc_ov,info, extype) write(debug_unit,*) me,' ',trim(name),':Done Crea_Index' call psb_barrier(ictxt) end if - call psb_transfer(t_halo_out,halo,info) + call psb_move_alloc(t_halo_out,halo,info) ! ! At this point we have built the halo necessary for I_OVR+1. ! @@ -687,7 +672,7 @@ Subroutine psb_scdbldext(a,desc_a,novr,desc_ov,info, extype) ! 5. n_col(ov) current. ! desc_ov%matrix_data(psb_n_row_) = desc_a%matrix_data(psb_n_row_) - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) call psb_ensure_size((counter_h+counter_t+1),tmp_halo,info,pad=-1) if (info /= 0) then call psb_errpush(4010,name,a_err='psb_ensure_size') @@ -696,7 +681,7 @@ Subroutine psb_scdbldext(a,desc_a,novr,desc_ov,info, extype) tmp_halo(counter_h:counter_h+counter_t-1) = t_halo_in(1:counter_t) counter_h = counter_h+counter_t-1 tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%halo_index,info) + call psb_move_alloc(tmp_halo,desc_ov%halo_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') @@ -722,16 +707,15 @@ Subroutine psb_scdbldext(a,desc_a,novr,desc_ov,info, extype) orig_ovr(cntov_o:cntov_o+counter_o-1) = tmp_ovr_idx(1:counter_o) cntov_o = cntov_o+counter_o-1 orig_ovr(cntov_o:) = -1 - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') goto 9999 end if tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%ext_index,info) - call psb_transfer(t_halo_in,desc_ov%halo_index,info) - + call psb_move_alloc(tmp_halo,desc_ov%ext_index,info) + call psb_move_alloc(t_halo_in,desc_ov%halo_index,info) case default call psb_errpush(30,name,i_err=(/5,extype_,0,0,0/)) goto 9999 diff --git a/base/tools/psb_zcdbldext.F90 b/base/tools/psb_zcdbldext.F90 index 8c3cc07b..fb1f3a6c 100644 --- a/base/tools/psb_zcdbldext.F90 +++ b/base/tools/psb_zcdbldext.F90 @@ -69,11 +69,11 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) use psb_realloc_mod use psi_mod #ifdef MPI_MOD - use mpi + use mpi #endif Implicit None #ifdef MPI_H - include 'mpif.h' + include 'mpif.h' #endif ! .. Array Arguments .. @@ -84,16 +84,6 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) integer, intent(out) :: info integer, intent(in),optional :: extype - interface - subroutine psb_icdasb(desc_a,info,ext_hv) - use psb_descriptor_type - Type(psb_desc_type), intent(inout) :: desc_a - integer, intent(out) :: info - logical, intent(in),optional :: ext_hv - end subroutine psb_icdasb - end interface - integer icomm, err_act - ! .. Local Scalars .. Integer :: i, j, np, me,m,nnzero,& & ictxt, lovr, lworks,lworkr, n_row,n_col, int_err(5),& @@ -102,6 +92,7 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) & n_elem_send,tot_recv,tot_elem,cntov_o,& & counter_t,n_elem,i_ovr,jj,proc_id,isz, & & idxr, idxs, iszr, iszs, nxch, nsnd, nrcv,lidx, extype_ + integer icomm, err_act type(psb_zspmat_type) :: blk Integer, allocatable :: tmp_halo(:),tmp_ovr_idx(:), orig_ovr(:) @@ -361,7 +352,7 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) info=-3 call psb_errpush(info,name) goto 9999 - endif + endif call psb_ensure_size((counter_o+3),tmp_ovr_idx,info,pad=-1) if (info /= 0) then info=4010 @@ -399,12 +390,6 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) ! Do j=0,n_elem_send-1 -!!$ idx = halo(counter+psb_elem_send_+j) -!!$ gidx = desc_ov%loc_to_glob(idx) -!!$ if (idx > psb_cd_get_local_rows(Desc_a)) & -!!$ & write(debug_unit,*) me,' ',trim(name),':Out of local rows ',i_ovr,& -!!$ & idx,psb_cd_get_local_rows(Desc_a) - idx = halo(counter+psb_elem_send_+j) call psb_map_l2g(idx,gidx,desc_ov%idxmap,info) If (gidx < 0) then @@ -657,18 +642,18 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) if (debug_level >= psb_debug_outer_) then - write(debug_unit,*) me,' ',trim(name),':Checktmp_o_i 1',tmp_ovr_idx(1:10) - write(debug_unit,*) me,' ',trim(name),':Calling Crea_index' - end if + write(debug_unit,*) me,' ',trim(name),':Checktmp_o_i 1',tmp_ovr_idx(1:10) + write(debug_unit,*) me,' ',trim(name),':Calling Crea_index' + end if call psi_crea_index(desc_ov,t_halo_in,t_halo_out,.false.,& & nxch,nsnd,nrcv,info) - + if (debug_level >= psb_debug_outer_) then write(debug_unit,*) me,' ',trim(name),':Done Crea_Index' call psb_barrier(ictxt) end if - call psb_transfer(t_halo_out,halo,info) + call psb_move_alloc(t_halo_out,halo,info) ! ! At this point we have built the halo necessary for I_OVR+1. ! @@ -687,7 +672,7 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) ! 5. n_col(ov) current. ! desc_ov%matrix_data(psb_n_row_) = desc_a%matrix_data(psb_n_row_) - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) call psb_ensure_size((counter_h+counter_t+1),tmp_halo,info,pad=-1) if (info /= 0) then call psb_errpush(4010,name,a_err='psb_ensure_size') @@ -696,7 +681,7 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) tmp_halo(counter_h:counter_h+counter_t-1) = t_halo_in(1:counter_t) counter_h = counter_h+counter_t-1 tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%halo_index,info) + call psb_move_alloc(tmp_halo,desc_ov%halo_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') @@ -722,16 +707,15 @@ Subroutine psb_zcdbldext(a,desc_a,novr,desc_ov,info, extype) orig_ovr(cntov_o:cntov_o+counter_o-1) = tmp_ovr_idx(1:counter_o) cntov_o = cntov_o+counter_o-1 orig_ovr(cntov_o:) = -1 - call psb_transfer(orig_ovr,desc_ov%ovrlap_index,info) + call psb_move_alloc(orig_ovr,desc_ov%ovrlap_index,info) deallocate(tmp_ovr_idx,stat=info) if (info /= 0) then call psb_errpush(4010,name,a_err='deallocate') goto 9999 end if tmp_halo(counter_h:) = -1 - call psb_transfer(tmp_halo,desc_ov%ext_index,info) - call psb_transfer(t_halo_in,desc_ov%halo_index,info) - + call psb_move_alloc(tmp_halo,desc_ov%ext_index,info) + call psb_move_alloc(t_halo_in,desc_ov%halo_index,info) case default call psb_errpush(30,name,i_err=(/5,extype_,0,0,0/)) goto 9999 diff --git a/config/pac.m4 b/config/pac.m4 index b7c7368e..471b4d5a 100644 --- a/config/pac.m4 +++ b/config/pac.m4 @@ -136,7 +136,7 @@ rm -f conftest*]) -dnl @synopsis PAC_HAVE_MODERN_GCC( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl @synopsis PAC_HAVE_MODERN_GFORTRAN( [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl dnl Will check if the GNU fortran version is suitable for PSBLAS. dnl If yes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND. @@ -145,16 +145,16 @@ dnl Note : Will use MPIFC; if unset, will use '$FC'. dnl dnl @author Michele Martone dnl -AC_DEFUN(PAC_HAVE_MODERN_GCC, +AC_DEFUN(PAC_HAVE_MODERN_GFORTRAN, ac_exeext='' ac_ext='F' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' dnl Warning : square brackets are EVIL! -[ +[AC_MSG_CHECKING([GNU Fortran version at least 4.3]) cat > conftest.$ac_ext <= 4 && __GNUC_MINOR__ >= 2 ) || ( __GNUC__ > 4 ) - print *, "ciao" +#if ( __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 ) || ( __GNUC__ > 4 ) + print *, "ok" #else this program will fail #endif @@ -162,9 +162,11 @@ cat > conftest.$ac_ext <&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC ifelse([$2], , , [ rm -rf conftest* diff --git a/configure b/configure index 9046c03c..7a7c4693 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for PSBLAS 2.2. +# Generated by GNU Autoconf 2.63 for PSBLAS 2.3.1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## @@ -17,7 +17,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -39,17 +39,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -65,8 +93,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -89,7 +115,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -102,17 +128,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -134,7 +153,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -160,7 +179,7 @@ else as_have_required=no fi - if test $as_have_required = yes && (eval ": + if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } @@ -242,7 +261,7 @@ IFS=$as_save_IFS if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -263,7 +282,7 @@ _ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -343,10 +362,10 @@ fi if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi @@ -415,9 +434,10 @@ fi test \$exitcode = 0") || { echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. } @@ -453,7 +473,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -481,7 +501,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -494,19 +513,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -531,10 +553,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -574,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='PSBLAS' PACKAGE_TARNAME='psblas' -PACKAGE_VERSION='2.2' -PACKAGE_STRING='PSBLAS 2.2' +PACKAGE_VERSION='2.3.1' +PACKAGE_STRING='PSBLAS 2.3.1' PACKAGE_BUGREPORT='salvatore.filippone@uniroma2.it' ac_unique_file="base/modules/psb_base_mod.f90" @@ -615,132 +637,12609 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS +ac_subst_vars='LTLIBOBJS +LIBOBJS +UTILLIBNAME +METHDLIBNAME +PRECLIBNAME +LIBDIR +PSBLASRULES +FINCLUDES +CINCLUDES +METIS_LIBS +BLACS_LIBS +INSTALL_DOCSDIR +INSTALL_INCLUDEDIR +INSTALL_LIBDIR +INSTALL_DIR +INSTALL +MPIFCC +AR +F90LINK +FLINK +MODEXT +FMFLAG +FIFLAG +EXTRA_OPT +CCOPT +FCOPT +MPCC +MPF77 +MPF90 +F90COPT +F90 +BASELIBNAME +CDEFINES +FDEFINES +LAPACK_LIBS +BLAS_LIBS +FLIBS +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +RANLIB +MPIFC +MPIF77 +MPILIBS +MPICC +ac_ct_CC +CPPFLAGS +CFLAGS +CC +ac_ct_F77 +FFLAGS +F77 +OBJEXT +EXEEXT +ac_ct_FC +LDFLAGS +FCFLAGS +FC +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_ccopt +with_fcopt +with_f90copt +with_libs +with_clibs +with_flibs +with_library_path +with_include_path +with_module_path +enable_dependency_tracking +with_blas +with_lapack +with_blacs +with_metis +' + ac_precious_vars='build_alias host_alias target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA FC FCFLAGS LDFLAGS -ac_ct_FC -EXEEXT -OBJEXT +LIBS F77 FFLAGS -ac_ct_F77 CC CFLAGS CPPFLAGS -ac_ct_CC MPICC -MPILIBS MPIF77 MPIFC -RANLIB -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -CPP -GREP -EGREP -FLIBS -BLAS_LIBS -LAPACK_LIBS -FDEFINES -CDEFINES -BASELIBNAME -F90 -F90COPT -MPF90 -MPF77 -MPCC -FCOPT -CCOPT -FIFLAG -FMFLAG -MODEXT -FLINK -F90LINK -AR -MPIFCC -INSTALL -INSTALL_DIR -INSTALL_LIBDIR -INSTALL_INCLUDEDIR -INSTALL_DOCSDIR -BLACS_LIBS -METIS_LIBS -CINCLUDES -FINCLUDES -PSBLASRULES -LIBDIR -PRECLIBNAME -METHDLIBNAME -UTILLIBNAME +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 + { (exit 1); exit 1; }; } + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures PSBLAS 2.3.1 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/psblas] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of PSBLAS 2.3.1:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-ccopt additional CCOPT flags to be added: will prepend + to CCOPT + --with-fcopt additional FCOPT flags to be added: will prepend + to FCOPT + --with-f90copt additional F90COPT flags to be added: will prepend + to F90COPT + --with-libs List additional link flags here. For example, + --with-libs=-lspecial_system_lib or + --with-libs=-L/path/to/libs + --with-clibs additional CLIBS flags to be added: will prepend + to CLIBS + --with-flibs additional FLIBS flags to be added: will prepend + to FLIBS + --with-library-path additional LIBRARYPATH flags to be added: will + prepend to LIBRARYPATH + --with-include-path additional INCLUDEPATH flags to be added: will + prepend to INCLUDEPATH + --with-module-path additional MODULE_PATH flags to be added: will + prepend to MODULE_PATH + --with-blas= use BLAS library + --with-lapack= use LAPACK library + --with-blacs=LIB Specify BLACSLIBNAME or -lBLACSLIBNAME or the + absolute library filename. + --with-metis=LIB Specify -lMETISLIBNAME or the absolute library + filename. + +Some influential environment variables: + FC Fortran compiler command + FCFLAGS Fortran compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + CC C compiler command + CFLAGS C compiler flags + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + MPICC MPI C compiler command + MPIF77 MPI Fortran 77 compiler command + MPIFC MPI Fortran compiler command + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +PSBLAS configure 2.3.1 +generated by GNU Autoconf 2.63 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by PSBLAS $as_me 2.3.1, which was +generated by GNU Autoconf 2.63. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test -r "$ac_site_file"; then + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# VERSION is the file containing the PSBLAS version code +# FIXME +psblas_cv_version="2.3.1" + +# A sample source file + + +# Our custom M4 macros are in the 'config' directory + +{ $as_echo "$as_me:$LINENO: +-------------------------------------------------------------------------------- + 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. +-------------------------------------------------------------------------------- + " >&5 +$as_echo "$as_me: +-------------------------------------------------------------------------------- + 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. +-------------------------------------------------------------------------------- + " >&6;} +############################################################################### +# Compilers detection: FC,F77,CC should be set, if found. +############################################################################### +# +# Installation. +# +# +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +{ $as_echo "$as_me:$LINENO: checking where to install" >&5 +$as_echo_n "checking where to install... " >&6; } +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 +{ $as_echo "$as_me:$LINENO: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&5 +$as_echo "$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&6; } + +# Note that the following line won't save from troubles. +# AC_PROG_FC([mpxlf95 mpxlf90 mpxlf pgf95 pgf90 mpif95 mpif90 gfortran f95 f90 ifc]) +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_FC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$FC"; then + ac_cv_prog_FC="$FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_FC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +FC=$ac_cv_prog_FC +if test -n "$FC"; then + { $as_echo "$as_me:$LINENO: result: $FC" >&5 +$as_echo "$FC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$FC" && break + done +fi +if test -z "$FC"; then + ac_ct_FC=$FC + for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_FC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_FC"; then + ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_FC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_FC=$ac_cv_prog_ac_ct_FC +if test -n "$ac_ct_FC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_FC" && break +done + + if test "x$ac_ct_FC" = x; then + FC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + FC=$ac_ct_FC + fi +fi + + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:$LINENO: checking for Fortran compiler default output file name" >&5 +$as_echo_n "checking for Fortran compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Fortran compiler cannot create executables +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: Fortran compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether the Fortran compiler works" >&5 +$as_echo_n "checking whether the Fortran compiler works... " >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run Fortran compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot run Fortran compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + fi + fi +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest$ac_cv_exeext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } +if test "${ac_cv_fc_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_fc_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FCFLAGS+set} +ac_save_FFLAGS=$FCFLAGS +FCFLAGS= +{ $as_echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } +if test "${ac_cv_prog_fc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + FCFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_fc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_fc_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FCFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_fc_g = yes; then + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-g -O2" + else + FCFLAGS="-g" + fi +else + if test "x$ac_cv_fc_compiler_gnu" = xyes; then + FCFLAGS="-O2" + else + FCFLAGS= + fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +#AC_PROG_FC +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in xlf pgf77 ifort ifc nagfor gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_F77+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + { $as_echo "$as_me:$LINENO: result: $F77" >&5 +$as_echo "$F77" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in xlf pgf77 ifort ifc nagfor gfortran +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_F77="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +$as_echo "$ac_ct_F77" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_F77" && break +done + + if test "x$ac_ct_F77" = x; then + F77="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + F77=$ac_ct_F77 + fi +fi + + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +$as_echo "$ac_cv_f77_compiler_gnu" >&6; } +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +$as_echo_n "checking whether $F77 accepts -g... " >&6; } +if test "${ac_cv_prog_f77_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_prog_f77_g=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +$as_echo "$ac_cv_prog_f77_g" >&6; } +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +if test $ac_compiler_gnu = yes; then + G77=yes +else + G77= +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in xlc pgcc icc gcc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in xlc pgcc icc gcc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Sanity checks, although redundant (useful when debugging this configure.ac)! +if test "X$FC" == "X" ; then + { { $as_echo "$as_me:$LINENO: error: Problem : No Fortran compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No Fortran compiler specified nor found!" >&2;} + { (exit 1); exit 1; }; } +fi + +if test "X$CC" == "X" ; then + { { $as_echo "$as_me:$LINENO: error: Problem : No C compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No C compiler specified nor found!" >&2;} + { (exit 1); exit 1; }; } +fi +############################################################################### +# Suitable MPI compilers detection +############################################################################### +# Note: Someday we will contemplate a fake MPI - configured version of PSBLAS +############################################################################### + +#Note : we miss the name of the Intel C compiler + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test "X$MPICC" = "X" ; then + # This is our MPICC compiler preference: it will override ACX_MPI's first try. + for ac_prog in mpxlc mpcc mpicc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MPICC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$MPICC"; then + ac_cv_prog_MPICC="$MPICC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MPICC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +MPICC=$ac_cv_prog_MPICC +if test -n "$MPICC"; then + { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 +$as_echo "$MPICC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MPICC" && break +done + +fi + + + + + + + for ac_prog in mpicc hcc mpxlc_r mpxlc mpcc cmpicc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MPICC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$MPICC"; then + ac_cv_prog_MPICC="$MPICC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MPICC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +MPICC=$ac_cv_prog_MPICC +if test -n "$MPICC"; then + { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 +$as_echo "$MPICC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MPICC" && break +done +test -n "$MPICC" || MPICC="$CC" + + acx_mpi_save_CC="$CC" + CC="$MPICC" + + + +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } +if test "${ac_cv_func_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define MPI_Init to an innocuous variant, in case declares MPI_Init. + For example, HP-UX 11i declares gettimeofday. */ +#define MPI_Init innocuous_MPI_Init + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char MPI_Init (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef MPI_Init + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MPI_Init (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_MPI_Init || defined __stub___MPI_Init +choke me +#endif + +int +main () +{ +return MPI_Init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_func_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 +$as_echo "$ac_cv_func_MPI_Init" >&6; } +if test "x$ac_cv_func_MPI_Init" = x""yes; then + MPILIBS=" " +fi + +fi + +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } +if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpi $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MPI_Init (); +int +main () +{ +return MPI_Init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_mpi_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mpi_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then + MPILIBS="-lmpi" +fi + +fi +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } +if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpich $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MPI_Init (); +int +main () +{ +return MPI_Init (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_mpich_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mpich_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then + MPILIBS="-lmpich" +fi + +fi + +if test x != x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for mpi.h" >&5 +$as_echo_n "checking for mpi.h... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + MPILIBS="" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +CC="$acx_mpi_save_CC" + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x = x"$MPILIBS"; then + { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for C" >&5 +$as_echo "$as_me: error: Cannot find any suitable MPI implementation for C" >&2;} + { (exit 1); exit 1; }; } + : +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MPI 1 +_ACEOF + + : +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +if test "X$MPIF77" = "X" ; then + # This is our MPIFC compiler preference: it will override ACX_MPI's first try. + for ac_prog in mpxlf mpf77 mpif77 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MPIF77+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$MPIF77"; then + ac_cv_prog_MPIF77="$MPIF77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MPIF77="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +MPIF77=$ac_cv_prog_MPIF77 +if test -n "$MPIF77"; then + { $as_echo "$as_me:$LINENO: result: $MPIF77" >&5 +$as_echo "$MPIF77" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MPIF77" && break +done + +fi + + + + + + + for ac_prog in mpif77 hf77 mpxlf mpf77 mpif90 mpf90 mpxlf90 mpxlf95 mpxlf_r cmpifc cmpif90c +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MPIF77+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$MPIF77"; then + ac_cv_prog_MPIF77="$MPIF77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MPIF77="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +MPIF77=$ac_cv_prog_MPIF77 +if test -n "$MPIF77"; then + { $as_echo "$as_me:$LINENO: result: $MPIF77" >&5 +$as_echo "$MPIF77" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MPIF77" && break +done +test -n "$MPIF77" || MPIF77="$F77" + + acx_mpi_save_F77="$F77" + F77="$MPIF77" + + + +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + MPILIBS=" " + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + + if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 +$as_echo_n "checking for MPI_Init in -lfmpi... " >&6; } +if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfmpi $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_fmpi_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_fmpi_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then + MPILIBS="-lfmpi" +fi + + fi + if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpich" >&5 +$as_echo_n "checking for MPI_Init in -lfmpich... " >&6; } +if test "${ac_cv_lib_fmpich_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfmpich $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_fmpich_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_fmpich_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_fmpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_fmpich_MPI_Init" = x""yes; then + MPILIBS="-lfmpich" +fi + + fi + +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } +if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpi $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_mpi_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mpi_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then + MPILIBS="-lmpi" +fi + +fi +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } +if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpich $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_mpich_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mpich_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then + MPILIBS="-lmpich" +fi + +fi + +if test x != x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for mpif.h" >&5 +$as_echo_n "checking for mpif.h... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + program main + include 'mpif.h' + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + MPILIBS="" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +F77="$acx_mpi_save_F77" + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x = x"$MPILIBS"; then + { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran 77" >&5 +$as_echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran 77" >&2;} + { (exit 1); exit 1; }; } + : +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MPI 1 +_ACEOF + + : +fi + + +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + +if test "X$MPIFC" = "X" ; then + # This is our MPIFC compiler preference: it will override ACX_MPI's first try. + for ac_prog in mpxlf95 mpxlf90 mpf95 mpf90 mpif95 mpif90 +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MPIFC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$MPIFC"; then + ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MPIFC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +MPIFC=$ac_cv_prog_MPIFC +if test -n "$MPIFC"; then + { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 +$as_echo "$MPIFC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MPIFC" && break +done + +fi + + + + + + + + for ac_prog in mpif90 hf90 mpxlf90 mpxlf95 mpf90 cmpifc cmpif90c +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MPIFC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$MPIFC"; then + ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MPIFC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +MPIFC=$ac_cv_prog_MPIFC +if test -n "$MPIFC"; then + { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 +$as_echo "$MPIFC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MPIFC" && break +done +test -n "$MPIFC" || MPIFC="$FC" + + acx_mpi_save_FC="$FC" + FC="$MPIFC" + + + +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + MPILIBS=" " + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi + + if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 +$as_echo_n "checking for MPI_Init in -lfmpi... " >&6; } +if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lfmpi $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_fmpi_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_fmpi_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then + MPILIBS="-lfmpi" +fi + + fi + if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpichf90" >&5 +$as_echo_n "checking for MPI_Init in -lmpichf90... " >&6; } +if test "${ac_cv_lib_mpichf90_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpichf90 $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_mpichf90_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mpichf90_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpichf90_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpichf90_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpichf90_MPI_Init" = x""yes; then + MPILIBS="-lmpichf90" +fi + + fi + +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } +if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpi $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_mpi_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mpi_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then + MPILIBS="-lmpi" +fi + +fi +if test x = x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } +if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmpich $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call MPI_Init + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_mpich_MPI_Init=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_mpich_MPI_Init=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then + MPILIBS="-lmpich" +fi + +fi + +if test x != x"$MPILIBS"; then + { $as_echo "$as_me:$LINENO: checking for mpif.h" >&5 +$as_echo_n "checking for mpif.h... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + program main + include 'mpif.h' + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + MPILIBS="" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +FC="$acx_mpi_save_FC" + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x = x"$MPILIBS"; then + { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran" >&5 +$as_echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran" >&2;} + { (exit 1); exit 1; }; } + : +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MPI 1 +_ACEOF + + : +fi + + +# We leave a default language for the next checks. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +############################################################################### +# Sanity checks, although redundant (useful when debugging this configure.ac)! +############################################################################### + +if test "X$MPIFC" == "X" ; then + { { $as_echo "$as_me:$LINENO: error: Problem : No MPI Fortran compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No MPI Fortran compiler specified nor found!" >&2;} + { (exit 1); exit 1; }; } +fi + +if test "X$MPICC" == "X" ; then + { { $as_echo "$as_me:$LINENO: error: Problem : No MPI C compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No MPI C compiler specified nor found!" >&2;} + { (exit 1); exit 1; }; } +fi + +############################################################################### +# FLAGS and LIBS user customization +############################################################################### + + +{ $as_echo "$as_me:$LINENO: checking whether additional CCOPT flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional CCOPT flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-ccopt was given. +if test "${with_ccopt+set}" = set; then + withval=$with_ccopt; +CCOPT="${withval} ${CCOPT}" +{ $as_echo "$as_me:$LINENO: result: CCOPT = ${CCOPT}" >&5 +$as_echo "CCOPT = ${CCOPT}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + +{ $as_echo "$as_me:$LINENO: checking whether additional FCOPT flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional FCOPT flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-fcopt was given. +if test "${with_fcopt+set}" = set; then + withval=$with_fcopt; +FCOPT="${withval} ${FCOPT}" +{ $as_echo "$as_me:$LINENO: result: FCOPT = ${FCOPT}" >&5 +$as_echo "FCOPT = ${FCOPT}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + +{ $as_echo "$as_me:$LINENO: checking whether additional F90COPT flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional F90COPT flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-f90copt was given. +if test "${with_f90copt+set}" = set; then + withval=$with_f90copt; +F90COPT="${withval} ${F90COPT}" +{ $as_echo "$as_me:$LINENO: result: F90COPT = ${F90COPT}" >&5 +$as_echo "F90COPT = ${F90COPT}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + +#PAC_ARG_WITH_FLAGS(ldflags,LDFLAGS) + +{ $as_echo "$as_me:$LINENO: checking whether additional libraries are needed" >&5 +$as_echo_n "checking whether additional libraries are needed... " >&6; } + +# Check whether --with-libs was given. +if test "${with_libs+set}" = set; then + withval=$with_libs; +LIBS="${withval} ${LIBS}" +{ $as_echo "$as_me:$LINENO: result: LIBS = ${LIBS}" >&5 +$as_echo "LIBS = ${LIBS}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + +{ $as_echo "$as_me:$LINENO: checking whether additional CLIBS flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional CLIBS flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-clibs was given. +if test "${with_clibs+set}" = set; then + withval=$with_clibs; +CLIBS="${withval} ${CLIBS}" +{ $as_echo "$as_me:$LINENO: result: CLIBS = ${CLIBS}" >&5 +$as_echo "CLIBS = ${CLIBS}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + +{ $as_echo "$as_me:$LINENO: checking whether additional FLIBS flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional FLIBS flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-flibs was given. +if test "${with_flibs+set}" = set; then + withval=$with_flibs; +FLIBS="${withval} ${FLIBS}" +{ $as_echo "$as_me:$LINENO: result: FLIBS = ${FLIBS}" >&5 +$as_echo "FLIBS = ${FLIBS}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + + +{ $as_echo "$as_me:$LINENO: checking whether additional LIBRARYPATH flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional LIBRARYPATH flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-library-path was given. +if test "${with_library_path+set}" = set; then + withval=$with_library_path; +LIBRARYPATH="${withval} ${LIBRARYPATH}" +{ $as_echo "$as_me:$LINENO: result: LIBRARYPATH = ${LIBRARYPATH}" >&5 +$as_echo "LIBRARYPATH = ${LIBRARYPATH}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + +{ $as_echo "$as_me:$LINENO: checking whether additional INCLUDEPATH flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional INCLUDEPATH flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-include-path was given. +if test "${with_include_path+set}" = set; then + withval=$with_include_path; +INCLUDEPATH="${withval} ${INCLUDEPATH}" +{ $as_echo "$as_me:$LINENO: result: INCLUDEPATH = ${INCLUDEPATH}" >&5 +$as_echo "INCLUDEPATH = ${INCLUDEPATH}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + +{ $as_echo "$as_me:$LINENO: checking whether additional MODULE_PATH flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional MODULE_PATH flags should be added (should be invoked only once)... " >&6; } + +# Check whether --with-module-path was given. +if test "${with_module_path+set}" = set; then + withval=$with_module_path; +MODULE_PATH="${withval} ${MODULE_PATH}" +{ $as_echo "$as_me:$LINENO: result: MODULE_PATH = ${MODULE_PATH}" >&5 +$as_echo "MODULE_PATH = ${MODULE_PATH}" >&6; } + +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + + + +# we just gave the user the chance to append values to these variables + +############################################################################### + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + +am__api_version='1.10' + +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +$as_echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='psblas' + VERSION='2.3.1' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + + + + +############################################################################### +# Compiler identification (sadly, it is necessary) +############################################################################### +psblas_cv_fc="" + + +ac_exeext='' +ac_ext='F' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + +cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + rm -rf conftest* + psblas_cv_fc="gcc" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + + +fi +rm -f conftest* + +# +# Test for TR 15581, aka allocatables extensions. +# +ac_exeext='' +ac_ext='f90' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +{ $as_echo "$as_me:$LINENO: checking support for Fortran allocatables TR15581" >&5 +$as_echo_n "checking support for Fortran allocatables TR15581... " >&6; } +i=0 +while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do + i=`expr $i + 1` +done +mkdir tmpdir_$i +cd tmpdir_$i +cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for TR15581. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.3." >&5 +$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for TR15581. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.3." >&2;} + { (exit 1); exit 1; }; } + +fi +cd .. +rm -fr tmpdir_$i + +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 + { $as_echo "$as_me:$LINENO: Unknown Fortran compiler, proceeding with fingers crossed !" >&5 +$as_echo "$as_me: Unknown Fortran compiler, proceeding with fingers crossed !" >&6;} + fi +fi +if test "X$psblas_cv_fc" == "Xgcc" ; then +ac_exeext='' +ac_ext='F' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +{ $as_echo "$as_me:$LINENO: checking GNU Fortran version at least 4.3" >&5 +$as_echo_n "checking GNU Fortran version at least 4.3... " >&6; } +cat > conftest.$ac_ext <= 4 && __GNUC_MINOR__ >= 3 ) || ( __GNUC__ > 4 ) + print *, "ok" +#else + this program will fail +#endif + end + +EOF +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + { $as_echo "$as_me:$LINENO: result: yes." >&5 +$as_echo " yes." >&6; } + : +else + { $as_echo "$as_me:$LINENO: result: no." >&5 +$as_echo " no." >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + { { $as_echo "$as_me:$LINENO: error: Sorry, we require GNU Fortran 4.3 or later." >&5 +$as_echo "$as_me: error: Sorry, we require GNU Fortran 4.3 or later." >&2;} + { (exit 1); exit 1; }; } + +fi +rm -f conftest* +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_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (void *))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (void *)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (void *)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_void_p=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_void_p=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + +# Define for platforms with 64 bit (void * ) pointers +if test X"$ac_cv_sizeof_void_p" == X"8" ; then + CDEFINES="-DPtr64Bits $CDEFINES" +fi +ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +if test "X$psblas_cv_fc" == X"pg" ; then + save_FC=$FC + FC=$F77 +fi +{ $as_echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } +if test "${ac_cv_fc_mangling+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + mv conftest.$ac_objext cfortran_test.$ac_objext + + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_success=yes; break 2 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_success_extra=yes; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + if test "$ac_success_extra" = "yes"; then + ac_cv_fc_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore" + else + ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore" + fi + else + ac_cv_fc_mangling="unknown" + fi + else + ac_cv_fc_mangling="unknown" + fi + + LIBS=$ac_save_LIBS + rm -rf conftest* + rm -f cfortran_test* +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compile a simple Fortran program +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } + +if test "X$psblas_cv_fc" == X"pg" ; then + FC=$save_FC +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +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# } +{ $as_echo "$as_me:$LINENO: checking defines for C/Fortran name interfaces" >&5 +$as_echo_n "checking defines for C/Fortran name interfaces... " >&6; } +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" + fi + elif test "x$pac_fc_under" == "xno underscore"; then + pac_f_c_names="-DLowerCase" + else + pac_f_c_names="-DUNKNOWN" + 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" + fi + elif test "x$pac_fc_under" == "xno underscore"; then + pac_f_c_names="-DUpperCase" + else + pac_f_c_names="-DUNKNOWN" + fi +else + pac_f_c_names="-DUNKNOWN" +fi +CDEFINES="$pac_f_c_names $CDEFINES" + +{ $as_echo "$as_me:$LINENO: result: $pac_f_c_names " >&5 +$as_echo " $pac_f_c_names " >&6; } + +############################################################################### +# 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 $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 -mismatch -dcfuns" +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 $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 -mismatch -dcfuns" + EXTRA_OPT="-mismatch_all" +fi +FCFLAGS="${F90COPT}" + +# COPT,FCOPT, F90COPT are aliases for FFLAGS,CFLAGS,FCFLAGS . + +############################################################################## +# Compilers variables selection +############################################################################## +if test "X$psblas_cv_fc" == X"xlf" ; then + # WARNING : this is EVIL : specifying a pathname prefixed compiler will be ignored! + # But this is necessary since : + # - if called from some script, xlf could behave strangely + # - it is not said that mpxlf95 gets chosen by the configure script. + F90="xlf95 -qsuffix=f=f90:cpp=F90" + # F90="xlf95" + MPF90="mpxlf95 -qsuffix=f=f90:cpp=F90" +# FC="xlf" + +# Note : this gives problems in base/serial/aux/isaperm.f +# FC="mpxlf -qsuffix=f=f90:cpp=F90" + +# Note : this is the cure + FC="xlf -qsuffix=f=f:cpp=F" + # Note : maybe we will want xlf -qsuffix=cpp=F + + F77="xlf" + MPF77="mpxlf95 -qfixed -qsuffix=f=f:cpp=F" + CC="xlc" + MPCC="mpcc" + #MPFCC="mpxlc" + # Note : -qfixed should be not specified in the environment FFLAGS or things will break. + # This fact should be documented somewhere. +else + # We really think about the GCC here but this is our idea for other compilers, too. + # If the user wishes to, she should specify MPICC, MPIF77 after ./configure. + # Note: this behavious should be documented. + F90=${FC} + MPF90=${MPIFC} + FC=${FC} + MPF77=${MPIFC} + CC=${CC} + MPCC=${MPICC} +fi + + +############################################################################## +# 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 +############################################################################## + +{ $as_echo "$as_me:$LINENO: checking fortran 90 modules extension" >&5 +$as_echo_n "checking fortran 90 modules extension... " >&6; } +if test "${ax_f90_modext+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +i=0 +while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do + i=`expr $i + 1` +done +mkdir tmpdir_$i +cd tmpdir_$i +cat >conftest.$ac_ext <<_ACEOF + + module conftest_module + contains + subroutine conftest_routine + write(*,'(a)') 'gotcha!' + end subroutine conftest_routine + end module conftest_module + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ax_f90_modext=`ls | sed -n 's,conftest_module\.,,p'` + if test x$ax_f90_modext = x ; then + ax_f90_modext=`ls | sed -n 's,CONFTEST_MODULE\.,,p'` + if test x$ax_f90_modext = x ; then + ax_f90_modext=unknown + fi + fi + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ax_f90_modext=unknown +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +cd .. +rm -fr tmpdir_$i +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ $as_echo "$as_me:$LINENO: result: $ax_f90_modext" >&5 +$as_echo "$ax_f90_modext" >&6; } + +{ $as_echo "$as_me:$LINENO: checking fortran 90 modules inclusion flag" >&5 +$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } +if test "${ax_f90_modflag+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + +i=0 +while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do + i=`expr $i + 1` +done +mkdir tmpdir_$i +cd tmpdir_$i +cat >conftest.$ac_ext <<_ACEOF + + module conftest_module + contains + subroutine conftest_routine + write(*,'(a)') 'gotcha!' + end subroutine conftest_routine + end module conftest_module + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +cd .. +ax_f90_modflag="not found" +for ax_flag in "-I " "-M" "-p"; do + if test "$ax_f90_modflag" = "not found" ; then + ax_save_FCFLAGS="$FCFLAGS" + FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i" + cat >conftest.$ac_ext <<_ACEOF + + program conftest_program + use conftest_module + call conftest_routine + end program conftest_program + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ax_f90_modflag="$ax_flag" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + FCFLAGS="$ax_save_FCFLAGS" + fi +done +rm -fr tmpdir_$i +if test "$ax_flag" = "not found" ; then + { { $as_echo "$as_me:$LINENO: error: unable to find compiler flag for modules inclusion" >&5 +$as_echo "$as_me: error: unable to find compiler flag for modules inclusion" >&2;} + { (exit 1); exit 1; }; } +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi +{ $as_echo "$as_me:$LINENO: result: $ax_f90_modflag" >&5 +$as_echo "$ax_f90_modflag" >&6; } +MODEXT=".$ax_f90_modext" +FMFLAG="${ax_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? + +ac_exeext='' +ac_ext='f90' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +{ $as_echo "$as_me:$LINENO: checking MPI Fortran interface" >&5 +$as_echo_n "checking MPI Fortran interface... " >&6; } +cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + { $as_echo "$as_me:$LINENO: result: use mpi " >&5 +$as_echo " use mpi " >&6; } + rm -rf conftest* + FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: include mpif.h " >&5 +$as_echo " include mpif.h " >&6; } + rm -rf conftest* + FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES" + +fi +rm -f conftest* + +# Custom test : do we have move_alloc ? +ac_exeext='' +ac_ext='f' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +{ $as_echo "$as_me:$LINENO: checking for Fortran MOVE_ALLOC intrinsic" >&5 +$as_echo_n "checking for Fortran MOVE_ALLOC intrinsic... " >&6; } +cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + rm -rf conftest* + FDEFINES="$psblas_cv_define_prepend-DHAVE_MOVE_ALLOC $FDEFINES" +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + +ac_exeext='' +ac_ext='f90' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +{ $as_echo "$as_me:$LINENO: checking support for Fortran VOLATILE" >&5 +$as_echo_n "checking support for Fortran VOLATILE... " >&6; } +i=0 +while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do + i=`expr $i + 1` +done +mkdir tmpdir_$i +cd tmpdir_$i +cat > conftest.$ac_ext <&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + + FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES" +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +cd .. +rm -fr tmpdir_$i + +############################################################################### +# 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_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 +$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } +if test "${ac_cv_prog_f77_v+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_f77_v= +# Try some options frequently used verbose output +for ac_verb in -v -verbose --verbose -V -\#\#\#; do + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_verb" +eval "set x $ac_link" +shift +$as_echo "$as_me:$LINENO: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | + grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` +$as_echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS + +rm -rf conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" + +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_f77_v_output in + # If we are using xlf then replace all the commas with spaces. + *xlfentry*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_f77_v_output=`echo $ac_f77_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; + + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; +esac + + + # look for -l* and *.a constructs in the output + for ac_arg in $ac_f77_v_output; do + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a | -[lLRu]*) + ac_cv_prog_f77_v=$ac_verb + break 2 ;; + esac + done +done +if test -z "$ac_cv_prog_f77_v"; then + { $as_echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} +fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 +$as_echo "$ac_cv_prog_f77_v" >&6; } +{ $as_echo "$as_me:$LINENO: checking for Fortran 77 libraries of $F77" >&5 +$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } +if test "${ac_cv_f77_libs+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$FLIBS" != "x"; then + ac_cv_f77_libs="$FLIBS" # Let the user override the test. +else + +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF + +# Compile and link our simple test program by passing a flag (argument +# 1 to this macro) to the Fortran compiler in order to get +# "verbose" output that we can then parse for the Fortran linker +# flags. +ac_save_FFLAGS=$FFLAGS +FFLAGS="$FFLAGS $ac_cv_prog_f77_v" +eval "set x $ac_link" +shift +$as_echo "$as_me:$LINENO: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | + grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` +$as_echo "$ac_f77_v_output" >&5 +FFLAGS=$ac_save_FFLAGS + +rm -rf conftest* + +# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where +# /foo, /bar, and /baz are search directories for the Fortran linker. +# Here, we change these into -L/foo -L/bar -L/baz (and put it first): +ac_f77_v_output="`echo $ac_f77_v_output | + grep 'LPATH is:' | + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" + +# FIXME: we keep getting bitten by quoted arguments; a more general fix +# that detects unbalanced quotes in FLIBS should be implemented +# and (ugh) tested at some point. +case $ac_f77_v_output in + # If we are using xlf then replace all the commas with spaces. + *xlfentry*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/,/ /g'` ;; + + # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted + # $LIBS confuse us, and the libraries appear later in the output anyway). + *mGLOB_options_string*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;; + + # Portland Group compiler has singly- or doubly-quoted -cmdline argument + # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4. + # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2". + *-cmdline\ * | *-ignore\ * | *-def\ *) + ac_f77_v_output=`echo $ac_f77_v_output | sed "\ + s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g + s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g + s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;; + + # If we are using Cray Fortran then delete quotes. + *cft90*) + ac_f77_v_output=`echo $ac_f77_v_output | sed 's/"//g'` ;; +esac + + + +ac_cv_f77_libs= + +# Save positional arguments (if any) +ac_save_positional="$@" + +set X $ac_f77_v_output +while test $# != 1; do + shift + ac_arg=$1 + case $ac_arg in + [\\/]*.a | ?:[\\/]*.a) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi + + ;; + -bI:*) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_arg; do + ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" + done +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi +fi + + ;; + # Ignore these flags. + -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -LANG:=* | -LIST:* | -LNO:*) + ;; + -lkernel32) + test x"$CYGWIN" != xyes && ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + ;; + -[LRuYz]) + # These flags, when seen by themselves, take an argument. + # We remove the space between option and argument and re-iterate + # unless we find an empty arg or a new option (starting with -) + case $2 in + "" | -*);; + *) + ac_arg="$ac_arg$2" + shift; shift + set X $ac_arg "$@" + ;; + esac + ;; + -YP,*) + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_j" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_arg="$ac_arg $ac_j" + ac_cv_f77_libs="$ac_cv_f77_libs $ac_j" +fi + + done + ;; + -[lLR]*) + ac_exists=false + for ac_i in $ac_cv_f77_libs; do + if test x"$ac_arg" = x"$ac_i"; then + ac_exists=true + break + fi + done + + if test x"$ac_exists" = xtrue; then + : +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" +fi + + ;; + -zallextract*| -zdefaultextract) + ac_cv_f77_libs="$ac_cv_f77_libs $ac_arg" + ;; + # Ignore everything else. + esac +done +# restore positional arguments +set X $ac_save_positional; shift + +# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, +# then we insist that the "run path" must be an absolute path (i.e. it +# must begin with a "/"). +case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + ac_ld_run_path=`$as_echo "$ac_f77_v_output" | + sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` + test "x$ac_ld_run_path" != x && + if test "$ac_compiler_gnu" = yes; then + for ac_link_opt in $ac_ld_run_path; do + ac_cv_f77_libs="$ac_cv_f77_libs -Xlinker $ac_link_opt" + done +else + ac_cv_f77_libs="$ac_cv_f77_libs $ac_ld_run_path" +fi + ;; +esac +fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 +$as_echo "$ac_cv_f77_libs" >&6; } +FLIBS="$ac_cv_f77_libs" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + +{ $as_echo "$as_me:$LINENO: checking for dummy main to link with Fortran 77 libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } +if test "${ac_cv_f77_dummy_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_f77_dm_save_LIBS=$LIBS + LIBS="$LIBS $FLIBS" + ac_fortran_dm_var=F77_DUMMY_MAIN + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # First, try linking without a dummy main: + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_fortran_dummy_main=none +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_fortran_dummy_main=unknown +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + if test $ac_cv_fortran_dummy_main = unknown; then + for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define $ac_fortran_dm_var $ac_func +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_fortran_dummy_main=$ac_func; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done + fi + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main + rm -rf conftest* + LIBS=$ac_f77_dm_save_LIBS + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 +$as_echo "$ac_cv_f77_dummy_main" >&6; } +F77_DUMMY_MAIN=$ac_cv_f77_dummy_main +if test "$F77_DUMMY_MAIN" != unknown; then + if test $F77_DUMMY_MAIN != none; then + +cat >>confdefs.h <<_ACEOF +#define F77_DUMMY_MAIN $F77_DUMMY_MAIN +_ACEOF + + if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then + +cat >>confdefs.h <<\_ACEOF +#define FC_DUMMY_MAIN_EQ_F77 1 +_ACEOF + + fi +fi +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: linking to Fortran libraries from C fails +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking for Fortran 77 name-mangling scheme" >&5 +$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } +if test "${ac_cv_f77_mangling+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF + subroutine foobar() + return + end + subroutine foo_bar() + return + end +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + mv conftest.$ac_objext cfortran_test.$ac_objext + + ac_save_LIBS=$LIBS + LIBS="cfortran_test.$ac_objext $LIBS $FLIBS" + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success=no + for ac_foobar in foobar FOOBAR; do + for ac_underscore in "" "_"; do + ac_func="$ac_foobar$ac_underscore" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_success=yes; break 2 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done + done + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + if test "$ac_success" = "yes"; then + case $ac_foobar in + foobar) + ac_case=lower + ac_foo_bar=foo_bar + ;; + FOOBAR) + ac_case=upper + ac_foo_bar=FOO_BAR + ;; + esac + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_success_extra=no + for ac_extra in "" "_"; do + ac_func="$ac_foo_bar$ac_underscore$ac_extra" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_success_extra=yes; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + done + ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + if test "$ac_success_extra" = "yes"; then + ac_cv_f77_mangling="$ac_case case" + if test -z "$ac_underscore"; then + ac_cv_f77_mangling="$ac_cv_f77_mangling, no underscore" + else + ac_cv_f77_mangling="$ac_cv_f77_mangling, underscore" + fi + if test -z "$ac_extra"; then + ac_cv_f77_mangling="$ac_cv_f77_mangling, no extra underscore" + else + ac_cv_f77_mangling="$ac_cv_f77_mangling, extra underscore" + fi + else + ac_cv_f77_mangling="unknown" + fi + else + ac_cv_f77_mangling="unknown" + fi + + LIBS=$ac_save_LIBS + rm -rf conftest* + rm -f cfortran_test* +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compile a simple Fortran program +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 +$as_echo "$ac_cv_f77_mangling" >&6; } + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +acx_blas_ok=no + + +# Check whether --with-blas was given. +if test "${with_blas+set}" = set; then + withval=$with_blas; +fi + +case $with_blas in + yes | "") ;; + no) acx_blas_ok=disable ;; + -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; + *) BLAS_LIBS="-l$with_blas" ;; +esac + +# Get fortran linker names of BLAS functions to check for. +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="SGEMM" ;; + lower*) ac_val="sgemm" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac + +sgemm="$ac_val" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="DGEMM" ;; + lower*) ac_val="dgemm" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac + +dgemm="$ac_val" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +acx_blas_save_LIBS="$LIBS" +LIBS="$LIBS $FLIBS" + +# First, check BLAS_LIBS environment variable +if test $acx_blas_ok = no; then +if test "x$BLAS_LIBS" != x; then + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" + { $as_echo "$as_me:$LINENO: checking for $sgemm in $BLAS_LIBS" >&5 +$as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + acx_blas_ok=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + BLAS_LIBS="" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $acx_blas_ok" >&5 +$as_echo "$acx_blas_ok" >&6; } + LIBS="$save_LIBS" +fi +fi + + +# BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) +if test $acx_blas_ok = no; then + { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5 +$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } +if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-latlas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ATL_xerbla (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return ATL_xerbla (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_atlas_ATL_xerbla=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_atlas_ATL_xerbla=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lf77blas" >&5 +$as_echo_n "checking for $sgemm in -lf77blas... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lf77blas -latlas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 +$as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } +if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcblas -lf77blas -latlas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char cblas_dgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return cblas_dgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_cblas_cblas_dgemm=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_cblas_cblas_dgemm=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 +$as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } +if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then + acx_blas_ok=yes + BLAS_LIBS="-lcblas -lf77blas -latlas" +fi + +fi + +fi + + +fi + +# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) +if test $acx_blas_ok = no; then + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 +$as_echo_n "checking for $sgemm in -lblas... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $dgemm in -ldgemm" >&5 +$as_echo_n "checking for $dgemm in -ldgemm... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldgemm -lblas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $dgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $dgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lsgemm" >&5 +$as_echo_n "checking for $sgemm in -lsgemm... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsgemm -lblas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas" +fi + +fi + +fi + +fi + +# BLAS in Alpha CXML library? +if test $acx_blas_ok = no; then + as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lcxml" >&5 +$as_echo_n "checking for $sgemm in -lcxml... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcxml $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_blas_ok=yes;BLAS_LIBS="-lcxml" +fi + +fi + +# BLAS in Alpha DXML library? (now called CXML, see above) +if test $acx_blas_ok = no; then + as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -ldxml" >&5 +$as_echo_n "checking for $sgemm in -ldxml... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldxml $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_blas_ok=yes;BLAS_LIBS="-ldxml" +fi + + +fi + +# BLAS in Sun Performance library? +if test $acx_blas_ok = no; then + if test "x$GCC" != xyes; then # only works with Sun CC + { $as_echo "$as_me:$LINENO: checking for acosp in -lsunmath" >&5 +$as_echo_n "checking for acosp in -lsunmath... " >&6; } +if test "${ac_cv_lib_sunmath_acosp+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsunmath $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char acosp (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return acosp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_sunmath_acosp=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_sunmath_acosp=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_acosp" >&5 +$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lsunperf" >&5 +$as_echo_n "checking for $sgemm in -lsunperf... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsunperf -lsunmath $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + BLAS_LIBS="-xlic_lib=sunperf -lsunmath" + acx_blas_ok=yes +fi + +fi + + + fi +fi + +# BLAS in SCSL library? (SGI/Cray Scientific Library) +if test $acx_blas_ok = no; then + as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lscs" >&5 +$as_echo_n "checking for $sgemm in -lscs... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lscs $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_blas_ok=yes; BLAS_LIBS="-lscs" +fi + +fi + +# BLAS in SGIMATH library? +if test $acx_blas_ok = no; then + as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lcomplib.sgimath" >&5 +$as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcomplib.sgimath $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" +fi + +fi + +# BLAS in IBM ESSL library? (requires generic BLAS lib, too) +if test $acx_blas_ok = no; then + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 +$as_echo_n "checking for $sgemm in -lblas... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lessl" >&5 +$as_echo_n "checking for $sgemm in -lessl... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lessl -lblas $FLIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" +fi + +fi + +fi +# BLAS linked to by default? (happens on some supercomputers) +if test $acx_blas_ok = no; then + save_LIBS="$LIBS"; LIBS="$LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + acx_blas_ok=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + BLAS_LIBS="" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save_LIBS" +fi + +# Generic BLAS library? +if test $acx_blas_ok = no; then + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 +$as_echo_n "checking for $sgemm in -lblas... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lblas $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $sgemm (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $sgemm (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_blas_ok=yes; BLAS_LIBS="-lblas" +fi + +fi + + + +LIBS="$acx_blas_save_LIBS" + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_blas_ok" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BLAS 1 +_ACEOF + + : +else + acx_blas_ok=no + { { $as_echo "$as_me:$LINENO: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&5 +$as_echo "$as_me: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&2;} + { (exit 1); exit 1; }; } +fi + + + +acx_lapack_ok=no + + +# Check whether --with-lapack was given. +if test "${with_lapack+set}" = set; then + withval=$with_lapack; +fi + +case $with_lapack in + yes | "") ;; + no) acx_lapack_ok=disable ;; + -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; + *) LAPACK_LIBS="-l$with_lapack" ;; +esac + +# Get fortran linker name of LAPACK function to check for. +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +case $ac_cv_f77_mangling in + upper*) ac_val="CHEEV" ;; + lower*) ac_val="cheev" ;; + *) ac_val="unknown" ;; +esac +case $ac_cv_f77_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac + +cheev="$ac_val" + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# We cannot use LAPACK if BLAS is not found +if test "x$acx_blas_ok" != xyes; then + acx_lapack_ok=noblas +fi + +# First, check LAPACK_LIBS environment variable +if test "x$LAPACK_LIBS" != x; then + save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" + { $as_echo "$as_me:$LINENO: checking for $cheev in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $cheev (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $cheev (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + acx_lapack_ok=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LAPACK_LIBS="" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $acx_lapack_ok" >&5 +$as_echo "$acx_lapack_ok" >&6; } + LIBS="$save_LIBS" + if test acx_lapack_ok = no; then + LAPACK_LIBS="" + fi +fi + +# LAPACK linked to by default? (is sometimes included in BLAS lib) +if test $acx_lapack_ok = no; then + save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" + as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $cheev" >&5 +$as_echo_n "checking for $cheev... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $cheev to an innocuous variant, in case declares $cheev. + For example, HP-UX 11i declares gettimeofday. */ +#define $cheev innocuous_$cheev + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $cheev (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $cheev + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $cheev (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$cheev || defined __stub___$cheev +choke me +#endif + +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $cheev (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_lapack_ok=yes +fi + + LIBS="$save_LIBS" +fi + +# Generic LAPACK library? +for lapack in lapack lapack_rs6k; do + if test $acx_lapack_ok = no; then + save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" + as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $cheev in -l$lapack" >&5 +$as_echo_n "checking for $cheev in -l$lapack... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$lapack $FLIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $cheev (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $cheev (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" +fi + + LIBS="$save_LIBS" + fi +done + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_lapack_ok" = xyes; then + FDEFINES="$psblas_cv_define_prepend-DHAVE_LAPACK $FDEFINES" + : +else + acx_lapack_ok=no + +fi + + + +############################################################################### +# BLACS library presence checks +############################################################################### +save_FC="$FC"; +save_CC="$CC"; +FC="$MPIFC"; +CC="$MPICC"; + +# Check whether --with-blacs was given. +if test "${with_blacs+set}" = set; then + withval=$with_blacs; psblas_cv_blacs=$withval +else + psblas_cv_blacs='' +fi + + +case $psblas_cv_blacs in + yes | "") ;; + -* | */* | *.a | *.so | *.so.* | *.o) + BLACS_LIBS="$psblas_cv_blacs" ;; + *) BLACS_LIBS="-l$psblas_cv_blacs" ;; +esac + +# +# Test user-defined BLACS +# +if test x"$psblas_cv_blacs" != "x" ; then + save_LIBS="$LIBS"; + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + LIBS="$BLACS_LIBS $LIBS" + { $as_echo "$as_me:$LINENO: checking for dgesd2d in $BLACS_LIBS" >&5 +$as_echo_n "checking for dgesd2d in $BLACS_LIBS... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + program main + call dgesd2d + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + psblas_cv_blacs_ok=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + psblas_cv_blacs_ok=no;BLACS_LIBS="" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 +$as_echo "$psblas_cv_blacs_ok" >&6; } + + if test x"$psblas_cv_blacs_ok" == x"yes"; then + { $as_echo "$as_me:$LINENO: checking for blacs_pinfo in $BLACS_LIBS" >&5 +$as_echo_n "checking for blacs_pinfo in $BLACS_LIBS... " >&6; } + cat >conftest.$ac_ext <<_ACEOF + program main + call blacs_pinfo + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + psblas_cv_blacs_ok=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + psblas_cv_blacs_ok=no;BLACS_LIBS="" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 +$as_echo "$psblas_cv_blacs_ok" >&6; } + fi + LIBS="$save_LIBS"; +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +###################################### +# System BLACS with PESSL default names. +###################################### +if test x"$BLACS_LIBS" == "x" ; then + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + pac_check_libs_ok=no + for pac_check_libs_f in dgesd2d + do + for pac_check_libs_l in blacssmp blacsp2 blacs + do + if test x"$pac_check_libs_ok" == xno ; then + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$pac_check_libs_l $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call $pac_check_libs_f + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" +fi + + fi + done + done + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: + if test x"$pac_check_libs_ok" = xyes ; then + psblas_cv_blacs_ok=yes; LIBS="$LIBS $pac_check_libs_LIBS " + BLACS_LIBS="$pac_check_libs_LIBS" + { $as_echo "$as_me:$LINENO: BLACS libraries detected." >&5 +$as_echo "$as_me: BLACS libraries detected." >&6;} + else + pac_check_libs_ok=no + + + fi + + + if test x"$BLACS_LIBS" != "x"; then + save_LIBS="$LIBS"; + LIBS="$BLACS_LIBS $LIBS" + { $as_echo "$as_me:$LINENO: checking for blacs_pinfo in $BLACS_LIBS" >&5 +$as_echo_n "checking for blacs_pinfo in $BLACS_LIBS... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF + program main + call blacs_pinfo + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + psblas_cv_blacs_ok=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + psblas_cv_blacs_ok=no;BLACS_LIBS="" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 +$as_echo "$psblas_cv_blacs_ok" >&6; } + LIBS="$save_LIBS"; + fi +fi +###################################### +# Maybe we're looking at PESSL BLACS?# +###################################### +if test x"$BLACS_LIBS" != "x" ; then + save_LIBS="$LIBS"; + LIBS="$BLACS_LIBS $LIBS" + { $as_echo "$as_me:$LINENO: checking for PESSL BLACS" >&5 +$as_echo_n "checking for PESSL BLACS... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF + program main + call esvemonp + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + psblas_cv_pessl_blacs=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + psblas_cv_pessl_blacs=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $psblas_cv_pessl_blacs" >&5 +$as_echo "$psblas_cv_pessl_blacs" >&6; } + LIBS="$save_LIBS"; +fi +if test "x$psblas_cv_pessl_blacs" == "xyes"; then + FDEFINES="$psblas_cv_define_prepend-DHAVE_ESSL_BLACS $FDEFINES" +fi + + +############################################################################## +# Netlib BLACS library with default names +############################################################################## + +if test x"$BLACS_LIBS" == "x" ; then + save_LIBS="$LIBS"; + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + pac_check_libs_ok=no + for pac_check_libs_f in dgesd2d + do + for pac_check_libs_l in blacs_MPI-LINUX-0 blacs_MPI-SP5-0 blacs_MPI-SP4-0 blacs_MPI-SP3-0 blacs_MPI-SP2-0 blacsCinit_MPI-ALPHA-0 blacsCinit_MPI-IRIX64-0 blacsCinit_MPI-RS6K-0 blacsCinit_MPI-SPP-0 blacsCinit_MPI-SUN4-0 blacsCinit_MPI-SUN4SOL2-0 blacsCinit_MPI-T3D-0 blacsCinit_MPI-T3E-0 + + do + if test x"$pac_check_libs_ok" == xno ; then + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$pac_check_libs_l $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call $pac_check_libs_f + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" +fi + + fi + done + done + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: + if test x"$pac_check_libs_ok" = xyes ; then + psblas_cv_blacs_ok=yes; LIBS="$LIBS $pac_check_libs_LIBS " + psblas_have_netlib_blacs=yes; + BLACS_LIBS="$pac_check_libs_LIBS" + { $as_echo "$as_me:$LINENO: BLACS libraries detected." >&5 +$as_echo "$as_me: BLACS libraries detected." >&6;} + else + pac_check_libs_ok=no + + + fi + + + + if test x"$BLACS_LIBS" != "x" ; then + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + + pac_check_libs_ok=no + for pac_check_libs_f in blacs_pinfo + do + for pac_check_libs_l in blacsF77init_MPI-LINUX-0 blacsF77init_MPI-SP5-0 blacsF77init_MPI-SP4-0 blacsF77init_MPI-SP3-0 blacsF77init_MPI-SP2-0 blacsF77init_MPI-ALPHA-0 blacsF77init_MPI-IRIX64-0 blacsF77init_MPI-RS6K-0 blacsF77init_MPI-SPP-0 blacsF77init_MPI-SUN4-0 blacsF77init_MPI-SUN4SOL2-0 blacsF77init_MPI-T3D-0 blacsF77init_MPI-T3E-0 + + do + if test x"$pac_check_libs_ok" == xno ; then + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$pac_check_libs_l $LIBS" +cat >conftest.$ac_ext <<_ACEOF + program main + call $pac_check_libs_f + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" +fi + + fi + done + done + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: + if test x"$pac_check_libs_ok" = xyes ; then + psblas_cv_blacs_ok=yes; LIBS="$pac_check_libs_LIBS $LIBS" + BLACS_LIBS="$pac_check_libs_LIBS $BLACS_LIBS" + { $as_echo "$as_me:$LINENO: Netlib BLACS Fortran initialization libraries detected." >&5 +$as_echo "$as_me: Netlib BLACS Fortran initialization libraries detected." >&6;} + else + pac_check_libs_ok=no + + + fi + + + fi + + if test x"$BLACS_LIBS" != "x" ; then + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + pac_check_libs_ok=no + for pac_check_libs_f in Cblacs_pinfo + do + for pac_check_libs_l in blacsCinit_MPI-LINUX-0 blacsCinit_MPI-SP5-0 blacsCinit_MPI-SP4-0 blacsCinit_MPI-SP3-0 blacsCinit_MPI-SP2-0 blacsCinit_MPI-ALPHA-0 blacsCinit_MPI-IRIX64-0 blacsCinit_MPI-RS6K-0 blacsCinit_MPI-SPP-0 blacsCinit_MPI-SUN4-0 blacsCinit_MPI-SUN4SOL2-0 blacsCinit_MPI-T3D-0 blacsCinit_MPI-T3E-0 + + do + if test x"$pac_check_libs_ok" == xno ; then + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l$pac_check_libs_l $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $pac_check_libs_f (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return $pac_check_libs_f (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_Lib=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" +fi + + fi + done + done + # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: + if test x"$pac_check_libs_ok" = xyes ; then + psblas_cv_blacs_ok=yes; LIBS="$pac_check_libs_LIBS $LIBS" + BLACS_LIBS="$BLACS_LIBS $pac_check_libs_LIBS" + { $as_echo "$as_me:$LINENO: Netlib BLACS C initialization libraries detected." >&5 +$as_echo "$as_me: Netlib BLACS C initialization libraries detected." >&6;} + else + pac_check_libs_ok=no + + + fi + + + fi + LIBS="$save_LIBS"; +fi + +if test x"$BLACS_LIBS" == "x" ; then + { { $as_echo "$as_me:$LINENO: error: + No BLACS library detected! $PACKAGE_NAME will be unusable. + Please make sure a BLACS implementation is accessible (ex.: --with-blacs=\"-lblacsname -L/blacs/dir\" ) + " >&5 +$as_echo "$as_me: error: + No BLACS library detected! $PACKAGE_NAME will be unusable. + Please make sure a BLACS implementation is accessible (ex.: --with-blacs=\"-lblacsname -L/blacs/dir\" ) + " >&2;} + { (exit 1); exit 1; }; } +else + save_LIBS="$LIBS"; + LIBS="$BLACS_LIBS $LIBS" + { $as_echo "$as_me:$LINENO: checking for ksendid in $BLACS_LIBS" >&5 +$as_echo_n "checking for ksendid in $BLACS_LIBS... " >&6; } + ac_ext=${ac_fc_srcext-f} +ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' +ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF + program main + call ksendid + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_fc_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + psblas_cv_have_sendid=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + psblas_cv_have_sendid=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: $psblas_cv_have_sendid" >&5 +$as_echo "$psblas_cv_have_sendid" >&6; } + LIBS="$save_LIBS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "x$psblas_cv_have_sendid" == "xyes"; then + FDEFINES="$psblas_cv_define_prepend-DHAVE_KSENDID $FDEFINES" + fi +fi + +FC="$save_FC"; +CC="$save_CC"; + +{ $as_echo "$as_me:$LINENO: checking for gnumake" >&5 +$as_echo_n "checking for gnumake... " >&6; } +MAKE=${MAKE:-make} + +if $MAKE --version 2>&1 | grep -e"GNU Make" >/dev/null; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + psblas_make_gnumake='yes' +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + psblas_make_gnumake='no' +fi + + +############################################################################### +# 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]) + + +# Check whether --with-metis was given. +if test "${with_metis+set}" = set; then + withval=$with_metis; psblas_cv_metis=$withval +else + psblas_cv_metis='' +fi + + + +if test "x$psblas_cv_metis" != "x" ; then + { $as_echo "$as_me:$LINENO: checking for METIS_PartGraphRecursive in -l\"m\"" >&5 +$as_echo_n "checking for METIS_PartGraphRecursive in -l\"m\"... " >&6; } +if test "${ac_cv_lib__m__METIS_PartGraphRecursive+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-l"m" "$psblas_cv_metis" $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char METIS_PartGraphRecursive (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return METIS_PartGraphRecursive (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib__m__METIS_PartGraphRecursive=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib__m__METIS_PartGraphRecursive=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib__m__METIS_PartGraphRecursive" >&5 +$as_echo "$ac_cv_lib__m__METIS_PartGraphRecursive" >&6; } +if test "x$ac_cv_lib__m__METIS_PartGraphRecursive" = x""yes; then + psblas_cv_have_metis=yes; METIS_LIBS="$psblas_cv_metis" +else + psblas_cv_have_metis=no +fi + +else + save_LIBS="$LIBS"; + LIBS="-lm $LIBS"; + { $as_echo "$as_me:$LINENO: checking for METIS_PartGraphRecursive in -lmetis" >&5 +$as_echo_n "checking for METIS_PartGraphRecursive in -lmetis... " >&6; } +if test "${ac_cv_lib_metis_METIS_PartGraphRecursive+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmetis $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char METIS_PartGraphRecursive (); +#ifdef F77_DUMMY_MAIN + +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } + +#endif +int +main () +{ +return METIS_PartGraphRecursive (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_metis_METIS_PartGraphRecursive=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_metis_METIS_PartGraphRecursive=no +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_metis_METIS_PartGraphRecursive" >&5 +$as_echo "$ac_cv_lib_metis_METIS_PartGraphRecursive" >&6; } +if test "x$ac_cv_lib_metis_METIS_PartGraphRecursive" = x""yes; then + psblas_cv_have_metis=yes;METIS_LIBS="-lmetis" +else + psblas_cv_have_metis=no +fi + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +if test "X$psblas_make_gnumake" == "Xyes" ; then +PSBLASRULES=' +PSBLDLIBS=$(BLACS) $(LAPACK) $(BLAS) $(METIS_LIB) $(LIBS) +CDEFINES=$(PSBCDEFINES) +FDEFINES=$(PSBFDEFINES) +# Warning : these rules are only valid with GNU make! +$(.mod).o: + + +%.o: %.c + $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< +%.o: %.f + $(FC) $(FCOPT) $(FINCLUDES) -c $< +%$(.mod): %.f + $(FC) $(FCOPT) $(FINCLUDES) -c $< +%.o: %.f90 + $(F90) $(F90COPT) $(FINCLUDES) -c $< +%$(.mod): %.f90 + $(F90) $(F90COPT) $(FINCLUDES) -c $< +%.o: %.F + $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< +%$(.mod): %.F + $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< +%.o: %.F90 + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< +%$(.mod): %.F90 + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< + +%.o: %.f03 + $(F90) $(F90COPT) $(FINCLUDES) -c $< +%$(.mod): %.f03 + $(F90) $(F90COPT) $(FINCLUDES) -c $< +%.o: %.F03 + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< +%$(.mod): %.F03 + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' + +else + +PSBLASRULES=' +PSBLDLIBS=$(BLACS) $(LAPACK) $(BLAS) $(METIS_LIB) $(LIBS) +CDEFINES=$(PSBCDEFINES) +FDEFINES=$(PSBFDEFINES) + + +$(.mod).o: + +# These should be portable rules, arent they? +.c.o: + $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< +.f.o: + $(FC) $(FCOPT) $(FINCLUDES) -c $< +.f$(.mod): + $(F90) $(FCOPT) $(FINCLUDES) -c $< +.f90$(.mod): + $(F90) $(F90COPT) $(FINCLUDES) -c $< +.f90.o: + $(F90) $(F90COPT) $(FINCLUDES) -c $< +.F.o: + $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< +.F$(.mod): + $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< +.F90.o: + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< +.F90$(.mod): + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< +.f03$(.mod): + $(F90) $(F90COPT) $(FINCLUDES) -c $< +.f03.o: + $(F90) $(F90COPT) $(FINCLUDES) -c $< +.F03.o: + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< +.F03$(.mod): + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' + +fi + + + + + + + +############################################################################### +# the following files will be created by Automake + +ac_config_files="$ac_config_files Make.inc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by PSBLAS $as_me 2.3.1, which was +generated by GNU Autoconf 2.63. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTION]... [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_version="\\ +PSBLAS config.status 2.3.1 +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2008 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Make.inc") CONFIG_FILES="$CONFIG_FILES Make.inc" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + $as_echo "$as_me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + ;; + + + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + +#AC_OUTPUT(Make.inc Makefile) +############################################################################### + +{ $as_echo "$as_me:$LINENO: + ${PACKAGE_NAME} ${psblas_cv_version} has been configured as follows: + + MPF90 : ${MPF90} + MPF77 : ${MPF77} + MPCC : ${MPICC} + FLINK : ${FLINK} + + FDEFINES : ${FDEFINES} + CDEFINES : ${CDEFINES} + MODEXT : ${MODEXT} + FMFLAG : ${FMFLAG} + F90COPT : ${F90COPT} + FCOPT : ${FCOPT} + CCOPT : ${CCOPT} + + + BLAS : ${BLAS_LIBS} + BLACS : ${BLACS_LIBS} + + METIS detected : ${psblas_cv_have_metis} + + LIBS : ${LIBS} + + 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}. +" >&5 +$as_echo "$as_me: + ${PACKAGE_NAME} ${psblas_cv_version} has been configured as follows: + + MPF90 : ${MPF90} + MPF77 : ${MPF77} + MPCC : ${MPICC} + FLINK : ${FLINK} + + FDEFINES : ${FDEFINES} + CDEFINES : ${CDEFINES} + MODEXT : ${MODEXT} + FMFLAG : ${FMFLAG} + F90COPT : ${F90COPT} + FCOPT : ${FCOPT} + CCOPT : ${CCOPT} + + + BLAS : ${BLAS_LIBS} + BLACS : ${BLACS_LIBS} + + METIS detected : ${psblas_cv_have_metis} + + LIBS : ${LIBS} + + 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}. +" >&6;} + +############################################################################### + +======= +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.63 for PSBLAS 2.3.1. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' + fi +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='PSBLAS' +PACKAGE_TARNAME='psblas' +PACKAGE_VERSION='2.3.1' +PACKAGE_STRING='PSBLAS 2.3.1' +PACKAGE_BUGREPORT='salvatore.filippone@uniroma2.it' + +ac_unique_file="base/modules/psb_base_mod.f90" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='LTLIBOBJS LIBOBJS -LTLIBOBJS' +UTILLIBNAME +METHDLIBNAME +PRECLIBNAME +LIBDIR +PSBLASRULES +FINCLUDES +CINCLUDES +METIS_LIBS +BLACS_LIBS +INSTALL_DOCSDIR +INSTALL_INCLUDEDIR +INSTALL_LIBDIR +INSTALL_DIR +INSTALL +MPIFCC +AR +F90LINK +FLINK +MODEXT +FMFLAG +FIFLAG +EXTRA_OPT +CCOPT +FCOPT +MPCC +MPF77 +MPF90 +F90COPT +F90 +BASELIBNAME +CDEFINES +FDEFINES +LAPACK_LIBS +BLAS_LIBS +FLIBS +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +RANLIB +MPIFC +MPIF77 +MPILIBS +MPICC +ac_ct_CC +CPPFLAGS +CFLAGS +CC +ac_ct_F77 +FFLAGS +F77 +OBJEXT +EXEEXT +ac_ct_FC +LDFLAGS +FCFLAGS +FC +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_ccopt +with_fcopt +with_f90copt +with_libs +with_clibs +with_flibs +with_library_path +with_include_path +with_module_path +enable_dependency_tracking +with_blas +with_lapack +with_blacs +with_metis +' ac_precious_vars='build_alias host_alias target_alias @@ -762,6 +13261,8 @@ CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -860,13 +13361,21 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -879,13 +13388,21 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1076,22 +13593,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1111,7 +13644,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -1120,16 +13653,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1138,22 +13671,38 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done @@ -1168,7 +13717,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -1184,10 +13733,10 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 + { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } @@ -1195,12 +13744,12 @@ test "X$ac_ls_di" = "X$ac_pwd_ls_di" || if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1227,12 +13776,12 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. @@ -1259,7 +13808,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures PSBLAS 2.2 to adapt to many kinds of systems. +\`configure' configures PSBLAS 2.3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1281,9 +13830,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1293,25 +13842,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/psblas] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/psblas] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1325,11 +13874,12 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of PSBLAS 2.2:";; + short | recursive ) echo "Configuration of PSBLAS 2.3.1:";; esac cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build @@ -1338,12 +13888,12 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-ccflags additional CCFLAGS flags to be added: will prepend - to CCFLAGS - --with-cflags additional CFLAGS flags to be added: will prepend - to CFLAGS - --with-fflags additional FFLAGS flags to be added: will prepend - to FFLAGS + --with-ccopt additional CCOPT flags to be added: will prepend + to CCOPT + --with-fcopt additional FCOPT flags to be added: will prepend + to FCOPT + --with-f90copt additional F90COPT flags to be added: will prepend + to F90COPT --with-libs List additional link flags here. For example, --with-libs=-lspecial_system_lib or --with-libs=-L/path/to/libs @@ -1392,15 +13942,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1436,7 +13988,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1445,11 +13997,11 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -PSBLAS configure 2.2 -generated by GNU Autoconf 2.61 +PSBLAS configure 2.3.1 +generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1459,8 +14011,8 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by PSBLAS $as_me 2.2, which was -generated by GNU Autoconf 2.61. Invocation command line was +It was created by PSBLAS $as_me 2.3.1, which was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -1496,7 +14048,7 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1531,7 +14083,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1583,11 +14135,12 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -1617,9 +14170,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo @@ -1634,9 +14187,9 @@ _ASBOX do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1652,8 +14205,8 @@ _ASBOX echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1695,21 +14248,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1719,16 +14275,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1742,29 +14298,38 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1774,10 +14339,12 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -1815,14 +14382,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # VERSION is the file containing the PSBLAS version code # FIXME -psblas_cv_version="`cat VERSION`" +psblas_cv_version="2.3.1" # A sample source file # Our custom M4 macros are in the 'config' directory -{ echo "$as_me:$LINENO: +{ $as_echo "$as_me:$LINENO: -------------------------------------------------------------------------------- Welcome to the $PACKAGE_NAME $psblas_cv_version configure Script. @@ -1830,16 +14397,13 @@ psblas_cv_version="`cat VERSION`" documentation, you can make your own by hand for your needs. Be sure to specify the library paths of your interest. Examples: - ./configure CFLAGS=-L/some/directory/LIB <- will force CFLAGS - CFLAGS=-L/some/directory/LIB ./configure <- will force CFLAGS - ./configure --with-cflags=-L/some/directory/LIB <- will append to CFLAGS + ./configure --with-libs=-L/some/directory/LIB <- will append to LIBS FC=mpif90 F77=$FC CC=mpicc ./configure <- will force FC,CC,F77 - FLINK=gcc FLINK=gcc ./configure <- will force FLINK,F90LINK See ./configure --help=short fore more info. -------------------------------------------------------------------------------- " >&5 -echo "$as_me: +$as_echo "$as_me: -------------------------------------------------------------------------------- Welcome to the $PACKAGE_NAME $psblas_cv_version configure Script. @@ -1847,11 +14411,8 @@ echo "$as_me: documentation, you can make your own by hand for your needs. Be sure to specify the library paths of your interest. Examples: - ./configure CFLAGS=-L/some/directory/LIB <- will force CFLAGS - CFLAGS=-L/some/directory/LIB ./configure <- will force CFLAGS - ./configure --with-cflags=-L/some/directory/LIB <- will append to CFLAGS + ./configure --with-libs=-L/some/directory/LIB <- will append to LIBS FC=mpif90 F77=$FC CC=mpicc ./configure <- will force FC,CC,F77 - FLINK=gcc FLINK=gcc ./configure <- will force FLINK,F90LINK See ./configure --help=short fore more info. -------------------------------------------------------------------------------- @@ -1880,8 +14441,8 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1907,11 +14468,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -1940,17 +14502,29 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -1963,8 +14537,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1975,8 +14549,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking where to install" >&5 -echo $ECHO_N "checking where to install... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking where to install" >&5 +$as_echo_n "checking where to install... " >&6; } case $prefix in \/* ) eval "INSTALL_DIR=$prefix";; * ) eval "INSTALL_DIR=/usr/local/psblas";; @@ -1993,8 +14567,8 @@ case $docsdir in \/* ) eval "INSTALL_DOCSDIR=$docsdir";; * ) eval "INSTALL_DOCSDIR=$INSTALL_DIR/docs";; esac -{ echo "$as_me:$LINENO: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&5 -echo "${ECHO_T}$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&6; } +{ $as_echo "$as_me:$LINENO: result: $INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&5 +$as_echo "$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR" >&6; } # Note that the following line won't save from troubles. # AC_PROG_FC([mpxlf95 mpxlf90 mpxlf pgf95 pgf90 mpif95 mpif90 gfortran f95 f90 ifc]) @@ -2003,14 +14577,14 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc gfortran + for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_FC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$FC"; then ac_cv_prog_FC="$FC" # Let the user override the test. @@ -2023,7 +14597,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_FC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2034,11 +14608,11 @@ fi fi FC=$ac_cv_prog_FC if test -n "$FC"; then - { echo "$as_me:$LINENO: result: $FC" >&5 -echo "${ECHO_T}$FC" >&6; } + { $as_echo "$as_me:$LINENO: result: $FC" >&5 +$as_echo "$FC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2047,14 +14621,14 @@ fi fi if test -z "$FC"; then ac_ct_FC=$FC - for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc gfortran + for ac_prog in xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_FC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_FC"; then ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test. @@ -2067,7 +14641,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_FC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2078,11 +14652,11 @@ fi fi ac_ct_FC=$ac_cv_prog_ac_ct_FC if test -n "$ac_ct_FC"; then - { echo "$as_me:$LINENO: result: $ac_ct_FC" >&5 -echo "${ECHO_T}$ac_ct_FC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_FC" >&5 +$as_echo "$ac_ct_FC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2094,12 +14668,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FC=$ac_ct_FC @@ -2108,37 +14678,41 @@ fi # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for Fortran compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out @@ -2148,27 +14722,22 @@ cat >conftest.$ac_ext <<_ACEOF end _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for Fortran compiler default output file name" >&5 -echo $ECHO_N "checking for Fortran compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:$LINENO: checking for Fortran compiler default output file name" >&5 +$as_echo_n "checking for Fortran compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done @@ -2179,10 +14748,11 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' @@ -2193,7 +14763,7 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most @@ -2220,25 +14790,27 @@ else ac_file='' fi -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Fortran compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Fortran compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: Fortran compiler cannot create executables +$as_echo "$as_me: error: Fortran compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the Fortran compiler works" >&5 -echo $ECHO_N "checking whether the Fortran compiler works... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether the Fortran compiler works" >&5 +$as_echo_n "checking whether the Fortran compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then @@ -2247,49 +14819,53 @@ if test "$cross_compiling" != yes; then *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run Fortran compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run Fortran compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run Fortran compiled programs. +$as_echo "$as_me: error: cannot run Fortran compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -2298,31 +14874,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main @@ -2335,44 +14913,47 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran compiler... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; } if test "${ac_cv_fc_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main @@ -2388,20 +14969,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -2411,16 +14993,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_fc_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_fc_compiler_gnu" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5 +$as_echo "$ac_cv_fc_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FCFLAGS+set} ac_save_FFLAGS=$FCFLAGS FCFLAGS= -{ echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5 -echo $ECHO_N "checking whether $FC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5 +$as_echo_n "checking whether $FC accepts -g... " >&6; } if test "${ac_cv_prog_fc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else FCFLAGS=-g cat >conftest.$ac_ext <<_ACEOF @@ -2434,20 +15016,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_fc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_fc_g=no @@ -2456,8 +15039,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_fc_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5 +$as_echo "$ac_cv_prog_fc_g" >&6; } if test "$ac_test_FFLAGS" = set; then FCFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_fc_g = yes; then @@ -2486,14 +15069,14 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in xlf pgf77 ifort ifc gfortran + for ac_prog in xlf pgf77 ifort ifc nagfor gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. @@ -2506,7 +15089,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2517,11 +15100,11 @@ fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then - { echo "$as_me:$LINENO: result: $F77" >&5 -echo "${ECHO_T}$F77" >&6; } + { $as_echo "$as_me:$LINENO: result: $F77" >&5 +$as_echo "$F77" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2530,14 +15113,14 @@ fi fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in xlf pgf77 ifort ifc gfortran + for ac_prog in xlf pgf77 ifort ifc nagfor gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. @@ -2550,7 +15133,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2561,11 +15144,11 @@ fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then - { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 -echo "${ECHO_T}$ac_ct_F77" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +$as_echo "$ac_ct_F77" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2577,12 +15160,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 @@ -2591,37 +15170,41 @@ fi # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out @@ -2629,10 +15212,10 @@ rm -f a.out # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F -{ echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main @@ -2648,20 +15231,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -2671,16 +15255,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +$as_echo "$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -{ echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 -echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +$as_echo_n "checking whether $F77 accepts -g... " >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF @@ -2694,20 +15278,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no @@ -2716,8 +15301,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +$as_echo "$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then @@ -2734,7 +15319,11 @@ else fi fi -G77=`test $ac_compiler_gnu = yes && echo yes` +if test $ac_compiler_gnu = yes; then + G77=yes +else + G77= +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2751,10 +15340,10 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2767,7 +15356,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2778,11 +15367,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2795,10 +15384,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2811,7 +15400,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2822,11 +15411,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2838,12 +15427,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2851,50 +15436,56 @@ esac fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2920,20 +15511,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no @@ -2943,15 +15535,19 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes @@ -2978,20 +15574,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" @@ -3016,20 +15613,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag @@ -3055,20 +15653,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3083,8 +15682,8 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3100,10 +15699,10 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC @@ -3174,20 +15773,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -3203,15 +15803,15 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac @@ -3225,14 +15825,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Sanity checks, although redundant (useful when debugging this configure.ac)! if test "X$FC" == "X" ; then - { { echo "$as_me:$LINENO: error: Problem : No Fortran compiler specified nor found!" >&5 -echo "$as_me: error: Problem : No Fortran compiler specified nor found!" >&2;} + { { $as_echo "$as_me:$LINENO: error: Problem : No Fortran compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No Fortran compiler specified nor found!" >&2;} { (exit 1); exit 1; }; } fi if test "X$CC" == "X" ; then - { { echo "$as_me:$LINENO: error: Problem : No C compiler specified nor found!" >&5 -echo "$as_me: error: Problem : No C compiler specified nor found!" >&2;} + { { $as_echo "$as_me:$LINENO: error: Problem : No C compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No C compiler specified nor found!" >&2;} { (exit 1); exit 1; }; } fi ############################################################################### @@ -3251,14 +15851,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "X$MPICC" = "X" ; then # This is our MPICC compiler preference: it will override ACX_MPI's first try. - for ac_prog in mpxlc mpcc pgcc mpicc + for ac_prog in mpxlc mpcc mpicc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MPICC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MPICC"; then ac_cv_prog_MPICC="$MPICC" # Let the user override the test. @@ -3271,7 +15871,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPICC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3282,11 +15882,11 @@ fi fi MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then - { echo "$as_me:$LINENO: result: $MPICC" >&5 -echo "${ECHO_T}$MPICC" >&6; } + { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 +$as_echo "$MPICC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3304,10 +15904,10 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MPICC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MPICC"; then ac_cv_prog_MPICC="$MPICC" # Let the user override the test. @@ -3320,7 +15920,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPICC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3331,11 +15931,11 @@ fi fi MPICC=$ac_cv_prog_MPICC if test -n "$MPICC"; then - { echo "$as_me:$LINENO: result: $MPICC" >&5 -echo "${ECHO_T}$MPICC" >&6; } + { $as_echo "$as_me:$LINENO: result: $MPICC" >&5 +$as_echo "$MPICC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3349,10 +15949,10 @@ test -n "$MPICC" || MPICC="$CC" if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init" >&5 -echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } if test "${ac_cv_func_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3405,42 +16005,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_func_MPI_Init" >&6; } -if test $ac_cv_func_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5 +$as_echo "$ac_cv_func_MPI_Init" >&6; } +if test "x$ac_cv_func_MPI_Init" = x""yes; then MPILIBS=" " fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" @@ -3472,42 +16076,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpi_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6; } -if test $ac_cv_lib_mpi_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" @@ -3539,41 +16147,45 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpich_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpich_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6; } -if test $ac_cv_lib_mpich_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for mpi.h" >&5 -echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for mpi.h" >&5 +$as_echo_n "checking for mpi.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3595,26 +16207,27 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 MPILIBS="" - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -3626,8 +16239,8 @@ CC="$acx_mpi_save_CC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then - { { echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for C" >&5 -echo "$as_me: error: Cannot find any suitable MPI implementation for C" >&2;} + { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for C" >&5 +$as_echo "$as_me: error: Cannot find any suitable MPI implementation for C" >&2;} { (exit 1); exit 1; }; } : else @@ -3647,14 +16260,14 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test "X$MPIF77" = "X" ; then # This is our MPIFC compiler preference: it will override ACX_MPI's first try. - for ac_prog in mpxlf mpif77 pgf77 mpf77 ifc + for ac_prog in mpxlf mpf77 mpif77 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MPIF77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MPIF77"; then ac_cv_prog_MPIF77="$MPIF77" # Let the user override the test. @@ -3667,7 +16280,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPIF77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3678,11 +16291,11 @@ fi fi MPIF77=$ac_cv_prog_MPIF77 if test -n "$MPIF77"; then - { echo "$as_me:$LINENO: result: $MPIF77" >&5 -echo "${ECHO_T}$MPIF77" >&6; } + { $as_echo "$as_me:$LINENO: result: $MPIF77" >&5 +$as_echo "$MPIF77" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3700,10 +16313,10 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MPIF77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MPIF77"; then ac_cv_prog_MPIF77="$MPIF77" # Let the user override the test. @@ -3716,7 +16329,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPIF77="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3727,11 +16340,11 @@ fi fi MPIF77=$ac_cv_prog_MPIF77 if test -n "$MPIF77"; then - { echo "$as_me:$LINENO: result: $MPIF77" >&5 -echo "${ECHO_T}$MPIF77" >&6; } + { $as_echo "$as_me:$LINENO: result: $MPIF77" >&5 +$as_echo "$MPIF77" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3745,8 +16358,8 @@ test -n "$MPIF77" || MPIF77="$F77" if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init" >&5 -echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat >conftest.$ac_ext <<_ACEOF program main call MPI_Init @@ -3758,38 +16371,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then MPILIBS=" " - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 -echo $ECHO_N "checking for MPI_Init in -lfmpi... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 +$as_echo_n "checking for MPI_Init in -lfmpi... " >&6; } if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfmpi $LIBS" @@ -3804,42 +16421,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_fmpi_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fmpi_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_fmpi_MPI_Init" >&6; } -if test $ac_cv_lib_fmpi_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then MPILIBS="-lfmpi" fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lfmpich" >&5 -echo $ECHO_N "checking for MPI_Init in -lfmpich... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpich" >&5 +$as_echo_n "checking for MPI_Init in -lfmpich... " >&6; } if test "${ac_cv_lib_fmpich_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfmpich $LIBS" @@ -3854,43 +16475,47 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_fmpich_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fmpich_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_fmpich_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_fmpich_MPI_Init" >&6; } -if test $ac_cv_lib_fmpich_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_fmpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_fmpich_MPI_Init" = x""yes; then MPILIBS="-lfmpich" fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" @@ -3905,42 +16530,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpi_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6; } -if test $ac_cv_lib_mpi_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" @@ -3955,41 +16584,45 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpich_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpich_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6; } -if test $ac_cv_lib_mpich_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for mpif.h" >&5 -echo $ECHO_N "checking for mpif.h... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for mpif.h" >&5 +$as_echo_n "checking for mpif.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF program main include 'mpif.h' @@ -4001,26 +16634,27 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 MPILIBS="" - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -4032,8 +16666,8 @@ F77="$acx_mpi_save_F77" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then - { { echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran 77" >&5 -echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran 77" >&2;} + { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran 77" >&5 +$as_echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran 77" >&2;} { (exit 1); exit 1; }; } : else @@ -4054,14 +16688,14 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu if test "X$MPIFC" = "X" ; then # This is our MPIFC compiler preference: it will override ACX_MPI's first try. - for ac_prog in mpxlf95 mpxlf90 mpif95 mpif90 pgf95 pg90 mpf95 mpf90 ifc + for ac_prog in mpxlf95 mpxlf90 mpf95 mpf90 mpif95 mpif90 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MPIFC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MPIFC"; then ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test. @@ -4074,7 +16708,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPIFC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4085,11 +16719,11 @@ fi fi MPIFC=$ac_cv_prog_MPIFC if test -n "$MPIFC"; then - { echo "$as_me:$LINENO: result: $MPIFC" >&5 -echo "${ECHO_T}$MPIFC" >&6; } + { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 +$as_echo "$MPIFC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4108,10 +16742,10 @@ fi do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_MPIFC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$MPIFC"; then ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test. @@ -4124,7 +16758,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MPIFC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4135,11 +16769,11 @@ fi fi MPIFC=$ac_cv_prog_MPIFC if test -n "$MPIFC"; then - { echo "$as_me:$LINENO: result: $MPIFC" >&5 -echo "${ECHO_T}$MPIFC" >&6; } + { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5 +$as_echo "$MPIFC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4153,8 +16787,8 @@ test -n "$MPIFC" || MPIFC="$FC" if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init" >&5 -echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5 +$as_echo_n "checking for MPI_Init... " >&6; } cat >conftest.$ac_ext <<_ACEOF program main call MPI_Init @@ -4166,38 +16800,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then MPILIBS=" " - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 -echo $ECHO_N "checking for MPI_Init in -lfmpi... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5 +$as_echo_n "checking for MPI_Init in -lfmpi... " >&6; } if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfmpi $LIBS" @@ -4212,42 +16850,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_fmpi_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_fmpi_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_fmpi_MPI_Init" >&6; } -if test $ac_cv_lib_fmpi_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then MPILIBS="-lfmpi" fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lmpichf90" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpichf90... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpichf90" >&5 +$as_echo_n "checking for MPI_Init in -lmpichf90... " >&6; } if test "${ac_cv_lib_mpichf90_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpichf90 $LIBS" @@ -4262,43 +16904,47 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpichf90_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpichf90_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpichf90_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpichf90_MPI_Init" >&6; } -if test $ac_cv_lib_mpichf90_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpichf90_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpichf90_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpichf90_MPI_Init" = x""yes; then MPILIBS="-lmpichf90" fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5 +$as_echo_n "checking for MPI_Init in -lmpi... " >&6; } if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpi $LIBS" @@ -4313,42 +16959,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpi_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpi_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6; } -if test $ac_cv_lib_mpi_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then MPILIBS="-lmpi" fi fi if test x = x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 -echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5 +$as_echo_n "checking for MPI_Init in -lmpich... " >&6; } if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpich $LIBS" @@ -4363,41 +17013,45 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_mpich_MPI_Init=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_mpich_MPI_Init=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 -echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6; } -if test $ac_cv_lib_mpich_MPI_Init = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5 +$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } +if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then MPILIBS="-lmpich" fi fi if test x != x"$MPILIBS"; then - { echo "$as_me:$LINENO: checking for mpif.h" >&5 -echo $ECHO_N "checking for mpif.h... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for mpif.h" >&5 +$as_echo_n "checking for mpif.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF program main include 'mpif.h' @@ -4409,26 +17063,27 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 MPILIBS="" - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -4440,8 +17095,8 @@ FC="$acx_mpi_save_FC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x = x"$MPILIBS"; then - { { echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran" >&5 -echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran" >&2;} + { { $as_echo "$as_me:$LINENO: error: Cannot find any suitable MPI implementation for Fortran" >&5 +$as_echo "$as_me: error: Cannot find any suitable MPI implementation for Fortran" >&2;} { (exit 1); exit 1; }; } : else @@ -4468,14 +17123,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ############################################################################### if test "X$MPIFC" == "X" ; then - { { echo "$as_me:$LINENO: error: Problem : No MPI Fortran compiler specified nor found!" >&5 -echo "$as_me: error: Problem : No MPI Fortran compiler specified nor found!" >&2;} + { { $as_echo "$as_me:$LINENO: error: Problem : No MPI Fortran compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No MPI Fortran compiler specified nor found!" >&2;} { (exit 1); exit 1; }; } fi if test "X$MPICC" == "X" ; then - { { echo "$as_me:$LINENO: error: Problem : No MPI C compiler specified nor found!" >&5 -echo "$as_me: error: Problem : No MPI C compiler specified nor found!" >&2;} + { { $as_echo "$as_me:$LINENO: error: Problem : No MPI C compiler specified nor found!" >&5 +$as_echo "$as_me: error: Problem : No MPI C compiler specified nor found!" >&2;} { (exit 1); exit 1; }; } fi @@ -4484,166 +17139,166 @@ fi ############################################################################### -{ echo "$as_me:$LINENO: checking whether additional CCFLAGS flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional CCFLAGS flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional CCOPT flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional CCOPT flags should be added (should be invoked only once)... " >&6; } -# Check whether --with-ccflags was given. -if test "${with_ccflags+set}" = set; then - withval=$with_ccflags; -CCFLAGS="${withval} ${CCFLAGS}" -{ echo "$as_me:$LINENO: result: CCFLAGS = ${CCFLAGS}" >&5 -echo "${ECHO_T}CCFLAGS = ${CCFLAGS}" >&6; } +# Check whether --with-ccopt was given. +if test "${with_ccopt+set}" = set; then + withval=$with_ccopt; +CCOPT="${withval} ${CCOPT}" +{ $as_echo "$as_me:$LINENO: result: CCOPT = ${CCOPT}" >&5 +$as_echo "CCOPT = ${CCOPT}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether additional CFLAGS flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional CFLAGS flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional FCOPT flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional FCOPT flags should be added (should be invoked only once)... " >&6; } -# Check whether --with-cflags was given. -if test "${with_cflags+set}" = set; then - withval=$with_cflags; -CFLAGS="${withval} ${CFLAGS}" -{ echo "$as_me:$LINENO: result: CFLAGS = ${CFLAGS}" >&5 -echo "${ECHO_T}CFLAGS = ${CFLAGS}" >&6; } +# Check whether --with-fcopt was given. +if test "${with_fcopt+set}" = set; then + withval=$with_fcopt; +FCOPT="${withval} ${FCOPT}" +{ $as_echo "$as_me:$LINENO: result: FCOPT = ${FCOPT}" >&5 +$as_echo "FCOPT = ${FCOPT}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether additional FFLAGS flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional FFLAGS flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional F90COPT flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional F90COPT flags should be added (should be invoked only once)... " >&6; } -# Check whether --with-fflags was given. -if test "${with_fflags+set}" = set; then - withval=$with_fflags; -FFLAGS="${withval} ${FFLAGS}" -{ echo "$as_me:$LINENO: result: FFLAGS = ${FFLAGS}" >&5 -echo "${ECHO_T}FFLAGS = ${FFLAGS}" >&6; } +# Check whether --with-f90copt was given. +if test "${with_f90copt+set}" = set; then + withval=$with_f90copt; +F90COPT="${withval} ${F90COPT}" +{ $as_echo "$as_me:$LINENO: result: F90COPT = ${F90COPT}" >&5 +$as_echo "F90COPT = ${F90COPT}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi #PAC_ARG_WITH_FLAGS(ldflags,LDFLAGS) -{ echo "$as_me:$LINENO: checking whether additional libraries are needed" >&5 -echo $ECHO_N "checking whether additional libraries are needed... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional libraries are needed" >&5 +$as_echo_n "checking whether additional libraries are needed... " >&6; } # Check whether --with-libs was given. if test "${with_libs+set}" = set; then withval=$with_libs; LIBS="${withval} ${LIBS}" -{ echo "$as_me:$LINENO: result: LIBS = ${LIBS}" >&5 -echo "${ECHO_T}LIBS = ${LIBS}" >&6; } +{ $as_echo "$as_me:$LINENO: result: LIBS = ${LIBS}" >&5 +$as_echo "LIBS = ${LIBS}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether additional CLIBS flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional CLIBS flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional CLIBS flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional CLIBS flags should be added (should be invoked only once)... " >&6; } # Check whether --with-clibs was given. if test "${with_clibs+set}" = set; then withval=$with_clibs; CLIBS="${withval} ${CLIBS}" -{ echo "$as_me:$LINENO: result: CLIBS = ${CLIBS}" >&5 -echo "${ECHO_T}CLIBS = ${CLIBS}" >&6; } +{ $as_echo "$as_me:$LINENO: result: CLIBS = ${CLIBS}" >&5 +$as_echo "CLIBS = ${CLIBS}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether additional FLIBS flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional FLIBS flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional FLIBS flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional FLIBS flags should be added (should be invoked only once)... " >&6; } # Check whether --with-flibs was given. if test "${with_flibs+set}" = set; then withval=$with_flibs; FLIBS="${withval} ${FLIBS}" -{ echo "$as_me:$LINENO: result: FLIBS = ${FLIBS}" >&5 -echo "${ECHO_T}FLIBS = ${FLIBS}" >&6; } +{ $as_echo "$as_me:$LINENO: result: FLIBS = ${FLIBS}" >&5 +$as_echo "FLIBS = ${FLIBS}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether additional LIBRARYPATH flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional LIBRARYPATH flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional LIBRARYPATH flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional LIBRARYPATH flags should be added (should be invoked only once)... " >&6; } # Check whether --with-library-path was given. if test "${with_library_path+set}" = set; then withval=$with_library_path; LIBRARYPATH="${withval} ${LIBRARYPATH}" -{ echo "$as_me:$LINENO: result: LIBRARYPATH = ${LIBRARYPATH}" >&5 -echo "${ECHO_T}LIBRARYPATH = ${LIBRARYPATH}" >&6; } +{ $as_echo "$as_me:$LINENO: result: LIBRARYPATH = ${LIBRARYPATH}" >&5 +$as_echo "LIBRARYPATH = ${LIBRARYPATH}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether additional INCLUDEPATH flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional INCLUDEPATH flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional INCLUDEPATH flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional INCLUDEPATH flags should be added (should be invoked only once)... " >&6; } # Check whether --with-include-path was given. if test "${with_include_path+set}" = set; then withval=$with_include_path; INCLUDEPATH="${withval} ${INCLUDEPATH}" -{ echo "$as_me:$LINENO: result: INCLUDEPATH = ${INCLUDEPATH}" >&5 -echo "${ECHO_T}INCLUDEPATH = ${INCLUDEPATH}" >&6; } +{ $as_echo "$as_me:$LINENO: result: INCLUDEPATH = ${INCLUDEPATH}" >&5 +$as_echo "INCLUDEPATH = ${INCLUDEPATH}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking whether additional MODULE_PATH flags should be added (should be invoked only once)" >&5 -echo $ECHO_N "checking whether additional MODULE_PATH flags should be added (should be invoked only once)... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether additional MODULE_PATH flags should be added (should be invoked only once)" >&5 +$as_echo_n "checking whether additional MODULE_PATH flags should be added (should be invoked only once)... " >&6; } # Check whether --with-module-path was given. if test "${with_module_path+set}" = set; then withval=$with_module_path; MODULE_PATH="${withval} ${MODULE_PATH}" -{ echo "$as_me:$LINENO: result: MODULE_PATH = ${MODULE_PATH}" >&5 -echo "${ECHO_T}MODULE_PATH = ${MODULE_PATH}" >&6; } +{ $as_echo "$as_me:$LINENO: result: MODULE_PATH = ${MODULE_PATH}" >&5 +$as_echo "MODULE_PATH = ${MODULE_PATH}" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4656,10 +17311,10 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -4672,7 +17327,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4683,11 +17338,11 @@ fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4696,10 +17351,10 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -4712,7 +17367,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4723,11 +17378,11 @@ fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -4735,12 +17390,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -4752,8 +17403,8 @@ fi am__api_version='1.10' -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file @@ -4776,9 +17427,9 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken + { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi @@ -4789,26 +17440,23 @@ then # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! + { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! +$as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -4819,15 +17467,15 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin @@ -4862,8 +17510,8 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } +{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in @@ -4875,10 +17523,10 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -4891,7 +17539,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4902,22 +17550,23 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh @@ -4934,12 +17583,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -4964,8 +17613,8 @@ am__doit: .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none @@ -4992,8 +17641,8 @@ if test "$am__include" = "#"; then fi -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. @@ -5020,8 +17669,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi @@ -5038,7 +17687,7 @@ fi # Define the identity of the package. PACKAGE='psblas' - VERSION='2.2' + VERSION='2.3.1' cat >>confdefs.h <<_ACEOF @@ -5076,10 +17725,10 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. @@ -5092,7 +17741,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5103,11 +17752,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5116,10 +17765,10 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. @@ -5132,7 +17781,7 @@ do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5143,11 +17792,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -5155,12 +17804,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -5185,10 +17830,10 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' depcc="$CC" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -5276,8 +17921,8 @@ else fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -5318,7 +17963,7 @@ EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then rm -rf conftest* psblas_cv_fc="gcc" @@ -5337,8 +17982,8 @@ rm -f conftest* ac_exeext='' ac_ext='f90' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ echo "$as_me:$LINENO: checking support for Fortran allocatables TR15581" >&5 -echo $ECHO_N "checking support for Fortran allocatables TR15581... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking support for Fortran allocatables TR15581" >&5 +$as_echo_n "checking support for Fortran allocatables TR15581... " >&6; } i=0 while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do i=`expr $i + 1` @@ -5394,67 +18039,104 @@ program testtr15581 write(*,*) b write(*,*) db%v -end program testtr15581 +end program testtr15581 +EOF +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + + { { $as_echo "$as_me:$LINENO: error: Sorry, cannot build PSBLAS without support for TR15581. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.3." >&5 +$as_echo "$as_me: error: Sorry, cannot build PSBLAS without support for TR15581. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.3." >&2;} + { (exit 1); exit 1; }; } + +fi +cd .. +rm -fr tmpdir_$i + +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 + { $as_echo "$as_me:$LINENO: Unknown Fortran compiler, proceeding with fingers crossed !" >&5 +$as_echo "$as_me: Unknown Fortran compiler, proceeding with fingers crossed !" >&6;} + fi +fi +if test "X$psblas_cv_fc" == "Xgcc" ; then +ac_exeext='' +ac_ext='F' +ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +{ $as_echo "$as_me:$LINENO: checking GNU Fortran version at least 4.3" >&5 +$as_echo_n "checking GNU Fortran version at least 4.3... " >&6; } +cat > conftest.$ac_ext <= 4 && __GNUC_MINOR__ >= 3 ) || ( __GNUC__ > 4 ) + print *, "ok" +#else + this program will fail +#endif + end + EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - - { echo "$as_me:$LINENO: result: yes." >&5 -echo "${ECHO_T}yes." >&6; } + { $as_echo "$as_me:$LINENO: result: yes." >&5 +$as_echo " yes." >&6; } + : else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no." >&5 +$as_echo " no." >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - - { { echo "$as_me:$LINENO: error: no. - Sorry, cannot build PSBLAS without support for TR15581. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.2." >&5 -echo "$as_me: error: no. - Sorry, cannot build PSBLAS without support for TR15581. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.2." >&2;} + rm -rf conftest* + { { $as_echo "$as_me:$LINENO: error: Sorry, we require GNU Fortran 4.3 or later." >&5 +$as_echo "$as_me: error: Sorry, we require GNU Fortran 4.3 or later." >&2;} { (exit 1); exit 1; }; } fi -cd .. -rm -fr tmpdir_$i - -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," - # Note : there coule 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. - else - # Sun compiler detection - if eval "$MPIFC -V 2>&1 | grep Sun 2>/dev/null" ; then - psblas_cv_fc="sun" - else - # Portland group compiler detection - if eval "$MPIFC -V 2>&1 | grep Portland 2>/dev/null" ; then - psblas_cv_fc="pg" - else - # Intel compiler identification - if eval "$MPIFC -V 2>&1 | grep Intel.*Fortran.*Compiler 2>/dev/null" ; then - psblas_cv_fc="ifc" - else - psblas_cv_fc="" - # unsupported MPI Fortran compiler - { { echo "$as_me:$LINENO: error: Unknown compiler ! Make sure your Fortran compiler is specified as compatible in the documentation!" >&5 -echo "$as_me: error: Unknown compiler ! Make sure your Fortran compiler is specified as compatible in the documentation!" >&2;} - { (exit 1); exit 1; }; } - fi - fi - fi - fi +rm -f conftest* fi # TODO : SEE _AC_PROG_FC_V # TODO : AC_MSG_ERROR(see "$ac_cv_prog_FC_fc") @@ -5477,15 +18159,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -5517,20 +18199,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -5554,13 +18237,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -5568,7 +18252,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -5593,8 +18277,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -5622,20 +18306,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. @@ -5659,13 +18344,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err @@ -5673,7 +18359,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. @@ -5689,11 +18375,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -5703,42 +18391,37 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -5753,74 +18436,60 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done done done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$EGREP"; then ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` @@ -5835,40 +18504,31 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done done done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } -fi - + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5895,20 +18555,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no @@ -6000,37 +18661,40 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -6052,11 +18716,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6074,20 +18738,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" @@ -6095,12 +18760,15 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6108,68 +18776,14 @@ fi done -{ echo "$as_me:$LINENO: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6; } -if test "${ac_cv_type_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef void * ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_void_p=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_void_p=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6; } - # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } if test "${ac_cv_sizeof_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. @@ -6180,11 +18794,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; test_array [0] = 0 ; @@ -6197,13 +18810,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -6217,11 +18831,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6234,20 +18847,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` @@ -6261,7 +18875,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF @@ -6271,11 +18885,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; test_array [0] = 0 ; @@ -6288,13 +18901,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err @@ -6308,11 +18922,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; test_array [0] = 0 ; @@ -6325,20 +18938,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` @@ -6352,7 +18966,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= @@ -6372,11 +18986,10 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; int main () { -static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; test_array [0] = 0 ; @@ -6389,20 +19002,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` @@ -6413,11 +19027,13 @@ done case $ac_lo in ?*) ac_cv_sizeof_void_p=$ac_lo;; '') if test "$ac_cv_type_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *) +$as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_void_p=0 fi ;; @@ -6430,9 +19046,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default - typedef void * ac__type_sizeof_; -static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } -static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +static long int longval () { return (long int) (sizeof (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } #include #include int @@ -6442,20 +19057,22 @@ main () FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; - if (((long int) (sizeof (ac__type_sizeof_))) < 0) + if (((long int) (sizeof (void *))) < 0) { long int i = longval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (void *)))) return 1; - fprintf (f, "%ld\n", i); + fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (ac__type_sizeof_)))) + if (i != ((long int) (sizeof (void *)))) return 1; - fprintf (f, "%lu\n", i); + fprintf (f, "%lu", i); } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ return ferror (f) || fclose (f) != 0; ; @@ -6468,43 +19085,48 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_void_p=`cat conftest.val` else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_void_p" = yes; then - { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *) + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *) +$as_echo "$as_me: error: cannot compute sizeof (void *) See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } else ac_cv_sizeof_void_p=0 fi fi +rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi -{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } @@ -6522,10 +19144,14 @@ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_fc_compiler_gnu -{ echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5 -echo $ECHO_N "checking for Fortran name-mangling scheme... $ECHO_C" >&6; } +if test "X$psblas_cv_fc" == X"pg" ; then + save_FC=$FC + FC=$F77 +fi +{ $as_echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5 +$as_echo_n "checking for Fortran name-mangling scheme... " >&6; } if test "${ac_cv_fc_mangling+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF subroutine foobar() @@ -6541,13 +19167,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err @@ -6594,26 +19221,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_success=yes; break 2 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done @@ -6671,26 +19302,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_success_extra=yes; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done @@ -6719,24 +19354,30 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu fi LIBS=$ac_save_LIBS - rm -f cfortran_test* conftest* + rm -rf conftest* + rm -f cfortran_test* else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compile a simple Fortran program +$as_echo "$as_me: error: cannot compile a simple Fortran program See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_fc_mangling" >&5 -echo "${ECHO_T}$ac_cv_fc_mangling" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_mangling" >&5 +$as_echo "$ac_cv_fc_mangling" >&6; } +if test "X$psblas_cv_fc" == X"pg" ; then + FC=$save_FC +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6749,8 +19390,8 @@ 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# } -{ echo "$as_me:$LINENO: checking defines for C/Fortran name interfaces" >&5 -echo $ECHO_N "checking defines for C/Fortran name interfaces... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking defines for C/Fortran name interfaces" >&5 +$as_echo_n "checking defines for C/Fortran name interfaces... " >&6; } 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 @@ -6784,22 +19425,20 @@ else fi CDEFINES="$pac_f_c_names $CDEFINES" -{ echo "$as_me:$LINENO: result: $pac_f_c_names " >&5 -echo "${ECHO_T} $pac_f_c_names " >&6; } +{ $as_echo "$as_me:$LINENO: result: $pac_f_c_names " >&5 +$as_echo " $pac_f_c_names " >&6; } ############################################################################### # Make.inc generation logic ############################################################################### -# Note : This script is sensitive to FFLAGS, FCFLAGS, CFLAGS variables. -# Note : We cannot be sure whether ./configure test programs will use these *FLAGS. - -if test "X$CFLAGS" == "X" ; then +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 assignations + # 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" @@ -6814,15 +19453,16 @@ if test "X$CFLAGS" == "X" ; 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 -else - CCOPT="${CFLAGS}" fi CFLAGS="${CCOPT}" -if test "X$FFLAGS" == "X" ; then +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) @@ -6840,16 +19480,21 @@ if test "X$FFLAGS" == "X" ; then 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 -else - FCOPT="${FFLAGS}" +fi +if test "X$psblas_cv_fc" == X"nag" ; then + # Add needed options + FCOPT="$FCOPT -mismatch -dcfuns" fi FFLAGS="${FCOPT}" -if test "X$FCFLAGS" == "X" ; then +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) @@ -6864,14 +19509,22 @@ if test "X$FCFLAGS" == "X" ; then # other compilers .. F90COPT="-fast $F90COPT" elif test "X$psblas_cv_fc" == X"sun" ; then - # other compilers .. F90COPT="-fast $F90COPT" - # NOTE : PG & Sun use -fast instead -O3 + elif test "X$psblas_cv_fc" == X"nag" ; then + # NAG compiler + F90COPT="-O2" else + # other compilers .. F90COPT="-O2 $F90COPT" fi else - F90COPT="${FCFLAGS}" + echo "Found FCFLAGS $F90COPT" + #F90COPT="${FCFLAGS}" +fi +if test "X$psblas_cv_fc" == X"nag" ; then + # Add needed options + F90COPT="$F90COPT -mismatch -dcfuns" + EXTRA_OPT="-mismatch_all" fi FCFLAGS="${F90COPT}" @@ -6880,13 +19533,12 @@ FCFLAGS="${F90COPT}" ############################################################################## # Compilers variables selection ############################################################################## -if true ; then - if test "X$psblas_cv_fc" == X"xlf" ; then +if test "X$psblas_cv_fc" == X"xlf" ; then # WARNING : this is EVIL : specifying a pathname prefixed compiler will be ignored! # But this is necessary since : # - if called from some script, xlf could behave strangely # - it is not said that mpxlf95 gets chosen by the configure script. - F90="xlf95 -qsuffix=f=f90:cpp=F90" + F90="xlf95 -qsuffix=f=f90:cpp=F90" # F90="xlf95" MPF90="mpxlf95 -qsuffix=f=f90:cpp=F90" # FC="xlf" @@ -6905,7 +19557,7 @@ if true ; then #MPFCC="mpxlc" # Note : -qfixed should be not specified in the environment FFLAGS or things will break. # This fact should be documented somewhere. - else +else # We really think about the GCC here but this is our idea for other compilers, too. # If the user wishes to, she should specify MPICC, MPIF77 after ./configure. # Note: this behavious should be documented. @@ -6915,9 +19567,9 @@ if true ; then MPF77=${MPIFC} CC=${CC} MPCC=${MPICC} - fi fi + ############################################################################## # Choice of our compilers, needed by Make.inc ############################################################################## @@ -6933,10 +19585,10 @@ fi # Include flags ############################################################################## -{ echo "$as_me:$LINENO: checking fortran 90 modules extension" >&5 -echo $ECHO_N "checking fortran 90 modules extension... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking fortran 90 modules extension" >&5 +$as_echo_n "checking fortran 90 modules extension... " >&6; } if test "${ax_f90_modext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -6965,13 +19617,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err @@ -6985,7 +19638,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 fi else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ax_f90_modext=unknown @@ -7002,13 +19655,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ax_f90_modext" >&5 -echo "${ECHO_T}$ax_f90_modext" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ax_f90_modext" >&5 +$as_echo "$ax_f90_modext" >&6; } -{ echo "$as_me:$LINENO: checking fortran 90 modules inclusion flag" >&5 -echo $ECHO_N "checking fortran 90 modules inclusion flag... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking fortran 90 modules inclusion flag" >&5 +$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; } if test "${ax_f90_modflag+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' @@ -7037,20 +19690,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7077,20 +19731,21 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ax_f90_modflag="$ax_flag" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -7102,8 +19757,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done rm -fr tmpdir_$i if test "$ax_flag" = "not found" ; then - { { echo "$as_me:$LINENO: error: unable to find compiler flag for modules inclusion" >&5 -echo "$as_me: error: unable to find compiler flag for modules inclusion" >&2;} + { { $as_echo "$as_me:$LINENO: error: unable to find compiler flag for modules inclusion" >&5 +$as_echo "$as_me: error: unable to find compiler flag for modules inclusion" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c @@ -7114,8 +19769,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ax_f90_modflag" >&5 -echo "${ECHO_T}$ax_f90_modflag" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ax_f90_modflag" >&5 +$as_echo "$ax_f90_modflag" >&6; } MODEXT=".$ax_f90_modext" FMFLAG="${ax_f90_modflag%% *}" FIFLAG=-I @@ -7137,8 +19792,8 @@ FIFLAG=-I ac_exeext='' ac_ext='f90' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ echo "$as_me:$LINENO: checking MPI Fortran interface" >&5 -echo $ECHO_N "checking MPI Fortran interface... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking MPI Fortran interface" >&5 +$as_echo_n "checking MPI Fortran interface... " >&6; } cat > conftest.$ac_ext <&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then - { echo "$as_me:$LINENO: result: use mpi " >&5 -echo "${ECHO_T} use mpi " >&6; } + { $as_echo "$as_me:$LINENO: result: use mpi " >&5 +$as_echo " use mpi " >&6; } rm -rf conftest* FDEFINES="$psblas_cv_define_prepend-DMPI_MOD $FDEFINES" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: include mpif.h " >&5 -echo "${ECHO_T} include mpif.h " >&6; } + { $as_echo "$as_me:$LINENO: result: include mpif.h " >&5 +$as_echo " include mpif.h " >&6; } rm -rf conftest* FDEFINES="$psblas_cv_define_prepend-DMPI_H $FDEFINES" @@ -7168,8 +19823,8 @@ rm -f conftest* ac_exeext='' ac_ext='f' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ echo "$as_me:$LINENO: checking for Fortran MOVE_ALLOC intrinsic" >&5 -echo $ECHO_N "checking for Fortran MOVE_ALLOC intrinsic... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for Fortran MOVE_ALLOC intrinsic" >&5 +$as_echo_n "checking for Fortran MOVE_ALLOC intrinsic... " >&6; } cat > conftest.$ac_ext <&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } rm -rf conftest* FDEFINES="$psblas_cv_define_prepend-DHAVE_MOVE_ALLOC $FDEFINES" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi @@ -7199,8 +19854,8 @@ rm -f conftest* ac_exeext='' ac_ext='f90' ac_link='${MPIFC-$FC} -o conftest${ac_exeext} $FCFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -{ echo "$as_me:$LINENO: checking support for Fortran VOLATILE" >&5 -echo $ECHO_N "checking support for Fortran VOLATILE... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking support for Fortran VOLATILE" >&5 +$as_echo_n "checking support for Fortran VOLATILE... " >&6; } i=0 while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do i=`expr $i + 1` @@ -7215,15 +19870,15 @@ EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } FDEFINES="$psblas_cv_define_prepend-DHAVE_VOLATILE $FDEFINES" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi @@ -7287,10 +19942,10 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 -echo $ECHO_N "checking how to get verbose linking output from $F77... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking how to get verbose linking output from $F77" >&5 +$as_echo_n "checking how to get verbose linking output from $F77... " >&6; } if test "${ac_cv_prog_f77_v+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF program main @@ -7303,13 +19958,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err @@ -7331,19 +19987,22 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_verb" eval "set x $ac_link" shift -echo "$as_me:$LINENO: $*" >&5 -ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` -echo "$ac_f77_v_output" >&5 +$as_echo "$as_me:$LINENO: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | + grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS -rm -f conftest* +rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | - sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented @@ -7383,26 +20042,26 @@ esac done done if test -z "$ac_cv_prog_f77_v"; then - { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 -echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $F77" >&5 +$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $F77" >&2;} fi else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: WARNING: compilation failed" >&5 -echo "$as_me: WARNING: compilation failed" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: compilation failed" >&5 +$as_echo "$as_me: WARNING: compilation failed" >&2;} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 -echo "${ECHO_T}$ac_cv_prog_f77_v" >&6; } -{ echo "$as_me:$LINENO: checking for Fortran 77 libraries of $F77" >&5 -echo $ECHO_N "checking for Fortran 77 libraries of $F77... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_f77_v" >&5 +$as_echo "$ac_cv_prog_f77_v" >&6; } +{ $as_echo "$as_me:$LINENO: checking for Fortran 77 libraries of $F77" >&5 +$as_echo_n "checking for Fortran 77 libraries of $F77... " >&6; } if test "${ac_cv_f77_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test "x$FLIBS" != "x"; then ac_cv_f77_libs="$FLIBS" # Let the user override the test. @@ -7422,19 +20081,22 @@ ac_save_FFLAGS=$FFLAGS FFLAGS="$FFLAGS $ac_cv_prog_f77_v" eval "set x $ac_link" shift -echo "$as_me:$LINENO: $*" >&5 -ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'` -echo "$ac_f77_v_output" >&5 +$as_echo "$as_me:$LINENO: $*" >&5 +# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH, +# LIBRARY_PATH; skip all such settings. +ac_f77_v_output=`eval $ac_link 5>&1 2>&1 | + grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="` +$as_echo "$ac_f77_v_output" >&5 FFLAGS=$ac_save_FFLAGS -rm -f conftest* +rm -rf conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_f77_v_output="`echo $ac_f77_v_output | grep 'LPATH is:' | - sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_f77_v_output" + sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_f77_v_output" # FIXME: we keep getting bitten by quoted arguments; a more general fix # that detects unbalanced quotes in FLIBS should be implemented @@ -7533,7 +20195,7 @@ fi esac ;; -YP,*) - for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do + for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do ac_exists=false for ac_i in $ac_cv_f77_libs; do if test x"$ac_j" = x"$ac_i"; then @@ -7581,7 +20243,7 @@ set X $ac_save_positional; shift # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) - ac_ld_run_path=`echo $ac_f77_v_output | + ac_ld_run_path=`$as_echo "$ac_f77_v_output" | sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && if test "$ac_compiler_gnu" = yes; then @@ -7596,8 +20258,8 @@ esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 -echo "${ECHO_T}$ac_cv_f77_libs" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_libs" >&5 +$as_echo "$ac_cv_f77_libs" >&6; } FLIBS="$ac_cv_f77_libs" @@ -7612,10 +20274,10 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ echo "$as_me:$LINENO: checking for dummy main to link with Fortran 77 libraries" >&5 -echo $ECHO_N "checking for dummy main to link with Fortran 77 libraries... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for dummy main to link with Fortran 77 libraries" >&5 +$as_echo_n "checking for dummy main to link with Fortran 77 libraries... " >&6; } if test "${ac_cv_f77_dummy_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_f77_dm_save_LIBS=$LIBS LIBS="$LIBS $FLIBS" @@ -7656,26 +20318,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_fortran_dummy_main=none else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_fortran_dummy_main=unknown fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext @@ -7710,26 +20376,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_fortran_dummy_main=$ac_func; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done @@ -7739,12 +20409,12 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu ac_cv_f77_dummy_main=$ac_cv_fortran_dummy_main - rm -f conftest* + rm -rf conftest* LIBS=$ac_f77_dm_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 -echo "${ECHO_T}$ac_cv_f77_dummy_main" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_dummy_main" >&5 +$as_echo "$ac_cv_f77_dummy_main" >&6; } F77_DUMMY_MAIN=$ac_cv_f77_dummy_main if test "$F77_DUMMY_MAIN" != unknown; then if test $F77_DUMMY_MAIN != none; then @@ -7762,11 +20432,13 @@ _ACEOF fi fi else - { { echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails See \`config.log' for more details." >&5 -echo "$as_me: error: linking to Fortran libraries from C fails +$as_echo "$as_me: error: linking to Fortran libraries from C fails See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi @@ -7780,10 +20452,10 @@ ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu -{ echo "$as_me:$LINENO: checking for Fortran 77 name-mangling scheme" >&5 -echo $ECHO_N "checking for Fortran 77 name-mangling scheme... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for Fortran 77 name-mangling scheme" >&5 +$as_echo_n "checking for Fortran 77 name-mangling scheme... " >&6; } if test "${ac_cv_f77_mangling+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF subroutine foobar() @@ -7799,13 +20471,14 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err @@ -7860,26 +20533,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_success=yes; break 2 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done @@ -7945,26 +20622,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_success_extra=yes; break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done @@ -7993,23 +20674,26 @@ ac_compiler_gnu=$ac_cv_f77_compiler_gnu fi LIBS=$ac_save_LIBS - rm -f cfortran_test* conftest* + rm -rf conftest* + rm -f cfortran_test* else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compile a simple Fortran program +$as_echo "$as_me: error: cannot compile a simple Fortran program See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 -echo "${ECHO_T}$ac_cv_f77_mangling" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_f77_mangling" >&5 +$as_echo "$ac_cv_f77_mangling" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8082,8 +20766,8 @@ LIBS="$LIBS $FLIBS" if test $acx_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - { echo "$as_me:$LINENO: checking for $sgemm in $BLAS_LIBS" >&5 -echo $ECHO_N "checking for $sgemm in $BLAS_LIBS... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $sgemm in $BLAS_LIBS" >&5 +$as_echo_n "checking for $sgemm in $BLAS_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8120,30 +20804,34 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then acx_blas_ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 BLAS_LIBS="" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $acx_blas_ok" >&5 -echo "${ECHO_T}$acx_blas_ok" >&6; } + { $as_echo "$as_me:$LINENO: result: $acx_blas_ok" >&5 +$as_echo "$acx_blas_ok" >&6; } LIBS="$save_LIBS" fi fi @@ -8151,10 +20839,10 @@ fi # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) if test $acx_blas_ok = no; then - { echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5 -echo $ECHO_N "checking for ATL_xerbla in -latlas... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for ATL_xerbla in -latlas" >&5 +$as_echo_n "checking for ATL_xerbla in -latlas... " >&6; } if test "${ac_cv_lib_atlas_ATL_xerbla+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-latlas $LIBS" @@ -8194,38 +20882,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_atlas_ATL_xerbla=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_atlas_ATL_xerbla=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 -echo "${ECHO_T}$ac_cv_lib_atlas_ATL_xerbla" >&6; } -if test $ac_cv_lib_atlas_ATL_xerbla = yes; then - as_ac_Lib=`echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lf77blas" >&5 -echo $ECHO_N "checking for $sgemm in -lf77blas... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_atlas_ATL_xerbla" >&5 +$as_echo "$ac_cv_lib_atlas_ATL_xerbla" >&6; } +if test "x$ac_cv_lib_atlas_ATL_xerbla" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_f77blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lf77blas" >&5 +$as_echo_n "checking for $sgemm in -lf77blas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lf77blas -latlas $LIBS" @@ -8265,38 +20957,45 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - { echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 -echo $ECHO_N "checking for cblas_dgemm in -lcblas... $ECHO_C" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + { $as_echo "$as_me:$LINENO: checking for cblas_dgemm in -lcblas" >&5 +$as_echo_n "checking for cblas_dgemm in -lcblas... " >&6; } if test "${ac_cv_lib_cblas_cblas_dgemm+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcblas -lf77blas -latlas $LIBS" @@ -8336,33 +21035,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_cblas_cblas_dgemm=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cblas_cblas_dgemm=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 -echo "${ECHO_T}$ac_cv_lib_cblas_cblas_dgemm" >&6; } -if test $ac_cv_lib_cblas_cblas_dgemm = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cblas_cblas_dgemm" >&5 +$as_echo "$ac_cv_lib_cblas_cblas_dgemm" >&6; } +if test "x$ac_cv_lib_cblas_cblas_dgemm" = x""yes; then acx_blas_ok=yes BLAS_LIBS="-lcblas -lf77blas -latlas" fi @@ -8376,11 +21079,11 @@ fi # BLAS in PhiPACK libraries? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 -echo $ECHO_N "checking for $sgemm in -lblas... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 +$as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" @@ -8420,39 +21123,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - as_ac_Lib=`echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $dgemm in -ldgemm" >&5 -echo $ECHO_N "checking for $dgemm in -ldgemm... $ECHO_C" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_dgemm_$dgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $dgemm in -ldgemm" >&5 +$as_echo_n "checking for $dgemm in -ldgemm... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldgemm -lblas $LIBS" @@ -8492,39 +21202,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - as_ac_Lib=`echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lsgemm" >&5 -echo $ECHO_N "checking for $sgemm in -lsgemm... $ECHO_C" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_sgemm_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lsgemm" >&5 +$as_echo_n "checking for $sgemm in -lsgemm... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsgemm -lblas $LIBS" @@ -8564,34 +21281,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lsgemm -ldgemm -lblas" fi @@ -8603,11 +21327,11 @@ fi # BLAS in Alpha CXML library? if test $acx_blas_ok = no; then - as_ac_Lib=`echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lcxml" >&5 -echo $ECHO_N "checking for $sgemm in -lcxml... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_cxml_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lcxml" >&5 +$as_echo_n "checking for $sgemm in -lcxml... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcxml $LIBS" @@ -8647,34 +21371,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-lcxml" fi @@ -8682,11 +21413,11 @@ fi # BLAS in Alpha DXML library? (now called CXML, see above) if test $acx_blas_ok = no; then - as_ac_Lib=`echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -ldxml" >&5 -echo $ECHO_N "checking for $sgemm in -ldxml... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_dxml_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -ldxml" >&5 +$as_echo_n "checking for $sgemm in -ldxml... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldxml $LIBS" @@ -8726,34 +21457,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_blas_ok=yes;BLAS_LIBS="-ldxml" fi @@ -8763,10 +21501,10 @@ fi # BLAS in Sun Performance library? if test $acx_blas_ok = no; then if test "x$GCC" != xyes; then # only works with Sun CC - { echo "$as_me:$LINENO: checking for acosp in -lsunmath" >&5 -echo $ECHO_N "checking for acosp in -lsunmath... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for acosp in -lsunmath" >&5 +$as_echo_n "checking for acosp in -lsunmath... " >&6; } if test "${ac_cv_lib_sunmath_acosp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunmath $LIBS" @@ -8806,38 +21544,42 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_sunmath_acosp=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_sunmath_acosp=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_acosp" >&5 -echo "${ECHO_T}$ac_cv_lib_sunmath_acosp" >&6; } -if test $ac_cv_lib_sunmath_acosp = yes; then - as_ac_Lib=`echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lsunperf" >&5 -echo $ECHO_N "checking for $sgemm in -lsunperf... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_acosp" >&5 +$as_echo "$ac_cv_lib_sunmath_acosp" >&6; } +if test "x$ac_cv_lib_sunmath_acosp" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_sunperf_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lsunperf" >&5 +$as_echo_n "checking for $sgemm in -lsunperf... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsunperf -lsunmath $LIBS" @@ -8877,34 +21619,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then BLAS_LIBS="-xlic_lib=sunperf -lsunmath" acx_blas_ok=yes fi @@ -8917,11 +21666,11 @@ fi # BLAS in SCSL library? (SGI/Cray Scientific Library) if test $acx_blas_ok = no; then - as_ac_Lib=`echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lscs" >&5 -echo $ECHO_N "checking for $sgemm in -lscs... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_scs_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lscs" >&5 +$as_echo_n "checking for $sgemm in -lscs... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lscs $LIBS" @@ -8961,34 +21710,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lscs" fi @@ -8996,11 +21752,11 @@ fi # BLAS in SGIMATH library? if test $acx_blas_ok = no; then - as_ac_Lib=`echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lcomplib.sgimath" >&5 -echo $ECHO_N "checking for $sgemm in -lcomplib.sgimath... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_complib.sgimath_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lcomplib.sgimath" >&5 +$as_echo_n "checking for $sgemm in -lcomplib.sgimath... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcomplib.sgimath $LIBS" @@ -9040,34 +21796,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lcomplib.sgimath" fi @@ -9075,11 +21838,11 @@ fi # BLAS in IBM ESSL library? (requires generic BLAS lib, too) if test $acx_blas_ok = no; then - as_ac_Lib=`echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 -echo $ECHO_N "checking for $sgemm in -lblas... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 +$as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" @@ -9119,39 +21882,46 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then - as_ac_Lib=`echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lessl" >&5 -echo $ECHO_N "checking for $sgemm in -lessl... $ECHO_C" >&6; } +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + as_ac_Lib=`$as_echo "ac_cv_lib_essl_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lessl" >&5 +$as_echo_n "checking for $sgemm in -lessl... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lessl -lblas $FLIBS $LIBS" @@ -9191,34 +21961,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lessl -lblas" fi @@ -9264,26 +22041,30 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then acx_blas_ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 BLAS_LIBS="" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" @@ -9291,11 +22072,11 @@ fi # Generic BLAS library? if test $acx_blas_ok = no; then - as_ac_Lib=`echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 -echo $ECHO_N "checking for $sgemm in -lblas... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_blas_$sgemm" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $sgemm in -lblas" >&5 +$as_echo_n "checking for $sgemm in -lblas... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lblas $LIBS" @@ -9335,34 +22116,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_blas_ok=yes; BLAS_LIBS="-lblas" fi @@ -9382,8 +22170,8 @@ _ACEOF : else acx_blas_ok=no - { { echo "$as_me:$LINENO: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&5 -echo "$as_me: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&2;} + { { $as_echo "$as_me:$LINENO: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&5 +$as_echo "$as_me: error: Cannot find BLAS library, specify a path using --with-blas=DIR/LIB (for example --with-blas=/usr/path/lib/libcxml.a)" >&2;} { (exit 1); exit 1; }; } fi @@ -9433,8 +22221,8 @@ fi # First, check LAPACK_LIBS environment variable if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" - { echo "$as_me:$LINENO: checking for $cheev in $LAPACK_LIBS" >&5 -echo $ECHO_N "checking for $cheev in $LAPACK_LIBS... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for $cheev in $LAPACK_LIBS" >&5 +$as_echo_n "checking for $cheev in $LAPACK_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9471,30 +22259,34 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then acx_lapack_ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LAPACK_LIBS="" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $acx_lapack_ok" >&5 -echo "${ECHO_T}$acx_lapack_ok" >&6; } + { $as_echo "$as_me:$LINENO: result: $acx_lapack_ok" >&5 +$as_echo "$acx_lapack_ok" >&6; } LIBS="$save_LIBS" if test acx_lapack_ok = no; then LAPACK_LIBS="" @@ -9504,11 +22296,11 @@ fi # LAPACK linked to by default? (is sometimes included in BLAS lib) if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS" - as_ac_var=`echo "ac_cv_func_$cheev" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $cheev" >&5 -echo $ECHO_N "checking for $cheev... $ECHO_C" >&6; } + as_ac_var=`$as_echo "ac_cv_func_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $cheev" >&5 +$as_echo_n "checking for $cheev... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -9569,33 +22361,40 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_lapack_ok=yes fi @@ -9606,11 +22405,11 @@ fi for lapack in lapack lapack_rs6k; do if test $acx_lapack_ok = no; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" - as_ac_Lib=`echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $cheev in -l$lapack" >&5 -echo $ECHO_N "checking for $cheev in -l$lapack... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_$lapack''_$cheev" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $cheev in -l$lapack" >&5 +$as_echo_n "checking for $cheev in -l$lapack... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$lapack $FLIBS $LIBS" @@ -9650,34 +22449,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then acx_lapack_ok=yes; LAPACK_LIBS="-l$lapack" fi @@ -9732,8 +22538,8 @@ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest ac_compiler_gnu=$ac_cv_fc_compiler_gnu LIBS="$BLACS_LIBS $LIBS" - { echo "$as_me:$LINENO: checking for dgesd2d in $BLACS_LIBS" >&5 -echo $ECHO_N "checking for dgesd2d in $BLACS_LIBS... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for dgesd2d in $BLACS_LIBS" >&5 +$as_echo_n "checking for dgesd2d in $BLACS_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF program main call dgesd2d @@ -9745,34 +22551,38 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then psblas_cv_blacs_ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 psblas_cv_blacs_ok=no;BLACS_LIBS="" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 -echo "${ECHO_T}$psblas_cv_blacs_ok" >&6; } + { $as_echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 +$as_echo "$psblas_cv_blacs_ok" >&6; } if test x"$psblas_cv_blacs_ok" == x"yes"; then - { echo "$as_me:$LINENO: checking for blacs_pinfo in $BLACS_LIBS" >&5 -echo $ECHO_N "checking for blacs_pinfo in $BLACS_LIBS... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for blacs_pinfo in $BLACS_LIBS" >&5 +$as_echo_n "checking for blacs_pinfo in $BLACS_LIBS... " >&6; } cat >conftest.$ac_ext <<_ACEOF program main call blacs_pinfo @@ -9784,30 +22594,34 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then psblas_cv_blacs_ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 psblas_cv_blacs_ok=no;BLACS_LIBS="" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 -echo "${ECHO_T}$psblas_cv_blacs_ok" >&6; } + { $as_echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 +$as_echo "$psblas_cv_blacs_ok" >&6; } fi LIBS="$save_LIBS"; fi @@ -9834,11 +22648,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu for pac_check_libs_l in blacssmp blacsp2 blacs do if test x"$pac_check_libs_ok" == xno ; then - as_ac_Lib=`echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 -echo $ECHO_N "checking for $pac_check_libs_f in -l$pac_check_libs_l... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$pac_check_libs_l $LIBS" @@ -9853,34 +22667,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" fi @@ -9891,8 +22712,8 @@ fi if test x"$pac_check_libs_ok" = xyes ; then psblas_cv_blacs_ok=yes; LIBS="$LIBS $pac_check_libs_LIBS " BLACS_LIBS="$pac_check_libs_LIBS" - { echo "$as_me:$LINENO: BLACS libraries detected." >&5 -echo "$as_me: BLACS libraries detected." >&6;} + { $as_echo "$as_me:$LINENO: BLACS libraries detected." >&5 +$as_echo "$as_me: BLACS libraries detected." >&6;} else pac_check_libs_ok=no @@ -9903,8 +22724,8 @@ echo "$as_me: BLACS libraries detected." >&6;} if test x"$BLACS_LIBS" != "x"; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { echo "$as_me:$LINENO: checking for blacs_pinfo in $BLACS_LIBS" >&5 -echo $ECHO_N "checking for blacs_pinfo in $BLACS_LIBS... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for blacs_pinfo in $BLACS_LIBS" >&5 +$as_echo_n "checking for blacs_pinfo in $BLACS_LIBS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -9921,30 +22742,34 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then psblas_cv_blacs_ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 psblas_cv_blacs_ok=no;BLACS_LIBS="" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 -echo "${ECHO_T}$psblas_cv_blacs_ok" >&6; } + { $as_echo "$as_me:$LINENO: result: $psblas_cv_blacs_ok" >&5 +$as_echo "$psblas_cv_blacs_ok" >&6; } LIBS="$save_LIBS"; fi fi @@ -9954,8 +22779,8 @@ fi if test x"$BLACS_LIBS" != "x" ; then save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { echo "$as_me:$LINENO: checking for PESSL BLACS" >&5 -echo $ECHO_N "checking for PESSL BLACS... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for PESSL BLACS" >&5 +$as_echo_n "checking for PESSL BLACS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -9972,30 +22797,34 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then psblas_cv_pessl_blacs=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 psblas_cv_pessl_blacs=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $psblas_cv_pessl_blacs" >&5 -echo "${ECHO_T}$psblas_cv_pessl_blacs" >&6; } + { $as_echo "$as_me:$LINENO: result: $psblas_cv_pessl_blacs" >&5 +$as_echo "$psblas_cv_pessl_blacs" >&6; } LIBS="$save_LIBS"; fi if test "x$psblas_cv_pessl_blacs" == "xyes"; then @@ -10022,11 +22851,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do if test x"$pac_check_libs_ok" == xno ; then - as_ac_Lib=`echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 -echo $ECHO_N "checking for $pac_check_libs_f in -l$pac_check_libs_l... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$pac_check_libs_l $LIBS" @@ -10041,34 +22870,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" fi @@ -10080,8 +22916,8 @@ fi psblas_cv_blacs_ok=yes; LIBS="$LIBS $pac_check_libs_LIBS " psblas_have_netlib_blacs=yes; BLACS_LIBS="$pac_check_libs_LIBS" - { echo "$as_me:$LINENO: BLACS libraries detected." >&5 -echo "$as_me: BLACS libraries detected." >&6;} + { $as_echo "$as_me:$LINENO: BLACS libraries detected." >&5 +$as_echo "$as_me: BLACS libraries detected." >&6;} else pac_check_libs_ok=no @@ -10104,11 +22940,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu do if test x"$pac_check_libs_ok" == xno ; then - as_ac_Lib=`echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 -echo $ECHO_N "checking for $pac_check_libs_f in -l$pac_check_libs_l... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$pac_check_libs_l $LIBS" @@ -10123,34 +22959,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" fi @@ -10161,8 +23004,8 @@ fi if test x"$pac_check_libs_ok" = xyes ; then psblas_cv_blacs_ok=yes; LIBS="$pac_check_libs_LIBS $LIBS" BLACS_LIBS="$pac_check_libs_LIBS $BLACS_LIBS" - { echo "$as_me:$LINENO: Netlib BLACS Fortran initialization libraries detected." >&5 -echo "$as_me: Netlib BLACS Fortran initialization libraries detected." >&6;} + { $as_echo "$as_me:$LINENO: Netlib BLACS Fortran initialization libraries detected." >&5 +$as_echo "$as_me: Netlib BLACS Fortran initialization libraries detected." >&6;} else pac_check_libs_ok=no @@ -10188,11 +23031,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu do if test x"$pac_check_libs_ok" == xno ; then - as_ac_Lib=`echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 -echo $ECHO_N "checking for $pac_check_libs_f in -l$pac_check_libs_l... $ECHO_C" >&6; } + as_ac_Lib=`$as_echo "ac_cv_lib_$pac_check_libs_l''_$pac_check_libs_f" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $pac_check_libs_f in -l$pac_check_libs_l" >&5 +$as_echo_n "checking for $pac_check_libs_f in -l$pac_check_libs_l... " >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$pac_check_libs_l $LIBS" @@ -10232,34 +23075,41 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Lib'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then pac_check_libs_ok=yes; pac_check_libs_LIBS="-l$pac_check_libs_l" fi @@ -10270,8 +23120,8 @@ fi if test x"$pac_check_libs_ok" = xyes ; then psblas_cv_blacs_ok=yes; LIBS="$pac_check_libs_LIBS $LIBS" BLACS_LIBS="$BLACS_LIBS $pac_check_libs_LIBS" - { echo "$as_me:$LINENO: Netlib BLACS C initialization libraries detected." >&5 -echo "$as_me: Netlib BLACS C initialization libraries detected." >&6;} + { $as_echo "$as_me:$LINENO: Netlib BLACS C initialization libraries detected." >&5 +$as_echo "$as_me: Netlib BLACS C initialization libraries detected." >&6;} else pac_check_libs_ok=no @@ -10284,11 +23134,11 @@ echo "$as_me: Netlib BLACS C initialization libraries detected." >&6;} fi if test x"$BLACS_LIBS" == "x" ; then - { { echo "$as_me:$LINENO: error: + { { $as_echo "$as_me:$LINENO: error: No BLACS library detected! $PACKAGE_NAME will be unusable. Please make sure a BLACS implementation is accessible (ex.: --with-blacs=\"-lblacsname -L/blacs/dir\" ) " >&5 -echo "$as_me: error: +$as_echo "$as_me: error: No BLACS library detected! $PACKAGE_NAME will be unusable. Please make sure a BLACS implementation is accessible (ex.: --with-blacs=\"-lblacsname -L/blacs/dir\" ) " >&2;} @@ -10296,8 +23146,8 @@ echo "$as_me: error: else save_LIBS="$LIBS"; LIBS="$BLACS_LIBS $LIBS" - { echo "$as_me:$LINENO: checking for ksendid in $BLACS_LIBS" >&5 -echo $ECHO_N "checking for ksendid in $BLACS_LIBS... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for ksendid in $BLACS_LIBS" >&5 +$as_echo_n "checking for ksendid in $BLACS_LIBS... " >&6; } ac_ext=${ac_fc_srcext-f} ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5' @@ -10314,30 +23164,34 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_fc_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then psblas_cv_have_sendid=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 psblas_cv_have_sendid=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $psblas_cv_have_sendid" >&5 -echo "${ECHO_T}$psblas_cv_have_sendid" >&6; } + { $as_echo "$as_me:$LINENO: result: $psblas_cv_have_sendid" >&5 +$as_echo "$psblas_cv_have_sendid" >&6; } LIBS="$save_LIBS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -10353,17 +23207,17 @@ fi FC="$save_FC"; CC="$save_CC"; -{ echo "$as_me:$LINENO: checking for gnumake" >&5 -echo $ECHO_N "checking for gnumake... $ECHO_C" >&6; } +{ $as_echo "$as_me:$LINENO: checking for gnumake" >&5 +$as_echo_n "checking for gnumake... " >&6; } MAKE=${MAKE:-make} if $MAKE --version 2>&1 | grep -e"GNU Make" >/dev/null; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } psblas_make_gnumake='yes' else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } psblas_make_gnumake='no' fi @@ -10391,10 +23245,10 @@ fi if test "x$psblas_cv_metis" != "x" ; then - { echo "$as_me:$LINENO: checking for METIS_PartGraphRecursive in -l\"m\"" >&5 -echo $ECHO_N "checking for METIS_PartGraphRecursive in -l\"m\"... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for METIS_PartGraphRecursive in -l\"m\"" >&5 +$as_echo_n "checking for METIS_PartGraphRecursive in -l\"m\"... " >&6; } if test "${ac_cv_lib__m__METIS_PartGraphRecursive+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l"m" "$psblas_cv_metis" $LIBS" @@ -10434,33 +23288,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib__m__METIS_PartGraphRecursive=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib__m__METIS_PartGraphRecursive=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib__m__METIS_PartGraphRecursive" >&5 -echo "${ECHO_T}$ac_cv_lib__m__METIS_PartGraphRecursive" >&6; } -if test $ac_cv_lib__m__METIS_PartGraphRecursive = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib__m__METIS_PartGraphRecursive" >&5 +$as_echo "$ac_cv_lib__m__METIS_PartGraphRecursive" >&6; } +if test "x$ac_cv_lib__m__METIS_PartGraphRecursive" = x""yes; then psblas_cv_have_metis=yes; METIS_LIBS="$psblas_cv_metis" else psblas_cv_have_metis=no @@ -10469,10 +23327,10 @@ fi else save_LIBS="$LIBS"; LIBS="-lm $LIBS"; - { echo "$as_me:$LINENO: checking for METIS_PartGraphRecursive in -lmetis" >&5 -echo $ECHO_N "checking for METIS_PartGraphRecursive in -lmetis... $ECHO_C" >&6; } + { $as_echo "$as_me:$LINENO: checking for METIS_PartGraphRecursive in -lmetis" >&5 +$as_echo_n "checking for METIS_PartGraphRecursive in -lmetis... " >&6; } if test "${ac_cv_lib_metis_METIS_PartGraphRecursive+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmetis $LIBS" @@ -10512,33 +23370,37 @@ case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_metis_METIS_PartGraphRecursive=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_metis_METIS_PartGraphRecursive=no fi +rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_metis_METIS_PartGraphRecursive" >&5 -echo "${ECHO_T}$ac_cv_lib_metis_METIS_PartGraphRecursive" >&6; } -if test $ac_cv_lib_metis_METIS_PartGraphRecursive = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_metis_METIS_PartGraphRecursive" >&5 +$as_echo "$ac_cv_lib_metis_METIS_PartGraphRecursive" >&6; } +if test "x$ac_cv_lib_metis_METIS_PartGraphRecursive" = x""yes; then psblas_cv_have_metis=yes;METIS_LIBS="-lmetis" else psblas_cv_have_metis=no @@ -10609,6 +23471,7 @@ UTILLIBNAME=libpsb_util.a + if test "X$psblas_make_gnumake" == "Xyes" ; then @@ -10621,7 +23484,7 @@ $(.mod).o: %.o: %.c - $(CC) $(F90COPT) $(CINCLUDES) $(CDEFINES) -c $< + $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< %.o: %.f $(FC) $(FCOPT) $(FINCLUDES) -c $< %$(.mod): %.f @@ -10630,10 +23493,6 @@ $(.mod).o: $(F90) $(F90COPT) $(FINCLUDES) -c $< %$(.mod): %.f90 $(F90) $(F90COPT) $(FINCLUDES) -c $< -%.o: %.f03 - $(F90) $(F90COPT) $(FINCLUDES) -c $< -%$(.mod): %.f03 - $(F90) $(F90COPT) $(FINCLUDES) -c $< %.o: %.F $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< %$(.mod): %.F @@ -10641,11 +23500,7 @@ $(.mod).o: %.o: %.F90 $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< %$(.mod): %.F90 - $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< -%.o: %.F03 - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< -%$(.mod): %.F03 - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' else @@ -10668,10 +23523,6 @@ $(.mod).o: $(F90) $(F90COPT) $(FINCLUDES) -c $< .f90.o: $(F90) $(F90COPT) $(FINCLUDES) -c $< -.f03$(.mod): - $(F03) $(F90COPT) $(FINCLUDES) -c $< -.f03.o: - $(F03) $(F90COPT) $(FINCLUDES) -c $< .F.o: $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< .F$(.mod): @@ -10679,11 +23530,7 @@ $(.mod).o: .F90.o: $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< .F90$(.mod): - $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< -.F03.o: - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< -.F03$(.mod): - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' fi @@ -10725,11 +23572,12 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac @@ -10762,12 +23610,12 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -10784,6 +23632,12 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g @@ -10813,7 +23667,7 @@ ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -10825,26 +23679,27 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -10857,7 +23712,7 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -10867,7 +23722,7 @@ DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST @@ -10889,17 +23744,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi # Support unset when possible. @@ -10915,8 +23798,6 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. @@ -10939,7 +23820,7 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi @@ -10952,17 +23833,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && @@ -10984,7 +23858,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -11035,7 +23909,7 @@ $as_unset CDPATH s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems @@ -11063,7 +23937,6 @@ case `echo -n x` in *) ECHO_N='-n';; esac - if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -11076,19 +23949,22 @@ if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -11113,10 +23989,10 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else case $1 in - -*)set "./$1";; + -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi @@ -11138,8 +24014,8 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by PSBLAS $as_me 2.2, which was -generated by GNU Autoconf 2.61. Invocation command line was +This file was extended by PSBLAS $as_me 2.3.1, which was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11152,27 +24028,34 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE Configuration files: $config_files @@ -11183,13 +24066,13 @@ $config_commands Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -PSBLAS config.status 2.2 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +PSBLAS config.status 2.3.1 +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -11197,11 +24080,12 @@ ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do @@ -11223,21 +24107,24 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 + -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -11256,27 +24143,29 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # @@ -11284,7 +24173,7 @@ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -11293,8 +24182,8 @@ do "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Make.inc") CONFIG_FILES="$CONFIG_FILES Make.inc" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done @@ -11334,231 +24223,144 @@ $debug || (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -FC!$FC$ac_delim -FCFLAGS!$FCFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -ac_ct_FC!$ac_ct_FC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -MPICC!$MPICC$ac_delim -MPILIBS!$MPILIBS$ac_delim -MPIF77!$MPIF77$ac_delim -MPIFC!$MPIFC$ac_delim -RANLIB!$RANLIB$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -FLIBS!$FLIBS$ac_delim -BLAS_LIBS!$BLAS_LIBS$ac_delim -LAPACK_LIBS!$LAPACK_LIBS$ac_delim -FDEFINES!$FDEFINES$ac_delim -CDEFINES!$CDEFINES$ac_delim -BASELIBNAME!$BASELIBNAME$ac_delim -F90!$F90$ac_delim -F90COPT!$F90COPT$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr fi -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -MPF90!$MPF90$ac_delim -MPF77!$MPF77$ac_delim -MPCC!$MPCC$ac_delim -FCOPT!$FCOPT$ac_delim -CCOPT!$CCOPT$ac_delim -FIFLAG!$FIFLAG$ac_delim -FMFLAG!$FMFLAG$ac_delim -MODEXT!$MODEXT$ac_delim -FLINK!$FLINK$ac_delim -F90LINK!$F90LINK$ac_delim -AR!$AR$ac_delim -MPIFCC!$MPIFCC$ac_delim -INSTALL!$INSTALL$ac_delim -INSTALL_DIR!$INSTALL_DIR$ac_delim -INSTALL_LIBDIR!$INSTALL_LIBDIR$ac_delim -INSTALL_INCLUDEDIR!$INSTALL_INCLUDEDIR$ac_delim -INSTALL_DOCSDIR!$INSTALL_DOCSDIR$ac_delim -BLACS_LIBS!$BLACS_LIBS$ac_delim -METIS_LIBS!$METIS_LIBS$ac_delim -CINCLUDES!$CINCLUDES$ac_delim -FINCLUDES!$FINCLUDES$ac_delim -PSBLASRULES!$PSBLASRULES$ac_delim -LIBDIR!$LIBDIR$ac_delim -PRECLIBNAME!$PRECLIBNAME$ac_delim -METHDLIBNAME!$METHDLIBNAME$ac_delim -UTILLIBNAME!$UTILLIBNAME$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 28; then + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACAWK _ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } _ACEOF - # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty @@ -11574,19 +24376,21 @@ s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; @@ -11615,26 +24419,38 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; esac ;; esac @@ -11644,7 +24460,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11670,7 +24486,7 @@ echo X"$ac_file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -11679,7 +24495,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11700,17 +24516,17 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -11755,12 +24571,13 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -11769,13 +24586,14 @@ case `sed -n '/datarootdir/ { /@infodir@/p /@localedir@/p /@mandir@/p -' $ac_file_inputs` in +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g @@ -11789,15 +24607,16 @@ _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -11808,26 +24627,33 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -11843,13 +24669,13 @@ echo "$as_me: executing $ac_file commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | +$as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11893,7 +24719,7 @@ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | +$as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11919,7 +24745,7 @@ echo X"$file" | as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -11928,7 +24754,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11949,8 +24775,8 @@ echo X"$as_dir" | test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" @@ -11967,6 +24793,11 @@ _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -11988,25 +24819,29 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi #AC_OUTPUT(Make.inc Makefile) ############################################################################### -{ echo "$as_me:$LINENO: +{ $as_echo "$as_me:$LINENO: ${PACKAGE_NAME} ${psblas_cv_version} has been configured as follows: MPF90 : ${MPF90} MPF77 : ${MPF77} - MPICC : ${MPICC} + MPCC : ${MPICC} FLINK : ${FLINK} FDEFINES : ${FDEFINES} CDEFINES : ${CDEFINES} - CFLAGS : ${CFLAGS} - FFLAGS : ${FFLAGS} - FCFLAGS : ${FCFLAGS} MODEXT : ${MODEXT} FMFLAG : ${FMFLAG} + F90COPT : ${F90COPT} + FCOPT : ${FCOPT} + CCOPT : ${CCOPT} BLAS : ${BLAS_LIBS} @@ -12025,21 +24860,21 @@ fi 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}. " >&5 -echo "$as_me: +$as_echo "$as_me: ${PACKAGE_NAME} ${psblas_cv_version} has been configured as follows: MPF90 : ${MPF90} MPF77 : ${MPF77} - MPICC : ${MPICC} + MPCC : ${MPICC} FLINK : ${FLINK} FDEFINES : ${FDEFINES} CDEFINES : ${CDEFINES} - CFLAGS : ${CFLAGS} - FFLAGS : ${FFLAGS} - FCFLAGS : ${FCFLAGS} MODEXT : ${MODEXT} FMFLAG : ${FMFLAG} + F90COPT : ${F90COPT} + FCOPT : ${FCOPT} + CCOPT : ${CCOPT} BLAS : ${BLAS_LIBS} @@ -12061,3 +24896,4 @@ echo "$as_me: ############################################################################### +>>>>>>> .merge-dx.r3592 diff --git a/configure.ac b/configure.ac index b9f8fd70..3a094a1f 100755 --- a/configure.ac +++ b/configure.ac @@ -22,8 +22,6 @@ dnl SEE : --module-path --include-path dnl NOTE : There is no cross compilation support. -dnl NOTE : missing ifort and kl* library handling.. -dnl NOTE : odd configurations like ifc + gcc still await in the mist of the unknown ############################################################################### @@ -38,11 +36,11 @@ dnl NOTE : odd configurations like ifc + gcc still await in the mist of the unkn ############################################################################### # NOTE: the literal for version (the second argument to AC_INIT should be a literal!) -AC_INIT([PSBLAS],2.2, salvatore.filippone@uniroma2.it) +AC_INIT([PSBLAS],3.0, salvatore.filippone@uniroma2.it) # VERSION is the file containing the PSBLAS version code # FIXME -psblas_cv_version="`cat VERSION`" +psblas_cv_version="3.0" # A sample source file AC_CONFIG_SRCDIR([base/modules/psb_base_mod.f90]) @@ -58,11 +56,8 @@ AC_MSG_NOTICE([ documentation, you can make your own by hand for your needs. Be sure to specify the library paths of your interest. Examples: - ./configure CFLAGS=-L/some/directory/LIB <- will force CFLAGS - CFLAGS=-L/some/directory/LIB ./configure <- will force CFLAGS - ./configure --with-cflags=-L/some/directory/LIB <- will append to CFLAGS + ./configure --with-libs=-L/some/directory/LIB <- will append to LIBS FC=mpif90 F77=$FC CC=mpicc ./configure <- will force FC,CC,F77 - FLINK=gcc FLINK=gcc ./configure <- will force FLINK,F90LINK See ./configure --help=short fore more info. -------------------------------------------------------------------------------- @@ -97,9 +92,9 @@ AC_MSG_RESULT([$INSTALL_DIR $INSTALL_INCLUDEDIR $INSTALL_LIBDIR $INSTALL_DOCSDIR # Note that the following line won't save from troubles. # AC_PROG_FC([mpxlf95 mpxlf90 mpxlf pgf95 pgf90 mpif95 mpif90 gfortran f95 f90 ifc]) -AC_PROG_FC([xlf95 xlf90 xlf pgf95 pgf90 ifort ifc gfortran]) +AC_PROG_FC([xlf95 xlf90 xlf pgf95 pgf90 ifort ifc nagfor gfortran]) #AC_PROG_FC -AC_PROG_F77([xlf pgf77 ifort ifc gfortran]) +AC_PROG_F77([xlf pgf77 ifort ifc nagfor gfortran]) AC_PROG_CC([xlc pgcc icc gcc ]) dnl AC_PROG_CXX @@ -125,14 +120,14 @@ fi 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 pgcc mpicc]) + AC_CHECK_PROGS([MPICC],[mpxlc mpcc mpicc]) fi ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for C]])]) 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 mpif77 pgf77 mpf77 ifc]) + AC_CHECK_PROGS([MPIF77],[mpxlf mpf77 mpif77]) fi ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for Fortran 77]])]) @@ -140,7 +135,7 @@ 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],[mpxlf95 mpxlf90 mpif95 mpif90 pgf95 pg90 mpf95 mpf90 ifc ]) + AC_CHECK_PROGS([MPIFC],[mpxlf95 mpxlf90 mpf95 mpf90 mpif95 mpif90 ]) fi ACX_MPI([], [AC_MSG_ERROR([[Cannot find any suitable MPI implementation for Fortran]])]) @@ -168,9 +163,9 @@ fi ############################################################################### dnl NOTE : no spaces before the comma, and no brackets before the second argument! -PAC_ARG_WITH_FLAGS(ccflags,CCFLAGS) -PAC_ARG_WITH_FLAGS(cflags,CFLAGS) -PAC_ARG_WITH_FLAGS(fflags,FFLAGS) +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) @@ -213,10 +208,9 @@ PAC_CHECK_HAVE_GFORTRAN( # Test for TR 15581, aka allocatables extensions. # PAC_FORTRAN_TEST_TR15581( - [AC_MSG_RESULT([yes.])], - [AC_MSG_ERROR([no. - Sorry, cannot build PSBLAS without support for TR15581. - Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.2.])] + [], + [AC_MSG_ERROR([Sorry, cannot build PSBLAS without support for TR15581. + Please get a Fortran compiler that supports it, e.g. GNU Fortran 4.3.])] ) if test x"$psblas_cv_fc" == "x" ; then @@ -225,30 +219,41 @@ if test x"$psblas_cv_fc" == "x" ; then # 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," - # Note : there coule be problems with old xlf compiler versions ( <10.1 ) + 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. - else - # Sun compiler detection - if eval "$MPIFC -V 2>&1 | grep Sun 2>/dev/null" ; then - psblas_cv_fc="sun" - else + 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 - if eval "$MPIFC -V 2>&1 | grep Portland 2>/dev/null" ; then - psblas_cv_fc="pg" - else - # Intel compiler identification - if eval "$MPIFC -V 2>&1 | grep Intel.*Fortran.*Compiler 2>/dev/null" ; then - psblas_cv_fc="ifc" - else - psblas_cv_fc="" - # unsupported MPI Fortran compiler - AC_MSG_ERROR([[Unknown compiler ! Make sure your Fortran compiler is specified as compatible in the documentation!]]) - fi - fi - fi + + 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.3 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") @@ -266,7 +271,14 @@ 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%%,*}] @@ -321,19 +333,13 @@ AC_MSG_RESULT([ $pac_f_c_names ]) # Make.inc generation logic ############################################################################### -# Note : This script is sensitive to FFLAGS, FCFLAGS, CFLAGS variables. -# Note : We cannot be sure whether ./configure test programs will use these *FLAGS. -dnl Note: CFLAGS == '' is a rare condition, but we provide mechanism, not policy. -dnl So we prefer: - -if test "X$CFLAGS" == "X" ; then -dnl over -dnl if true ; then +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 assignations + # 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" @@ -348,15 +354,16 @@ dnl if true ; 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 -else - CCOPT="${CFLAGS}" fi CFLAGS="${CCOPT}" -if test "X$FFLAGS" == "X" ; then +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) @@ -374,16 +381,21 @@ if test "X$FFLAGS" == "X" ; then 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 -else - FCOPT="${FFLAGS}" +fi +if test "X$psblas_cv_fc" == X"nag" ; then + # Add needed options + FCOPT="$FCOPT -mismatch -dcfuns" fi FFLAGS="${FCOPT}" -if test "X$FCFLAGS" == "X" ; then +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) @@ -398,14 +410,22 @@ if test "X$FCFLAGS" == "X" ; then # other compilers .. F90COPT="-fast $F90COPT" elif test "X$psblas_cv_fc" == X"sun" ; then - # other compilers .. F90COPT="-fast $F90COPT" - # NOTE : PG & Sun use -fast instead -O3 + elif test "X$psblas_cv_fc" == X"nag" ; then + # NAG compiler + F90COPT="-O2" else + # other compilers .. F90COPT="-O2 $F90COPT" fi else - F90COPT="${FCFLAGS}" + echo "Found FCFLAGS $F90COPT" + #F90COPT="${FCFLAGS}" +fi +if test "X$psblas_cv_fc" == X"nag" ; then + # Add needed options + F90COPT="$F90COPT -mismatch -dcfuns" + EXTRA_OPT="-mismatch_all" fi FCFLAGS="${F90COPT}" @@ -414,13 +434,12 @@ FCFLAGS="${F90COPT}" ############################################################################## # Compilers variables selection ############################################################################## -if true ; then - if test "X$psblas_cv_fc" == X"xlf" ; then +if test "X$psblas_cv_fc" == X"xlf" ; then # WARNING : this is EVIL : specifying a pathname prefixed compiler will be ignored! # But this is necessary since : # - if called from some script, xlf could behave strangely # - it is not said that mpxlf95 gets chosen by the configure script. - F90="xlf95 -qsuffix=f=f90:cpp=F90" + F90="xlf95 -qsuffix=f=f90:cpp=F90" # F90="xlf95" MPF90="mpxlf95 -qsuffix=f=f90:cpp=F90" # FC="xlf" @@ -439,7 +458,7 @@ if true ; then #MPFCC="mpxlc" # Note : -qfixed should be not specified in the environment FFLAGS or things will break. # This fact should be documented somewhere. - else +else # We really think about the GCC here but this is our idea for other compilers, too. # If the user wishes to, she should specify MPICC, MPIF77 after ./configure. # Note: this behavious should be documented. @@ -449,9 +468,9 @@ if true ; then MPF77=${MPIFC} CC=${CC} MPCC=${MPICC} - fi fi + ############################################################################## # Choice of our compilers, needed by Make.inc ############################################################################## @@ -630,6 +649,7 @@ AC_SUBST(MPF77) AC_SUBST(MPCC) AC_SUBST(FCOPT) AC_SUBST(CCOPT) +AC_SUBST(EXTRA_OPT) AC_SUBST(FIFLAG) AC_SUBST(FMFLAG) AC_SUBST(MODEXT) @@ -667,7 +687,7 @@ $(.mod).o: %.o: %.c - $(CC) $(F90COPT) $(CINCLUDES) $(CDEFINES) -c $< + $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< %.o: %.f $(FC) $(FCOPT) $(FINCLUDES) -c $< %$(.mod): %.f @@ -676,10 +696,6 @@ $(.mod).o: $(F90) $(F90COPT) $(FINCLUDES) -c $< %$(.mod): %.f90 $(F90) $(F90COPT) $(FINCLUDES) -c $< -%.o: %.f03 - $(F90) $(F90COPT) $(FINCLUDES) -c $< -%$(.mod): %.f03 - $(F90) $(F90COPT) $(FINCLUDES) -c $< %.o: %.F $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< %$(.mod): %.F @@ -688,10 +704,15 @@ $(.mod).o: $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< %$(.mod): %.F90 $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< + +%.o: %.f03 + $(F90) $(F90COPT) $(FINCLUDES) -c $< +%$(.mod): %.f03 + $(F90) $(F90COPT) $(FINCLUDES) -c $< %.o: %.F03 - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< %$(.mod): %.F03 - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' else @@ -714,10 +735,6 @@ $(.mod).o: $(F90) $(F90COPT) $(FINCLUDES) -c $< .f90.o: $(F90) $(F90COPT) $(FINCLUDES) -c $< -.f03$(.mod): - $(F03) $(F90COPT) $(FINCLUDES) -c $< -.f03.o: - $(F03) $(F90COPT) $(FINCLUDES) -c $< .F.o: $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< .F$(.mod): @@ -726,10 +743,14 @@ $(.mod).o: $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< .F90$(.mod): $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< +.f03$(.mod): + $(F90) $(F90COPT) $(FINCLUDES) -c $< +.f03.o: + $(F90) $(F90COPT) $(FINCLUDES) -c $< .F03.o: - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< .F03$(.mod): - $(F03) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' + $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<' fi AC_SUBST(PSBLASRULES) @@ -753,20 +774,20 @@ AC_MSG_NOTICE([ MPF90 : ${MPF90} MPF77 : ${MPF77} - MPICC : ${MPICC} + MPCC : ${MPICC} dnl F90LINK : ${F90LINK} FLINK : ${FLINK} FDEFINES : ${FDEFINES} CDEFINES : ${CDEFINES} - CFLAGS : ${CFLAGS} - FFLAGS : ${FFLAGS} - FCFLAGS : ${FCFLAGS} +dnl CFLAGS : ${CFLAGS} +dnl FFLAGS : ${FFLAGS} +dnl FCFLAGS : ${FCFLAGS} MODEXT : ${MODEXT} FMFLAG : ${FMFLAG} -dnl F90COPT : ${F90COPT} -dnl FCOPT : ${FCOPT} -dnl CCOPT : ${CCOPT} + F90COPT : ${F90COPT} + FCOPT : ${FCOPT} + CCOPT : ${CCOPT} dnl ESSL/PESSL : ${psblas_cv_have_essl} / ${psblas_cv_have_pessl} diff --git a/krylov/psb_scgstab.F90 b/krylov/psb_scgstab.F90 index 53c6e8f5..746db4d2 100644 --- a/krylov/psb_scgstab.F90 +++ b/krylov/psb_scgstab.F90 @@ -270,7 +270,7 @@ Subroutine psb_scgstab(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop) & ' Iteration: ',itx rho_old = rho - rho = psb_gexdot(q,r,desc_a,info) + rho = psb_gedot(q,r,desc_a,info) if (rho==dzero) then if (debug_level >= psb_debug_ext_) & @@ -301,7 +301,7 @@ Subroutine psb_scgstab(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop) imerr = MPE_Log_event( imme, 0, "ed SPMM" ) #endif - sigma = psb_gexdot(q,v,desc_a,info) + sigma = psb_gedot(q,v,desc_a,info) if (sigma==dzero) then if (debug_level >= psb_debug_ext_) & & write(debug_unit,*) me,' ',trim(name),& @@ -338,7 +338,7 @@ Subroutine psb_scgstab(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop) goto 9999 end if - sigma = psb_gexdot(t,t,desc_a,info) + sigma = psb_gedot(t,t,desc_a,info) if (sigma==dzero) then if (debug_level >= psb_debug_ext_) & & write(debug_unit,*) me,' ',trim(name),& @@ -346,7 +346,7 @@ Subroutine psb_scgstab(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop) exit iteration endif - tau = psb_gexdot(t,s,desc_a,info) + tau = psb_gedot(t,s,desc_a,info) omega = tau/sigma if (omega==szero) then diff --git a/prec/psb_cdiagsc_bld.f90 b/prec/psb_cdiagsc_bld.f90 index e19fca92..a25f0129 100644 --- a/prec/psb_cdiagsc_bld.f90 +++ b/prec/psb_cdiagsc_bld.f90 @@ -35,11 +35,11 @@ subroutine psb_cdiagsc_bld(a,desc_a,p,upd,info) use psb_prec_mod, psb_protect_name => psb_cdiagsc_bld Implicit None - type(psb_cspmat_type), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_cprec_type),intent(inout) :: p - character, intent(in) :: upd - integer, intent(out) :: info + type(psb_cspmat_type), intent(in), target :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_cprec_type),intent(inout) :: p + character, intent(in) :: upd + integer, intent(out) :: info ! Local scalars diff --git a/prec/psb_cprc_aply.f90 b/prec/psb_cprc_aply.f90 index 842b77e8..f8563547 100644 --- a/prec/psb_cprc_aply.f90 +++ b/prec/psb_cprc_aply.f90 @@ -42,7 +42,7 @@ subroutine psb_cprc_aply(prec,x,y,desc_data,info,trans, work) complex(psb_spk_),intent(inout) :: y(:) integer, intent(out) :: info character(len=1), optional :: trans - complex(psb_spk_), optional, target :: work(:) + complex(psb_spk_), intent(inout), optional, target :: work(:) ! Local variables character :: trans_ diff --git a/prec/psb_cprecbld.f90 b/prec/psb_cprecbld.f90 index de984ccb..905ec62b 100644 --- a/prec/psb_cprecbld.f90 +++ b/prec/psb_cprecbld.f90 @@ -35,7 +35,7 @@ subroutine psb_cprecbld(a,desc_a,p,info,upd) use psb_prec_mod, psb_protect_name => psb_cprecbld Implicit None - type(psb_cspmat_type), target :: a + type(psb_cspmat_type), intent(in), target :: a type(psb_desc_type), intent(in), target :: desc_a type(psb_cprec_type),intent(inout) :: p integer, intent(out) :: info diff --git a/prec/psb_ddiagsc_bld.f90 b/prec/psb_ddiagsc_bld.f90 index 26f07580..b7cdc49b 100644 --- a/prec/psb_ddiagsc_bld.f90 +++ b/prec/psb_ddiagsc_bld.f90 @@ -35,11 +35,11 @@ subroutine psb_ddiagsc_bld(a,desc_a,p,upd,info) use psb_prec_mod, psb_protect_name => psb_ddiagsc_bld Implicit None - type(psb_dspmat_type), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_dprec_type),intent(inout) :: p - character, intent(in) :: upd - integer, intent(out) :: info + type(psb_dspmat_type), intent(in), target :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_dprec_type),intent(inout) :: p + character, intent(in) :: upd + integer, intent(out) :: info ! Local scalars diff --git a/prec/psb_dprc_aply.f90 b/prec/psb_dprc_aply.f90 index ea3bc07e..d2e4692b 100644 --- a/prec/psb_dprc_aply.f90 +++ b/prec/psb_dprc_aply.f90 @@ -41,7 +41,7 @@ subroutine psb_dprc_aply(prec,x,y,desc_data,info,trans, work) real(psb_dpk_),intent(inout) :: y(:) integer, intent(out) :: info character(len=1), optional :: trans - real(psb_dpk_), optional, target :: work(:) + real(psb_dpk_), intent(inout), optional, target :: work(:) ! Local variables character :: trans_ diff --git a/prec/psb_dprecbld.f90 b/prec/psb_dprecbld.f90 index 8868e823..ddbb1d80 100644 --- a/prec/psb_dprecbld.f90 +++ b/prec/psb_dprecbld.f90 @@ -35,7 +35,7 @@ subroutine psb_dprecbld(a,desc_a,p,info,upd) use psb_prec_mod, psb_protect_name => psb_dprecbld Implicit None - type(psb_dspmat_type), target :: a + type(psb_dspmat_type), intent(in), target :: a type(psb_desc_type), intent(in), target :: desc_a type(psb_dprec_type),intent(inout) :: p integer, intent(out) :: info diff --git a/prec/psb_sdiagsc_bld.f90 b/prec/psb_sdiagsc_bld.f90 index 24e776a3..8572b5e6 100644 --- a/prec/psb_sdiagsc_bld.f90 +++ b/prec/psb_sdiagsc_bld.f90 @@ -35,11 +35,11 @@ subroutine psb_sdiagsc_bld(a,desc_a,p,upd,info) use psb_prec_mod, psb_protect_name => psb_sdiagsc_bld Implicit None - type(psb_sspmat_type), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_sprec_type),intent(inout) :: p - character, intent(in) :: upd - integer, intent(out) :: info + type(psb_sspmat_type), intent(in), target :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_sprec_type),intent(inout) :: p + character, intent(in) :: upd + integer, intent(out) :: info ! Local scalars diff --git a/prec/psb_sprc_aply.f90 b/prec/psb_sprc_aply.f90 index 7b67d3ef..a011e357 100644 --- a/prec/psb_sprc_aply.f90 +++ b/prec/psb_sprc_aply.f90 @@ -41,7 +41,7 @@ subroutine psb_sprc_aply(prec,x,y,desc_data,info,trans, work) real(psb_spk_),intent(inout) :: y(:) integer, intent(out) :: info character(len=1), optional :: trans - real(psb_spk_), optional, target :: work(:) + real(psb_spk_), intent(inout), optional, target :: work(:) ! Local variables character :: trans_ diff --git a/prec/psb_sprecbld.f90 b/prec/psb_sprecbld.f90 index 4dbea55b..fd69462e 100644 --- a/prec/psb_sprecbld.f90 +++ b/prec/psb_sprecbld.f90 @@ -35,7 +35,7 @@ subroutine psb_sprecbld(a,desc_a,p,info,upd) use psb_prec_mod, psb_protect_name => psb_sprecbld Implicit None - type(psb_sspmat_type), target :: a + type(psb_sspmat_type), intent(in), target :: a type(psb_desc_type), intent(in), target :: desc_a type(psb_sprec_type),intent(inout) :: p integer, intent(out) :: info diff --git a/prec/psb_zdiagsc_bld.f90 b/prec/psb_zdiagsc_bld.f90 index 2d4c6ee5..6be38d78 100644 --- a/prec/psb_zdiagsc_bld.f90 +++ b/prec/psb_zdiagsc_bld.f90 @@ -35,11 +35,11 @@ subroutine psb_zdiagsc_bld(a,desc_a,p,upd,info) use psb_prec_mod, psb_protect_name => psb_zdiagsc_bld Implicit None - type(psb_zspmat_type), target :: a - type(psb_desc_type), intent(in) :: desc_a - type(psb_zprec_type),intent(inout) :: p - character, intent(in) :: upd - integer, intent(out) :: info + type(psb_zspmat_type), intent(in), target :: a + type(psb_desc_type), intent(in) :: desc_a + type(psb_zprec_type),intent(inout) :: p + character, intent(in) :: upd + integer, intent(out) :: info ! Local scalars diff --git a/prec/psb_zprc_aply.f90 b/prec/psb_zprc_aply.f90 index b8d869ea..8ed701c3 100644 --- a/prec/psb_zprc_aply.f90 +++ b/prec/psb_zprc_aply.f90 @@ -42,7 +42,7 @@ subroutine psb_zprc_aply(prec,x,y,desc_data,info,trans, work) complex(psb_dpk_),intent(inout) :: y(:) integer, intent(out) :: info character(len=1), optional :: trans - complex(psb_dpk_), optional, target :: work(:) + complex(psb_dpk_), intent(inout), optional, target :: work(:) ! Local variables character :: trans_ diff --git a/prec/psb_zprecbld.f90 b/prec/psb_zprecbld.f90 index 94e931a3..8dfac0c7 100644 --- a/prec/psb_zprecbld.f90 +++ b/prec/psb_zprecbld.f90 @@ -35,7 +35,7 @@ subroutine psb_zprecbld(a,desc_a,p,info,upd) use psb_prec_mod, psb_protect_name => psb_zprecbld Implicit None - type(psb_zspmat_type), target :: a + type(psb_zspmat_type), intent(in), target :: a type(psb_desc_type), intent(in), target :: desc_a type(psb_zprec_type),intent(inout) :: p integer, intent(out) :: info diff --git a/test/fileread/cf_sample.f90 b/test/fileread/cf_sample.f90 index 932b9b96..f9ae83c2 100644 --- a/test/fileread/cf_sample.f90 +++ b/test/fileread/cf_sample.f90 @@ -165,15 +165,15 @@ program cf_sample ! switch over different partition types if (ipart == 0) then - call psb_barrier(ictxt) - if (iam==psb_root_) write(*,'("Partition type: block")') - allocate(ivg(m_problem),ipv(np)) - do i=1,m_problem - call part_block(i,m_problem,np,ipv,nv) - ivg(i) = ipv(1) - enddo - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_barrier(ictxt) + if (iam==psb_root_) write(*,'("Partition type: block")') + allocate(ivg(m_problem),ipv(np)) + do i=1,m_problem + call part_block(i,m_problem,np,ipv,nv) + ivg(i) = ipv(1) + enddo + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (ipart == 2) then if (iam==psb_root_) then write(*,'("Partition type: graph")') @@ -184,12 +184,12 @@ program cf_sample call psb_barrier(ictxt) call distr_mtpart(psb_root_,ictxt) call getv_mtpart(ivg) - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (iam==psb_root_) write(*,'("Partition type: block")') - call psb_matdist(aux_a, a, part_block, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,parts=part_block) end if call psb_geall(x_col,desc_a,info) diff --git a/test/fileread/df_sample.f90 b/test/fileread/df_sample.f90 index c55875ef..bba9629f 100644 --- a/test/fileread/df_sample.f90 +++ b/test/fileread/df_sample.f90 @@ -175,8 +175,8 @@ program df_sample call part_block(i,m_problem,np,ipv,nv) ivg(i) = ipv(1) enddo - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (ipart == 2) then if (iam==psb_root_) then write(*,'("Partition type: graph")') @@ -187,12 +187,12 @@ program df_sample call psb_barrier(ictxt) call distr_mtpart(psb_root_,ictxt) call getv_mtpart(ivg) - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (iam==psb_root_) write(*,'("Partition type: block")') - call psb_matdist(aux_a, a, part_block, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,parts=part_block) end if call psb_geall(x_col,desc_a,info) diff --git a/test/fileread/sf_sample.f90 b/test/fileread/sf_sample.f90 index c871afb6..b94fbd56 100644 --- a/test/fileread/sf_sample.f90 +++ b/test/fileread/sf_sample.f90 @@ -172,8 +172,8 @@ program sf_sample call part_block(i,m_problem,np,ipv,nv) ivg(i) = ipv(1) enddo - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (ipart == 2) then if (iam==psb_root_) then write(*,'("Partition type: graph")') @@ -184,12 +184,12 @@ program sf_sample call psb_barrier(ictxt) call distr_mtpart(psb_root_,ictxt) call getv_mtpart(ivg) - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (iam==psb_root_) write(*,'("Partition type: block")') - call psb_matdist(aux_a, a, part_block, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,parts=part_block) end if call psb_geall(x_col,desc_a,info) diff --git a/test/fileread/zf_sample.f90 b/test/fileread/zf_sample.f90 index 420ac093..13522aba 100644 --- a/test/fileread/zf_sample.f90 +++ b/test/fileread/zf_sample.f90 @@ -165,15 +165,15 @@ program zf_sample ! switch over different partition types if (ipart == 0) then - call psb_barrier(ictxt) - if (iam==psb_root_) write(*,'("Partition type: block")') - allocate(ivg(m_problem),ipv(np)) - do i=1,m_problem - call part_block(i,m_problem,np,ipv,nv) - ivg(i) = ipv(1) - enddo - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_barrier(ictxt) + if (iam==psb_root_) write(*,'("Partition type: block")') + allocate(ivg(m_problem),ipv(np)) + do i=1,m_problem + call part_block(i,m_problem,np,ipv,nv) + ivg(i) = ipv(1) + enddo + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (ipart == 2) then if (iam==psb_root_) then write(*,'("Partition type: graph")') @@ -184,12 +184,12 @@ program zf_sample call psb_barrier(ictxt) call distr_mtpart(psb_root_,ictxt) call getv_mtpart(ivg) - call psb_matdist(aux_a, a, ivg, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,v=ivg) else if (iam==psb_root_) write(*,'("Partition type: block")') - call psb_matdist(aux_a, a, part_block, ictxt, & - & desc_a,b_col_glob,b_col,info,fmt=afmt) + call psb_matdist(aux_a, a, ictxt, & + & desc_a,b_col_glob,b_col,info,fmt=afmt,parts=part_block) end if call psb_geall(x_col,desc_a,info) diff --git a/test/pargen/ppde.f90 b/test/pargen/ppde.f90 index 41059eb0..cd43e08f 100644 --- a/test/pargen/ppde.f90 +++ b/test/pargen/ppde.f90 @@ -383,7 +383,7 @@ contains m = idim*idim*idim n = m nnz = ((n*9)/(np)) - if(iam == psb_root_) write(0,'("Generating Matrix (size=",i0x,")...")')n + if(iam == psb_root_) write(0,'("Generating Matrix (size=",i0,")...")')n ! ! Using a simple BLOCK distribution. diff --git a/test/pargen/runs/ppde.inp b/test/pargen/runs/ppde.inp index c7d41af5..1a5854fe 100644 --- a/test/pargen/runs/ppde.inp +++ b/test/pargen/runs/ppde.inp @@ -7,5 +7,3 @@ CSR Storage format for matrix A: CSR COO JAD 200 MAXIT -1 ITRACE 20 IRST restart for RGMRES and BiCGSTABL - - diff --git a/test/pargen/spde.f90 b/test/pargen/spde.f90 index baecb2c2..ff6caa87 100644 --- a/test/pargen/spde.f90 +++ b/test/pargen/spde.f90 @@ -381,7 +381,7 @@ contains m = idim*idim*idim n = m nnz = ((n*9)/(np)) - if(iam == psb_root_) write(0,'("Generating Matrix (size=",i0x,")...")')n + if(iam == psb_root_) write(0,'("Generating Matrix (size=",i0,")...")')n ! ! Using a simple BLOCK distribution. diff --git a/util/psb_mat_dist_mod.f90 b/util/psb_mat_dist_mod.f90 index 90ccf610..6c6b26f7 100644 --- a/util/psb_mat_dist_mod.f90 +++ b/util/psb_mat_dist_mod.f90 @@ -32,15 +32,14 @@ module psb_mat_dist_mod interface psb_matdist - module procedure smatdistf, smatdistv, cmatdistv, cmatdistf, & - & dmatdistf, dmatdistv, zmatdistf, zmatdistv + module procedure smatdist, cmatdist, dmatdist, zmatdist end interface contains - subroutine smatdistf (a_glob, a, parts, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) + subroutine smatdist(a_glob, a, ictxt, desc_a,& + & b_glob, b, info, parts, v, inroot,fmt) ! ! an utility subroutine to distribute a matrix among processors ! according to a user defined data distribution, using @@ -110,9 +109,9 @@ contains integer, intent(out) :: info integer, optional :: inroot character(len=5), optional :: fmt - interface - ! .....user passed subroutine..... + integer :: v(:) + interface subroutine parts(global_indx,n,np,pv,nv) implicit none integer, intent(in) :: global_indx, n, np @@ -120,8 +119,10 @@ contains integer, intent(out) :: pv(*) end subroutine parts end interface + optional :: parts, v ! local variables + logical :: use_parts, use_v integer :: np, iam integer :: length_row, i_count, j_count,& & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& @@ -165,6 +166,15 @@ contains nnzero = size(a_glob%aspk) nrhs = 1 endif + + use_parts = present(parts) + use_v = present(v) + if (count((/ use_parts, use_v /)) /= 1) then + info=581 + call psb_errpush(info,name,a_err=" v, parts") + goto 9999 + endif + ! broadcast informations to other processors call psb_bcast(ictxt,nrow, root) call psb_bcast(ictxt,ncol, root) @@ -182,14 +192,18 @@ contains write (*, fmt = *) 'start matdist',root, size(iwork),& &nrow, ncol, nnzero,nrhs endif - call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) + if (use_parts) then + call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) + else + call psb_cdall(ictxt,desc_a,info,vg=v) + end if if(info/=0) then info=4010 ch_err='psb_cdall' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - call psb_spall(a,desc_a,info,nnz=nnzero/np) + call psb_spall(a,desc_a,info,nnz=((nnzero+np-1)/np)) if(info/=0) then info=4010 ch_err='psb_psspall' @@ -219,20 +233,34 @@ contains do while (i_count <= nrow) - call parts(i_count,nrow,np,iwork, length_row) - - if (length_row == 1) then + if (use_parts) then + call parts(i_count,nrow,np,iwork, length_row) + if (length_row == 1) then + j_count = i_count + iproc = iwork(1) + do + j_count = j_count + 1 + if (j_count-i_count >= nb) exit + if (j_count > nrow) exit + call parts(j_count,nrow,np,iwork, length_row) + if (length_row /= 1 ) exit + if (iwork(1) /= iproc ) exit + end do + end if + else + length_row = 1 j_count = i_count - iproc = iwork(1) + iproc = v(i_count) + do j_count = j_count + 1 if (j_count-i_count >= nb) exit if (j_count > nrow) exit - call parts(j_count,nrow,np,iwork, length_row) - if (length_row /= 1 ) exit - if (iwork(1) /= iproc ) exit + if (v(j_count) /= iproc ) exit end do - + end if + + if (length_row == 1) then ! now we should insert rows i_count..j_count-1 nnr = j_count - i_count @@ -320,6 +348,7 @@ contains i_count = j_count else + ! here processors are counted 1..np do j_count = 1, length_row k_count = iwork(j_count) @@ -457,335 +486,10 @@ contains end if return - end subroutine smatdistf - - - subroutine smatdistv (a_glob, a, v, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) - ! - ! an utility subroutine to distribute a matrix among processors - ! according to a user defined data distribution, using - ! sparse matrix subroutines. - ! - ! type(d_spmat) :: a_glob - ! on entry: this contains the global sparse matrix as follows: - ! a%fida =='csr' - ! a%aspk for coefficient values - ! a%ia1 for column indices - ! a%ia2 for row pointers - ! a%m for number of global matrix rows - ! a%k for number of global matrix columns - ! on exit : undefined, with unassociated pointers. - ! - ! type(d_spmat) :: a - ! on entry: fresh variable. - ! on exit : this will contain the local sparse matrix. - ! - ! interface parts - ! ! .....user passed subroutine..... - ! subroutine parts(global_indx,n,np,pv,nv) - ! implicit none - ! integer, intent(in) :: global_indx, n, np - ! integer, intent(out) :: nv - ! integer, intent(out) :: pv(*) - ! - ! end subroutine parts - ! end interface - ! on entry: subroutine providing user defined data distribution. - ! for each global_indx the subroutine should return - ! the list pv of all processes owning the row with - ! that index; the list will contain nv entries. - ! usually nv=1; if nv >1 then we have an overlap in the data - ! distribution. - ! - ! integer :: ictxt - ! on entry: blacs context. - ! on exit : unchanged. - ! - ! type (desc_type) :: desc_a - ! on entry: fresh variable. - ! on exit : the updated array descriptor - ! - ! real(psb_dpk_), optional :: b_glob(:) - ! on entry: this contains right hand side. - ! on exit : - ! - ! real(psb_dpk_), allocatable, optional :: b(:) - ! on entry: fresh variable. - ! on exit : this will contain the local right hand side. - ! - ! integer, optional :: inroot - ! on entry: specifies processor holding a_glob. default: 0 - ! on exit : unchanged. - ! - use psb_base_mod - implicit none ! parameters - type(psb_sspmat_type) :: a_glob - real(psb_spk_) :: b_glob(:) - integer :: ictxt, v(:) - type(psb_sspmat_type) :: a - real(psb_spk_), allocatable :: b(:) - type(psb_desc_type) :: desc_a - integer, intent(out) :: info - integer, optional :: inroot - character(len=5), optional :: fmt - - integer :: np, iam - integer :: i_count, j_count,& - & root, liwork, nrow, ncol, nnzero, nrhs,& - & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) - integer, allocatable :: iwork(:) - character :: afmt*5 - integer, allocatable :: irow(:),icol(:) - real(psb_spk_), allocatable :: val(:) - integer, parameter :: nb=30 - logical, parameter :: newt=.true. - real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 - character(len=20) :: name, ch_err - - info = 0 - err = 0 - name = 'mat_distv' - call psb_erractionsave(err_act) - - ! executable statements - if (present(inroot)) then - root = inroot - else - root = psb_root_ - end if - - call psb_info(ictxt, iam, np) - if (iam == root) then - ! extract information from a_glob - if (psb_toupper(a_glob%fida) /= 'CSR') then - info=135 - ch_err='CSR' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - endif - - nrow = a_glob%m - ncol = a_glob%k - if (nrow /= ncol) then - write(0,*) 'a rectangular matrix ? ',nrow,ncol - info=-1 - call psb_errpush(info,name) - goto 9999 - endif - - nnzero = size(a_glob%aspk) - nrhs = 1 - end if - ! broadcast informations to other processors - call psb_bcast(ictxt,nrow, root) - call psb_bcast(ictxt,ncol, root) - call psb_bcast(ictxt,nnzero, root) - call psb_bcast(ictxt,nrhs, root) - liwork = max(np, nrow + ncol) - allocate(iwork(liwork), stat = info) - if (info /= 0) then - info=4025 - int_err(1)=liwork - call psb_errpush(info,name,i_err=int_err,a_err='integer') - goto 9999 - endif - - call psb_cdall(ictxt,desc_a,info,vg=v) - if(info/=0) then - info=4010 - ch_err='psb_cdall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_spall(a,desc_a,info,nnz=((nnzero+np-1)/np)) - if(info/=0) then - info=4010 - ch_err='psb_psspall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geall(b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_psdsall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - isize = 3*nb*max(((nnzero+nrow)/nrow),nb) - allocate(val(isize),irow(isize),icol(isize),stat=info) - - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - i_count = 1 - - do while (i_count <= nrow) - - j_count = i_count - iproc = v(i_count) - - do - j_count = j_count + 1 - if (j_count-i_count >= nb) exit - if (j_count > nrow) exit - if (v(j_count) /= iproc ) exit - end do - - ! now we should insert rows i_count..j_count-1 - nnr = j_count - i_count - - if (iam == root) then - ll = 0 - do i= i_count, j_count-1 - call psb_sp_getrow(i,a_glob,nz,& - & irow,icol,val,info,nzin=ll,append=.true.) - if (info /= 0) then - if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then - write(0,*) 'Allocation failure? This should not happen!' - end if - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - ll = ll + nz - end do - - if (iproc == iam) then - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_geins(nnr,(/(i,i=i_count,j_count-1)/),b_glob(i_count:j_count-1),& - & b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='dsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - else - call psb_snd(ictxt,nnr,iproc) - call psb_snd(ictxt,ll,iproc) - call psb_snd(ictxt,irow(1:ll),iproc) - call psb_snd(ictxt,icol(1:ll),iproc) - call psb_snd(ictxt,val(1:ll),iproc) - call psb_snd(ictxt,b_glob(i_count:j_count-1),iproc) - call psb_rcv(ictxt,ll,iproc) - endif - else if (iam /= root) then - - if (iproc == iam) then - call psb_rcv(ictxt,nnr,root) - call psb_rcv(ictxt,ll,root) - if (ll > size(val)) then - write(0,*) iam,'need to reallocate ',ll - deallocate(val,irow,icol) - allocate(val(ll),irow(ll),icol(ll),stat=info) - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - call psb_rcv(ictxt,irow(1:ll),root) - call psb_rcv(ictxt,icol(1:ll),root) - call psb_rcv(ictxt,val(1:ll),root) - call psb_rcv(ictxt,b_glob(i_count:i_count+nnr-1),root) - call psb_snd(ictxt,ll,root) - - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(nnr,(/(i,i=i_count,i_count+nnr-1)/),& - & b_glob(i_count:i_count+nnr-1),b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psdsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - endif - i_count = j_count - - end do - - ! default storage format for sparse matrix; we do not - ! expect duplicated entries. - - if (present(fmt)) then - afmt=fmt - else - afmt = 'CSR' - endif - call psb_barrier(ictxt) - t0 = psb_wtime() - call psb_cdasb(desc_a,info) - t1 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_cdasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_barrier(ictxt) - t2 = psb_wtime() - call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt) - t3 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_spasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_geasb(b,desc_a,info) - - if (iam == root) then - write(*,'("Descriptor assembly : ",es10.4)')t1-t0 - write(*,'("Sparse matrix assembly: ",es10.4)')t3-t2 - end if - - if(info/=0)then - info=4010 - ch_err='psdsasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - deallocate(iwork) - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error(ictxt) - return - end if - return - - end subroutine smatdistv + end subroutine smatdist - subroutine dmatdistf (a_glob, a, parts, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) + subroutine dmatdist(a_glob, a, ictxt, desc_a,& + & b_glob, b, info, parts, v, inroot,fmt) ! ! an utility subroutine to distribute a matrix among processors ! according to a user defined data distribution, using @@ -847,17 +551,17 @@ contains ! parameters type(psb_dspmat_type) :: a_glob - real(psb_dpk_) :: b_glob(:) + real(psb_dpk_) :: b_glob(:) integer :: ictxt type(psb_dspmat_type) :: a real(psb_dpk_), allocatable :: b(:) - type (psb_desc_type) :: desc_a + type(psb_desc_type) :: desc_a integer, intent(out) :: info integer, optional :: inroot character(len=5), optional :: fmt - interface - ! .....user passed subroutine..... + integer :: v(:) + interface subroutine parts(global_indx,n,np,pv,nv) implicit none integer, intent(in) :: global_indx, n, np @@ -865,8 +569,10 @@ contains integer, intent(out) :: pv(*) end subroutine parts end interface + optional :: parts, v ! local variables + logical :: use_parts, use_v integer :: np, iam integer :: length_row, i_count, j_count,& & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& @@ -876,7 +582,7 @@ contains integer, allocatable :: irow(:),icol(:) real(psb_dpk_), allocatable :: val(:) integer, parameter :: nb=30 - real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 + real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 character(len=20) :: name, ch_err info = 0 @@ -910,6 +616,15 @@ contains nnzero = size(a_glob%aspk) nrhs = 1 endif + + use_parts = present(parts) + use_v = present(v) + if (count((/ use_parts, use_v /)) /= 1) then + info=581 + call psb_errpush(info,name,a_err=" v, parts") + goto 9999 + endif + ! broadcast informations to other processors call psb_bcast(ictxt,nrow, root) call psb_bcast(ictxt,ncol, root) @@ -927,14 +642,18 @@ contains write (*, fmt = *) 'start matdist',root, size(iwork),& &nrow, ncol, nnzero,nrhs endif - call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) + if (use_parts) then + call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) + else + call psb_cdall(ictxt,desc_a,info,vg=v) + end if if(info/=0) then info=4010 ch_err='psb_cdall' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - call psb_spall(a,desc_a,info,nnz=nnzero/np) + call psb_spall(a,desc_a,info,nnz=((nnzero+np-1)/np)) if(info/=0) then info=4010 ch_err='psb_psspall' @@ -964,20 +683,34 @@ contains do while (i_count <= nrow) - call parts(i_count,nrow,np,iwork, length_row) - - if (length_row == 1) then + if (use_parts) then + call parts(i_count,nrow,np,iwork, length_row) + if (length_row == 1) then + j_count = i_count + iproc = iwork(1) + do + j_count = j_count + 1 + if (j_count-i_count >= nb) exit + if (j_count > nrow) exit + call parts(j_count,nrow,np,iwork, length_row) + if (length_row /= 1 ) exit + if (iwork(1) /= iproc ) exit + end do + end if + else + length_row = 1 j_count = i_count - iproc = iwork(1) + iproc = v(i_count) + do j_count = j_count + 1 if (j_count-i_count >= nb) exit if (j_count > nrow) exit - call parts(j_count,nrow,np,iwork, length_row) - if (length_row /= 1 ) exit - if (iwork(1) /= iproc ) exit + if (v(j_count) /= iproc ) exit end do - + end if + + if (length_row == 1) then ! now we should insert rows i_count..j_count-1 nnr = j_count - i_count @@ -1065,6 +798,7 @@ contains i_count = j_count else + ! here processors are counted 1..np do j_count = 1, length_row k_count = iwork(j_count) @@ -1202,14 +936,13 @@ contains end if return - end subroutine dmatdistf + end subroutine dmatdist - - subroutine dmatdistv (a_glob, a, v, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) + subroutine cmatdist(a_glob, a, ictxt, desc_a,& + & b_glob, b, info, parts, v, inroot,fmt) ! ! an utility subroutine to distribute a matrix among processors - ! according to a user defined data distribution, using + ! according to a user defined data distribution, using ! sparse matrix subroutines. ! ! type(d_spmat) :: a_glob @@ -1264,33 +997,47 @@ contains ! on exit : unchanged. ! use psb_base_mod - implicit none ! parameters - type(psb_dspmat_type) :: a_glob - real(psb_dpk_) :: b_glob(:) - integer :: ictxt, v(:) - type(psb_dspmat_type) :: a - real(psb_dpk_), allocatable :: b(:) - type(psb_desc_type) :: desc_a - integer, intent(out) :: info + implicit none + + ! parameters + type(psb_cspmat_type) :: a_glob + complex(psb_spk_) :: b_glob(:) + integer :: ictxt + type(psb_cspmat_type) :: a + complex(psb_spk_), allocatable :: b(:) + type(psb_desc_type) :: desc_a + integer, intent(out) :: info integer, optional :: inroot character(len=5), optional :: fmt + integer :: v(:) + interface + subroutine parts(global_indx,n,np,pv,nv) + implicit none + integer, intent(in) :: global_indx, n, np + integer, intent(out) :: nv + integer, intent(out) :: pv(*) + end subroutine parts + end interface + optional :: parts, v + + ! local variables + logical :: use_parts, use_v integer :: np, iam - integer :: i_count, j_count,& - & root, liwork, nrow, ncol, nnzero, nrhs,& + integer :: length_row, i_count, j_count,& + & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) integer, allocatable :: iwork(:) character :: afmt*5 integer, allocatable :: irow(:),icol(:) - real(psb_dpk_), allocatable :: val(:) + complex(psb_spk_), allocatable :: val(:) integer, parameter :: nb=30 - logical, parameter :: newt=.true. - real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 - character(len=20) :: name, ch_err + real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 + character(len=20) :: name, ch_err info = 0 err = 0 - name = 'mat_distv' + name = 'mat_distf' call psb_erractionsave(err_act) ! executable statements @@ -1299,17 +1046,15 @@ contains else root = psb_root_ end if - call psb_info(ictxt, iam, np) if (iam == root) then ! extract information from a_glob - if (psb_toupper(a_glob%fida) /= 'CSR') then + if (a_glob%fida /= 'CSR') then info=135 ch_err='CSR' call psb_errpush(info,name,a_err=ch_err) goto 9999 endif - nrow = a_glob%m ncol = a_glob%k if (nrow /= ncol) then @@ -1318,10 +1063,18 @@ contains call psb_errpush(info,name) goto 9999 endif - nnzero = size(a_glob%aspk) nrhs = 1 - end if + endif + + use_parts = present(parts) + use_v = present(v) + if (count((/ use_parts, use_v /)) /= 1) then + info=581 + call psb_errpush(info,name,a_err=" v, parts") + goto 9999 + endif + ! broadcast informations to other processors call psb_bcast(ictxt,nrow, root) call psb_bcast(ictxt,ncol, root) @@ -1335,15 +1088,21 @@ contains call psb_errpush(info,name,i_err=int_err,a_err='integer') goto 9999 endif - - call psb_cdall(ictxt,desc_a,info,vg=v) + if (iam == root) then + write (*, fmt = *) 'start matdist',root, size(iwork),& + &nrow, ncol, nnzero,nrhs + endif + if (use_parts) then + call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) + else + call psb_cdall(ictxt,desc_a,info,vg=v) + end if if(info/=0) then info=4010 ch_err='psb_cdall' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - call psb_spall(a,desc_a,info,nnz=((nnzero+np-1)/np)) if(info/=0) then info=4010 @@ -1359,9 +1118,10 @@ contains goto 9999 end if + + isize = 3*nb*max(((nnzero+nrow)/nrow),nb) allocate(val(isize),irow(isize),icol(isize),stat=info) - if(info/=0) then info=4010 ch_err='Allocate' @@ -1373,111 +1133,202 @@ contains do while (i_count <= nrow) - j_count = i_count - iproc = v(i_count) - - do - j_count = j_count + 1 - if (j_count-i_count >= nb) exit - if (j_count > nrow) exit - if (v(j_count) /= iproc ) exit - end do - - ! now we should insert rows i_count..j_count-1 - nnr = j_count - i_count - - if (iam == root) then - ll = 0 - do i= i_count, j_count-1 - call psb_sp_getrow(i,a_glob,nz,& - & irow,icol,val,info,nzin=ll,append=.true.) - if (info /= 0) then - if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then - write(0,*) 'Allocation failure? This should not happen!' - end if - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - ll = ll + nz + if (use_parts) then + call parts(i_count,nrow,np,iwork, length_row) + if (length_row == 1) then + j_count = i_count + iproc = iwork(1) + do + j_count = j_count + 1 + if (j_count-i_count >= nb) exit + if (j_count > nrow) exit + call parts(j_count,nrow,np,iwork, length_row) + if (length_row /= 1 ) exit + if (iwork(1) /= iproc ) exit + end do + end if + else + length_row = 1 + j_count = i_count + iproc = v(i_count) + + do + j_count = j_count + 1 + if (j_count-i_count >= nb) exit + if (j_count > nrow) exit + if (v(j_count) /= iproc ) exit end do + end if + + if (length_row == 1) then + ! now we should insert rows i_count..j_count-1 + nnr = j_count - i_count - if (iproc == iam) then - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_geins(nnr,(/(i,i=i_count,j_count-1)/),b_glob(i_count:j_count-1),& - & b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='dsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - else - call psb_snd(ictxt,nnr,iproc) - call psb_snd(ictxt,ll,iproc) - call psb_snd(ictxt,irow(1:ll),iproc) - call psb_snd(ictxt,icol(1:ll),iproc) - call psb_snd(ictxt,val(1:ll),iproc) - call psb_snd(ictxt,b_glob(i_count:j_count-1),iproc) - call psb_rcv(ictxt,ll,iproc) - endif - else if (iam /= root) then - - if (iproc == iam) then - call psb_rcv(ictxt,nnr,root) - call psb_rcv(ictxt,ll,root) - if (ll > size(val)) then - write(0,*) iam,'need to reallocate ',ll - deallocate(val,irow,icol) - allocate(val(ll),irow(ll),icol(ll),stat=info) + if (iam == root) then + + ll = 0 + do i= i_count, j_count-1 + call psb_sp_getrow(i,a_glob,nz,& + & irow,icol,val,info,nzin=ll,append=.true.) + if (info /= 0) then + if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then + write(0,*) 'Allocation failure? This should not happen!' + end if + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + ll = ll + nz + end do + + if (iproc == iam) then + call psb_spins(ll,irow,icol,val,a,desc_a,info) + if(info/=0) then + info=4010 + ch_err='psb_spins' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_geins(nnr,(/(i,i=i_count,j_count-1)/),b_glob(i_count:j_count-1),& + & b,desc_a,info) + if(info/=0) then + info=4010 + ch_err='psb_ins' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + else + call psb_snd(ictxt,nnr,iproc) + call psb_snd(ictxt,ll,iproc) + call psb_snd(ictxt,irow(1:ll),iproc) + call psb_snd(ictxt,icol(1:ll),iproc) + call psb_snd(ictxt,val(1:ll),iproc) + call psb_snd(ictxt,b_glob(i_count:j_count-1),iproc) + call psb_rcv(ictxt,ll,iproc) + endif + else if (iam /= root) then + + if (iproc == iam) then + call psb_rcv(ictxt,nnr,root) + call psb_rcv(ictxt,ll,root) + if (ll > size(irow)) then + write(0,*) iam,'need to reallocate ',ll + deallocate(val,irow,icol) + allocate(val(ll),irow(ll),icol(ll),stat=info) + if(info/=0) then + info=4010 + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + + endif + call psb_rcv(ictxt,irow(1:ll),root) + call psb_rcv(ictxt,icol(1:ll),root) + call psb_rcv(ictxt,val(1:ll),root) + call psb_rcv(ictxt,b_glob(i_count:i_count+nnr-1),root) + call psb_snd(ictxt,ll,root) + call psb_spins(ll,irow,icol,val,a,desc_a,info) + if(info/=0) then + info=4010 + ch_err='psspins' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_geins(nnr,(/(i,i=i_count,i_count+nnr-1)/),& + & b_glob(i_count:i_count+nnr-1),b,desc_a,info) if(info/=0) then info=4010 - ch_err='Allocate' + ch_err='psdsins' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if endif - call psb_rcv(ictxt,irow(1:ll),root) - call psb_rcv(ictxt,icol(1:ll),root) - call psb_rcv(ictxt,val(1:ll),root) - call psb_rcv(ictxt,b_glob(i_count:i_count+nnr-1),root) - call psb_snd(ictxt,ll,root) - - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(nnr,(/(i,i=i_count,i_count+nnr-1)/),& - & b_glob(i_count:i_count+nnr-1),b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psdsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if endif - endif - i_count = j_count - end do + i_count = j_count + + else + + ! here processors are counted 1..np + do j_count = 1, length_row + k_count = iwork(j_count) + if (iam == root) then + + ll = 0 + do i= i_count, i_count + call psb_sp_getrow(i,a_glob,nz,& + & irow,icol,val,info,nzin=ll,append=.true.) + if (info /= 0) then + if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then + write(0,*) 'Allocation failure? This should not happen!' + end if + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + ll = ll + nz + end do + + if (k_count == iam) then - ! default storage format for sparse matrix; we do not - ! expect duplicated entries. + call psb_spins(ll,irow,icol,val,a,desc_a,info) + if(info/=0) then + info=4010 + ch_err='psspins' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_geins(1,(/i_count/),b_glob(i_count:i_count),& + & b,desc_a,info) + if(info/=0) then + info=4010 + ch_err='psdsins' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + else + call psb_snd(ictxt,ll,k_count) + call psb_snd(ictxt,irow(1:ll),k_count) + call psb_snd(ictxt,icol(1:ll),k_count) + call psb_snd(ictxt,val(1:ll),k_count) + call psb_snd(ictxt,b_glob(i_count),k_count) + call psb_rcv(ictxt,ll,k_count) + endif + else if (iam /= root) then + if (k_count == iam) then + call psb_rcv(ictxt,ll,root) + call psb_rcv(ictxt,irow(1:ll),root) + call psb_rcv(ictxt,icol(1:ll),root) + call psb_rcv(ictxt,val(1:ll),root) + call psb_rcv(ictxt,b_glob(i_count),root) + call psb_snd(ictxt,ll,root) + call psb_spins(ll,irow,icol,val,a,desc_a,info) + if(info/=0) then + info=4010 + ch_err='psspins' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_geins(1,(/i_count/),b_glob(i_count:i_count),& + & b,desc_a,info) + if(info/=0) then + info=4010 + ch_err='psdsins' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + endif + endif + end do + i_count = i_count + 1 + endif + end do - if (present(fmt)) then + if (present(fmt)) then afmt=fmt else afmt = 'CSR' endif + call psb_barrier(ictxt) t0 = psb_wtime() call psb_cdasb(desc_a,info) @@ -1500,21 +1351,29 @@ contains goto 9999 end if - call psb_geasb(b,desc_a,info) if (iam == root) then - write(*,'("Descriptor assembly : ",es10.4)')t1-t0 - write(*,'("Sparse matrix assembly: ",es10.4)')t3-t2 + write(*,*) 'descriptor assembly: ',t1-t0 + write(*,*) 'sparse matrix assembly: ',t3-t2 end if + call psb_geasb(b,desc_a,info) if(info/=0)then info=4010 ch_err='psdsasb' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if + deallocate(val,irow,icol,stat=info) + if(info/=0)then + info=4010 + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if deallocate(iwork) + if (iam == root) write (*, fmt = *) 'end matdist' call psb_erractionrestore(err_act) return @@ -1527,10 +1386,10 @@ contains end if return - end subroutine dmatdistv + end subroutine cmatdist - subroutine cmatdistf (a_glob, a, parts, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) + subroutine zmatdist(a_glob, a, ictxt, desc_a,& + & b_glob, b, info, parts, v, inroot,fmt) ! ! an utility subroutine to distribute a matrix among processors ! according to a user defined data distribution, using @@ -1591,18 +1450,18 @@ contains implicit none ! parameters - type(psb_cspmat_type) :: a_glob - complex(psb_spk_) :: b_glob(:) + type(psb_zspmat_type) :: a_glob + complex(psb_dpk_) :: b_glob(:) integer :: ictxt - type(psb_cspmat_type) :: a - complex(psb_spk_), allocatable :: b(:) + type(psb_zspmat_type) :: a + complex(psb_dpk_), allocatable :: b(:) type(psb_desc_type) :: desc_a integer, intent(out) :: info integer, optional :: inroot character(len=5), optional :: fmt - interface - ! .....user passed subroutine..... + integer :: v(:) + interface subroutine parts(global_indx,n,np,pv,nv) implicit none integer, intent(in) :: global_indx, n, np @@ -1610,18 +1469,20 @@ contains integer, intent(out) :: pv(*) end subroutine parts end interface + optional :: parts, v ! local variables + logical :: use_parts, use_v integer :: np, iam integer :: length_row, i_count, j_count,& & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) - integer, allocatable :: iwork(:) - character :: afmt*5 + integer, allocatable :: iwork(:) + character :: afmt*5 integer, allocatable :: irow(:),icol(:) - complex(psb_spk_), allocatable :: val(:) + complex(psb_dpk_), allocatable :: val(:) integer, parameter :: nb=30 - real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 + real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 character(len=20) :: name, ch_err info = 0 @@ -1655,6 +1516,15 @@ contains nnzero = size(a_glob%aspk) nrhs = 1 endif + + use_parts = present(parts) + use_v = present(v) + if (count((/ use_parts, use_v /)) /= 1) then + info=581 + call psb_errpush(info,name,a_err=" v, parts") + goto 9999 + endif + ! broadcast informations to other processors call psb_bcast(ictxt,nrow, root) call psb_bcast(ictxt,ncol, root) @@ -1672,14 +1542,18 @@ contains write (*, fmt = *) 'start matdist',root, size(iwork),& &nrow, ncol, nnzero,nrhs endif - call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) + if (use_parts) then + call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) + else + call psb_cdall(ictxt,desc_a,info,vg=v) + end if if(info/=0) then info=4010 ch_err='psb_cdall' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - call psb_spall(a,desc_a,info,nnz=nnzero/np) + call psb_spall(a,desc_a,info,nnz=((nnzero+np-1)/np)) if(info/=0) then info=4010 ch_err='psb_psspall' @@ -1694,9 +1568,10 @@ contains goto 9999 end if + + isize = 3*nb*max(((nnzero+nrow)/nrow),nb) allocate(val(isize),irow(isize),icol(isize),stat=info) - if(info/=0) then info=4010 ch_err='Allocate' @@ -1708,20 +1583,34 @@ contains do while (i_count <= nrow) - call parts(i_count,nrow,np,iwork, length_row) - - if (length_row == 1) then + if (use_parts) then + call parts(i_count,nrow,np,iwork, length_row) + if (length_row == 1) then + j_count = i_count + iproc = iwork(1) + do + j_count = j_count + 1 + if (j_count-i_count >= nb) exit + if (j_count > nrow) exit + call parts(j_count,nrow,np,iwork, length_row) + if (length_row /= 1 ) exit + if (iwork(1) /= iproc ) exit + end do + end if + else + length_row = 1 j_count = i_count - iproc = iwork(1) + iproc = v(i_count) + do j_count = j_count + 1 if (j_count-i_count >= nb) exit if (j_count > nrow) exit - call parts(j_count,nrow,np,iwork, length_row) - if (length_row /= 1 ) exit - if (iwork(1) /= iproc ) exit + if (v(j_count) /= iproc ) exit end do - + end if + + if (length_row == 1) then ! now we should insert rows i_count..j_count-1 nnr = j_count - i_count @@ -1809,6 +1698,7 @@ contains i_count = j_count else + ! here processors are counted 1..np do j_count = 1, length_row k_count = iwork(j_count) @@ -1946,1077 +1836,7 @@ contains end if return - end subroutine cmatdistf - - - subroutine cmatdistv (a_glob, a, v, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) - ! - ! an utility subroutine to distribute a matrix among processors - ! according to a user defined data distribution, using - ! sparse matrix subroutines. - ! - ! type(d_spmat) :: a_glob - ! on entry: this contains the global sparse matrix as follows: - ! a%fida =='csr' - ! a%aspk for coefficient values - ! a%ia1 for column indices - ! a%ia2 for row pointers - ! a%m for number of global matrix rows - ! a%k for number of global matrix columns - ! on exit : undefined, with unassociated pointers. - ! - ! type(d_spmat) :: a - ! on entry: fresh variable. - ! on exit : this will contain the local sparse matrix. - ! - ! interface parts - ! ! .....user passed subroutine..... - ! subroutine parts(global_indx,n,np,pv,nv) - ! implicit none - ! integer, intent(in) :: global_indx, n, np - ! integer, intent(out) :: nv - ! integer, intent(out) :: pv(*) - ! - ! end subroutine parts - ! end interface - ! on entry: subroutine providing user defined data distribution. - ! for each global_indx the subroutine should return - ! the list pv of all processes owning the row with - ! that index; the list will contain nv entries. - ! usually nv=1; if nv >1 then we have an overlap in the data - ! distribution. - ! - ! integer :: ictxt - ! on entry: blacs context. - ! on exit : unchanged. - ! - ! type (desc_type) :: desc_a - ! on entry: fresh variable. - ! on exit : the updated array descriptor - ! - ! real(psb_dpk_), optional :: b_glob(:) - ! on entry: this contains right hand side. - ! on exit : - ! - ! real(psb_dpk_), allocatable, optional :: b(:) - ! on entry: fresh variable. - ! on exit : this will contain the local right hand side. - ! - ! integer, optional :: inroot - ! on entry: specifies processor holding a_glob. default: 0 - ! on exit : unchanged. - ! - use psb_base_mod - implicit none ! parameters - type(psb_cspmat_type) :: a_glob - complex(psb_spk_) :: b_glob(:) - integer :: ictxt, v(:) - type(psb_cspmat_type) :: a - complex(psb_spk_), allocatable :: b(:) - type(psb_desc_type) :: desc_a - integer, intent(out) :: info - integer, optional :: inroot - character(len=5), optional :: fmt - - integer :: np, iam - integer :: i_count, j_count,& - & root, liwork, nrow, ncol, nnzero, nrhs,& - & i,ll, nz, isize, iproc, nnr, err, err_act, int_err(5) - integer, allocatable :: iwork(:) - character :: afmt*5 - integer, allocatable :: irow(:),icol(:) - complex(psb_spk_), allocatable :: val(:) - integer, parameter :: nb=30 - logical, parameter :: newt=.true. - real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 - character(len=20) :: name, ch_err - - info = 0 - err = 0 - name = 'mat_distv' - call psb_erractionsave(err_act) - - ! executable statements - if (present(inroot)) then - root = inroot - else - root = psb_root_ - end if - - call psb_info(ictxt, iam, np) - if (iam == root) then - ! extract information from a_glob - if (psb_toupper(a_glob%fida) /= 'CSR') then - info=135 - ch_err='CSR' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - endif - - nrow = a_glob%m - ncol = a_glob%k - if (nrow /= ncol) then - write(0,*) 'a rectangular matrix ? ',nrow,ncol - info=-1 - call psb_errpush(info,name) - goto 9999 - endif - - nnzero = size(a_glob%aspk) - nrhs = 1 - end if - ! broadcast informations to other processors - call psb_bcast(ictxt,nrow, root) - call psb_bcast(ictxt,ncol, root) - call psb_bcast(ictxt,nnzero, root) - call psb_bcast(ictxt,nrhs, root) - liwork = max(np, nrow + ncol) - allocate(iwork(liwork), stat = info) - if (info /= 0) then - write(0,*) 'matdist allocation failed' - info=4025 - int_err(1)=liwork - call psb_errpush(info,name,i_err=int_err,a_err='integer') - goto 9999 - endif - - call psb_cdall(ictxt,desc_a,info,vg=v) - if(info/=0) then - info=4010 - ch_err='psb_cdall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_spall(a,desc_a,info,nnz=((nnzero+np-1)/np)) - if(info/=0) then - info=4010 - ch_err='psb_psspall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geall(b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_psdsall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - isize = 3*nb*max(((nnzero+nrow)/nrow),nb) - allocate(val(isize),irow(isize),icol(isize),stat=info) - - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - i_count = 1 - - do while (i_count <= nrow) - - j_count = i_count - iproc = v(i_count) - - do - j_count = j_count + 1 - if (j_count-i_count >= nb) exit - if (j_count > nrow) exit - if (v(j_count) /= iproc ) exit - end do - - ! now we should insert rows i_count..j_count-1 - nnr = j_count - i_count - - if (iam == root) then - ll = 0 - do i= i_count, j_count-1 - call psb_sp_getrow(i,a_glob,nz,& - & irow,icol,val,info,nzin=ll,append=.true.) - if (info /= 0) then - if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then - write(0,*) 'Allocation failure? This should not happen!' - end if - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - ll = ll + nz - end do - - if (iproc == iam) then - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_geins(nnr,(/(i,i=i_count,j_count-1)/),b_glob(i_count:j_count-1),& - & b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='dsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - else - call psb_snd(ictxt,nnr,iproc) - call psb_snd(ictxt,ll,iproc) - call psb_snd(ictxt,irow(1:ll),iproc) - call psb_snd(ictxt,icol(1:ll),iproc) - call psb_snd(ictxt,val(1:ll),iproc) - call psb_snd(ictxt,b_glob(i_count:j_count-1),iproc) - call psb_rcv(ictxt,ll,iproc) - endif - else if (iam /= root) then - - if (iproc == iam) then - call psb_rcv(ictxt,nnr,root) - call psb_rcv(ictxt,ll,root) - if (ll > size(val)) then - write(0,*) iam,'need to reallocate ',ll - deallocate(val,irow,icol) - allocate(val(ll),irow(ll),icol(ll),stat=info) - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - call psb_rcv(ictxt,irow(1:ll),root) - call psb_rcv(ictxt,icol(1:ll),root) - call psb_rcv(ictxt,val(1:ll),root) - call psb_rcv(ictxt,b_glob(i_count:i_count+nnr-1),root) - call psb_snd(ictxt,ll,root) - - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(nnr,(/(i,i=i_count,i_count+nnr-1)/),& - & b_glob(i_count:i_count+nnr-1),b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psdsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - endif - i_count = j_count - - end do - - ! default storage format for sparse matrix; we do not - ! expect duplicated entries. - - if (present(fmt)) then - afmt=fmt - else - afmt = 'CSR' - endif - call psb_barrier(ictxt) - t0 = psb_wtime() - call psb_cdasb(desc_a,info) - t1 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_cdasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_barrier(ictxt) - t2 = psb_wtime() - call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt) - t3 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_spasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_geasb(b,desc_a,info) - - if (iam == root) then - write(*,'("Descriptor assembly : ",es10.4)')t1-t0 - write(*,'("Sparse matrix assembly: ",es10.4)')t3-t2 - end if - - if(info/=0)then - info=4010 - ch_err='psdsasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - deallocate(iwork) - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error(ictxt) - return - end if - return - - end subroutine cmatdistv - - subroutine zmatdistf (a_glob, a, parts, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) - ! - ! an utility subroutine to distribute a matrix among processors - ! according to a user defined data distribution, using - ! sparse matrix subroutines. - ! - ! type(d_spmat) :: a_glob - ! on entry: this contains the global sparse matrix as follows: - ! a%fida =='csr' - ! a%aspk for coefficient values - ! a%ia1 for column indices - ! a%ia2 for row pointers - ! a%m for number of global matrix rows - ! a%k for number of global matrix columns - ! on exit : undefined, with unassociated pointers. - ! - ! type(d_spmat) :: a - ! on entry: fresh variable. - ! on exit : this will contain the local sparse matrix. - ! - ! interface parts - ! ! .....user passed subroutine..... - ! subroutine parts(global_indx,n,np,pv,nv) - ! implicit none - ! integer, intent(in) :: global_indx, n, np - ! integer, intent(out) :: nv - ! integer, intent(out) :: pv(*) - ! - ! end subroutine parts - ! end interface - ! on entry: subroutine providing user defined data distribution. - ! for each global_indx the subroutine should return - ! the list pv of all processes owning the row with - ! that index; the list will contain nv entries. - ! usually nv=1; if nv >1 then we have an overlap in the data - ! distribution. - ! - ! integer :: ictxt - ! on entry: blacs context. - ! on exit : unchanged. - ! - ! type (desc_type) :: desc_a - ! on entry: fresh variable. - ! on exit : the updated array descriptor - ! - ! real(psb_dpk_), optional :: b_glob(:) - ! on entry: this contains right hand side. - ! on exit : - ! - ! real(psb_dpk_), allocatable, optional :: b(:) - ! on entry: fresh variable. - ! on exit : this will contain the local right hand side. - ! - ! integer, optional :: inroot - ! on entry: specifies processor holding a_glob. default: 0 - ! on exit : unchanged. - ! - use psb_base_mod - implicit none - - ! parameters - type(psb_zspmat_type) :: a_glob - complex(psb_dpk_) :: b_glob(:) - integer :: ictxt - type(psb_zspmat_type) :: a - complex(psb_dpk_), allocatable :: b(:) - type (psb_desc_type) :: desc_a - integer, intent(out) :: info - integer, optional :: inroot - character(len=5), optional :: fmt - interface - - ! .....user passed subroutine..... - subroutine parts(global_indx,n,np,pv,nv) - implicit none - integer, intent(in) :: global_indx, n, np - integer, intent(out) :: nv - integer, intent(out) :: pv(*) - end subroutine parts - end interface - - ! local variables - integer :: np, iam - integer :: length_row, i_count, j_count,& - & k_count, root, liwork, nrow, ncol, nnzero, nrhs,& - & i, ll, nz, isize, iproc, nnr, err, err_act, int_err(5) - integer, allocatable :: iwork(:) - character :: afmt*5 - integer, allocatable :: irow(:),icol(:) - complex(psb_dpk_), allocatable :: val(:) - integer, parameter :: nb=30 - real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 - character(len=20) :: name, ch_err - - info = 0 - err = 0 - name = 'mat_distf' - call psb_erractionsave(err_act) - - ! executable statements - if (present(inroot)) then - root = inroot - else - root = psb_root_ - end if - call psb_info(ictxt, iam, np) - if (iam == root) then - ! extract information from a_glob - if (a_glob%fida /= 'CSR') then - info=135 - ch_err='CSR' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - endif - nrow = a_glob%m - ncol = a_glob%k - if (nrow /= ncol) then - write(0,*) 'a rectangular matrix ? ',nrow,ncol - info=-1 - call psb_errpush(info,name) - goto 9999 - endif - nnzero = size(a_glob%aspk) - nrhs = 1 - endif - ! broadcast informations to other processors - call psb_bcast(ictxt,nrow, root) - call psb_bcast(ictxt,ncol, root) - call psb_bcast(ictxt,nnzero, root) - call psb_bcast(ictxt,nrhs, root) - liwork = max(np, nrow + ncol) - allocate(iwork(liwork), stat = info) - if (info /= 0) then - info=4025 - int_err(1)=liwork - call psb_errpush(info,name,i_err=int_err,a_err='integer') - goto 9999 - endif - if (iam == root) then - write (*, fmt = *) 'start matdist',root, size(iwork),& - &nrow, ncol, nnzero,nrhs - endif - call psb_cdall(ictxt,desc_a,info,mg=nrow,parts=parts) - if(info/=0) then - info=4010 - ch_err='psb_cdall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_spall(a,desc_a,info,nnz=nnzero/np) - if(info/=0) then - info=4010 - ch_err='psb_psspall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geall(b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_psdsall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - isize = 3*nb*max(((nnzero+nrow)/nrow),nb) - allocate(val(isize),irow(isize),icol(isize),stat=info) - - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - i_count = 1 - - do while (i_count <= nrow) - - call parts(i_count,nrow,np,iwork, length_row) - - if (length_row == 1) then - j_count = i_count - iproc = iwork(1) - do - j_count = j_count + 1 - if (j_count-i_count >= nb) exit - if (j_count > nrow) exit - call parts(j_count,nrow,np,iwork, length_row) - if (length_row /= 1 ) exit - if (iwork(1) /= iproc ) exit - end do - - ! now we should insert rows i_count..j_count-1 - nnr = j_count - i_count - - if (iam == root) then - - ll = 0 - do i= i_count, j_count-1 - call psb_sp_getrow(i,a_glob,nz,& - & irow,icol,val,info,nzin=ll,append=.true.) - if (info /= 0) then - if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then - write(0,*) 'Allocation failure? This should not happen!' - end if - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - ll = ll + nz - end do - - if (iproc == iam) then - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(nnr,(/(i,i=i_count,j_count-1)/),b_glob(i_count:j_count-1),& - & b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_ins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - else - call psb_snd(ictxt,nnr,iproc) - call psb_snd(ictxt,ll,iproc) - call psb_snd(ictxt,irow(1:ll),iproc) - call psb_snd(ictxt,icol(1:ll),iproc) - call psb_snd(ictxt,val(1:ll),iproc) - call psb_snd(ictxt,b_glob(i_count:j_count-1),iproc) - call psb_rcv(ictxt,ll,iproc) - endif - else if (iam /= root) then - - if (iproc == iam) then - call psb_rcv(ictxt,nnr,root) - call psb_rcv(ictxt,ll,root) - if (ll > size(irow)) then - write(0,*) iam,'need to reallocate ',ll - deallocate(val,irow,icol) - allocate(val(ll),irow(ll),icol(ll),stat=info) - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - endif - call psb_rcv(ictxt,irow(1:ll),root) - call psb_rcv(ictxt,icol(1:ll),root) - call psb_rcv(ictxt,val(1:ll),root) - call psb_rcv(ictxt,b_glob(i_count:i_count+nnr-1),root) - call psb_snd(ictxt,ll,root) - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psspins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(nnr,(/(i,i=i_count,i_count+nnr-1)/),& - & b_glob(i_count:i_count+nnr-1),b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psdsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - endif - - i_count = j_count - - else - ! here processors are counted 1..np - do j_count = 1, length_row - k_count = iwork(j_count) - if (iam == root) then - - ll = 0 - do i= i_count, i_count - call psb_sp_getrow(i,a_glob,nz,& - & irow,icol,val,info,nzin=ll,append=.true.) - if (info /= 0) then - if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then - write(0,*) 'Allocation failure? This should not happen!' - end if - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - ll = ll + nz - end do - - if (k_count == iam) then - - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psspins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(1,(/i_count/),b_glob(i_count:i_count),& - & b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psdsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - else - call psb_snd(ictxt,ll,k_count) - call psb_snd(ictxt,irow(1:ll),k_count) - call psb_snd(ictxt,icol(1:ll),k_count) - call psb_snd(ictxt,val(1:ll),k_count) - call psb_snd(ictxt,b_glob(i_count),k_count) - call psb_rcv(ictxt,ll,k_count) - endif - else if (iam /= root) then - if (k_count == iam) then - call psb_rcv(ictxt,ll,root) - call psb_rcv(ictxt,irow(1:ll),root) - call psb_rcv(ictxt,icol(1:ll),root) - call psb_rcv(ictxt,val(1:ll),root) - call psb_rcv(ictxt,b_glob(i_count),root) - call psb_snd(ictxt,ll,root) - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psspins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(1,(/i_count/),b_glob(i_count:i_count),& - & b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psdsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - endif - end do - i_count = i_count + 1 - endif - end do - - if (present(fmt)) then - afmt=fmt - else - afmt = 'CSR' - endif - - call psb_barrier(ictxt) - t0 = psb_wtime() - call psb_cdasb(desc_a,info) - t1 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_cdasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_barrier(ictxt) - t2 = psb_wtime() - call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt) - t3 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_spasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - - if (iam == root) then - write(*,*) 'descriptor assembly: ',t1-t0 - write(*,*) 'sparse matrix assembly: ',t3-t2 - end if - - call psb_geasb(b,desc_a,info) - if(info/=0)then - info=4010 - ch_err='psdsasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - deallocate(val,irow,icol,stat=info) - if(info/=0)then - info=4010 - ch_err='deallocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - deallocate(iwork) - if (iam == root) write (*, fmt = *) 'end matdist' - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error(ictxt) - return - end if - return - - end subroutine zmatdistf - - - subroutine zmatdistv (a_glob, a, v, ictxt, desc_a,& - & b_glob, b, info, inroot,fmt) - ! - ! an utility subroutine to distribute a matrix among processors - ! according to a user defined data distribution, using - ! sparse matrix subroutines. - ! - ! type(d_spmat) :: a_glob - ! on entry: this contains the global sparse matrix as follows: - ! a%fida =='csr' - ! a%aspk for coefficient values - ! a%ia1 for column indices - ! a%ia2 for row pointers - ! a%m for number of global matrix rows - ! a%k for number of global matrix columns - ! on exit : undefined, with unassociated pointers. - ! - ! type(d_spmat) :: a - ! on entry: fresh variable. - ! on exit : this will contain the local sparse matrix. - ! - ! interface parts - ! ! .....user passed subroutine..... - ! subroutine parts(global_indx,n,np,pv,nv) - ! implicit none - ! integer, intent(in) :: global_indx, n, np - ! integer, intent(out) :: nv - ! integer, intent(out) :: pv(*) - ! - ! end subroutine parts - ! end interface - ! on entry: subroutine providing user defined data distribution. - ! for each global_indx the subroutine should return - ! the list pv of all processes owning the row with - ! that index; the list will contain nv entries. - ! usually nv=1; if nv >1 then we have an overlap in the data - ! distribution. - ! - ! integer :: ictxt - ! on entry: blacs context. - ! on exit : unchanged. - ! - ! type (desc_type) :: desc_a - ! on entry: fresh variable. - ! on exit : the updated array descriptor - ! - ! real(psb_dpk_), optional :: b_glob(:) - ! on entry: this contains right hand side. - ! on exit : - ! - ! real(psb_dpk_), allocatable, optional :: b(:) - ! on entry: fresh variable. - ! on exit : this will contain the local right hand side. - ! - ! integer, optional :: inroot - ! on entry: specifies processor holding a_glob. default: 0 - ! on exit : unchanged. - ! - use psb_base_mod - implicit none ! parameters - type(psb_zspmat_type) :: a_glob - complex(psb_dpk_) :: b_glob(:) - integer :: ictxt, v(:) - type(psb_zspmat_type) :: a - complex(psb_dpk_), allocatable :: b(:) - type(psb_desc_type) :: desc_a - integer, intent(out) :: info - integer, optional :: inroot - character(len=5), optional :: fmt - - integer :: np, iam - integer :: i_count, j_count,& - & root, liwork, nrow, ncol, nnzero, nrhs,& - & i,ll, nz, isize, iproc, nnr, err, err_act, int_err(5) - integer, allocatable :: iwork(:) - character :: afmt*5 - integer, allocatable :: irow(:),icol(:) - complex(psb_dpk_), allocatable :: val(:) - integer, parameter :: nb=30 - logical, parameter :: newt=.true. - real(psb_dpk_) :: t0, t1, t2, t3, t4, t5 - character(len=20) :: name, ch_err - - info = 0 - err = 0 - name = 'mat_distv' - call psb_erractionsave(err_act) - - ! executable statements - if (present(inroot)) then - root = inroot - else - root = psb_root_ - end if - - call psb_info(ictxt, iam, np) - if (iam == root) then - ! extract information from a_glob - if (psb_toupper(a_glob%fida) /= 'CSR') then - info=135 - ch_err='CSR' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - endif - - nrow = a_glob%m - ncol = a_glob%k - if (nrow /= ncol) then - write(0,*) 'a rectangular matrix ? ',nrow,ncol - info=-1 - call psb_errpush(info,name) - goto 9999 - endif - - nnzero = size(a_glob%aspk) - nrhs = 1 - end if - ! broadcast informations to other processors - call psb_bcast(ictxt,nrow, root) - call psb_bcast(ictxt,ncol, root) - call psb_bcast(ictxt,nnzero, root) - call psb_bcast(ictxt,nrhs, root) - liwork = max(np, nrow + ncol) - allocate(iwork(liwork), stat = info) - if (info /= 0) then - write(0,*) 'matdist allocation failed' - info=4025 - int_err(1)=liwork - call psb_errpush(info,name,i_err=int_err,a_err='integer') - goto 9999 - endif - - call psb_cdall(ictxt,desc_a,info,vg=v) - if(info/=0) then - info=4010 - ch_err='psb_cdall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_spall(a,desc_a,info,nnz=((nnzero+np-1)/np)) - if(info/=0) then - info=4010 - ch_err='psb_psspall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geall(b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_psdsall' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - isize = 3*nb*max(((nnzero+nrow)/nrow),nb) - allocate(val(isize),irow(isize),icol(isize),stat=info) - - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - i_count = 1 - - do while (i_count <= nrow) - - j_count = i_count - iproc = v(i_count) - - do - j_count = j_count + 1 - if (j_count-i_count >= nb) exit - if (j_count > nrow) exit - if (v(j_count) /= iproc ) exit - end do - - ! now we should insert rows i_count..j_count-1 - nnr = j_count - i_count - - if (iam == root) then - ll = 0 - do i= i_count, j_count-1 - call psb_sp_getrow(i,a_glob,nz,& - & irow,icol,val,info,nzin=ll,append=.true.) - if (info /= 0) then - if (nz >min(size(irow(ll+1:)),size(icol(ll+1:)),size(val(ll+1:)))) then - write(0,*) 'Allocation failure? This should not happen!' - end if - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - ll = ll + nz - end do - - if (iproc == iam) then - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psb_spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_geins(nnr,(/(i,i=i_count,j_count-1)/),b_glob(i_count:j_count-1),& - & b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='dsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - else - call psb_snd(ictxt,nnr,iproc) - call psb_snd(ictxt,ll,iproc) - call psb_snd(ictxt,irow(1:ll),iproc) - call psb_snd(ictxt,icol(1:ll),iproc) - call psb_snd(ictxt,val(1:ll),iproc) - call psb_snd(ictxt,b_glob(i_count:j_count-1),iproc) - call psb_rcv(ictxt,ll,iproc) - endif - else if (iam /= root) then - - if (iproc == iam) then - call psb_rcv(ictxt,nnr,root) - call psb_rcv(ictxt,ll,root) - if (ll > size(val)) then - write(0,*) iam,'need to reallocate ',ll - deallocate(val,irow,icol) - allocate(val(ll),irow(ll),icol(ll),stat=info) - if(info/=0) then - info=4010 - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - call psb_rcv(ictxt,irow(1:ll),root) - call psb_rcv(ictxt,icol(1:ll),root) - call psb_rcv(ictxt,val(1:ll),root) - call psb_rcv(ictxt,b_glob(i_count:i_count+nnr-1),root) - call psb_snd(ictxt,ll,root) - - call psb_spins(ll,irow,icol,val,a,desc_a,info) - if(info/=0) then - info=4010 - ch_err='spins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - call psb_geins(nnr,(/(i,i=i_count,i_count+nnr-1)/),& - & b_glob(i_count:i_count+nnr-1),b,desc_a,info) - if(info/=0) then - info=4010 - ch_err='psdsins' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - endif - endif - i_count = j_count - - end do - - ! default storage format for sparse matrix; we do not - ! expect duplicated entries. - - if (present(fmt)) then - afmt=fmt - else - afmt = 'CSR' - endif - call psb_barrier(ictxt) - t0 = psb_wtime() - call psb_cdasb(desc_a,info) - t1 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_cdasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_barrier(ictxt) - t2 = psb_wtime() - call psb_spasb(a,desc_a,info,dupl=psb_dupl_err_,afmt=afmt) - t3 = psb_wtime() - if(info/=0)then - info=4010 - ch_err='psb_spasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - call psb_geasb(b,desc_a,info) - - if (iam == root) then - write(*,'("Descriptor assembly : ",es10.4)')t1-t0 - write(*,'("Sparse matrix assembly: ",es10.4)')t3-t2 - end if - - if(info/=0)then - info=4010 - ch_err='psdsasb' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - deallocate(iwork) - - call psb_erractionrestore(err_act) - return - -9999 continue - call psb_erractionrestore(err_act) - if (err_act == psb_act_abort_) then - call psb_error(ictxt) - return - end if - return + end subroutine zmatdist - end subroutine zmatdistv end module psb_mat_dist_mod