Skip to content

Add py-meep package and dependencies#1156

Merged
becker33 merged 16 commits intospack:developfrom
adamjstewart:features/py-meep
Aug 3, 2016
Merged

Add py-meep package and dependencies#1156
becker33 merged 16 commits intospack:developfrom
adamjstewart:features/py-meep

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

Still a work in progress. I couldn't get gettext to build at first, so I'm trying to overhaul that. I'm adding a lot of packages for system libraries in the hope that we no longer need to run sudo yum and sudo apt-get to actually install things. Let me know if any of the extra dependencies give anybody a heart attack.

collecting replacement for C malloc or C++ new."""

homepage = "http://www.hboehm.info/gc/"
url = "http://www.hboehm.info/gc/gc_source/gc-7.4.4.tar.gz"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So Spack auto-detected the package name for this one as gc, but I manually changed it to bdw-gc for three reasons:

  1. The GitHub repo is named bdwgc
  2. The Homebrew package is named bdw-gc
  3. There may be other garbage collectors added to Spack someday?

Let me know if you have any strong opinions on this. I really don't care either way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like it.

@adamjstewart
Copy link
Copy Markdown
Member Author

So I was getting a mysterious seg fault/core dump whenever I tried building guile and had no idea why. I contacted the developers but they couldn't figure it out either. I tried removing dependencies one at a time and building with the system libraries and eventually discovered that the problem was libiconv. Guile, gettext, and libunistring all depend on libiconv. But if even one of them was built with Spack's libiconv, guile would seg fault. Note that libiconv passed all of it's tests, so I don't think there's anything wrong with the package itself. From the libunistring DEPENDENCIES:

The following packages should be installed before GNU libunistring is
installed:

  • GNU libiconv
    • Not needed on systems with

      • glibc 2.2 or newer, or
      • MacOS X 10.3 or newer, or
      • NetBSD 3.0 or newer.

      But highly recommended on all other systems.
      Needed for character set conversion of strings from/to Unicode.

Based on this, I think it's pretty safe to assume that libiconv isn't important.

@adamjstewart
Copy link
Copy Markdown
Member Author

Last remaining hurdle. I think I have everything installed and passing all of it's tests. The only problem is that when I try to import py-meep, I get this error:

>>> import meep_mpi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/blues/gpfs/home/software/spack/opt/spack/linux-centos6-x86_64/gcc-6.1.0/python-2.7.11-voyxwv4ijmxs3qxyo5wjwxtps3uj2hhm/lib/python2.7/site-packages/meep_mpi.py", line 28, in <module>
    _meep_mpi = swig_import_helper()
  File "/blues/gpfs/home/software/spack/opt/spack/linux-centos6-x86_64/gcc-6.1.0/python-2.7.11-voyxwv4ijmxs3qxyo5wjwxtps3uj2hhm/lib/python2.7/site-packages/meep_mpi.py", line 24, in swig_import_helper
    _mod = imp.load_module('_meep_mpi', fp, pathname, description)
ImportError: /blues/gpfs/home/software/spack/opt/spack/linux-centos6-x86_64/gcc-6.1.0/python-2.7.11-voyxwv4ijmxs3qxyo5wjwxtps3uj2hhm/lib/python2.7/site-packages/_meep_mpi.so: undefined symbol: _ZN3MPI3Win4FreeEv

I have no idea what this means. Please save me.

@adamjstewart
Copy link
Copy Markdown
Member Author

I solved the aforementioned problem. I just needed to build meep and its dependencies with --enable-shared. Everything should be good to go now. I believe this PR is ready for review.


if '+mpi' in spec:
include_dirs.append(spec['mpi'].prefix.include)
library_dirs.append(spec['mpi'].prefix.lib)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think this actually works. The package is linked to MPI properly:

$ ldd py-meep-1.4.2-ikjdpnikleqeaxvncnag37bhhdnfafoj/lib/python2.7/site-packages/_meep_mpi.so 
...
    libmpi.so.20 => /blues/gpfs/home/software/spack-0.9.1/opt/spack/linux-centos6-x86_64/gcc-6.1.0/openmpi-2.0.0-tapt7aozvnpq4m7tf7cbsa5zefy4kc6s/lib/libmpi.so.20 (0x00002b0cbd86b000)
...

but when I import it:

$ python
Python 2.7.12 (default, Jul 21 2016, 15:23:03) 
[GCC 6.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import meep_mpi
Neither libmpi.so.0 nor libmpi.so found. Fatal error.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/soft/spack-0.9.1/opt/spack/linux-centos6-x86_64/gcc-6.1.0/python-2.7.12-hfkksvc2jgtlvkjagr33k6khrnj7yfqt/lib/python2.7/site-packages/meep_mpi.py", line 5088, in <module>
    raise e
OSError: libmpi.so: cannot open shared object file: No such file or directory

it can't find MPI.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

By the way, if I add MPI to my LD_LIBRARY_PATH, py-meep finds it, so I don't think this problem should hold up the PR.

@adamjstewart
Copy link
Copy Markdown
Member Author

ping @tgamblin

@becker33 becker33 merged commit 353726f into spack:develop Aug 3, 2016
@adamjstewart adamjstewart deleted the features/py-meep branch August 3, 2016 17:53
olupton pushed a commit to olupton/spack that referenced this pull request Feb 7, 2022
* Adds support for Caliper variant and enables it by default.
* Updates Caliper recipe from upstream and fixes an issue in CoreNEURON.
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