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

Guile (2.0.13) is incompatible with meep: Temporary workaround #7

Open
JohnWeiner opened this issue Jun 18, 2017 · 20 comments
Open

Guile (2.0.13) is incompatible with meep: Temporary workaround #7

JohnWeiner opened this issue Jun 18, 2017 · 20 comments
Assignees
Labels

Comments

@JohnWeiner
Copy link

JohnWeiner commented Jun 18, 2017

It appears that the latest version of Guile (2.0.13) is incompatible with meep. The first meep tutorial (straight waveguide) does not run with Guile 2.0.13 installed. Here is a summary of what I did to get it to work (in single processor mode)

  1. Remove Guile 2.0.13 using apt remove
  2. Download deb packages for Guile 2.0.11, Guile-dev 2.0.11, Guile-libs 2.0.11
  3. Use dpkg -i for installation in the following sequence: (a) Guile-lib, (b) Guile, (c) Guile-dev
  4. Use the python-meep-install.sh script, but edit it so as to choose the “serial” option and comment out the line that invokes installation of guile.

I found that the install script runs to completion. Even though the meep mode is “serial” (single processor, not multiprocessor) the command to run meep is still meep-mpi.
A check of the guile version shows 2.0.11 installed.

The first tutorial on the Meep tutorial web page (straight wave guide) ran without error and generated correct h5 files. The uses h5utils to convert the h5 files to .png files ran without error.

@FilipDominec FilipDominec mentioned this issue Aug 1, 2017
@FilipDominec FilipDominec changed the title Temporary workaround for meep Guile (2.0.13) is incompatible with meep: Temporary workaround Aug 1, 2017
@FilipDominec FilipDominec self-assigned this Aug 1, 2017
@FilipDominec
Copy link
Owner

FilipDominec commented Aug 1, 2017

Thank you, John. This appears as a fundamental incompatibility which should be fixed upstream, i.e. by actual MEEP developers, and they should be aware of it now.

If nothing changes and MEEP does not compile in new Ubuntu until September 2017, I will take some measures to explicitly download the legacy libraries.

@JohnWeiner
Copy link
Author

JohnWeiner commented Aug 1, 2017 via email

@FilipDominec
Copy link
Owner

John (and all folks bitten by the update of Guile and obsoleteness of Swig),
as I promised, I added a workaround that detects that package Guile1.8 is not available, and that Guile2.0 is also not available in its version of 2.0.11 or older.

In such a case, it downloads the Guile git source, and checkouts to its old-enough version. Thus, the meep compilation seems to be fine on Ubuntu 17.04, as suggested by the latest log https://github.com/FilipDominec/python-meep-install/blob/master/logs/171006-ubuntu17.04-amd64-02withguile11fromgit.log

Note that there is another compatibility issue in installation on new Ubuntu versions, as reported here: #10

I hope that the described update spares you some time.

@FilipDominec
Copy link
Owner

As I think about it - perhaps your approach of cleanly installing Guile into the /usr/local/bin is preferable. Could you please post the code that does the job here?

So far, I probably did not encounter the bug with stime.h. Could you please describe the situation when it becomes a trouble?

@JohnWeiner
Copy link
Author

JohnWeiner commented Oct 6, 2017 via email

@FilipDominec
Copy link
Owner

Hi, John, thanks for your message.
As you probably assume,

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1.

is actually fatal for python-meep compilation. It however means that something failed in the whole compilation chain, and one has to find out what. I spent about two hours with this investigation, and eventually I found out that the recent git version of the script compiles correctly under Ubuntu 17.04 (amd64) with Guile 2.0.13 taken from the repository. This is puzzling, since I thought this is exactly the version (both of Guile and of Ubuntu) when the compilation broke.

Regards, Filip

@JohnWeiner
Copy link
Author

JohnWeiner commented Oct 9, 2017 via email

@FilipDominec
Copy link
Owner

Hi, I can positively state that the installer script and both the simulations finish successfully with Guile 2.0.13 installed from the Ubuntu-17.04 repository. So it seems that the original issue somehow magically disappeared.

