Giter Site home page Giter Site logo

Comments (10)

kenkendk avatar kenkendk commented on August 15, 2024

I don't think the Cluster VEM compiles on OSX. At least I know that I have not tested it, and I do most of the OSX fixes.

Normally the build will just skip the Cluster VEM because MPI is not found.

Below is my output from cmake, does yours differ?

-- The following RECOMMENDED packages have been found:

 * OpenCL , Open Computing Language , <www.khronos.org/opencl/>
   Enables the GPU-VE.
 * NumPy , Numerical Python , <www.numpy.org>
   Enables the Python/NumPy bridge (together with Python and SWIG).
 * SWIG , Simplified Wrapper and Interface Generator , <www.swig.org>
   Enables the Python/NumPy bridge (together with Python and NumPy).
 * Cython , C-Extensions for Python , <cython.org>
   Enables the Python/NumPy bridge (together with Python and SWIG).
 * Mono , An open source implementation the CLR , <www.mono-project.com>
   Enables the NumCIL package

-- The following REQUIRED packages have been found:

 * Boost , Boost C++ source libraries , <www.boost.org>
   Boost is required to build Bohrium
 * Cheetah , Cheetah is a template module for Python , <www.cheetahtemplate.org>
   Cheetah is required to build Bohrium
 * GLUT
 * OpenGL , Open Graphics Library , <www.opengl.org>
   Required by OpenCL/GPU-VE.
 * PythonInterp , Python Programming Language , <www.python.org>
   Python is required to build Bohrium

-- The following OPTIONAL packages have not been found:

 * OpenMP

-- The following RECOMMENDED packages have not been found:

 * MPI , Message Passing Interface , <www.mpi-forum.org>
   Enables the Cluster-VEM.
 * FFTW , Fastest Fourier Transform in the West , <www.fftw.org>
   Enables the FFTW extended method

from bohrium.

fjarri avatar fjarri commented on August 15, 2024

That's what I have:

  -- The following RECOMMENDED packages have been found:

   * MPI , Message Passing Interface , <www.mpi-forum.org>
     Enables the Cluster-VEM.
   * OpenCL , Open Computing Language , <www.khronos.org/opencl/>
     Enables the GPU-VE.
   * OpenGL , Open Graphics Library , <www.opengl.org>
     Required by OpenCL/GPU-VE.
   * NumPy , Numerical Python , <www.numpy.org>
     Enables the Python/NumPy bridge (together with Python and SWIG).
   * SWIG , Simplified Wrapper and Interface Generator , <www.swig.org>
     Enables the Python/NumPy bridge (together with Python and NumPy).
   * Cython , C-Extensions for Python , <cython.org>
     Enables the Python/NumPy bridge (together with Python and SWIG).

  -- The following REQUIRED packages have been found:

   * Boost , Boost C++ source libraries , <www.boost.org>
     Boost is required to build Bohrium
   * Cheetah , Cheetah is a template module for Python , <www.cheetahtemplate.org>
     Cheetah is required to build Bohrium
   * PythonInterp , Python Programming Language , <www.python.org>
     Python is required to build Bohrium

  -- The following OPTIONAL packages have not been found:

   * OpenMP

  -- The following RECOMMENDED packages have not been found:

   * FFTW , Fastest Fourier Transform in the West , <www.fftw.org>
     Enables the FFTW extended method
     FFTW was found, but not enabled. 
     Manually enable FFTW with FFTW_INCLUDES and FFTW_LIBRARIES
     if you have a clang multi-arch FFTW binary.
   * Mono , An open source implementation the CLR , <www.mono-project.com>
     Enables the NumCIL package

So I do have MPI, but no OpenMP. I installed OpenMPI specifically for Bohrium via Homebrew, but I can remove it if it prevents the compilation — I don't use it otherwise.

from bohrium.

fjarri avatar fjarri commented on August 15, 2024

I installed OpenMPI specifically for Bohrium via Homebrew, but I can remove it if it prevents the compilation

Actually, scratch that. I uninstalled openmpi from homebrew, and cmake is still able to find it.

from bohrium.

kenkendk avatar kenkendk commented on August 15, 2024

In the folder where you checked out Bohrium, you should be able to do:

mkdir build
cd build
cmake -DVEM_CLUSTER=false ..
make install

Alternatively, you can use ccmake . to configure the build, and disable VEM_CLUSTER.

from bohrium.

fjarri avatar fjarri commented on August 15, 2024

Thanks, now the build passes. There's a (seemingly) related problem though: import bohrium passes, but when I try to use it, Python crashes with:

Error in [node:impl]: dlopen(/Users/bogdan/.local/lib/libbh_vem_node.dylib, 2): Library not loaded: libbh.dylib
  Referenced from: /Users/bogdan/.local/lib/libbh_vem_node.dylib
  Reason: image not found

from bohrium.

kenkendk avatar kenkendk commented on August 15, 2024

Try to clean out your install, i.e.:

rm -rf ~/.local/lib/libbh* ~/.local/var/bohrium ~/.bohrium

Then make install again.

If the file /Users/bogdan/.local/lib/libbh_vem_node.dylib exists, then it is most likely some issue with 64-vs-32 bit. You can see what version of Python you are running, with this snippet:

https://stackoverflow.com/questions/1405913/how-do-i-determine-if-my-python-shell-is-executing-in-32bit-or-64bit-mode-on-os

from bohrium.

fjarri avatar fjarri commented on August 15, 2024

I'm using Py2.7.9, using the tests from your link it's 64 bit. After removing everything and doing the clean install, the problem persists. The libraries in question seem to be multi-arch:

> file /Users/bogdan/.local/lib/libbh_vem_node.dylib
/Users/bogdan/.local/lib/libbh_vem_node.dylib: Mach-O universal binary with 2 architectures
/Users/bogdan/.local/lib/libbh_vem_node.dylib (for architecture i386):  Mach-O dynamically linked shared library i386
/Users/bogdan/.local/lib/libbh_vem_node.dylib (for architecture x86_64):    Mach-O 64-bit dynamically linked shared library x86_64
> file /Users/bogdan/.local/lib/libbh.dylib
/Users/bogdan/.local/lib/libbh.dylib: Mach-O universal binary with 2 architectures
/Users/bogdan/.local/lib/libbh.dylib (for architecture i386):   Mach-O dynamically linked shared library i386
/Users/bogdan/.local/lib/libbh.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64

from bohrium.

kenkendk avatar kenkendk commented on August 15, 2024

VEM stands for "Vector Engine Manager".
Currently there are two implementations of a VEM: Node and Cluster.
The Cluster VEM distributes (using MPI) work to multiple Node VEM's, which hands the work to the Vector Engine (VE).

So you get Python -> Bridge -> VEM -> VE.
Using the config.ini file you can change which VEM and VE you use, but you cannot skip the Node VEM (which, does not do anything but pass on the work).

I am trying a clean build to see if I can reproduce the issue.

from bohrium.

kenkendk avatar kenkendk commented on August 15, 2024

I can reproduce. The problem is that when you are building from source, the install goes into ~/.local.
On Linux the ~/.local/lib folder is used automatically, but it is not on OSX.

To fix it, you need to set the environment variable DYLD_LIBRARY_PATH.

To set it, run:
export DYLD_LIBRARY_PATH=~/.local/lib

Or add it each time you run a command:
DYLD_LIBRARY_PATH=~/.local/lib python ~/.local/share/bohrium/test/python/numpytest.py

from bohrium.

fjarri avatar fjarri commented on August 15, 2024

Thank you, works now!

from bohrium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.