0

I am trying to install Charm++ on the latest version of macOS 10.14. Following this http://charm.cs.illinois.edu/manuals/html/charm++/A.html, when I try and do ./build charm++ netlrts-darwin-x86_64 --with-production -j8 I get this error:

configure: error: in `/Users/youssefmoawad/Downloads/charm-6.9.0/netlrts-darwin-x86_64/tmp':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [headers] Error 2
-------------------------------------------------
Charm++ NOT BUILT. Either cd into netlrts-darwin-x86_64/tmp and try
to resolve the problems yourself, visit
http://charm.cs.illinois.edu/
for more information. Otherwise, email the developers at charm@cs.illinois.edu

When I try the installation using the alternative method, through Spack; first off I have to install Spack: https://spack.io. That fails however when I do the spack install hdf5, getting:

Error: InstallError: OpenMPI requires both C and Fortran compilers!

/Users/youssefmoawad/Downloads/spack/var/spack/repos/builtin/packages/openmpi/package.py:337, in die_without_fortran:
    334        # avoid delayed build errors in dependents.
    335        if (self.compiler.f77 is None) or (self.compiler.fc is None):
    336            raise InstallError(
>>  337                'OpenMPI requires both C and Fortran compilers!'
    338            )

See build log for details:
   /Users/youssefmoawad/Downloads/spack/var/spack/stage/openmpi-3.1.3-6owrpmticip3filnaljkrsyl3zlonwea/openmpi-3.1.3/spack-build.out

When I disregard that and try to install Charm++ anyway, using spack install charmpp, I get:

Error: TypeError: expected str, bytes or os.PathLike object, not NoneType

 /Users/youssefmoawad/Downloads/spack/var/spack/repos/builtin/packages/charmpp/package.py:173, in install:
    170        # here.
    171        options = [
    172            os.path.basename(self.compiler.cc),
>>  173            os.path.basename(self.compiler.fc),
    174            "-j%d" % make_jobs,
    175            "--destination=%s" % prefix,
    176        ]

See build log for details:
/Users/youssefmoawad/Downloads/spack/var/spack/stage/charmpp-6.8.2-g3j72njzqjejhutygtdksfdy6sp524us/charm-v6.8.2/spack-build.out

I'm not sure what's wrong, but I think it has something to do with Fortran compilers, in which case could I get some help on which compiler to install?

Update I have tried installing the gfortran compiler and it installed successfully, but I still encounter the above errors.

Youssef Moawad
  • 2,846
  • 5
  • 28
  • 50
  • This ste is not for softwre recommendation. Doesn't the roject state in the documentation which comiler versions do they support? – Vladimir F Героям слава Nov 26 '18 at 22:03
  • @VladimirF not really that I could find. I tried installing `gfortran` but no luck. – Youssef Moawad Nov 27 '18 at 01:24
  • 1
    take a look here: http://www.owsiak.org/running-open-mpi-on-macos/ – Oo.oO Nov 27 '18 at 10:26
  • @Oo.oO I've managed to successfully install and test OpenMPI, but unfortunately it hasn't helped. – Youssef Moawad Nov 27 '18 at 14:35
  • @YoussefMoawad but is it the very same message or is it something else now? Take a look at config.log. Sometimes, messages are miss leading. Try to look for `C compiler cannot create executables` inside configure script and extract the part that is there. By looking at what is called there, you may find that something else is causing the issue. – Oo.oO Nov 27 '18 at 14:41
  • Yup, it's the same message. I tried to use the `mpicc` compiler instead of `gcc` or `clang` but it says that it doesn't support it. I found the part inside configure that says that but I can't tell what the issue is. – Youssef Moawad Nov 27 '18 at 14:54
  • Possibly related...? (e.g., may need to edit compilers.yaml to add gfortran paths?) https://github.com/spack/spack/issues/7147, https://github.com/spack/spack/issues/3146, https://spack.readthedocs.io/en/latest/tutorial_configuration.html – roygvib Nov 28 '18 at 23:39

1 Answers1

0

You are using the correct build line. The issue might be some incompatibility with the C++ compiler, like Charm++ passing incorrect flags to the compiler. gfortran shouldn't be needed for regular builds. It would be helpful if you can show any errors displayed in config.log. If it turns out to be a bug, you might want to report it in the mailing list or the forum (https://charm.discourse.group).

Another way to install Charm++ on macOS is using charm4py: pip3 install charm4py. It comes with Charm++ compiled as a shared library but is used through a Python interface so this may not be what you are after.

Juan Galvez
  • 96
  • 1
  • 2
  • 2