SmileiPIC / Smilei

Particle-in-cell code for plasma simulation
https://smileipic.github.io/Smilei
334 stars 119 forks source link

problem when run 1st benchmark #133

Closed strugglepanda closed 5 years ago

strugglepanda commented 5 years ago

Hi all, after install smilei, I meet an error when I try to run 1st benchmark. It writes " an error occurred in MPI_Init_thread". I have visited some website and found the reason might be between orte_ess_init and oomph_mpi_init, but I still no idea how to solve this error. I am a beginner. Thanks in advance for your time.

xxirii commented 5 years ago

You have to use mpirun before ./smilei: mpirun ./smilei tst1d...

It is necessary for any parallel mpi program.

strugglepanda commented 5 years ago

Hi @xxirii, I'm glad to receive your reply. When I follow your instruction, I think it works, but it becomes not just one error but 11 faults, like: macdeMacBook-Air:~ air$ cd /smilei macdeMacBook-Air:smilei air$ mpirun ./smilei tst1d_00_em_propagation.py [macdeMacBook-Air:02794] Process received signal [macdeMacBook-Air:02794] Signal: Segmentation fault: 11 (11) [macdeMacBook-Air:02794] Signal code: (0) [macdeMacBook-Air:02794] Failing at address: 0x0 [macdeMacBook-Air:02794] End of error message Segmentation fault: 11

Your advice is really helpful but I'm puzzled, it seems that I didn't configure the environment correctly.My bash_profile is below: export SMILEICXX=mpicxx export HDF5_ROOT_DIR=/opt/local/hdf5/lib export PATH=/opt/local/bin:$PATH export PATH=/opt/local/sbin:$PATH export CPATH=/opt/local/include/ ulimit -s hard

And I write the command "make config=verbose" and "make env",which might be useful, the screenshot is below : 屏幕快照 2019-06-29 下午10 20 03

Again thank you!

mccoys commented 5 years ago

The mpirun command should be run as follows:

mpirun -np 2 ./smilei ....py

(2 processors)

strugglepanda commented 5 years ago

Hi @mccoys ! I followed your instruction and found the same error. ps: my Mac is a little old and has just 1 processor. Thanks for your reply! 屏幕快照 2019-06-29 下午11 52 04

xxirii commented 5 years ago

Hi @strugglepanda, first I am sorry because I forgot the -np. I am using my phone and it is not very convenient.

Can you try to set in your terminal: export OMP_NUM_THREADS=1 export OMP_STACKSIZE=32M

I am trying this in case of.

mccoys commented 5 years ago

Actually your error seems related to a faulty openmpi install. Could you try to compile and run an example from the openmpi website?

For instance https://github.com/open-mpi/ompi/blob/master/test/mpi/environment/chello.c

strugglepanda commented 5 years ago

Hello @xxirii , I appreciate your reply very much and set environmental variables in bash_profile like this: export SMILEICXX=mpicxx export HDF5_ROOT_DIR=/opt/local/hdf5/lib export PATH=/opt/local/bin:$PATH export PATH=/opt/local/sbin:$PATH export CPATH=/opt/local/include/ ulimit -s hard export OMP_NUM_THREADS=1 export OMP_STACKSIZE=32M

First I am happy to receive your reply but secondly unhappy to see the same error message as follows =_= . I feel puzzled and I hope that I can run the 1st program.

strugglepanda commented 5 years ago

Hi @mccoys ! I run this example but there is an error as follows: macdeMacBook-Air:~ air$ vim chello.c macdeMacBook-Air:~ air$ gcc chello.c chello.c:1:10: fatal error: 'mpi.h' file not found

include

     ^~~~~~~

1 error generated. macdeMacBook-Air:~ air$

Is this a good news or bad one? In fact, I followed the tutorial to install the dependencies: https://smileipic.github.io/Smilei/install_macos.html I am aware of your boldface words at this moment。 And thank you for your reply : -D

iltommi commented 5 years ago

you should compile the chello.c using mpicc or similar.

strugglepanda commented 5 years ago

