sourceryinstitute / OpenCoarrays

A parallel application binary interface for Fortran 2018 compilers.
http://www.opencoarrays.org
BSD 3-Clause "New" or "Revised" License
245 stars 58 forks source link

Trying to install open-coarrays-bin on Ubuntu 20.04 Ubuntu Focal Fossa (development branch) #702

Closed AndreMikulec closed 4 years ago

AndreMikulec commented 4 years ago

Hi,

I am very new.

I am trying to install open-coarrays-bin on my BRAND SPANKING NEW Ubuntu 20.04 Ubuntu Focal Fossa (development branch).

I did

sudo apt update
sudo apt upgrade

However, when I execute

sudo apt install open-coarrays-bin

I am getting the following error:

E: Unable to locate package open-coarrays-bin

in

computertu@computertu:~/Desktop$ sudo apt install gfortran libcoarrays-dev libopenmpi-dev open-coarrays-bin
[sudo] password for computertu: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package open-coarrays-bin
computertu@computertu:~/Desktop$ 

I was following the article from last year:

Fortran 2018 coarray quick start
24 April, 2019

https://www.scivision.dev/fortran-2018-coarray-quick-start/

So ..., what is the way (or easiest/best/most_flexible/awesome way) to install? Is there some better URL/method to follow?

I do prefer the cutting edge.

I noticed mentioned EasyBuild and Spackon the page https://github.com/sourceryinstitute/OpenCoarrays/blob/master/INSTALL.md

Are either good methods?

What are the general recommendations?

Thank you, Andre Mikulec Andre_Mikulec@Hotmail.com

AndreMikulec commented 4 years ago

All,

I tried SEVERAL THINGS (but not everything).
This is the way I could get opencoarrays 2.8.0 compiled and built (and working, so far) on Ubuntu Focal Fossa (development branch) 20.04.

This is from a perfectly new Ubuntu Focal Fossa (development branch) 20.04

#.# I actually just needed 'git' (also acquired gcc and g++ version 9.2)
sudo apt-get install build-essential curl file git

sudo apt install gcc   # included gfortran # version 9.2
sudo apt install cmake

.# Package: gfortran (4:9.2.1-3.1ubuntu1)

.# https://packages.ubuntu.com/focal/gfortran

.# Package: libmpich-dev (3.3.2-2) [universe]

.# https://packages.ubuntu.com/focal/libmpich-dev

.# Package: libcoarrays-mpich-dev (2.8.0-1) [universe]

.# https://packages.ubuntu.com/focal/libcoarrays-mpich-dev

.# Package: libopenmpi-dev (4.0.2-5ubuntu2) [universe]

.# https://packages.ubuntu.com/focal/libopenmpi-dev

.# Package: libcoarrays-openmpi-dev (2.8.0-1) [universe]

.# https://packages.ubuntu.com/focal/libcoarrays-openmpi-dev

.# Package: libcoarrays-dev (2.8.0-1) [universe]

.# https://packages.ubuntu.com/focal/libcoarrays-dev

.# Package: mpich (3.3.2-2) [universe]

.# https://packages.ubuntu.com/focal/mpich

sudo apt install libmpich-dev
sudo apt install libcoarrays-mpich-dev
sudo apt install libopenmpi-dev
sudo apt install libcoarrays-openmpi-dev
sudo apt install libcoarrays-dev          # already there
#.# sudo apt install mpich
#.# already there
#.# $ which mpiexec
#.# /usr/bin/mpiexec
git clone https://github.com/sourceryinstitute/OpenCoarrays.git
cd OpenCoarrays

git checkout -b OpenCoarrays_2.8.0 2.8.0

mkdir opencoarrays-build
cd opencoarrays-build
export FC=/usr/bin/gfortran
export CC=/usr/bin/gcc
cmake /home/computertu/OpenCoarrays -DCMAKE_INSTALL_PREFIX=/home/computertu/OpenCoarrays/opencoarrays-install
make
make test # optional; verify build works

.# only one test not passed

.# 77/79 Test #77: test-installation-scripts.sh .........................................***Failed 0.01 sec

make install

computertu@computertu:~/OpenCoarrays/opencoarrays-install/bin$ cat a.f90

program myprogram
  integer :: a [*]
  real :: b [*]
  double precision :: c [*]
  complex:: d [*]
  character (len=10) :: e [*]
  logical:: l [*]
end program
computertu@computertu:~/OpenCoarrays/opencoarrays-install/bin$ ./caf a.f90 -o a
computertu@computertu:~/OpenCoarrays/opencoarrays-install/bin$
computertu@computertu:~/OpenCoarrays/opencoarrays-install/bin$ # no MPI_* errors 
computertu@computertu:~/OpenCoarrays/opencoarrays-install/bin$ ./cafrun -n 4 a # no MPI_* errors
Ubuntu – Details of package gfortran in focal
GNU Fortran 95 compiler
Ubuntu – Details of package libmpich-dev in focal
Development files for MPICH
Ubuntu – Details of package libcoarrays-mpich-dev in focal
Co-Array Fortran libraries for - development files (MPICH)
Ubuntu – Details of package libopenmpi-dev in focal
high performance message passing library -- header files
Ubuntu – Details of package libcoarrays-openmpi-dev in focal
Co-Array Fortran libraries - development files (OpenMPI)
Ubuntu – Details of package libcoarrays-dev in focal
Co-Array Fortran libraries
500 Internal Server Error