The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

sebastian_sohr (3) [Avatar] Offline
#1
Hello,

in

Listing A.1. Building OpenCoarrays from source.

cd OpenCoarrays
mkdir build
FC=gfortran CC=gcc cmake ..
make
make install


the line

cd build


seems to be missing.

By the way : It compiles only with gcc 5 .
Milan Curcic (43) [Avatar] Offline
#2
Yes, it is, thank you! This will be fixed in the next MEAP update.
arclight (10) [Avatar] Offline
#3
I just ran across this; easy enough to fix with:

git clone --branch 1.9.3 https://github.com/sourceryinstitute/OpenCoarrays
mkdir build
cd build
FC=gfortran CC=gcc cmake ../OpenCoarrays
make
make test # optional
make install


The main difference is the location of the build directory.
arclight (10) [Avatar] Offline
#4
arclight wrote:
make install



should probably be

sudo make install
337172 (2) [Avatar] Offline
#5
Some other of your readers may be running into a gfortran internal compiler error as follows:

[ 12%] Generating coarray_distributed_transpose
/home/cropnumeric/OpenCoarrays/src/tests/integration/dist_transpose/coarray_distributed_transpose.F90:57:0:

do i = 2, num_nodes; variable[i] = variable; end do

internal compiler error: in gfc_dep_resolver, at fortran/dependency.c:2258
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Error: comand:
`/usr/bin/gfortran -I/home/cropnumeric/OpenCoarrays/build/include/OpenCoarrays-1.9.3_GNU-8.1.1 -fcoarray=lib -pthread -Wl,-rpath -Wl,/opt/lib -Wl,--enable-new-dtags -pthread -I /opt/include -I /opt/lib -DPREFIX_NAME=_gfortran_caf_ -DGCC_GE_7 -DGCC_GE_8 -DMPI_WORKING_MODULE -O2 -DNDEBUG -O2 -o /home/cropnumeric/OpenCoarrays/build/bin/OpenCoarrays-1.9.3-tests/coarray_distributed_transpose /home/cropnumeric/OpenCoarrays/src/tests/integration/dist_transpose/coarray_distributed_transpose.F90 /home/cropnumeric/OpenCoarrays/build/lib64/libcaf_mpi.a /opt/lib/libmpi_usempif08.so /opt/lib/libmpi_usempi_ignore_tkr.so /opt/lib/libmpi_mpifh.so /opt/lib/libmpi.so`
failed to compile.
make[2]: *** [src/tests/integration/dist_transpose/CMakeFiles/build_coarray_distributed_transpose.dir/build.make:62: src/tests/integration/dist_transpose/coarray_distributed_transpose] Error 12
make[1]: *** [CMakeFiles/Makefile2:445: src/tests/integration/dist_transpose/CMakeFiles/build_coarray_distributed_transpose.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

This appears to be related to recent versions of gfortran.
Milan Curcic (43) [Avatar] Offline
#6
I can reproduce this. The issue is a compiler bug introduced going from gcc-7 to gcc-8. Full thread here:

https://github.com/sourceryinstitute/OpenCoarrays/issues/527

Temporary solution is to use gcc-7, or to apply a patch to gcc-8 when building it.

gcc-8.2 should come with the patch applied.