PETSc download (prior to PFLOTRAN) Error Msg: UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details): -----Cannot request fblaslapack without Fortran compiler

313 views
Skip to first unread message

Richard -Chip- Fisher

unread,
Oct 20, 2017, 2:31:14 PM10/20/17
to pflotran-users
Hi, 

When I was downloading PETSc prior to installing PFLOTRAN, I got an error message regarding the fblasklapack package.

My commands were:

cd petsc
git checkout xsdk-0.2.0
./configure --CFLAGS='-O3' --CXXFLAGS='-O3' --FFLAGS='-O3' --with-debugging=no --download-mpich=yes --download-hdf5=yes --download-fblaslapack=yes --download-metis=yes --download-parmetis=yes

MPICH, HDF5 both configured without trouble but flbaslapack wouldn't configure and threw the following error message:
*******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Cannot request fblaslapack without Fortran compiler, use --download-f2cblaslapack intead
*******************************************************************************

But it worked when I tried the suggested command --download-f2cblaslapack

Will this work for the pflotran install or am I missing something? 

I checked and I have gfortran installed on my machine:
~$ gfortran --version
GNU Fortran (GCC) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks!
-Chip
configure.log

Peter Lichtner

unread,
Oct 20, 2017, 2:58:44 PM10/20/17
to pflotra...@googlegroups.com
You could try adding:  --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
…Peter

<configure.log>

Hammond, Glenn E

unread,
Oct 20, 2017, 3:51:44 PM10/20/17
to pflotra...@googlegroups.com

Sounds to me like you do not have gfortran installed as the message states “Cannot request fblaslapack without Fortran compiler”.

 

Glenn

Richard -Chip- Fisher

unread,
Oct 21, 2017, 12:06:29 PM10/21/17
to pflotran-users

I reinstalled homebrew and gcc. 

$ brew --version
Homebrew 1.3.6
Homebrew/homebrew-core (git revision cd94; last commit 2017-10-21)

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$ gfortran --version
GNU Fortran (Homebrew GCC 7.2.0) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Here's the output from adding Peter Lichtner's suggestion:

$ ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich=yes --download-hdf5=yes --download-fblaslapack=yes

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The version of PETSc you are using is out-of-date, we recommend updating to the new release
 Available Version: 3.8   Installed Version: 3.7.5
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
===============================================================================
             Configuring PETSc to compile on your system                       
===============================================================================
TESTING: checkFortranCompiler from config.setCompilers(config/BuildSystem/config/setCompilers.py:934)                                                 *******************************************************************************
         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for details):
-------------------------------------------------------------------------------
Fortran compiler you provided with --with-fc=gfortran does not work.
Cannot compile FC with gfortran.
*******************************************************************************

-Chip

Peter Lichtner

unread,
Oct 21, 2017, 12:12:54 PM10/21/17
to pflotra...@googlegroups.com
Chip: fortran 7.2 may not work. You might try 7.1 which I am using on Hi Sierra:

gravenstein:documentation lichtner$ gfortran --version
GNU Fortran (GCC) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gravenstein:documentation lichtner$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

You can install it from: http://hpc.sourceforge.net.

…Peter

Hammond, Glenn E

unread,
Oct 21, 2017, 12:16:21 PM10/21/17
to pflotra...@googlegroups.com
Please email the $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/configure.log (there is likely a link to it in PETSC_DIR) to pflotr...@googlegroups.com and petsc...@mcs.anl.gov.  We have many Mac users who can help, but we need that info.

Glenn

Richard -Chip- Fisher

unread,
Oct 21, 2017, 3:07:36 PM10/21/17
to pflotran-users
Thanks, Peter. I'll give that a try. 

Glenn, I just emailed the configure.log. 

Thanks,
Chip

Stein, Emily R

unread,
Oct 22, 2017, 10:48:53 AM10/22/17
to pflotra...@googlegroups.com

I don’t know if this is useful, but last time I tried to install pflotran on a new mac, I discovered that gfortran does not automatically get installed with gcc. Using macports you need to do this:

sudo port install gcc49 +gfortran

 

You may also discover at some point that you don’t have cmake – you can get it with macports, too:

sudo port install cmake

 

Homebrew is probably similar.

 

Emily

Richard -Chip- Fisher

unread,
Oct 23, 2017, 12:34:40 AM10/23/17
to pflotran-users
I ended up wiping my computer and starting from scratch. 

Now I get PETSc and pflotran to compile. But when I run:

 ~/pflotran/src/pflotran/regression_tests$ make test 

after installing pflotran I'm getting between 16 and about 63 fails, depending on which PETSc config options I used. I tried the PETSc config three different ways (no errors or issues with any of these) and get different regression test fails with pflotran. Seems like fewest errors are with the following PETSc configuration

I'll make a new post in case anybody else is having similar issues on MacOS High Sierra. 

-Chip
Reply all
Reply to author
Forward
0 new messages