CliMA / ClimateMachine.jl

Climate Machine: an Earth System Model that automatically learns from data
https://clima.github.io/ClimateMachine.jl/latest/
Other
454 stars 78 forks source link

Possible issue with climaformat.jl after Merge 1172 #1196

Closed smarras79 closed 4 years ago

smarras79 commented 4 years ago

Description

The commit listed below (Merge #1172) has possibly broken climaformat.jl as shown in the error trace posted below the commit:

commit 7f9d08dc66c1c0068c57b4f7778b7f68000bab3f (origin/master, origin/HEAD, master)
Merge: 03850273a 6e1b7786b
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Thu Jun 4 13:51:03 2020 +0000

    Merge #1172

Steps to reproduce

Steps to reproduce the behavior:

  1. Output of git log -1. In the case of bugs from code that has significantly diverged from master, a separate branch can be created and linked.
commit bfbf19eff9aaf57b84cc16556d65953fb4437aa3 (HEAD -> sm/mountain-waves, origin/sm/mountain-waves)
Author: Simone Marras <smarras@njit.edu>
Date:   Wed May 27 03:36:43 2020 -0700

    Mountain gravity waves:
    - hydrostatic linear and non-linear setups
    - removed agnesi-equilibrium.jl. IT will be added with its own PR.
    - Smagorinsky run with  0.23
    - Formatted
    - Reduced time end to avoid wave issue after the flow went through a few times
    - Replaced ClimateMachine.init() with ClimateMachine.cli() after merging with 7f9d08dc66c1c0068c57b4f7778b7f68000bab3f

This is PR #1163

  1. Exact sequence of commands run (REPL, terminal, or script) to reproduce this issue issue.
  2. Expected runtime for issue/bug to reveal itself (particularly useful in the case of problems with physics / set-ups that require longer time to solution)

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem, otherwise please remove this section. This can be particularly useful for physical simulations.

Environment and error messages

Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_MPI_PATH = /home/user/mylibs/mpich-3.3.1/build_intel

Additional context

Add any other context about the problem here.

For CLIMA developers

jkozdon commented 4 years ago

Problem is with the file not the formatter

ClimateMachine.cli ()

should have no space

ClimateMachine.cli()

in tutorials/Atmos/agnesi_hs_lin.jl

smarras79 commented 4 years ago

Shouldn't the formatter identify these issues and fix them?

smarras79 commented 4 years ago

issues solved.

jkozdon commented 4 years ago

Shouldn't the formatter identify these issues and fix them?

The formatter only works on syntactically correct julia code. It cannot fix bugs

jkozdon commented 4 years ago

fair enough, but a space after before a parenthesis is not a bug in the real sense. It is a syntax error due to a wrong format of the text in the file. Anyway, that solved it.

A space before a parenthesis is a bug in julia. Since the code won't run.

julia> f() = nothing
f (generic function with 1 method)

julia> f ()
ERROR: syntax: space before "(" not allowed in "f (" at REPL[2]:1
Stacktrace:
 [1] top-level scope at REPL[1]:0