@JohnWeiner
Copy link
Author

JohnWeiner commented Oct 9, 2017 via email

@JohnWeiner
Copy link
Author

JohnWeiner commented Oct 9, 2017 via email

@FilipDominec
Copy link
Owner

FilipDominec commented Oct 10, 2017

Hi, as I already mentioned in my recent post under #10, I made a new test over different Ubuntu versions. In short, the script finishes correctly in all of them without the need to manually compile Guile. I do not know what changed, but it just works.

Here I post the versions of Guile found in each system.

Ubuntu version     "guile-1.8-dev"      "guile-2.0-dev"      Compilation result
--------------     ---------------      ---------------      ------------------
16.04 "trusty"	   1.8.8+1-10ubuntu1    2.0.11+1-10          OK with 1.8
16.04.3 "trusty"   1.8.8+1-10ubuntu1    2.0.11+1-10          OK with 1.8
16.10 "yakkety"    1.8.8+1-10ubuntu1    2.0.11+1-12build2    OK (both with 1.8 and 2.0)
17.04 "zesty"      (N/A)                2.0.13+1-4           OK (now) with 2.0
17.10 "artful"     (N/A)                2.0.13+1-4           OK (as in "zesty")

Note that no package like "guile-2.2-dev" exists in any official repo (yet).

@JohnWeiner
Copy link
Author

JohnWeiner commented Oct 10, 2017 via email

@FilipDominec
Copy link
Owner

FilipDominec commented Oct 10, 2017

On Linux, I use the following procedure:

  1. get the image, e.g. wget http://releases.ubuntu.com/16.04/ubuntu-16.04.3-desktop-amd64.iso
  2. qemu-img create ubuntu-16.04.3-desktop-amd64.img 10G
  3. run the virtual machine qemu-system-x86_64 -m 1000 -smp cpus=2 -enable-kvm -hda ubuntu-16.04.3-desktop-amd64.img -cdrom ubuntu-16.04.3-desktop-amd64.iso
  4. install ubuntu to the virtual disk image (this can not harm any other file on your disk), shut down the virtual machine
  5. re-run the machine without cdrom qemu-system-x86_64 -m 1000 -smp cpus=2 -enable-kvm -hda ubuntu-16.04.3-desktop-amd64.img
  6. once booted, launch a terminal (e.g. xterm) window and get the fresh installer from git sudo apt-get install git -y ; git clone http://github.com/filipdominec/python-meep-install --depth 1 ; cd python-meep-install
  7. follow the command under Testing and debugging in the project's README.md file, that is: sudo ./python-meep-install.sh 2>&1 | tee logs/date +%y%m%d-lsb_release -sd | tr ' ' '_' -uname -m.log
  8. after ca. 10 minutes, it should end up successfully and you can run either meep from console, or launch python and test the python-meep module by import meep_mpi

@JohnWeiner
Copy link
Author

JohnWeiner commented Oct 14, 2017 via email

@JohnWeiner
Copy link
Author

JohnWeiner commented Nov 3, 2017 via email

@FilipDominec
Copy link
Owner

FilipDominec commented Nov 4, 2017 via email

@JohnWeiner
Copy link
Author

JohnWeiner commented Nov 5, 2017 via email

@FilipDominec
Copy link
Owner

Hi, this is really puzzling, since I tested my script successfully also on 17.04 without any error in using python-meep. What can be the difference of your setup and the default installation of Ubuntu 17.04 (amd64) I have tested lately? I have one idea - did you install latest updates on your system?

@JohnWeiner
Copy link
Author

JohnWeiner commented Nov 10, 2017 via email

@FilipDominec
Copy link
Owner

FilipDominec commented Nov 10, 2017

I understand and fully acknowledge that you are now using MEEP for science and engineering and have not much time to trace back the obsolescence of guile API. Actually I also need to focus on research now, instead of repeated testing of my installation procedures...

The good news is that Ardavan's script seems to be reliable and also cleaner than the installation of guile from repository, so I am tempted to adapt the installer to his approach. I will test it thoroughly. Thank you for your collaboration.

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

No branches or pull requests

2 participants