Конфигурация компьютера: мой компьютер - система maosx, на виртуальной машине установлена ​​ubuntu, исходная лестница установки системы (VPN), Linux не установил успешную лестницу (VPN).

Конфигурация среды: установите petsc на виртуальную машину, загрузите и распакуйте пакет программного обеспечения petsc, установите GCC, gfortran и загрузите MPI и BLAS / LAPACK по отдельности раньше, но при установке MPI произошла ошибка. .

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

Командная строка выполняется, и результат показывает, что MPI не может быть загружен с веб-сайта (я попытался загрузить URL-адрес, и его можно загрузить после установки лестничной диаграммы (VPN). Ниже приводится команда ввода и результат:

<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>

Следуйте подсказке: заранее скачайте пакет mpich. Я понимаю, где хранить пакет mpich, но результат показывает, что мое место загрузки недействительно. Я выбрал неправильное местоположение? Ниже представлена ​​моя вторая команда ввода и результат. Помогите мне, пожалуйста, разобраться, в чем проблема.

<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 &quot;./config/configure.py&quot;, line 390, in petsc_configure
    framework = config.framework.Framework([&apos;--configModules=PETSc.Configure&apos;,&apos;--optionsModule=config.compilerOptions&apos;]+sys.argv[1:], loadArgDB = 0)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 110, in __init__
    self.createChildren()
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 321, in createChildren
    self.getChild(moduleName)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 306, in getChild
    config.setupDependencies(self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/PETSc/Configure.py&quot;, line 95, in setupDependencies
    self.blasLapack    = framework.require(&apos;config.packages.BlasLapack&apos;,self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 326, in require
    config = self.getChild(moduleName, keywordArgs)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 306, in getChild
    config.setupDependencies(self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/packages/BlasLapack.py&quot;, line 22, in setupDependencies
    config.package.Package.setupDependencies(self, framework)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/package.py&quot;, line 119, in setupDependencies
    self.mpi         = framework.require(&apos;config.packages.MPI&apos;,self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 326, in require
    config = self.getChild(moduleName, keywordArgs)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 306, in getChild
    config.setupDependencies(self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/packages/MPI.py&quot;, line 62, in setupDependencies
    self.mpich   = framework.require(&apos;config.packages.MPICH&apos;, self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 326, in require
    config = self.getChild(moduleName, keywordArgs)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/framework.py&quot;, line 304, in getChild
    config.setup()
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/script.py&quot;, line 101, in setup
    logger.Logger.setup(self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/logger.py&quot;, line 85, in setup
    args.ArgumentProcessor.setup(self)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/args.py&quot;, line 75, in setup
    self.setupArguments(self.argDB)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/script.py&quot;, line 85, in setupArguments
    self.setupHelp(self.help)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/packages/MPICH.py&quot;, line 24, in setupHelp
    config.package.GNUPackage.setupHelp(self,help)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/package.py&quot;, line 1224, in setupHelp
    config.package.Package.setupHelp(self,help)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/config/package.py&quot;, line 132, in setupHelp
    help.addArgument(self.PACKAGE, &apos;-download-&apos;+self.package+&apos;=&lt;no,yes,filename,url&gt;&apos;, nargs.ArgDownload(None, 0, &apos;Download and install &apos;+self.name))
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/help.py&quot;, line 107, in addArgument
    self.argDB.setType(self.getArgName(name), argType, forceLocal = 1)
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/RDict.py&quot;, line 213, in setType
    value.setValue(v.getValue())
  File &quot;/home/parallels/DummyFolder/PETSC/config/BuildSystem/nargs.py&quot;, line 500, in setValue
    raise ValueError(&apos;Invalid download location: &apos;+str(value)+&apos; for key &apos;+str(self.key))
<font color="#8AE234"><b>parallels@parallels-Parallels-Virtual-Platform</b></font>:<font color="#729FCF"><b>~/DummyFolder/PETSC</b></font>$ 
</pre>

Вместо этого я сразу перешел в командную строку configure ./configure stage complete. Теперь создайте библиотеки PETSc с помощью

<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 &apos;mpiexec &apos; using &apos;NPMAX=2&apos; 
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>

Я попытался обновить GCC до последней версии, но ничего не изменилось.

0
Kexin Tian 15 Апр 2020 в 18:41

1 ответ

Лучший ответ

Как сказал Сатиш в электронном письме, на вашем компьютере, вероятно, закончилась память. gfortran может занять больше 2 ГБ оперативной памяти при компиляции. Альтернативой, если вам не нужен Фортран, является настройка с помощью --with-fc = 0.

0
Matt Knepley 15 Апр 2020 в 18:33