you should compile the chello.c using mpicc or similar.

Hello @iltommi ! When I modified to mpicc, the similar error appeared: 'mpicc.h' file not found.

But I followed the documents again, it seems everything is fine: macdeMacBook-Air:~ air$ sudo port install openmpi-gcc7 +threads Password: ---> Computing dependencies for openmpi-gcc7 ---> Cleaning openmpi-gcc7 ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found. macdeMacBook-Air:~ air$ sudo port select --set mpi openmpi-gcc7-fortran Selecting 'openmpi-gcc7-fortran' for 'mpi' succeeded. 'openmpi-gcc7-fortran' is now active. macdeMacBook-Air:~ air$ sudo port install hdf5 +openmpi+gcc7+threads ---> Computing dependencies for hdf5 ---> Cleaning hdf5 ---> Scanning binaries for linking errors ---> No broken files found. ---> No broken ports found.

There is not mpicc.h or similar things in /opt/local/include: 屏幕快照 2019-06-30 上午10 51 04 Some similar things are in /opt/lcal/include/openmpi-gcc7: 屏幕快照 2019-06-30 上午11 07 34

Maybe I need to install Linux on Mac and follow the instruction about Linux :-|

iltommi commented 5 years ago

Wait. To compile, the command should be mpicc chello.c.

Concerning the problem with Smilei, there might be an error in the doc which tell to set the variable HDF5_ROOT_DIRlike this :

export HDF5_ROOT_DIR=/opt/local/hdf5/lib

but that might be

export HDF5_ROOT_DIR=/opt/local/hdf5/

Could you try it?

p.s. As side note, please do not post screenshots but copy/paste text directly here.

strugglepanda commented 5 years ago

Wait. To compile, the command should be mpicc chello.c.

Concerning the problem with Smilei, there might be an error in the doc which tell to set the variable HDF5_ROOT_DIRlike this :

export HDF5_ROOT_DIR=/opt/local/hdf5/lib

but that might be

export HDF5_ROOT_DIR=/opt/local/hdf5/

Could you try it?

p.s. As side note, please do not post screenshots but copy/paste text directly here.

Sorry for posting screenshots. I reset the variable as you told me, unfortunately, the same error occurred. It's weird. And if you have any ideas, I'd be absolutely happy to try.

iltommi commented 5 years ago

Ok now, I need the output of these commands:

  1. which mpicxx
  2. mpicxx -showme
  3. which mpirun
  4. mpirun --version
  5. make (in the Smilei directory)
  6. make env (in the Smilei directory)
  7. find $HDF5_ROOT_DIR

p.s. reply to this message by clicking the three dots at the end pf the header and selecting Quote reply

strugglepanda commented 5 years ago

Ok now, I need the output of these commands:

  1. which mpicxx
  2. mpicxx -showme
  3. which mpirun
  4. mpirun --version
  5. make (in the Smilei directory)
  6. make env (in the Smilei directory)
  7. find $HDF5_ROOT_DIR

p.s. reply to this message by clicking the three dots at the end pf the header and selecting Quote reply

Thanks for your detailed reply. The whole things of command "make" are really a little too much, so I’m not sure whether you want me to show it, and there are several warnings but no error. According to the 7th command, it seems that the issue is for the environment variables.

macdeMacBook-Air:~ air$ which mpicxx /opt/local/bin/mpicxx macdeMacBook-Air:~ air$ mpicxx -showme /opt/local/bin/g++-mp-7 -I/opt/local/include/openmpi-gcc7 -L/opt/local/lib -L/opt/local/lib/openmpi-gcc7 -lmpi_cxx -lmpi macdeMacBook-Air:~ air$ which mpirun /opt/local/bin/mpirun macdeMacBook-Air:~ air$ mpirun --version mpirun (Open MPI) 4.0.1

