Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error (problem in pympb.cpp) "Cannot convert cnumber to mpb_real {aka double}" #269

Closed
DerekK44 opened this issue Apr 4, 2018 · 5 comments

Comments

@DerekK44
Copy link
Contributor

DerekK44 commented Apr 4, 2018

Hi,

I'm encountering a new issue when building meep from source. I get the following error message when at the meep "make" step:

pympb.cpp: In member function ‘void py_mpb::mode_solver::material_epsmu(meep_geom::material_type, symmetric_matrix*, symmetric_matrix*, bool)’: pympb.cpp:563:20: error: cannot convert ‘cnumber’ to ‘mpb_real {aka double}’ in assignment epsmu->m01 = md->medium.epsilon_offdiag.x;

The compilation then aborts. Any idea what might be going on? The build script I had was working with previous versions of meep. Below is my build script:

Thank you!


set -e

RPATH_FLAGS="-Wl,-rpath,/usr/local/lib:/usr/lib/x86_64-linux-gnu/hdf5/openmpi"
MY_LDFLAGS="-L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi ${RPATH_FLAGS}"
MY_CPPFLAGS="-I/usr/local/include -I/usr/include/hdf5/openmpi"

export CC=mpicc
export CXX=mpic++

cd ~/install
git clone https://github.com/stevengj/mpb.git
cd mpb/
sh autogen.sh --enable-shared CC=mpicc CXX=mpic++ LDFLAGS="${MY_LDFLAGS}" CPPFLAGS="${MY_CPPFLAGS}"
make && sudo make install

sudo pip install --upgrade pip
pip install --no-cache-dir mpi4py
export HDF5_MPI="ON"
pip install --no-binary=h5py h5py

cd ~/install
git clone https://github.com/stevengj/meep.git
cd meep/
sh autogen.sh --enable-shared --with-mpi PYTHON=/home/dkita/anaconda2/bin/python \
    CC=mpicc CXX=mpic++ LDFLAGS="${MY_LDFLAGS}" CPPFLAGS="${MY_CPPFLAGS}"
make && sudo make install
@DerekK44 DerekK44 changed the title Build error: "Cannot convert cnumber to mpb_real {aka double}" Build error (problem in pympb.cpp) "Cannot convert cnumber to mpb_real {aka double}" Apr 4, 2018
@ChristopherHogan
Copy link
Contributor

#257, which was merged 6 days ago, fixed an issue where the installed MPB, if compiled without the --with-hermitian-eps flag, would be incompatible with the python MPB interface in meep. Are you seeing this problem with the latest source from the master branch? Do you have MPB installed?

@DerekK44
Copy link
Contributor Author

DerekK44 commented Apr 4, 2018

I am building from https://github.com/stevengj/meep.git and https://github.com/stevengj/mpb.git, which I believe are the master branches.

I currently have MPB version 1.6.1 installed. I installed meep and mpb in January (which has been working fine), but I am now trying to install the newer meep

@DerekK44
Copy link
Contributor Author

DerekK44 commented Apr 5, 2018

Installing MPB with the --with-hermitian-eps flag fixes the installation error. Should it have installed ok without this though?

Also, with it installed now I am trying to run the mode decomposition example here

But am getting AttributeError: 'Simulation' object has no attribute 'get_eigenmode_coefficients' . Perhaps this is a separate issue?

@ChristopherHogan
Copy link
Contributor

Yes, it should work without the --with-hermitian-eps flag. I can reproduce the problem and am working on it.

Regarding mode decomposition, get_eigenmode_coefficients isn't quite ready yet for Python. You can track the progress at #248.

@DerekK44
Copy link
Contributor Author

DerekK44 commented Apr 5, 2018

Thanks for the response. I appreciate all the work going into this project and am looking forward to the features you are all adding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants