Code Monkey home page Code Monkey logo

ryuon-cmake's Introduction

ryuon-cmake

Build status

This project provides a CMake-based build system for the RYUON libraries. The original build system is based on GNU autotools which I don't like. Furthermore cross-dependencies are not automatically detected which makes the build process unnecessarily hard.

All build dependencies which are not available through the package repositories of big Linux distributions are included as submodules. These are

  • NITSOL: newton iterative solver for nonlinear systems (written in FORTRAN)
  • libiter: library containing iterative solvers for linear set of equations
  • libstokes: solve resistance and mobility problems
  • stokes: the Stokesian dynamics simulator

Currently only the stokes3 executable and the Python interface are generated. Let me know in the issues if you need more.

Usage

The usage is simple. Just follow your regular CMake workflow. The repository has to be cloned recursively because RYUON itself is incorporated as submodules.

git clone --recursive https://github.com/hmenke/ryuon-cmake.git
cd ryuon-cmake
mkdir build
cd build
cmake ..
make -j 16

Requirements

  • C compiler
  • FORTRAN compiler
  • CMake (>=3.9)
  • ARPACK
  • BLAS
  • GSL
  • Guile (<=1.8) yes, this is indeed less or equal
  • LAPACK
  • NetCDF
  • Python 2
  • SWIG

On a naked Ubuntu 18.04 LTS you can easily install all the required dependencies using

echo "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe" | sudo tee /etc/apt/sources.list.d/xenial.list
sudo apt-get update
sudo apt-get install build-essential cmake git libarpack2-dev libblas-dev libgsl-dev gfortran guile-1.8-dev liblapack-dev libnetcdf-dev libpython2.7-dev python2.7 swig

ryuon-cmake's People

Contributors

hmenke avatar

Stargazers

Ben Landrum avatar

Watchers

James Cloos avatar  avatar  avatar Ben Landrum avatar

ryuon-cmake's Issues

Undefined symbols while link stokes_shared