Report bugs to http://www.open-mpi.org/community/help/ macdeMacBook-Air:~ air$ cd /smilei macdeMacBook-Air:smilei air$ make Unknown smilei version make: Nothing to be done for `default'. macdeMacBook-Air:smilei air$ make env Unknown smilei version SMILEICXX : mpicxx PYTHONEXE : python MPIVERSION : VERSION : ??-?? OPENMP_FLAG : -fopenmp -D_OMP HDF5_ROOT_DIR : /opt/local/hdf5/ SITEDIR : /Users/air/Library/Python/2.7/lib/python/site-packages PY_CXXFLAGS : -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -DSMILEI_USE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION PY_LDFLAGS : -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -ldl -framework CoreFoundation CXXFLAGS : -D__VERSION=\"??-??\" -D_VECTO -std=c++11 -Wall -I/opt/local/hdf5//include -Isrc -Isrc/Ionization -Isrc/MovWindow -Isrc/Tools -Isrc/Checkpoint -Isrc/Projector -Isrc/Interpolator -Isrc/SmileiMPI -Isrc/ElectroMagnBC -Isrc/Python -Isrc/Pusher -Isrc/ElectroMagn -Isrc/Radiation -Isrc/Diagnostic -Isrc/ElectroMagnSolver -Isrc/Collisions -Isrc/Species -Isrc/Field -Isrc/Patch -Isrc/MultiphotonBreitWheeler -Isrc/picsar_interface -Isrc/Params -Isrc/DomainDecomposition -Isrc/Profiles -Ibuild/src/Python -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -DSMILEI_USE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_VECTO -O3 -g -fopenmp -D_OMP LDFLAGS : -L/opt/local/hdf5//lib -lhdf5 -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -ldl -framework CoreFoundation -lm -fopenmp -D_OMP macdeMacBook-Air:smilei air$ cd macdeMacBook-Air:~ air$ find $HDF5_ROOT_DIR find: /opt/local/hdf5/: No such file or directory

iltommi commented 5 years ago

ok it looks like the proble is find: /opt/local/hdf5/: No such file or directory

now, can you give me the output of these commands:

mdfind -name hdf5.h

and

find /opt -name hdf5.h

?

strugglepanda commented 5 years ago

ok it looks like the proble is find: /opt/local/hdf5/: No such file or directory

now, can you give me the output of these commands:

mdfind -name hdf5.h

and

find /opt -name hdf5.h

?

Sorry for reply so late, this is the results: macdeMacBook-Air:~ air$ mdfind -name hdf5.h /opt/local/include/hdf5.h /usr/local/Cellar/cmake/3.14.5/share/doc/cmake/html/module/FindHDF5.html macdeMacBook-Air:~ air$ find /opt -name hdf5.h /opt/local/include/hdf5.h

iltommi commented 5 years ago

Next step, try doing this:

export HDF5_ROOT_DIR=/opt/local
make clean
make

and paste here errors and warnings

strugglepanda commented 5 years ago

Next step, try doing this:

export HDF5_ROOT_DIR=/opt/local
make clean
make

and paste here errors and warnings

At first, I modified bash_profile by your instruction, and make Smilei. But the warnings are distributed discretely, I paste them below:

Compiling src/ElectroMagn/LaserPropagator.cpp
src/ElectroMagn/LaserPropagator.cpp: In member function 'void LaserPropagator::operator()(std::vector<_object*>, std::vector<int>, double, std::__cxx11::string, int, double)':
src/ElectroMagn/LaserPropagator.cpp:154:85: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
         PyObject* profile = PyObject_CallMethod(numpy, "vectorize", "O", profiles[i]);
                                                                                     ^
src/ElectroMagn/LaserPropagator.cpp:154:85: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
----------------------------------------------------------------------------------------------------
Compiling src/Params/Params.cpp
In file included from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:83:0,
                 from src/Tools/PyTools.h:20,
                 from src/Params/Params.cpp:8:
src/Params/Params.cpp: In constructor 'Params::Params(SmileiMPI*, std::vector<std::__cxx11::basic_string<char> >)':
src/Params/Params.cpp:91:65: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
                                                                 ^
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:774:24: note: in definition of macro 'Py_DECREF'
         --((PyObject*)(op))->ob_refcnt != 0)            \
                        ^~
