terminal vs. pycharm

257 views
Skip to first unread message

Maximilian Köhler

unread,
Apr 1, 2018, 8:44:50 AM4/1/18
to fenics-support

Hey guys,

I'm a total newbie to FEniCS. I use it on my Mac after surrender installing it on my windows 10 home laptop. I installed FEniCS twice. I can either use a docker container or the anaconda environment. I linked Pycharm to the anaconda FEniCS environment. See attached the Pycharminterpreter.png

Anyway, here is the problem. I set up my first fluid dynamics simulation and everything is totally fine. I installed docker and can run containers and run the .py. Also, anaconda can activate the environment in the terminal and can run the .py too. However, running .py files by the terminal does not end in the same result as running them via Pycharm. I set the Pycharm interpreter to the FEniCS environment, but some weird error occurs.



/anaconda3/envs/fenicsproject/bin/python /Users/maximiliankohler/Documents/example1.py
Calling DOLFIN just-in-time (JIT) compiler, this may take some time.
--- Instant: compiling ---
In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/maximiliankohler/.cache/instant/python3.6/error/dolfin_961d486bd47d2c48d7253affd4931eb0bf1829ae/compile.log'
Traceback (most recent call last):
  File "/Users/maximiliankohler/Documents/example1.py", line 16, in <module>
    u_D = Expression('1 + x[0]*x[0] + 2*x[1]*x[1]', degree=2)
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/functions/expression.py", line 679, in __new__
    mpi_comm=kwargs.get("mpi_comm"))
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/expressions.py", line 266, in compile_expressions
    mpi_comm=mpi_comm)
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/expressions.py", line 183, in compile_expression_code
    mpi_comm=mpi_comm)
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/jit.py", line 70, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/compilemodule.py", line 603, in compile_extension_module
    **instant_kwargs)
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/instant/build.py", line 577, in build_module
    build_system)
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/instant/build.py", line 170, in recompile
    instant_error(msg % (cmd, compile_log_filename_dest))
  File "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/instant/output.py", line 96, in instant_error
    raise RuntimeError(text)
RuntimeError: In instant.recompile: The module did not compile with command 'make VERBOSE=1', see '/Users/maximiliankohler/.cache/instant/python3.6/error/dolfin_961d486bd47d2c48d7253affd4931eb0bf1829ae/compile.log'

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Running the .py via terminal:



I attached the compile.log . As I said, I’m a newbie and engineer. So most of the things are chinese for me. But as far as I understood the error occurs for some specific solver, which makes no sense since I use the exact same solver while calling the .py by the terminal. I hope you guys can help me how to fix this problem :)

Greetings from Germany
Max


compile.log

Jan Blechta

unread,
Apr 3, 2018, 7:54:07 AM4/3/18
to Maximilian Köhler, fenics-support
There seems to be multiple MPICH installs on your systems and the
just-in-time compilation system picks the wrong one at runtime in your
IDE.

Apparently your IDE does not have set the right environment as there is
in the working terminal. There are several environment variable which
might matter: PYTHONPATH, CMAKE_PREFIX_PATH, CPATH, CPLUS_INCLUDE_PATH,
LD_LIBRARY_PATH, PKG_CONFIG_PATH. Apart of that a compiler wrapper
mpic++ can play a role in that.

I don't know how either PyCharm or Anaconda work so I can't help you
more detailed answer. I would recommend to come with the problem to the
#installation channel on FEniCS Slack.

Jan


On Sun, 1 Apr 2018 05:44:50 -0700 (PDT)
Maximilian Köhler <mcsh...@gmail.com> wrote:

> Hey guys,
>
> I'm a total newbie to FEniCS. I use it on my Mac after surrender
> installing it on my windows 10 home laptop. I installed FEniCS twice.
> I can either use a docker container or the anaconda environment. I
> linked Pycharm to the anaconda FEniCS environment. See attached the
> Pycharminterpreter.png
>
> <https://lh3.googleusercontent.com/-x3roslG-xLU/WsDSqxCfwaI/AAAAAAAAADc/VFccQRnnxJYnhzyj8LNpwrSjAZ3B7kfCACLcBGAs/s1600/Pycharminterpreter.png>
>
> Anyway, here is the problem. I set up my first fluid dynamics
> simulation and everything is totally fine. I installed docker and can
> run containers and run the .py. Also, anaconda can activate the
> environment in the terminal and can run the .py too. However,
> running .py files by the terminal does not end in the same result as
> running them via Pycharm. I set the Pycharm interpreter to the FEniCS
> environment, but some weird error occurs.
>
>
>
> */anaconda3/envs/fenicsproject/bin/python
> /Users/maximiliankohler/Documents/example1.py*
> *Calling DOLFIN just-in-time (JIT) compiler, this may take some time.*
> *--- Instant: compiling ---*
> *In instant.recompile: The module did not compile with command 'make
> VERBOSE=1', see
> '/Users/maximiliankohler/.cache/instant/python3.6/error/dolfin_961d486bd47d2c48d7253affd4931eb0bf1829ae/compile.log'*
> *Traceback (most recent call last):*
> * File "/Users/maximiliankohler/Documents/example1.py", line 16, in
> <module>*
> * u_D = Expression('1 + x[0]*x[0] + 2*x[1]*x[1]', degree=2)*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/functions/expression.py",
> line 679, in __new__*
> * mpi_comm=kwargs.get("mpi_comm"))*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/expressions.py",
> line 266, in compile_expressions*
> * mpi_comm=mpi_comm)*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/expressions.py",
> line 183, in compile_expression_code*
> * mpi_comm=mpi_comm)*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/jit.py",
> line 70, in mpi_jit*
> * return local_jit(*args, **kwargs)*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/dolfin/compilemodules/compilemodule.py",
> line 603, in compile_extension_module*
> * **instant_kwargs)*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/instant/build.py",
> line 577, in build_module*
> * build_system)*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/instant/build.py",
> line 170, in recompile*
> * instant_error(msg % (cmd, compile_log_filename_dest))*
> * File
> "/anaconda3/envs/fenicsproject/lib/python3.6/site-packages/instant/output.py",
> line 96, in instant_error*
> * raise RuntimeError(text)*
> *RuntimeError: In instant.recompile: The module did not compile with
> command 'make VERBOSE=1', see
> '/Users/maximiliankohler/.cache/instant/python3.6/error/dolfin_961d486bd47d2c48d7253affd4931eb0bf1829ae/compile.log'*
>
>
> *Process finished with exit code 134 (interrupted by signal 6:
> SIGABRT)*
>
> Running the .py via terminal:
>
> <https://lh3.googleusercontent.com/-VevyllAcjnw/WsDTcj_BgqI/AAAAAAAAADk/-4FVD4btJ3sCf-pVFh5uhnlWEj_UPDH0ACLcBGAs/s1600/terminal.png>
Reply all
Reply to author
Forward
0 new messages