Comments (11)
Hi
You seem to have run the happi.Open
command in your bash terminal. However, this is a python command.
You first need to install the happi package: in a bash terminal, type make happi
from the original Smilei directory. This has to be done only once in your machine. You should see a message saying a smilei.pth file was added somewhere. Otherwise, it means something is wrong with your python installation.
Then, open a python prompt using the python
command, or any other, such as ipython
which I recommend. In this prompt, you have to import happi
then you may run command happi.Open
as you did above.
from smilei.
I would like to add that the resolution to your problem is already explicit in the documentation.
If the doc is not clear for you, please explain what it lacks.
from smilei.
Dear @mccoys ,
Thanks for your e-mail and sorry that I did not look to the documentation.
I tried to install happy, by typing make happi in the shell but I could not,
I tried to execute Diagnostics.py file as follows, but seems still error exists:
(maybe it is due to my system, I use devtoolset -3 for GCC 4.9, but python is with GCC 4.8.5)
execfile("/home/work/Smilei-master/scripts/Diagnostics.py")
S = happi.Open("/home/work/Smilei-master")
Traceback (most recent call last):
File "", line 1, in
NameError: name 'happi' is not defined
ALL The Best
from smilei.
You need to type make happi
in the smilei follder.
cd /home/work/Smilei-master
make happi
what the above lines return?
from smilei.
However it seems that point 2 in https://smileipic.github.io/Smilei/installation.html#install-the-happi-module is no more valid for the latest release.
@mccoys can you confirm?
from smilei.
Thanks and sorry.
I used the previous version of Smilei and there was no happi folder, I compiled the new version and now I can use happi, ^_~
All The Best
from smilei.
@iltommi the Diagnostics.py technique should still work
@bitalm indeed the module happi is new and you need the newest version of smilei :)
from smilei.
I get this error when trying to directly import happi
In [1]: execfile("happi/__init__.py")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-1-d13963d2b9f6> in <module>()
----> 1 execfile("happi/__init__.py")
/Users/tommaso/local/src/smilei/happi/__init__.py in <module>()
----> 1 from ._core import Open
2 from ._Utils import multiPlot, Units
ValueError: Attempted relative import in non-package
from smilei.
@iltommi but this is not the right file to import. You must import scripts/Diagnostics.py
from smilei.
Also I think I need h5py, when I run the
S = happi.Open("/home/work/Smilei-master/tst2d_4_laser_wake")
I receive as:
Traceback (most recent call last):
File "", line 1, in
File "/home/work/Smilei-master/happi/_core.py", line 512, in Open
return SmileiSimulation(*args, **kwargs)
File "/home/work/Smilei-master/happi/_core.py", line 538, in init
import h5py
ImportError: No module named h5py
All The Best
from smilei.
I could solve the issue of h5py using anaconda python I guess,
Thanks :)
All The Best
from smilei.
Related Issues (20)
- Injector initialization crashes if temperature profile not defined HOT 1
- I get errors whenever I have been trying to use select in TrackParticles diagnostics HOT 4
- Segmentation fault when using the ExternalField block in 3D HOT 21
- How 'reflective' particle boundary works HOT 2
- Particle injector dosen't work with profile HOT 1
- AMcylindrical geometry, origin of transverse axes in Probes HOT 9
- error compiling v5.0 with amd_gpu config HOT 17
- dump_minutes failing to correctly dump restart files HOT 3
- smilei v5.0 problems with compiling on GPU on new HPC HOT 32
- "auto" keyword for automatic range calculation in ParticleBinning diagnostic causes fatal crash HOT 2
- Failures in the patch creation due to MPI processes etc HOT 8
- Understanding performance with ionization HOT 1
- VectorPatch Compiling Errors HOT 5
- Error with VectorPatch.o when making HOT 3
- HDF5 error HOT 7
- Incorrect Implementation of output time offset HOT 1
- Implementation of position attribute of Fields HOT 5
- Error message in 1Dcartesian HOT 2
- Problem installing Smilei for A100 GPUs HOT 7
- Crash with GPU computing HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smilei.