src/Params/Params.cpp:91:65: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
                                                                 ^
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:774:24: note: in definition of macro 'Py_DECREF'
         --((PyObject*)(op))->ob_refcnt != 0)            \
                        ^~
src/Params/Params.cpp:91:65: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
                                                                 ^
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:115:47: note: in definition of macro 'Py_TYPE'
 #define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
                                               ^~
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:777:9: note: in expansion of macro '_Py_Dealloc'
         _Py_Dealloc((PyObject *)(op));                  \
         ^~~~~~~~~~~
src/Params/Params.cpp:91:5: note: in expansion of macro 'Py_DECREF'
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
     ^~~~~~~~~
src/Params/Params.cpp:91:65: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
                                                                 ^
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:115:47: note: in definition of macro 'Py_TYPE'
 #define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
                                               ^~
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:777:9: note: in expansion of macro '_Py_Dealloc'
         _Py_Dealloc((PyObject *)(op));                  \
         ^~~~~~~~~~~
src/Params/Params.cpp:91:5: note: in expansion of macro 'Py_DECREF'
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
     ^~~~~~~~~
src/Params/Params.cpp:91:65: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
                                                                 ^
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:764:45: note: in definition of macro '_Py_Dealloc'
     (*Py_TYPE(op)->tp_dealloc)((PyObject *)(op)))
                                             ^~
src/Params/Params.cpp:91:5: note: in expansion of macro 'Py_DECREF'
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
     ^~~~~~~~~
src/Params/Params.cpp:91:65: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
                                                                 ^
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/object.h:764:45: note: in definition of macro '_Py_Dealloc'
     (*Py_TYPE(op)->tp_dealloc)((PyObject *)(op)))
                                             ^~
src/Params/Params.cpp:91:5: note: in expansion of macro 'Py_DECREF'
     Py_DECREF(PyObject_CallMethod(numpy, "seterr", "s", "ignore"));
     ^~~~~~~~~
src/Params/Params.cpp: In member function 'bool Params::isSpeciesField(std::__cxx11::string)':
src/Params/Params.cpp:1107:17: warning: suggest parentheses around '&&' within ||' [-Wparentheses]

             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 && (field_name.substr(2,6)!="_mode_" || field_name.find("mode_") != field_name.rfind("mode_"))
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------------------------------------------------------------------------------
Compiling src/Projector/Projector2D2OrderV.cpp
src/Projector/Projector2D2OrderV.cpp:417:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:448:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:488:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:535:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:566:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:604:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:652:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:683:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll

src/Projector/Projector2D2OrderV.cpp:721:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
             #pragma unroll
----------------------------------------------------------------------------------------------------
Compiling src/Projector/Projector3D4OrderV.cpp
src/Projector/Projector3D4OrderV.cpp:279:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D4OrderV.cpp:473:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D4OrderV.cpp:666:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D4OrderV.cpp:789:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D4OrderV.cpp:1147:0: warning: ignoring #pragma unroll  -Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D4OrderV.cpp:1346:0: warning: ignoring #pragma unroll  -Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D4OrderV.cpp:1547:0: warning: ignoring #pragma unroll  -Wunknown-pragmas]
                 #pragma unroll(8)
----------------------------------------------------------------------------------------------------
Compiling src/Projector/Projector3D2OrderV.cpp
src/Projector/Projector3D2OrderV.cpp:137:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D2OrderV.cpp:430:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D2OrderV.cpp:471:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D2OrderV.cpp:513:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)

src/Projector/Projector3D2OrderV.cpp:744:0: warning: ignoring #pragma unroll  [-Wunknown-pragmas]
                 #pragma unroll(8)