[  6%] Built target nitsol_object
[ 79%] Built target iter_object
[ 96%] Built target stokes_object
[ 97%] Built target iter_shared
[ 98%] Built target nitsol_shared
[100%] Linking C shared library libstokes.dylib
Undefined symbols for architecture x86_64:
  "_dnaupd_", referenced from:
      _dnaupd_wrap_min_max in dnaupd_c.c.o
     (maybe you meant: _dnaupd_wrap_min_max)
  "_dneupd_", referenced from:
      _dnaupd_wrap_min_max in dnaupd_c.c.o
  "_dsaupd_", referenced from:
      _dsaupd_wrap_min_max in dsaupd_c.c.o
     (maybe you meant: _dsaupd_wrap_min_max)
  "_dseupd_", referenced from:
      _dsaupd_wrap_min_max in dsaupd_c.c.o
  "_gsl_multiroot_fsolver_alloc", referenced from:
      _BD_imp_init in bd-imp.c.o
  "_gsl_multiroot_fsolver_free", referenced from:
      _BD_imp_free in bd-imp.c.o
  "_gsl_multiroot_fsolver_hybrid", referenced from:
      _BD_imp_init in bd-imp.c.o
  "_gsl_multiroot_fsolver_iterate", referenced from:
      _fastSI_GSL_MULTIROOT_wrap in bd-imp-fast.c.o
      _BD_imp_GSL_MULTIROOT_wrap in bd-imp.c.o
  "_gsl_multiroot_fsolver_root", referenced from:
      _fastSI_GSL_MULTIROOT_wrap in bd-imp-fast.c.o
      _BD_imp_GSL_MULTIROOT_wrap in bd-imp.c.o
  "_gsl_multiroot_fsolver_set", referenced from:
      _fastSI_GSL_MULTIROOT_wrap in bd-imp-fast.c.o
      _BD_imp_GSL_MULTIROOT_wrap in bd-imp.c.o
  "_gsl_multiroot_test_residual", referenced from:
      _fastSI_GSL_MULTIROOT_wrap in bd-imp-fast.c.o
      _BD_imp_GSL_MULTIROOT_wrap in bd-imp.c.o
  "_gsl_poly_solve_cubic", referenced from:
      _fastSI_solve_cubic_in_range in bd-imp-fast.c.o
  "_gsl_strerror", referenced from:
      _fastSI_GSL_MULTIROOT_wrap in bd-imp-fast.c.o
  "_gsl_vector_alloc", referenced from:
      _BD_imp_init in bd-imp.c.o
  "_gsl_vector_free", referenced from:
      _BD_imp_free in bd-imp.c.o
  "_gsl_vector_get", referenced from:
      _fastSI_GSL_MULTIROOT_func in bd-imp-fast.c.o
      _fastSI_GSL_MULTIROOT_wrap in bd-imp-fast.c.o
      _BD_imp_GSL_MULTIROOT_func in bd-imp.c.o
      _BD_imp_GSL_get_root in bd-imp.c.o
  "_gsl_vector_set", referenced from:
      _fastSI_GSL_MULTIROOT_func in bd-imp-fast.c.o
      _fastSI_GSL_MULTIROOT_wrap in bd-imp-fast.c.o
      _BD_imp_GSL_MULTIROOT_func in bd-imp.c.o
      _BD_imp_GSL_set_guess in bd-imp.c.o
  "_nc_close", referenced from:
      _stokes_nc_free in stokes-nc.c.o
  "_nc_create", referenced from:
      _stokes_nc_init_ in stokes-nc.c.o
  "_nc_def_dim", referenced from:
      _stokes_nc_init_ in stokes-nc.c.o
  "_nc_def_var", referenced from:
      _stokes_nc_init_ in stokes-nc.c.o
      _stokes_nc_init_vec in stokes-nc.c.o
      _stokes_nc_init_int_scalar in stokes-nc.c.o
      _stokes_nc_init_scalar in stokes-nc.c.o
      _stokes_nc_init_t in stokes-nc.c.o
      _stokes_nc_init_stt in stokes-nc.c.o
      _stokes_nc_init_t_vec in stokes-nc.c.o
      ...
  "_nc_enddef", referenced from:
      _stokes_nc_init_ in stokes-nc.c.o
  "_nc_get_var1_double", referenced from:
      _stokes_nc_get_time_step in stokes-nc-read.c.o
      _stokes_nc_get_rng in stokes-nc-read.c.o
      _stokes_nc_check_params in stokes-nc.c.o
      _stokes_nc_get_params in stokes-nc.c.o
  "_nc_get_var1_int", referenced from:
      _stokes_nc_get_rng in stokes-nc-read.c.o
      _stokes_nc_print_actives in stokes-nc.c.o
      _stokes_nc_check_params in stokes-nc.c.o
      _stokes_nc_get_params in stokes-nc.c.o
  "_nc_get_vara_double", referenced from:
      _stokes_nc_get_array1d in stokes-nc-read.c.o
      _stokes_nc_get_data0 in stokes-nc-read.c.o
      _stokes_nc_get_data in stokes-nc-read.c.o
      _stokes_nc_get_time in stokes-nc-read.c.o
  "_nc_get_vara_int", referenced from:
      _stokes_nc_get_rng in stokes-nc-read.c.o
  "_nc_inq", referenced from:
      _stokes_nc_open_ in stokes-nc-read.c.o
  "_nc_inq_dim", referenced from:
      _stokes_nc_open_ in stokes-nc-read.c.o
  "_nc_inq_var", referenced from:
      _stokes_nc_open_ in stokes-nc-read.c.o
  "_nc_open", referenced from:
      _stokes_nc_open_ in stokes-nc-read.c.o
     (maybe you meant: _stokes_nc_open)
  "_nc_put_att_text", referenced from:
      _stokes_nc_init_vec in stokes-nc.c.o
      _stokes_nc_init_int_scalar in stokes-nc.c.o
      _stokes_nc_init_scalar in stokes-nc.c.o
      _stokes_nc_init_t in stokes-nc.c.o
      _stokes_nc_init_stt in stokes-nc.c.o
      _stokes_nc_init_t_vec in stokes-nc.c.o
      _stokes_nc_init_t_stt in stokes-nc.c.o
      ...
  "_nc_put_var1_double", referenced from:
      _stokes_nc_set_shear_rate in stokes-nc.c.o
      _stokes_nc_set_time in stokes-nc.c.o
      _stokes_nc_set_shear_shift in stokes-nc.c.o
      _stokes_nc_set_rng in stokes-nc.c.o
  "_nc_put_var1_int", referenced from:
      _stokes_nc_init_ in stokes-nc.c.o
      _stokes_nc_set_rng in stokes-nc.c.o
  "_nc_put_vara_double", referenced from:
      _stokes_nc_set_l in stokes-nc.c.o
      _stokes_nc_set_ui0 in stokes-nc.c.o
      _stokes_nc_set_oi0 in stokes-nc.c.o
      _stokes_nc_set_ei0 in stokes-nc.c.o
      _stokes_nc_set_x0 in stokes-nc.c.o
      _stokes_nc_set_u0 in stokes-nc.c.o
      _stokes_nc_set_o0 in stokes-nc.c.o
      ...
  "_nc_put_vara_int", referenced from:
      _stokes_nc_set_rng in stokes-nc.c.o
  "_nc_strerror", referenced from:
      _stokes_nc_error in stokes-nc.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [libstokes.dylib] Error 1
make[2]: *** [CMakeFiles/stokes_shared.dir/all] Error 2
make[1]: *** [CMakeFiles/stokes_shared.dir/rule] Error 2
make: *** [stokes_shared] Error 2

Could NOT find ARPACK (missing: ARPACK_LIBRARIES)

Thank you for your help, but new error: Could NOT find ARPACK (missing: ARPACK_LIBRARIES)

The program is:

zruan@ci2ma-All-Series:~$ cd Desktop/ryuon-cmake/
zruan@ci2ma-All-Series:~/Desktop/ryuon-cmake$ mkdir build
zruan@ci2ma-All-Series:~/Desktop/ryuon-cmake$ cd build/
zruan@ci2ma-All-Series:~/Desktop/ryuon-cmake/build$ cmake ..
-- The C compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- The Fortran compiler identification is GNU 5.4.0
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
CMake Error at /usr/local/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find ARPACK (missing: ARPACK_LIBRARIES)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  FindARPACK.cmake:6 (find_package_handle_standard_args)
  CMakeLists.txt:35 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/zruan/Desktop/ryuon-cmake/build/CMakeFiles/CMakeOutput.log".
zruan@ci2ma-All-Series:~/Desktop/ryuon-cmake/build$ make -j 16
make: *** No targets specified and no makefile found.  Stop.
zruan@ci2ma-All-Series:~/Desktop/ryuon-cmake/build$ make -j 16 test
make: *** No rule to make target 'test'.  Stop.
zruan@ci2ma-All-Series:~/Desktop/ryuon-cmake/build$ 

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.