Skip to content

Add pymeep build instructions to docs#160

Merged
stevengj merged 11 commits intoNanoComp:masterfrom
ChristopherHogan:chogan/build_docs
Jan 16, 2018
Merged

Add pymeep build instructions to docs#160
stevengj merged 11 commits intoNanoComp:masterfrom
ChristopherHogan:chogan/build_docs

Conversation

@ChristopherHogan
Copy link
Contributor

@oskooi
Copy link
Collaborator

oskooi commented Jan 2, 2018

Replacing --with-pic and LIBS=-ldl with --enable-shared will result in a Meep failure to link with the MPB library (i.e., the linker is unable to find mpb.h). This will in turn cause the wvg_src.py test of the Meep make check suite to fail. The original flags produce no errors and all tests pass.

@ChristopherHogan
Copy link
Contributor Author

Ardavan is right. The problem is that using just --enable-shared causes make check to fail when running ./mpb ../examples/check.ctl, so MPB never gets installed, which is why meep can't find it. The test is looking for the installed mpb.scm but this is before make install is run:

make  check-local
make[3]: Entering directory '/root/install/mpb/mpb'
./mpb ../examples/check.ctl
Backtrace:
In ice-9/boot-9.scm:
 157: 4 [catch #t #<catch-closure 1403a80> ...]
In unknown file:
   ?: 3 [apply-smob/1 #<catch-closure 1403a80>]
In ice-9/eval.scm:
 432: 2 [eval # #]
 432: 1 [eval # #]
In unknown file:
   ?: 0 [primitive-load "/usr/local/share/mpb/mpb.scm"]

ERROR: In procedure primitive-load:
ERROR: In procedure open-file: No such file or directory: "/usr/local/share/mpb/mpb.scm"
Makefile:972: recipe for target 'check-local' failed
make[3]: *** [check-local] Error 1

@stevengj
Copy link
Collaborator

stevengj commented Jan 3, 2018

As a general rule, when you encounter a problem like this, it is best to fix it at the source rather than hack around it. If ./configure --enable-shared is not working for mpb, then we should fix it.

It should be fixed now with stevengj/libctl@51f7a7b

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would no longer recommend using environment variables for these things (397c693). It is better to pass flags directly to configure. (That way the configure script will "remember" them if you run make again, for example.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In particular, it is especially better to use -Wl,-rpath,... rather than LD_LIBRARY_FLAGS, since with -rpath the correct path will be embedded directly into the meep executable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is dangerous to include dist-upgrade in the script. This forces users to update their entire operating system — our installation script should not do this for them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would skip the make check in the build script.

Copy link
Collaborator

@stevengj stevengj Jan 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we use Ubuntu's libhdf5-openmpi-dev package?

Note that you can still build the serial versions of Meep and MPB and link to the MPI version of HDF5, you just need to build with CC=mpicc CXX=mpicxx.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building parallel hdf5 from source after setting the environment variables export CC=mpicc and export CC=mpicc ensures that the correct OpenMPI compilers are used throughout the entire build. In previous tests, I found that using Ubuntu's libhdf5-openmpi-dev package often lead to linking errors when building Meep (i.e., the hdf5 libraries could not be found, etc.).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use CC=mpicc.openmpi and CXX=mpic++.openmpi in case the user installed other MPI versions too.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This install script uses libhdf5-openmpi-dev and builds successfully. The only other packages built from source are: harminv, libctl, h5utils, and mpb.

There are two minor issues: (1) h5ls is missing, and (2) MPI jobs produce the following warning:

--------------------------------------------------------------------------
[[47997,1],0]: A high-performance Open MPI point-to-point messaging module
was unable to find any relevant network interfaces:

Module: OpenFabrics (openib)
  Host: ip-XXX-XX-XX-XXX

Another transport will be used instead, although this may result in
lower performance.
--------------------------------------------------------------------------

This can be circumvented by adding a flag to prevent searching for Infiniband hardware.

All that is left now is to omit the environment variables using -rpath...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h5ls is in the hdf5-tools Ubuntu package — see the Ubuntu package search.

@oskooi
Copy link
Collaborator

oskooi commented Jan 4, 2018

The updated install scripts (serial and parallel) have now been validated with --enable-shared replacing --with-pic and LIBS=-ldl.

@oskooi
Copy link
Collaborator

oskooi commented Jan 8, 2018

Here is the working install script without environment variables. Users must still add export PYTHONPATH="${HOME}/install/meep/python" to their .bashrc, etc file.

#!/bin/bash                                                                                                                                                                            

set -e

sudo apt-get update
sudo apt-get -y install libblas-dev liblapack-dev libgmp-dev libunistring-dev libmatheval-dev swig libgsl-dev autoconf pkg-config libpng16-dev git guile-2.0-dev libfftw3-dev libhdf5-openmpi-dev hdf5-tools libpython3.5-dev python3-numpy python3-pip

mkdir ~/install

cd ~/install
git clone https://github.com/stevengj/harminv.git
cd harminv/
sh autogen.sh --enable-shared
make && sudo make install

cd ~/install
git clone https://github.com/stevengj/libctl.git
cd libctl/
sh autogen.sh --enable-shared
make && sudo make install

cd ~/install
git clone https://github.com/stevengj/h5utils.git
cd h5utils/
CC=mpicc LDFLAGS="-L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -Wl,-rpath,/usr/local/lib:/usr/lib/x86_64-linux-gnu/hdf5/openmpi" CPPFLAGS="-I/usr/local/include -I/usr/include/hdf5/openmpi" sh autogen.sh
make && sudo make install

cd ~/install
git clone https://github.com/stevengj/mpb.git
cd mpb/
CC=mpicc LDFLAGS="-L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -Wl,-rpath,/usr/local/lib:/usr/lib/x86_64-linux-gnu/hdf5/openmpi" CPPFLAGS="-I/usr/local/include -I/usr/include/hdf5/openmpi" sh autogen.sh --enable-shared
make && make check && sudo make install

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

cd ~/install
git clone https://github.com/stevengj/meep.git
cd meep/
CC=mpicc CXX=mpic++ LDFLAGS="-L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi -Wl,-rpath,/usr/local/lib:/usr/lib/x86_64-linux-gnu/hdf5/openmpi" CPPFLAGS="-I/usr/local/include -I/usr/include/hdf5/openmpi" sh autogen.sh --enable-shared --with-python --with-mpi
make && make check && sudo make install

@ChristopherHogan
Copy link
Contributor Author

I replaced the separate serial and parallel build instructions with just the parallel version, using Ardavan's latest script.

@stevengj
Copy link
Collaborator

stevengj commented Jan 8, 2018

You shouldn't write CC=foo sh autogen.sh (which passes CC via temporarily setting an environment variable), you should use sh autogen.sh CC=foo (which passes CC by a command-line argument).

To do this, however, the Meep autogen.sh script should be modified. The whole configure_args business is problematic because it only allows a certain whitelist of names.

I already changed MPB's autoconf.sh script (NanoComp/mpb@ee35372) to be better in this way. Let's just change the autoconf.sh scripts for Meep etcetera.

stevengj added a commit that referenced this pull request Jan 8, 2018
stevengj added a commit to NanoComp/libctl that referenced this pull request Jan 8, 2018
@stevengj
Copy link
Collaborator

stevengj commented Jan 8, 2018

Okay, I updated the autogen.sh scripts so that you can now pass CC=foo etcetera directly as arguments.

@ChristopherHogan
Copy link
Contributor Author

ChristopherHogan commented Jan 8, 2018

PR 35 is needed for MPB to pass the args to configure. The same would need to be done for meep. See h5utils PR 5 for the explanation.

@ChristopherHogan
Copy link
Contributor Author

I believe this is correct now.

hdf5-tools \
libpython3.5-dev \
python3-numpy \
python3-pip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have to pass PYTHON=python3 if you want Meep to use Python 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automake goes through a list of possible interpreters and subs in the first one found into PYTHON. In our case, it picks python3 because that's the only one we have installed. Sicne most systems will likely have a python that points to python 2 though, I set PYTHON=python3 explicitly, with a note that the user can choose 2 or 3.

sh autogen.sh --enable-shared CC=mpicc LDFLAGS="${MY_LDFLAGS}" CPPFLAGS="${MY_CPPFLAGS}"
make && sudo make install

pip3 install --upgrade pip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs sudo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@oskooi
Copy link
Collaborator

oskooi commented Jan 8, 2018

To add sudo to the pip3 install lines, the --user flag needs to be removed, i.e.

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

@oskooi
Copy link
Collaborator

oskooi commented Jan 8, 2018

Minor correction: change the line mkdir ~/install to [ ! -d ~/install ] && mkdir ~/install

@ChristopherHogan
Copy link
Contributor Author

ChristopherHogan commented Jan 8, 2018

To add sudo to the pip3 install lines, the --user flag needs to be removed

I only added sudo to the line upgrading pip. mpi4py and h5py can still be installed with --user without sudo. We might want to install the latest pip with --user too in case the user might not want to upgrade the system pip. Then we wouldn't need sudo.

@ChristopherHogan
Copy link
Contributor Author

change the line mkdir ~/install to [ ! -d ~/install ] && mkdir ~/install

Done.

@stevengj
Copy link
Collaborator

stevengj commented Jan 8, 2018

You can just do mkdir -p ~/install ...

@ChristopherHogan
Copy link
Contributor Author

You can just do mkdir -p ~/install

Done.

@stevengj stevengj merged commit 73d2630 into NanoComp:master Jan 16, 2018
@ChristopherHogan ChristopherHogan deleted the chogan/build_docs branch January 16, 2018 15:11
scimax added a commit to scimax/meep that referenced this pull request Mar 26, 2018
* Broken Links in documentation (NanoComp#104)

* Links to further examples corrected

As I came across the broken links in the online documentation on readthedocs I thought I just propose the corrected links.
The broken link to the User interface was fixed as well.

* Links to Scheme Tutorial corrected

Links from "Scheme_Tutorial.md" changed to "Scheme_Tutorials/Basics.md"

* Fixes for running in Jupyter notebooks (NanoComp#101)

* Fixes for Jupyter

* Fix regex

* mpiPython V2P0 (NanoComp#87)

* trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches

* synced with stevengj/master

* sync with stevenj master

* updates

* rebased and updated .travis.yml with a 4-branch build matrix

* updates

* updates

* solely for the sake of travis debugging, remove all tests except aniso_disp from the core-library test suite

* updates to .travis.yml build matrix; temporary reduce TESTS in tests/Makefile.am and python/Makefile.am to minimal test suite just to get travis build working

* updates to .travis.yml

* updates to .travis.yml

* updates to .travis.yml

* rebased and updated .travis.yml with a 4-branch build matrix

* updates

* updates

* solely for the sake of travis debugging, remove all tests except aniso_disp from the core-library test suite

* updates to .travis.yml build matrix; temporary reduce TESTS in tests/Makefile.am and python/Makefile.am to minimal test suite just to get travis build working

* updates to .travis.yml

* updates to .travis.yml

* updates to .travis.yml

* updates to .travis.yml

* updates

* updates

* fields_chunk must only delete structure_chunk after it is done with it: after it has deleted the polarization state data

* test deleting structure before fields

* test deleting structure before fields

* Add material-dispersion.py example and test (NanoComp#99)

* Add material-dispersion.py example and test

* Includes Susceptibility fixes

* Temp workaround for py2 double free

* Add material-dispersion.py example and test

* Includes Susceptibility fixes

* Temp workaround for py2 double free

* WIP

* Delete extra comment

* Remove __swig_destroy__ calls

* Copy simulation.py to install directory (NanoComp#108)

* add Python tutorial for holey waveguide example to documentation and other minor fixes (NanoComp#110)

* Python tutorial for holey waveguide and other minor fixes

* minor tweaks

* Travis fixes (NanoComp#113)

* trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches

* synced with stevengj/master

* sync with stevenj master

* updates

* remove unnecessary libhdf5-serial-dev package from .travis build; restore  in python/Makefile.am to ensure python tests are executed under mpirun when building --with-mpi

* restored libhdf5-dev to package prerequisites (still omitting libhdf5-serial-dev)

* updates

* updates

* Add ring-cyl.py example and test (NanoComp#106)

* Add ring-cyl.py example

* Add working test for ring-cyl.py example

* Fix for py3 jupyter

* Add .py extension to __main__

* Check for cylindrical user volume

Also set default geometry and sources to []

* add Python tutorials for material dispersion and third-harmonic generation examples to documentation and other minor fixes (NanoComp#111)

* Python tutorial for material dispersion and other minor fixes

* minor tweaks and fixes

* more minor tweaks and fixes

* some fixes and 3 additional Scheme example files

* add Third Harmonic Generation example with more fixes and tweaks

* final set of tweaks and fixes

* tiny fix

* add Python tutorial for ring resonator in cylindrical coordinates to documentation and other fixes (NanoComp#117)

* add Python ring resonator in cylindrical coordinates tutorial to documentation and other fixes

* restore meep-pkgconfig.in

* minor tweaks

* fixes for new material_type in libctlgeom 4 (NanoComp#120)

* fixes for new material_type in libctlgeom 4

* update python usage of material_type

* Improve usability of user-defined material functions (NanoComp#118)

* set_epsilon wrapper

* Return Vector3 from vec2py instead of tuple

* Add antenna-radiation.py example and test  (NanoComp#121)

* Add working antenna-radiation.py

* Add test for radiation-antenna.py

* Add cavity-farfield.py

* Working cavity-farfield.py example

* Print complex numbers in scheme format (NanoComp#119)

* Print complex numbers in scheme format

* Don't mutate data

* Don't print double minus sign

* Use global Vector3 for material function (NanoComp#124)

* Destroy volume_list (NanoComp#123)

* Array slice fix (NanoComp#122)

* trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches

* synced with stevengj/master

* sync with stevenj master

* updates

* revised calculation of array_slice strides and offsets

* revised calculation of sco=slice chunk offset in array-slice.cpp

* Add output functions and synchronized_magnetic (NanoComp#126)

* add Python tutorial for near2far to documentation and other fixes (NanoComp#125)

* add near-to-far field transformation tutorial to documentation and other minor fixes

* more fixes and tweaks

* Initial high level interface to get_array_slice (NanoComp#105)

* f

* Add cavity_arrayslice test to Makefile

* Improve readability of if condition in change_k_point

* Return ndarray instead of storing shape

* Adjust array tests

* Fix get_array_slice typemaps

* Allow user arrays
* Allow complex arrays

* Py2 compatability

* Default complex in get_array

* Account for cylindrical Volume

* Add python ports of all remaining examples (NanoComp#127)

* Add metal-cavity-ldos.py example

* Add metal-cavity-ldos.py and parallel-wvgs-force.py

* Add initial wvg-src.py

* Working wvg-src.py and test

* Add pw-source.py example

* Working pw-source.py and test

* don't put sources at non-owned points (potential fix for NanoComp#23) (NanoComp#128)

* Fix failing wvg_src.py test (NanoComp#131)

* local density of states (LDOS) and optical forces Python tutorials for documentation (NanoComp#133)

* local density of states (LDOS) Python tutorial for documentation

* add optical forces Python tutorial to documentation and minor fixes

* more minor fixes and tweaks

* Add aliases and mu parameter for Medium (NanoComp#136)

* Only print on master node in MPI mode (NanoComp#139)

* Only print on master node in MPI mode

* Remove non-standard mpi flags

* Fix hanging test

* Fix failing physical.py test

* Send non-master MPI output to os.devnull

* Don't close os.devnull

* Remove future import

* Add support for field functions (NanoComp#134)

* Add metal-cavity-ldos.py example

* Add metal-cavity-ldos.py and parallel-wvgs-force.py

* Starting field functions

* Field function progress

* Field functions working

* Test output_field_function

* Show test logs on travis while still taking advantage of 'set -e'

* Fix python test-suite.log path

* fix test suite paths

* simplify

* Add missing functionality from meep.scm (NanoComp#135)

* Add use_output_directory

* Add test for use_output_dir

* Don't test directory creation/removal in MPI mode

* Add missing functionality

* numpy compatibility with Vector3
* Medium shortcuts
* meep.inf
* get_epsilon_point
* load/save/load_minus near2far/force
* at_time
* after_sources_and_time
* in_point
* when_true/false
* with_prefix
* scale_flux/force/near2far
* get_near2far_fields

* Add tests, fix filename_prefix

* Fix after_sources_and_time

* Make simulation.py tests work with MPI

* Use meep's MPI calls

* Fix field function tests

* Add ALL_COMPONENTS and use meep's MPI calls

* Fix memory leaks

* integrate2 field function typemaps and sanity test

* Fix travis

* Don't need mp prefix in __init__.py

* Fix failing field function test in python 2

* Add ring-mode-overlap.py as integrate2_field_function example and tests

* add Python User Interface page to documentation and minor fixes (NanoComp#144)

* add Python User Interface page to documentation and minor fixes

* fixes and tweaks

* more README

* fixes

* fixes

* centering

* centering

* Fix TODOs and warnings (NanoComp#142)

* Add support for absorbers and extra_materials (NanoComp#148)

* Add support for absorbers and an example, absorber-1d.py

* Add tests/absorber_1d.py

* Pass extra_materials from python to libmeepgeom

* User defined materials (NanoComp#114)

* trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches

* synced with stevengj/master

* sync with stevenj master

* updates

* initial commit of modeExpansion branch with new mode-decomposition feature

* updates

* initial stab at support for user-defined material functions in libmeepgeom

* updates

* updates

* redefined user_defined_materials, but the way I did it can't *possibly* be right

* update material_type_destroy() to free memory allocated by user function for user-defined material

* revamped handling of material_data structures; added libmeepgeom/user-defined-materials.cpp test code for user-defined materials

* revamped handling of material structures

* updates to revamped handling of material_data structures in libmeepgeom

* make_user_material now calls user function at the origin to initialize medium structure

* removed is_material_or_user function

* removed spurious image files in doc/docs/images

* initial commit of modeExpansion branch with new mode-decomposition feature

* updates

* initial stab at support for user-defined material functions in libmeepgeom

* updates

* updates

* redefined user_defined_materials, but the way I did it can't *possibly* be right

* update material_type_destroy() to free memory allocated by user function for user-defined material

* revamped handling of material_data structures; added libmeepgeom/user-defined-materials.cpp test code for user-defined materials

* revamped handling of material structures

* updates to revamped handling of material_data structures in libmeepgeom

* make_user_material now calls user function at the origin to initialize medium structure

* removed is_material_or_user function

* removed spurious image files in doc/docs/images

* updated python code/typemaps to reflect changes to material_data in libmeepgeom

* updates to python typemaps to reflect changes to material_data structure in libmeepgeom

* updates to python typemaps to reflect changes to material_data structure in libmeepgeom

* Improve pw_source.py test (NanoComp#140)

* Add better test for pw_source.py

* Add better test for pw_source.py

* Add missing functionality (NanoComp#146)

* Add missing functionality

* make _init_fields and _get_filename_prefix public
* add point_in_periodic_objectp
* add display_geometric_object_info as `info` method to geometric objects
* add shift_geometric_object as `shift` method to geometric objects
* add require_dimensions

* Add geometric_object_duplicates and tests

* Rename point_in_object methods

* Allign with docs and use parallel make in travis (NanoComp#147)

* Updates to docs (NanoComp#151)

* replace stability error with warning message in Lorentzian susceptibilities (NanoComp#150)

* fix bug due to rounding error in lorentzian_unstable

* replace the error with a warning message instead

* rm test

* modularize build a bit more, add check for -lctlgeom (NanoComp#153)

* add comment about Kerr conventions

* Add conda installation instructions (NanoComp#155)

* Conda installation instructions.

* Add TMPDIR workaround for parallel Mac

* updates to docs (NanoComp#157)

* updates to docs

* Update FAQ.md

* Update FAQ.md

* Update Guile_and_Scheme_Information.md

* Update Guile_and_Scheme_Information.md

* Update index.md

* Remove dead code and extra whitespace (NanoComp#158)

* Support user defined materials in python (NanoComp#156)

* User defined materials working

* User material function fixes

* Material functions return a Medium
* Add optimized path for epsilon_func
* Add proper test

* Update material function docs

* Add material_function docs to Simulation section

* Add epsilon_input_file and refactor pymaterial_to_material

* Align docs

* Adjust tolerance for tests on Mac (NanoComp#161)

* Relax material_dispersion test tolerance for Mac

* Fix for Mac

* Adjust test tolerance for Mac

* Add typemap and test for custom source (NanoComp#159)

* Add typemap and test for CustomSource

* Smooth source function for test

* stop recommending environment variables for most paths

* allow you to pass NULL for eps in structure constructor, in order to set the material later

* no longer install MPI version with -mpi suffix (NanoComp#166)

* updates and tweaks to documentation (NanoComp#165)

* Refactor geom_epsilon::eff_chi1inv_row for MPB (NanoComp#164)

* Refactor geom_epsilon::eff_chi1inv_row for MPB

* eff_chi1inv_row calls eff_chi1inv_matrix

* simplify autogen.sh for NanoComp#160

* Quote list of tests to run (NanoComp#167)

* correctly handle args with spaces in autogen.sh

* Fix volume bug and add test (NanoComp#168)

* Add pymeep build instructions to docs (NanoComp#160)

* Add pymeep build instructions to docs

* Remove --with-pic and LIBS=-ldl. Add --enable-shared

* Remove environment variables from build script and use rpath

* Replace serial and parallel builds with just one version

* User variables for flags

* Pass env to autogen.sh

* Explicit PYTHON and sudo pip

* Typo in installation docs

* Only create ~/install if it doesn't exist

* mkdir -p ~/install

* Update Installation.md

* Replace h5utils with python libraries (NanoComp#163)

* Animation with matplotlib

* Use RdBu colormap

* Update python tutorial image to RdBu

* Add vmin,vmax and RdBu colormap to animation

* Add get_array example

* Crop wvg-bent-ez-tslice

* Adjust Simulation constructor (NanoComp#170)

* Adjust Simulation constructor

* Make sure all "input variables" from the scheme docs can be passed into the constructor.
* Organize arguments into a column for readability.

* Update docs

* Remove dead make targets (NanoComp#171)

* Array slice doc (NanoComp#169)

* trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches

* synced with stevengj/master

* sync with stevenj master

* updates

* documentation for array-slice

* Update Python_User_Interface.md

* Get epsilon_input_file working and add test (NanoComp#162)

* Fix epsilon_input_file and add test

* Pass None to structure() instead of dummy_eps

* Get lattice size from structure.user_volume instead of passing to libmeepgeom.

* Don't need py_vector3_object

* Switch on user_volume

* Prevent calling Py_XDECREF on junk ptr

* add components_allocated flag to track whether any field components have been allocated, and check it in add_dft (NanoComp#172)

* Create LICENSE

* COPYING and LICENSE are duplicates

* no need for manifest file

* NEWS

* version bump for 1.4

* copyright year bump

* Update pympi startup message (NanoComp#178)

* trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches

* synced with stevengj/master

* sync with stevenj master

* updates

* update MPI-enabled pymeep startup message to mimic that of libctl meep binary

* ensure MPI startup message in pymeep is only printed by master process

* Add missing Vector3 methods and tests (NanoComp#175)

* update docs in preparation for v1.4 release (NanoComp#176)

* update docs in preparation for v1.4 release

* tweaks

* turn --with-python on by default

* rm redundant Release_Notes file

* make dist fix

* 1.4 release date

* typo

* fix NEWS target for out-of-tree builds

* make sure h5 files are included in dist for testing

* bump version to 1.4.1

* eliminate need for NEWS file

* Slightly change how dft_chunk objects handle include_dV_and_interp=false. (NanoComp#181)

Instead of implicitly doing this in the dft_chunk object by setting dV0=0,
which is loses the value of dV0 and may double-count interpolation weights,
it instead explicitly stores the include_dV_and_interp flag in the dft_chunk
and sets the weight to 1 when updating the DFT if include_dV_and_interp=false.

* Document Vector3 and add __mul__ operator (NanoComp#179)

* Document Vector3 and add __mul__ operator

* Add __rmul__ operator

* Fit user volumes to Simulation dimensions (NanoComp#182)

* Fit user volumes to Simulation dimensions

* Adjust user Volumes via Simulation method

* Only run make distcheck. Alternative to PR NanoComp#183 (NanoComp#185)

* Changes for make distcheck

* Adjust flags and clean after py tests

* Add flags

* Only run make distcheck

* Default to 3 dimensions (NanoComp#187)

* add material library for metals used in optoelectronic devices (NanoComp#188)

* add material library for metals used in optoelectronic devices

* minor tweaks

* use unicode µ and not a character entity

* version bump for 1.4.2

* don't use -malign-double on x86_64, to silence compiler warning (since it is the default in that arch)

* move materials-library to examples

* Workaround for SWIG 3.0.12 import handling (NanoComp#189)

* fix GNU sed-ism

* 64-bit support (NanoComp#193)

* use size_t/ptrdiff_t for total #points

* missing headers

* another missing stddef.h

* clarifications (closes NanoComp#173)

* Portable sed commands (NanoComp#194)

* Portable sed commands

* Remove sed backup files on clean

* Fix in_point and pass filename_prefix through Simulation constructor (NanoComp#196)

* Be explicit about which names are functions in Python docs (NanoComp#201)

* Show test-suite.log in travis (NanoComp#200)

* Fix 2d Absorbers (NanoComp#202)

* Fix 2d Absorbers

* Remove strength member from C++ absorber

* new clean branch for modeExpansion code (NanoComp#192)

* new clean branch for modeExpansion code

* updates

* fixed minor issue in add_eigenmode_source that had produced slight discrepancies in wvg_src.py test

* update docs, examples, tests (NanoComp#199)

* update docs, examples, tests

* fix imported library path

* tweaks

* fixes for 64-bit indices

* missing gitignore files

* am_master -> am_master() fix

* can't run 2d near2far tests if we don't have GSL for Hankel functions

* symmetry test tolerance was slightly too low for MacOS/LLVM compilers

* rename libctl directory to scheme

* MEEP_SUFFIX seems to be no longer used (NanoComp#205)

* fix spelling (NanoComp#204)

* support susceptibilities in user-defined materials  (NanoComp#203)

* trying mkdocs stuff on master branch as readthedocs seems to have trouble with other branches

* synced with stevengj/master

* sync with stevenj master

* updates

* adds support for susceptibilities in user-defined materials; fixes github issue NanoComp#197

* added --with-susceptibility option to libmeepgeom/user-defined-material test

* Python MPB interface (NanoComp#191)

* Initial mpb files

* MPB progress

* Rename mpb -> libpympb
* Rename meepmpb.cpp -> pympb.cpp
* Remove MaterialGrid stuff
* Add libmeepgeom pieces to pympb.cpp

* Add test machinery

* Add pympb.hpp

* libpympb compiling

* Set up python Makefile for libpympb

* Test create_maxwell_data

* Successfully creating maxwell_data from python

* Build adjustments for meep.mpb

* Add Lattice and Matrix.

* set_maxwell_dielectric working

* Starting solve_kpoint

* Solving kpoints, but values are off

* Adjust parity in test

* Add output_epsilon to python iface

* Fix warnings

* Copy default_material and add get_epsilon

* Add meep.hpp include path to pympb tests

* Add band range data and gap output functions

* Reuse linear_interpolate from libmeepgeom

* Default constructors for meepgeom types

* No globals. Don't copy geometry and default_material

* Initial output_field_to_file function

* Add matrix multiplication

* Move Matrix and Lattice to geom.py

* Move imports to geom.py

* Keep vacuum global for now

* output_epsilon working from python

* Bands agreeing

* Outputing band ranges and gaps from python

* Refactor libpympb

* Basis MPB run working perfectly from python

* Use deterministic results for testing

* run_te with geometry working

* Factor common checks into functions

* Test gap_list lengths

* Add list_split. Fix gap_list

* Reuse epsilon_file_material from meepgeom

* Get h_field from python

* Add get_e_field and get_d_field

* Start py version of output_field_to_file

* Get ref values of mpt-tutorial-epsilon.h5

* Add h5py for MPB

* Basic h5 file creation

* h5 python epsilon output working (without geometry)

* Get mpb stuff working on travis

* Fix libpympb MPI test

* Don't allocate memory in pympb test

* get_efield and get_dfield passing tests

* Refactor fields tests and add get_bfield

* Get meep version from configure

* Complete 'First Band Structure' tutorial working

* Add test for compute_field_energy

* Add python version of output_field_z

* Add test for output_efield_z

* Refactor output_field_to_file

* Add with_hermitian_epsilon

* Refactoring, and clean up h5 files from unit tests

* Only delete test files on master process

* Fix lattice typemap

* Reuse common swig functions and fix compiler warnings

* Align python with pympb name change

* Add triangular lattice test

* Add maximize gap and anisotropic gap to tutorial, plus tests

* Add 5x5 point defect example with tests

* Fix tests for py2

* All MPB tutorial functionality complete

* Add test for issue 180

* Passing output_efield_z test

* Remove h5 IO from C++

* Add output_charge_density and test

* Remove matrixio.cpp and all C++ IO stuff

* Remove redundant C++ tests and fix Makefiles

* Don't generate Makefile for libpympb/tests

* Fix bug in output_scalar_field

* Fix test_output_efield_z by calling fix_efield_phase

* Add bragg-sine example and test

* Reset dimensions on each run

* Add bragg example and test. Add verbose flag

* Allow tolerance in check_band_range

* Prevent MPI race conditions in tests

* Fix memory issues (NanoComp#209)

* more gitignore files

* add way to turn off COW semantics for structure_chunks

* gitignore python-mpb

* Add new MPB examples and functionality (NanoComp#211)

* Add diamond example and test

* Add hole-slab examples and test

* Add honey_rods example and test

* Replace np.testing.assert_allclose for h5 comparisons

* Add line_defect example and test.

* Add sq_rods example and test

* Run sq_rod example in main

* Fix mpb in installation package (NanoComp#215)

* Fix mpb in installation package

* Force remove on cleanup

* documentation updates/tweaks (NanoComp#216)

* updates to docs

* more tweaks

* add modeexpansion link

* FAQ on speedup

* Update FAQ.md

* Add subpixel averaging, remaining MPB examples, and lower MPB test tolerance (NanoComp#217)

* Add remaining MPB examples and tests

* Starting subpixel averaging

* Subpixel averaging working

* Lower MPB test accuracy

* Update test data to use subpixel averaging

* Always use Kottke method

* Remove meep's infinity from python wrapper (NanoComp#220)

* Add convenience version of set_materials_from_geometry (NanoComp#210)

* Add public set_materials method

* Add sanity test for set_materials

* Add documentation for set_materials

* Remove any old susceptibilities before setting them

* Improve test_set_materials

* Fields needs to know if chunks are shared

* Enable set_maxwell_mu (NanoComp#222)

* minor updates (NanoComp#225)

* note that libctl is used for Python

* Add missing MPB functionality (NanoComp#223)

* Add first_brillouin_zone and test

* Add missing functionality

* Add missing functionality

* copyright year update

* clarify near2far parallelization

* removed k_func argument to get_eigenmode_coefficients, added typemaps to call get_eigenmode_coefficients from python (NanoComp#227)

* removed k_func argument to get_eigenmode_coefficients, added typemaps to allow get_eigenmode_coefficients to be callable from python

* updates

* Manipulating raw eigenvectors (NanoComp#221)

* Getting eigenvectors

* get_eigenvectors working

* set_eigenvectors working

* load and save eigenvectors working

* Call fix_hfield_phase in get_eigenvectors test

* Add high level modal_volume_in_box and solve_cw (NanoComp#229)

* Convert physical.py test to high level API (NanoComp#231)

* Pass solve_cw arguments

* add frequency-domain solver tutorial and other fixes to docs (NanoComp#232)

* add frequency-domain solver tutorial and other fixes to docs

* remove figures

* update configure.ac

* update scheme/Makefile.am

* tweaks

* more tweaks

* Align with scheme interface on *in_box functions (NanoComp#239)

* rehauled flux/mode overlap calculation, added HDF5 output routines for all DFT structures (NanoComp#226)

* rehauled flux/mode overlap calculation, added HDF5 output routines for all types of DFT structures

* fixed bugs in output_dft routines; added libmeepgeom/dft-fields.cpp code to test new dft_fields structures and new output_dft routines

* updates to libmeepgeom/dft-fields.cpp test

* removed multiple-resolution runs from libmeepgeom/dft-fields and added this test to unit-test suite

* updated typemap suite for add_dft_fields; removed old dummy interface to C++ routine that had been used with previous typemap suite

* fixed failing test in libmeepgeom/dft-fields

* Initial mpb-data support for python (NanoComp#233)

* Starting data-analysis

* Progress on mpb-data

* mpb_data port complete

* mpb-data file i/o working

* Switch MPBData to array i/o instead of file i/o

* Fix for python 2

* Write map_data in C

* data analysis tests working

* Fix return shape of get_*field functions.

* Remove transpose flag

* Fix for py2

* handle_cvector working

* High level dft wrappers (NanoComp#241)

* add output_dft example to the frequency-domain solver tutorial and other doc updates (NanoComp#242)

* updates to docs

* more tweaks

* minor fixes

* epsilon input file support (NanoComp#240)

* Add epsilon_input_file support and test

* Make all_freqs an ndarray

* Support for with-hermitian-epsilon (NanoComp#243)

* Support for with-hermitian-epsilon

* Fix typo

* Align docs and *in_box functions (NanoComp#246)

* Check for complex offdiag in user materials (NanoComp#245)
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
* Add pymeep build instructions to docs

* Remove --with-pic and LIBS=-ldl. Add --enable-shared

* Remove environment variables from build script and use rpath

* Replace serial and parallel builds with just one version

* User variables for flags

* Pass env to autogen.sh

* Explicit PYTHON and sudo pip

* Typo in installation docs

* Only create ~/install if it doesn't exist

* mkdir -p ~/install

* Update Installation.md
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

Successfully merging this pull request may close these issues.

3 participants