----------------------------------------------------------------------------------------------------
Compiling src/Projector/ProjectorAM2Order.cpp
src/Projector/ProjectorAM2Order.cpp: In member function 'void ProjectorAM2Order::currents_mode0(std::complex<double>*, std::complex<double>*, std::complex<double>*, Particles&, unsigned int, double, int*, double*)':
src/Projector/ProjectorAM2Order.cpp:161:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] += Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:161:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:162:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] += Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:162:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:163:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] += Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:163:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:161:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] += Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:161:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:162:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] += Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:162:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:163:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] += Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:163:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp: In member function 'void ProjectorAM2Order::currents(std::complex<double>*, std::complex<double>*, std::complex<double>*, Particles&, unsigned int, double, int*, double*, std::complex<double>*, int)':
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] -= Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] -= Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] -= Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] -= Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:362:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] -= Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:363:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] -= Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:364:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp: In member function 'void ProjectorAM2Order::currentsAndDensity_mode0(std::complex<double>*, std::complex<double>*, std::complex<double>*, std::complex<double>*, Particles&, unsigned int, double, int*, double*)':
src/Projector/ProjectorAM2Order.cpp:543:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] += Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:543:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:544:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] += Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:544:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:545:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] += Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:545:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:543:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] += Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:543:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:544:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] += Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:544:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:545:32: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] += Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
src/Projector/ProjectorAM2Order.cpp:545:32: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp: In member function 'void ProjectorAM2Order::currentsAndDensity(std::complex<double>*, std::complex<double>*, std::complex<double>*, std::complex<double>*, Particles&, unsigned int, double, int*, double*, std::complex<double>*, int)':
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] -= Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] -= Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] -= Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wl[i][j-nfold] -= Wl[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:755:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wr[i][j-nfold] -= Wr[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:756:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
                 Wt[i][j-nfold] -= Wt[i][-j-nfold]; 
                 ~~~~~~~~~~~~~^
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
src/Projector/ProjectorAM2Order.cpp:757:30: warning: array subscript is above array bounds [-Warray-bounds]
----------------------------------------------------------------------------------------------------
Compiling src/Species/Species.cpp
src/Species/Species.cpp: In member function 'virtual void Species::computeCharge(unsigned int, ElectroMagn*)':
src/Species/Species.cpp:981:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                 for (unsigned int imode=0; imode<Nmode;imode++){
                                            ~~~~~^~~~~~

To be honest, it's really too much and too difficult to understand.

iltommi commented 5 years ago

I do not see any errror here, just warnings. What does it say at the end? Is there a smilei and smilei_test executables?

Could you pull the latest git? i.e. by doing git clone https://github.com/SmileiPIC/Smilei.git

strugglepanda commented 5 years ago

I do not see any errror here, just warnings. What does it say at the end? Is there a smilei and smilei_test executables?

Could you pull the latest git? i.e. by doing git clone https://github.com/SmileiPIC/Smilei.git

I type the "git ..." command and make Smilei again, and there are some warnings. But it is different from before, for instance, now Seecies.cpp have no warnings. I guess that it's unnecessary to paste all the warnings. At the end is as follows: Linking smilei Compiling src/Smilei.cpp for test mode Linking smilei_test for test mode

strugglepanda commented 5 years ago

I'm not sure whether this will be helpful: macdeMacBook-Air:Smilei air$ mpirun -np 1 ./smilei tst1d_00_em_propagation.py [macdeMacBook-Air:05804] Process received signal [macdeMacBook-Air:05804] Signal: Segmentation fault: 11 (11) [macdeMacBook-Air:05804] Signal code: (0) [macdeMacBook-Air:05804] Failing at address: 0x0 [macdeMacBook-Air:05804] End of error message Segmentation fault: 11

iltommi commented 5 years ago

Ok, first part is good. It means compilation went well. Second part is really strange. Are you sure you have smilei executable and tst1d_00_em_propagation.py in the directory you're running the command mpirun -np 1 ./smilei tst1d_00_em_propagation.py ?

mccoys commented 5 years ago

@strugglepanda I really think your issue is independent from Smilei.

Have you tried again compiling and running the example program chello.c ?

mpicc chello.c
./a.out
strugglepanda commented 5 years ago

Hi @iltommi ! I use 'cd' to /Users/air/Smilei and run the command. And Smilei.exec and tst1d_00_em_propagation.py are both in this file.

Hi @mccoys ! I think you are right. The results are as follows: macdeMacBook-Air:~ air$ mpicc chello.c chello.c:1:10: fatal error: mpicc.h: No such file or directory

include

      ^~~~~~~~~

compilation terminated.

By the way, I use command open and source .bash_profile to modify it, and Smilei is in D:/Users/air/Smilei while opt is in D:/opt, could this cause problem about environment variables?

mccoys commented 5 years ago

You have modified the file chello.c? It seems you have replaced mpi.h by mpicc.h. This is wrong.

Please try again with the original file

strugglepanda commented 5 years ago

You have modified the file chello.c? It seems you have replaced mpi.h by mpicc.h. This is wrong.

Please try again with the original file

Sorry for my mistake. New_chello is compiled successfully. But I find the same error as I run 1st program before and I paste it all here:

macdeMacBook-Air:~ air$ vim new_chello.c
macdeMacBook-Air:~ air$ mpicc new_chello.c
macdeMacBook-Air:~ air$ ./a.out
[macdeMacBook-Air:00645] *** Process received signal ***
[macdeMacBook-Air:00645] Signal: Segmentation fault: 11 (11)
[macdeMacBook-Air:00645] Signal code:  (0)
[macdeMacBook-Air:00645] Failing at address: 0x0
[macdeMacBook-Air:00645] *** End of error message ***
[macdeMacBook-Air.local:00644] [[INVALID],INVALID] ORTE_ERROR_LOG: Unable to start a daemon on the local node in file /opt/local/var/macports/build/_opt_local_var_macports_sources_www.macports.org_files_ports_science_openmpi/openmpi-gcc7/work/openmpi-4.0.1/orte/mca/ess/singleton/ess_singleton_module.c at line 532
[macdeMacBook-Air.local:00644] [[INVALID],INVALID] ORTE_ERROR_LOG: Unable to start a daemon on the local node in file /opt/local/var/macports/build/_opt_local_var_macports_sources_www.macports.org_files_ports_science_openmpi/openmpi-gcc7/work/openmpi-4.0.1/orte/mca/ess/singleton/ess_singleton_module.c at line 166

It looks like orte_init failed for some reason; your parallel process is likely to abort. There are many reasons that a parallel process can fail during orte_init; some of which are due to configuration or environment problems. This failure appears to be an internal failure; here's some additional information (which may only be relevant to an Open MPI developer):

orte_ess_init failed --> Returned value Unable to start a daemon on the local node (-127) instead of ORTE_SUCCESS


It looks like MPI_INIT failed for some reason; your parallel process is likely to abort. There are many reasons that a parallel process can fail during MPI_INIT; some of which are due to configuration or environment problems. This failure appears to be an internal failure; here's some additional information (which may only be relevant to an Open MPI developer):

ompi_mpi_init: ompi_rte_init failed --> Returned "Unable to start a daemon on the local node" (-127) instead of "Success" (0)

An error occurred in MPI_Init on a NULL communicator MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort, and potentially your MPI job) [macdeMacBook-Air.local:00644] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed! macdeMacBook-Air:~ air$

mccoys commented 5 years ago

Ok, then your install of openmpi is wrong.

You have to ask people at OpenMPI to fix this problem. Maybe your first try would be to install manually an older version, but we cannot help you here.

strugglepanda commented 5 years ago

Ok, then your install of openmpi is wrong.

You have to ask people at OpenMPI to fix this problem. Maybe your first try would be to install manually an older version, but we cannot help you here.

I get it, thank you so much!

jderouillat commented 5 years ago

Hi, Given that you met many difficulties to go to this status, I advise you to go to a system administrator in your lab which could check the integrity of your OpenMPI or OS installation.
There is more chance that you unfortunately damage it than to have met an OpenMPI bug. Regards

Julien

strugglepanda commented 5 years ago

Hi, Given that you met many difficulties to go to this status, I advise you to go to a system administrator in your lab which could check the integrity of your OpenMPI or OS installation. There is more chance that you unfortunately damage it than to have met an OpenMPI bug. Regards

Julien

Hello sir, thanks and I will take your advice. I'm truly grateful for your help and it's time to close the issue.