- Сначала перейдите к загрузке исходного пакета mpich3.2.tar.gz (URL:http://www.mpich.org/static/downloads/3.2/)
- Затем загрузите файл в каталог, который вы хотите установить, каталог автора:
/usr/software/mpi
- Разархивируйте файл в текущую папку:
tar -zxvf mpich-3.2.tar.gz
- Создайте новую папку в качестве каталога установки:
mkdir mpich
-
Войдите в распакованную папку:
cd mpich-3.2 ./configure -prefix=/usr/software/mpi/mpich
В это время произошла ошибка:
configure: error: No Fortran 77 compiler found. If you don't need to build any Fortran programs, you can disable Fortran support using --disable-fortran. If you do want to build Fortran programs, you need to install a Fortran compiler such as gfortran or ifort before you can proceed.
Следуйте инструкциям и добавьте после команды
--disable-fortran
./configure -prefix=/usr/software/mpi/mpich --disable-fortran
-
Беги за успехом
make
Команда, за которой следует « `make install« -
После завершения установки добавьте переменные среды
sudo vim ~/.bashrc
Добавьте внизу:
export MPI_ROOT=/usr/software/mpi/mpich export PATH=$MPI_ROOT/bin:$PATH export MANPATH=$MPI_ROOT/man:$MANPATH
Выполнить после сохранения
source ~/.bashrc
Внесите изменения немедленно.
Пока процесс установки окончен. Давайте возьмем тест, создадим новый файл mpi_hello.c и вставим следующий код.
#include <stdio.h>
#include <string.h>
#include <mpi.h>
const int MAX_STRING=100;
int main(int argc, char const *argv[])
{
/* code */
char greeting[MAX_STRING];
int comm_sz;
int my_rank;
MPI_Init(NULL,NULL);
MPI_Comm_size(MPI_COMM_WORLD,&comm_sz);
MPI_Comm_rank(MPI_COMM_WORLD,&my_rank);
if (my_rank!=0)
{
/* code */
sprintf(greeting,"Greetings from process %d of %d!",my_rank,comm_sz);
MPI_Send(greeting,strlen(greeting)+1,MPI_CHAR,0,0,MPI_COMM_WORLD);
}else{
printf("Greetings from process %d of %d!n",my_rank,comm_sz);
for (int i = 1; i < comm_sz; ++i)
{
/* code */
MPI_Recv(greeting,MAX_STRING,MPI_CHAR,i,0,MPI_COMM_WORLD,MPI_STATUS_IGNORE);
printf("%sn", greeting);
}
}
MPI_Finalize();
return 0;
}
Откройте терминал и скомпилируйте:
mpicc -g -Wall -o mpi_hello mpi_hello.c
Среди них:
mpicc программа для компиляции C
-g разрешить отладчик
-Все предупреждения на дисплее (заглавная W)
-o outfile.o скомпилировать исполняемый файл, имя файла outfile.o
-02 Скажите компилятору оптимизировать код
После завершения компиляции вы можете увидеть:
[email protected]:/usr/software/mpi/code# ls -la
total 24
drwxr-xr-x 2 root root 4096 Nov 7 14:01 .
drwxr-xr-x 5 root root 4096 Nov 7 13:52 ..
-rwxr-xr-x 1 root root 10824 Nov 7 14:00 mpi_hello
-rw-r--r-- 1 root root 785 Nov 7 14:00 mpi_hello.c
Начните работать, количество процессов создания может быть откорректировано числом после -n.
mpirun -n 4 ./mpi_hello
Результат работы:
[email protected]:/usr/software/mpi/code# mpirun -n 4 ./mpi_hello
Greetings from process 0 of 4!
Greetings from process 1 of 4!
Greetings from process 2 of 4!
Greetings from process 3 of 4!
На этом этапе установка и тестирование MPI завершены.
View previous topic :: View next topic | |||||||||
Author | Message | ||||||||
---|---|---|---|---|---|---|---|---|---|
foton2 Guru Joined: 23 Feb 2004 |
|
||||||||
Back to top |
|
||||||||
solarium_rider Tux’s lil’ helper Joined: 23 Jun 2003 |
|
||||||||
Back to top |
|
||||||||
|
You cannot post new topics in this forum |
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- Installation & Upgrades
- [ubuntu] «configure: error: No F77 compiler found» during R installation
-
March 8th, 2014
#1
- Join Date
- May 2009
- Beans
- 2
«configure: error: No F77 compiler found» during R installation
Hello,
I have ubuntu installation maverick (ubuntu 10.10) on my laptop.
When I try to configure ‘R-3.0.2’ on my laptop, it exits giving an error of » configure: error: No F77 compiler found».
I looked for fortran installations on my machine. I found none.
I tried to install fortran, using apt-get, but it could not find the packages.
I downloaded the gfortran package from the website and tried to install it, but it says some dependency related to gcc is missing.
What should I be doing now. I badly need R installed on my machine.
Please help me.
Thanks.
-
March 8th, 2014
#2
- Join Date
- Apr 2012
- Beans
- 7,256
Re: «configure: error: No F77 compiler found» during R installation
Hello and welcome to the forums
Unfortunately, the Maverick release has reached EOL and is no longer supported. You *may* be able to install a compatible version of R from the old-releases repository archive — see How to install software or upgrade from old unsupported release?. If you absolutely need R-3.x you will likely need to upgrade to a supported release.
-
March 8th, 2014
#3
- Join Date
- May 2009
- Beans
- 2
Re: «configure: error: No F77 compiler found» during R installation
Thank you sir.
I changes the sources list in etc folder and I installed fortran, just now and I could install R on my machine. however, now the error of «the inconsolata.sty file and zi4.sty are not found» comes up. I think that too can be fixed. So, I will clear this thread. Very thankful for your headsup and your reply.
Bookmarks
Bookmarks
Posting Permissions
All times are GMT +1. The time now is 10:14 AM.
vBulletin �2000 — 2023, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical � Canonical Ltd. Tango Icons � Tango Desktop Project.
User contributions on this site are licensed under the Creative Commons Attribution Share Alike 4.0 International License. For details and our forum data attribution, retention and privacy policy, see here
@LipuFei This is the info:
**CMake Error at /Applications/CMake.app/Contents/share/cmake-3.13/Modules/CMakeTestFortranCompiler.cmake:45 (message):
The Fortran compiler
"/usr/local/bin/gfortran"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/zhou/Documents/cura-build-environment-master/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_54259/fast"
/Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_54259.dir/build.make CMakeFiles/cmTC_54259.dir/build
Building Fortran object CMakeFiles/cmTC_54259.dir/testFortranCompiler.f.o
/usr/local/bin/gfortran -c /Users/zhou/Documents/cura-build-environment-master/build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_54259.dir/testFortranCompiler.f.o
Linking Fortran executable cmTC_54259
/Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/cmTC_54259.dir/link.txt --verbose=1
/usr/local/bin/gfortran CMakeFiles/cmTC_54259.dir/testFortranCompiler.f.o -o cmTC_54259
ld: unexpected token: !tapi-tbd-v3 file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [cmTC_54259] Error 1
make: *** [cmTC_54259/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
projects/openblas.cmake:3 (enable_language)
CMakeLists.txt:42 (include)
— Configuring incomplete, errors occurred!
See also «/Users/zhou/Documents/cura-build-environment-master/build/CMakeFiles/CMakeOutput.log».
See also «/Users/zhou/Documents/cura-build-environment-master/build/CMakeFiles/CMakeError.log».**
Hi,
I have followed to following instructions,
Open the Cmake GUI
Select source code directory
C:Usersusernameuhd-release_003_009_002
Select binary build directory
C:Usersusernameuhd-release_003_009_002build
Check the Advanced checkbox
Click Configure
Set Visual Studio 12 2013 Win64 as the compiler,
and I get the following error message,
The C compiler identification is MSVC 18.0.31101.0
The Fortran compiler identification is unknown
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
CMake Error at CMakeLists.txt:13 (project):
No CMAKE_Fortran_COMPILER could be found.
Configuring incomplete, errors occurred!
See also "C:/Users/slichy/Downloads/uhd-3.10.0.0.tar/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/slichy/Downloads/uhd-3.10.0.0.tar/build/CMakeFiles/CMakeError.log".
It states that CMake Fortran Compiler cannot be found. I have tried to install it from online but I cannot see a package for me to install. Is this supposed to be done by the cmake installer, and if so/not how can I fix this?
Thanks