Computer configuration: my computer is maosx system, in the virtual machine installed ubuntu, the original system install ladder (VPN), Linux did not install a successful ladder (VPN).
Environment configuration: install petsc in the virtual machine, download and unpack petsc software package, install GCC, gfortran, and download MPI and BLAS/LAPACK separately before, but there was an error when installing MPI. .
./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack
The command line is executed, and the result indicates that the MPI cannot be downloaded from the website (I tried to download the url and it can be downloaded after installing ladder (VPN). The following is the input command and the result:
<pre><font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/petsc-3.13.0</b></font>$ ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack
===============================================================================
Configuring PETSc to compile on your system
===============================================================================
=============================================================================== Trying to download https://www.mpich.org/static/downloads/3.3.2/mpich-3.3.=============================================================================== =============================================================================== Trying to download http://ftp.mcs.anl.gov/pub/petsc/externalpackages/mpich=============================================================================== =============================================================================== Trying to download ftp://ftp.mcs.anl.gov/pub/petsc/externalpackages/mpich-=============================================================================== =============================================================================== Trying to download https://www.mcs.anl.gov/petsc/mirror/externalpackages/m=============================================================================== *******************************************************************************
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
-------------------------------------------------------------------------------
Error during download/extract/detection of MPICH:
Unable to download package MPICH from: https://www.mpich.org/static/downloads/3.3.2/mpich-3.3.2.tar.gz
* If URL specified manually - perhaps there is a typo?
* If your network is disconnected - please reconnect and rerun ./configure
* Or perhaps you have a firewall blocking the download
* You can run with --with-packages-download-dir=/adirectory and ./configure will instruct you what packages to download manually
* or you can download the above URL manually, to /yourselectedlocation/mpich-3.3.2.tar.gz
and use the configure option:
--download-mpich=/yourselectedlocation/mpich-3.3.2.tar.gz
Unable to download package MPICH from: http://ftp.mcs.anl.gov/pub/petsc/externalpackages/mpich-3.3.2.tar.gz
* If URL specified manually - perhaps there is a typo?
* If your network is disconnected - please reconnect and rerun ./configure
* Or perhaps you have a firewall blocking the download
* You can run with --with-packages-download-dir=/adirectory and ./configure will instruct you what packages to download manually
* or you can download the above URL manually, to /yourselectedlocation/mpich-3.3.2.tar.gz
and use the configure option:
--download-mpich=/yourselectedlocation/mpich-3.3.2.tar.gz
Unable to download package MPICH from: ftp://ftp.mcs.anl.gov/pub/petsc/externalpackages/mpich-3.3.2.tar.gz
* If URL specified manually - perhaps there is a typo?
* If your network is disconnected - please reconnect and rerun ./configure
* Or perhaps you have a firewall blocking the download
* You can run with --with-packages-download-dir=/adirectory and ./configure will instruct you what packages to download manually
* or you can download the above URL manually, to /yourselectedlocation/mpich-3.3.2.tar.gz
and use the configure option:
--download-mpich=/yourselectedlocation/mpich-3.3.2.tar.gz
Unable to download package MPICH from: https://www.mcs.anl.gov/petsc/mirror/externalpackages/mpich-3.3.2.tar.gz
* If URL specified manually - perhaps there is a typo?
* If your network is disconnected - please reconnect and rerun ./configure
* Or perhaps you have a firewall blocking the download
* You can run with --with-packages-download-dir=/adirectory and ./configure will instruct you what packages to download manually
* or you can download the above URL manually, to /yourselectedlocation/mpich-3.3.2.tar.gz
and use the configure option:
--download-mpich=/yourselectedlocation/mpich-3.3.2.tar.gz
*******************************************************************************
</pre>
Follow the prompt : download the mpich package in advance. I understand the location where to store the mpich package, but the result shows that my download location is invalid. Is the location I selected wrong? Below is my second input command and the result, please help me to see where there is a problem.
<pre><font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$ ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich=/Downloads/mpich-3.3.2.tar.gz --download-fblaslapack
===============================================================================
Configuring PETSc to compile on your system
===============================================================================
*******************************************************************************
ERROR in COMMAND LINE ARGUMENT to ./configure
-------------------------------------------------------------------------------
Invalid download location: /Downloads/mpich-3.3.2.tar.gz for key download-mpich
*******************************************************************************
File "./config/configure.py", line 390, in petsc_configure
framework = config.framework.Framework(['--configModules=PETSc.Configure','--optionsModule=config.compilerOptions']+sys.argv[1:], loadArgDB = 0)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 110, in __init__
self.createChildren()
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 321, in createChildren
self.getChild(moduleName)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 306, in getChild
config.setupDependencies(self)
File "/home/parallels/DummyFolder/PETSC/config/PETSc/Configure.py", line 95, in setupDependencies
self.blasLapack = framework.require('config.packages.BlasLapack',self)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 326, in require
config = self.getChild(moduleName, keywordArgs)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 306, in getChild
config.setupDependencies(self)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/packages/BlasLapack.py", line 22, in setupDependencies
config.package.Package.setupDependencies(self, framework)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/package.py", line 119, in setupDependencies
self.mpi = framework.require('config.packages.MPI',self)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 326, in require
config = self.getChild(moduleName, keywordArgs)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 306, in getChild
config.setupDependencies(self)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/packages/MPI.py", line 62, in setupDependencies
self.mpich = framework.require('config.packages.MPICH', self)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 326, in require
config = self.getChild(moduleName, keywordArgs)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py", line 304, in getChild
config.setup()
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/script.py", line 101, in setup
logger.Logger.setup(self)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/logger.py", line 85, in setup
args.ArgumentProcessor.setup(self)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/args.py", line 75, in setup
self.setupArguments(self.argDB)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/script.py", line 85, in setupArguments
self.setupHelp(self.help)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/packages/MPICH.py", line 24, in setupHelp
config.package.GNUPackage.setupHelp(self,help)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/package.py", line 1224, in setupHelp
config.package.Package.setupHelp(self,help)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/package.py", line 132, in setupHelp
help.addArgument(self.PACKAGE, '-download-'+self.package+'=<no,yes,filename,url>', nargs.ArgDownload(None, 0, 'Download and install '+self.name))
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/help.py", line 107, in addArgument
self.argDB.setType(self.getArgName(name), argType, forceLocal = 1)
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/RDict.py", line 213, in setType
value.setValue(v.getValue())
File "/home/parallels/DummyFolder/PETSC/config/BuildSystem/nargs.py", line 500, in setValue
raise ValueError('Invalid download location: '+str(value)+' for key '+str(self.key))
<font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$
</pre>
Instead, I went straight to the configure command line./configure stage complete.now build PETSc libraries with
<pre><font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$ ./configure
===============================================================================
Configuring PETSc to compile on your system
===============================================================================
Compilers:
C Compiler: mpicc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3
C++ Compiler: mpicxx -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g -fPIC
Fortran Compiler: mpif90 -fPIC -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g
Linkers:
Shared linker: mpicc -shared -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3
Dynamic linker: mpicc -shared -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3
make:
BLAS/LAPACK: -llapack -lblas
MPI:
cmake:
Arch:
valgrind:
pthread:
PETSc:
PETSC_ARCH: arch-linux2-c-debug
PETSC_DIR: /home/parallels/DummyFolder/PETSC
Scalar type: real
Precision: double
Clanguage: C
Integer size: 32
shared libraries: enabled
Memory alignment: 16
xxx=========================================================================xxx
Configure stage complete. Now build PETSc libraries with (gnumake build):
make PETSC_DIR=/home/parallels/DummyFolder/PETSC PETSC_ARCH=arch-linux2-c-debug all
xxx=========================================================================xxx
<font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$ make PETSC_DIR=/home/parallels/DummyFolder/PETSC PETSC_ARCH=arch-linux2-c-debug all
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The version of PETSc you are using is out-of-date, we recommend updating to the new release
Available Version: 3.12.4 Installed Version: 3.8.3
http://www.mcs.anl.gov/petsc/download/index.html
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
make[1]: 进入目录“/home/parallels/DummyFolder/PETSC”
==========================================
See documentation/faq.html and documentation/bugreporting.html
for help with installation problems. Please send EVERYTHING
printed out below when reporting problems. Please check the
mailing list archives and consider subscribing.
http://www.mcs.anl.gov/petsc/miscellaneous/mailing-lists.html
==========================================
Starting on parallels-Parallels-Virtual-Platform at Thu Apr 16 10:33:08 CST 2020
Machine characteristics: Linux parallels-Parallels-Virtual-Platform 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
-----------------------------------------
Using PETSc directory: /home/parallels/DummyFolder/PETSC
Using PETSc arch: arch-linux2-c-debug
-----------------------------------------
PETSC_VERSION_RELEASE 1
PETSC_VERSION_MAJOR 3
PETSC_VERSION_MINOR 8
PETSC_VERSION_SUBMINOR 3
</pre>
……
……
……
<pre> FC arch-linux2-c-debug/obj/src/ksp/f90-mod/petsckspmod.o
FC arch-linux2-c-debug/obj/src/snes/f90-mod/petscsnesmod.o
FC arch-linux2-c-debug/obj/src/ts/f90-mod/petsctsmod.o
FC arch-linux2-c-debug/obj/src/tao/f90-mod/petsctaomod.o
CLINKER /home/parallels/DummyFolder/PETSC/arch-linux2-c-debug/lib/libpetsc.so.3.8.3
make[2]: 离开目录“/home/parallels/DummyFolder/PETSC”
=========================================
make[1]: 离开目录“/home/parallels/DummyFolder/PETSC”
Now to check if the libraries are working do:
make PETSC_DIR=/home/parallels/DummyFolder/PETSC PETSC_ARCH=arch-linux2-c-debug test
=========================================
<font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$ ^C
<font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$ make PETSC_DIR=/home/parallels/DummyFolder/PETSC PETSC_ARCH=arch-linux2-c-debug test
Running test examples to verify correct installation
Using PETSC_DIR=/home/parallels/DummyFolder/PETSC and PETSC_ARCH=arch-linux2-c-debug
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 2 MPI processes
Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
Completed test examples
=========================================
Now to evaluate the computer systems you plan use - do:
make PETSC_DIR=/home/parallels/DummyFolder/PETSC PETSC_ARCH=arch-linux2-c-debug streams
<font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$ make PETSC_DIR=/home/parallels/DummyFolder/PETSC PETSC_ARCH=arch-linux2-c-debug streams
cd src/benchmarks/streams; /usr/bin/make --no-print-directory PETSC_DIR=/home/parallels/DummyFolder/PETSC PETSC_ARCH=arch-linux2-c-debug streams
mpicc -o MPIVersion.o -c -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3 -I/home/parallels/DummyFolder/PETSC/include -I/home/parallels/DummyFolder/PETSC/arch-linux2-c-debug/include `pwd`/MPIVersion.c
Running streams with 'mpiexec ' using 'NPMAX=2'
Number of MPI processes 1 Processor names parallels-Parallels-Virtual-Platform
Triad: 15990.2886 Rate (MB/s)
Number of MPI processes 2 Processor names parallels-Parallels-Virtual-Platform parallels-Parallels-Virtual-Platform
Triad: 31023.1764 Rate (MB/s)
------------------------------------------------
np speedup
1 1.0
2 1.94
Estimation of possible speedup of MPI programs based on Streams benchmark.
It appears you have 1 node(s)
<font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Pla</b></font></pre>
I tried to upgrade GCC to the latest version and nothing changed
As Satish said in email, your machine likely ran out of memory. gfortran can take more the 2GB of RAM when compiling. An alternative, if you do not need Fortran, is to configure using --with-fc=0.