Closed barracuda156 closed 2 years ago
P. S. Interestingly, on MacOS 11 x86_64 OpenCoarrays
2.10.0 does not even build, failing on:
/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:32:26:
32 | use opencoarrays, only : get_communicator
| 1
Error: Symbol 'get_communicator' referenced at (1) not found in module 'opencoarrays'
/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:46:28:
46 | use opencoarrays, only : get_communicator, team_number !! TODO: remove team_number once gfortran supports it
| 1
Error: Symbol 'get_communicator' referenced at (1) not found in module 'opencoarrays'
/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:41:23:
41 | call mpi_matches_caf(get_communicator())
| 1
Error: Function 'get_communicator' at (1) has no IMPLICIT type
/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:60:29:
60 | call mpi_matches_caf(get_communicator())
| 1
Error: Function 'get_communicator' at (1) has no IMPLICIT type
@barracuda156 OpenCoarrays hasn't supported MacPorts for several years. I recommend using Homebrew to install OpenCoarrays via the command brew install opencoarrays
. I use this regularly without any problems. Alternatively, you could build OpenCoarrays from source using cmake
or you could try running ./install.sh
, which ultimately just invokes cmake
but attempts to check for prerequisites and install them if they're missing. I'm also working on a refactoring the install.sh
installer to use fpm
instead of cmake
because it's much simpler to maintain, but I haven't had time to work on that recently. If you're a fpm
user and want to try it out, let me know and I'll provide instructions.
I wasn't aware that the MacPorts OpenCoarrays port even still existed. If you know of a way for us to remove or deprecate it, please let me know. For now, I'm going to close this issue, but feel free to submit a new issue if you try one of the other approaches mentioned above and encounter difficulties.
@rouson Well, there is no problem with the building with Macports, it works – I have built it locally. My issue is concerned with tests failures.
P. S. I would appreciate if this ticket is opened, since someone may give a helpful advice on the matter. I just need to know what may cause test failures. Fixing I can work on myself.
@rouson Worth noting that Homebrew is simply broken for older MacOS. Looks like before you were interested in wider user base: https://github.com/sourceryinstitute/opencoarrays/issues/22#issuecomment-159009469
@rouson Update done, build is fixed: https://github.com/macports/macports-ports/pull/16075
@barracuda156 thanks for working on this!
@barracuda156 thanks for working on this!
@rouson I added a fix for case-sensitive MacOS in this PR: https://github.com/macports/macports-ports/pull/16175
So now OpenCoarrays
should build across the board; as for archs, aarch64
, x86_64
and ppc
builds confirmed. I will test ppc64
somewhat later when get back to native PPC hardware.
Current portfile: https://github.com/macports/macports-ports/blob/master/science/OpenCoarrays/Portfile
GitHubThe MacPorts ports tree. Contribute to macports/macports-ports development by creating an account on GitHub.
System information including:
OpenCoarrays Coarray Fortran Compiler Wrapper (caf version 2.10.0)
mpif90-mpich-gcc12
mpifort for MPICH version 4.0.2mpicc-mpich-gcc12
mpicc for MPICH version 4.0.2Executing: cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" -DMPIEXEC=/opt/local/bin/mpiexec-mpich-gcc12 -DMPI_C_COMPILER=/opt/local/bin/mpicc-mpich-gcc12 -DMPI_Fortran_COMPILER=/opt/local/bin/mpif90-mpich-gcc12 /opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0
uname -a
:Darwin 10.6.shared 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64
ppc
via Rosetta)cmake-devel @20220817-3.24.1-c3793b41_0
10:OpenCoarrays-2.10.0 svacchanda$ /opt/local/bin/gcc-mp-12 -v Using built-in specs. COLLECT_GCC=/opt/local/bin/gcc-mp-12 COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/powerpc-apple-darwin10/12.2.0/lto-wrapper Target: powerpc-apple-darwin10 Configured with: /opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_gcc12/gcc12/work/gcc-12.2.0/configure --prefix=/opt/local --build=powerpc-apple-darwin10 --enable-languages=c,c++,objc,obj-c++,lto,fortran,jit --libdir=/opt/local/lib/gcc12 --includedir=/opt/local/include/gcc12 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-12 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-12 --with-gxx-include-dir=/opt/local/include/gcc12/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --with-zstd=/opt/local --enable-checking=release --disable-multilib --enable-lto --enable-libstdcxx-time --without-build-config --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --enable-host-shared --with-darwin-extra-rpath=/opt/local/lib/libgcc --with-libiconv-prefix=/opt/local --with-tune-cpu=G4 --disable-tls --with-pkgversion='MacPorts gcc12 12.2.0_0' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.0 (MacPorts gcc12 12.2.0_0)
To help us debug your issue please explain:
What you were trying to do (and why)
Update OpenCoarrays for Macports and fix build for PPC. The only thing I had to change is use
isnan
instead ofieee_is_nan
and make includes ofieee_arithmetic
conditional, otherwise build fails: https://github.com/iains/darwin-toolchains-start-here/discussions/40 Here is the patch I made: https://github.com/barracuda156/macports-ports/blob/opencoarrays/science/OpenCoarrays/files/patch-isnan.diffWhat happened (include command output, screenshots, logs, etc.)
Build succeeds, however test results are poor:
opencoarrays_tests_10.6.8_ppc.txt P. S.
malloc
errors in the output are unrelated toOpenCoarrays
but result from twolibstdc++
, more here: https://github.com/iains/darwin-toolchains-start-here/discussions/20What you expected to happen
Test should pass :)
Step-by-step reproduction instructions to reproduce the error/bug
This can be reproduced from this commit: https://github.com/macports/macports-ports/commit/7ff020419b91ab210bda20e1b0998a0c977fff98 However PPC hardware is needed, or otherwise 10.6.8 with Rosetta installed.