exapde / Exasim

Exasim: Generating Discontinuous Galerkin Codes For Extreme Scalable Simulations
MIT License
65 stars 19 forks source link

Error "no method matching *(::Char, ::Tuple{String,Int64})" in install.jl #4

Closed glwagner closed 3 years ago

glwagner commented 3 years ago

Trying to install Exasim on macOS (10.15.7). Running julia 1.5.3.

My first attempt to run

julia> include("install.jl")

failed because

Error: Cannot install mpich because conflicting formulae are installed.
  open-mpi: because both install MPI compiler wrappers

Please `brew unlink open-mpi` before continuing.

After running

$ brew unlink open-mpi

installation seemed to proceed more smoothly, until I hit

ERROR: LoadError: MethodError: no method matching *(::Char, ::Tuple{String,Int64})
Closest candidates are:
  *(::Any, ::Any, ::Any, ::Any...) at operators.jl:538
  *(::Union{AbstractChar, AbstractString}, ::Union{AbstractChar, AbstractString}...) at strings/basic.jl:251
  *(::Union{Regex, AbstractChar, AbstractString}, ::Union{Regex, AbstractChar, AbstractString}...) at regex.jl:656
Stacktrace:
 [1] *(::Char, ::Tuple{String,Int64}, ::Char) at ./operators.jl:538
 [2] top-level scope at /Users/gregorywagner/Projects/Exasim/Installation/install.jl:94
 [3] include(::String) at ./client.jl:457
 [4] top-level scope at REPL[1]:1
in expression starting at /Users/gregorywagner/Projects/Exasim/Installation/install.jl:94

This comes from

https://github.com/exapde/Exasim/blob/fb02634b911ff181b8da6bcfedef200812eb5e24/Installation/install.jl#L94

I guess mpi is a tuple:

julia> mpi
("", 1)

and q is a char:

julia> q
'"': ASCII/Unicode U+0022 (category Po: Punctuation, other)

I'm not sure if mpi is meant to be Tuple, but the reason is because findinstallexec here:

https://github.com/exapde/Exasim/blob/fb02634b911ff181b8da6bcfedef200812eb5e24/Installation/install.jl#L34

returns a tuple:

https://github.com/exapde/Exasim/blob/fb02634b911ff181b8da6bcfedef200812eb5e24/Installation/findinstallexec.jl#L87

exapde commented 3 years ago

Hi Greg! Thanks a lot for catching the error. mpi = findinstallexec("mpicxx", "openmpi", brew, 0) should be mpi, appinstall = findinstallexec("mpicxx", "openmpi", brew, 0). I updated install.jl. Please let me know if you still encounter problem installing exasim.

glwagner commented 3 years ago

Ok, install.jl runs without error! Onto the next steps of installation...