Coder Social home page Coder Social logo

cpmech / gosl Goto Github PK

View Code? Open in Web Editor NEW
1.8K 75.0 196.0 30.46 MB

Linear algebra, eigenvalues, FFT, Bessel, elliptic, orthogonal polys, geometry, NURBS, numerical quadrature, 3D transfinite interpolation, random numbers, Mersenne twister, probability distributions, optimisation, differential equations.

License: BSD 3-Clause "New" or "Revised" License

Shell 1.49% Go 79.71% C 5.29% Python 1.10% R 0.19% Dockerfile 0.08% JetBrains MPS 12.13%
scientific-computing linear-algebra differential-equations sparse-systems parallel-computations computational-geometry fast-fourier-transform eigenvalues eigenvectors optimization

gosl's People

Contributors

cesumilo avatar cpmech avatar gitter-badger avatar lu1as avatar person142 avatar radarhere avatar rauldurand avatar sbromberger avatar siddhesh avatar ulises-jeremias avatar wtsia avatar yunpeng1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gosl's Issues

compiling la failed

Hi,
I am so sorry to bother you again.
After formatting my SSD and freshly installed the macOS, I tried again to install gosl on my macbook pro (13" early 2011) which is running macOS Sierra (10.12.6), as described in https://github.com/cpmech/gosl/blob/master/doc/InstallationOnMacOS.md.
I got an Fail during compiling la in the end when I executed ./all.bash (see attachment). Is the possibly a way to fix this issue?

By the way, there is a typo in 2 HomeBrew and dependencies:
brew install homebrew/science/suitesparse
only worked with:
brew install homebrew/science/suite-sparse

(go version: go version go1.9 darwin/amd64)

screen_shot1
screen_shot2

Installation

Hi! I'm new to go and I'm new to gosl. Trying to install it on MacOS following the instructions. When testing, it fails on the h5-tests:

compiling io/h5 =============================================================
github.com/cpmech/gosl/io/h5
Undefined symbols for architecture x86_64:
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How to fix that? I was ignoring this warning:
Warning: hdf5 dependency gcc was built with a different C++ standard

Kind regards

libblas error

After following your directions, I get the following error:
=== compiling la/oblas =============================================================
/tmp/go-build948894470/b001/oblas.test: symbol lookup error: /usr/lib/libblas.so.3: undefined symbol: gotoblas
exit status 127
FAIL github.com/cpmech/gosl/la/oblas 0.002s

Any suggestions?
Best,
Dave

FAIL compiling github.com/cpmech/gosl/la/oblas

Hi when I followed the README, installed the dependencies, and then ran ./all.bash
I got the following failure:

=== compiling la/oblas =============================================================
   . . . testing . . .   SplitJoinComplex
   . . . testing . . .   Conversions01. real
   . . . testing . . .   Conversions02. complex
   . . . testing . . .   Matrix01. real
   . . . testing . . .   Matrix02. complex
   . . . testing . . .   Ddot01
   . . . testing . . .   Dscal01
   . . . testing . . .   Daxpy01
   . . . testing . . .   Zaxpy01
   . . . testing . . .   Dgemv01
   . . . testing . . .   Zgemv01
   . . . testing . . .   Dger01: a = 100 + 0.5⋅u⋅vᵀ
   . . . testing . . .   Dgemm01: 0.5⋅a⋅b + 2⋅c
   . . . testing . . .   Dgemm02: 0.5⋅a⋅bᵀ + 2⋅c
   . . . testing . . .   Dgemm03: 0.5⋅aᵀ⋅b + 2⋅c
   . . . testing . . .   Dgemm04: 0.5⋅aᵀ⋅bᵀ + 2⋅c
   . . . testing . . .   Zgemm01
   . . . testing . . .   Dgesv01
   . . . testing . . .   Zgesv01. low accuracy
   . . . testing . . .   Dgesvd01
--- FAIL: TestDgesvd01 (0.00s)
    print.go:39: u [2][3]  1 != -1 |diff| = 2
    print.go:39: vt [2][1]  -1 != 1 |diff| = 2
   . . . testing . . .   Dgesvd02
   . . . testing . . .   Dgesvd03
   . . . testing . . .   Zgesvd01
   . . . testing . . .   Zgesvd02
   . . . testing . . .   Dgetrf01. Dgetrf and Dgetri
   . . . testing . . .   Zgetrf01. Zgetrf and Zgetri
   . . . testing . . .   Dsyrk01
   . . . testing . . .   Dsyrk02
   . . . testing . . .   Zsyrk01
   . . . testing . . .   Zherk01
   . . . testing . . .   Dpotrf01
   . . . testing . . .   Zpotrf01
   . . . testing . . .   Dgeev01
FAIL
exit status 1
FAIL    github.com/cpmech/gosl/la/oblas 0.014s
``
Seems only 1 test is failing, I'm wondering what does it mean by this test failing and is there a solution to it? Please let me know if you need more information.

Drawing and plotting

You can remove the need for putting and Qt by using golang opengl packages..these are able to work for web, desktop and mobile.

For web they use webgl.

A simple example is the shiny package but there are higher level ones like ebiten.
You could get something going very fast using ebiten with full websockets push support for real time updates

2d interpolation (bicubic/bilinear)

Hi,
I'm interested in implementing something, similar to DataInterp, to be used with two-dimensional discrete data interpolation.

I was thinking that an interface similar to alglib's 2dinterpolation would work?

Is this something you would want in this library?

OpenGL hui

I am a building architect working on energy , 3d printing and medical systems.

Me and a few others are building a OpenGL based GUI toolkit .

It replaces lots of stuff your using.

https://github.com/cpmech/gosl/blob/master/plt/README.md

We are used to use Qt and other tools and decided we had enough :)

I am from Melbourne but live in Berlin now.

I would love to use your code as a basis to check our OpenGL Toolkit written in golang can fulfil the needs that you have and get you involved in dog fooding our framework too.

Our device targets are all desktops, mobiles, web ( via webgl and gopherjs).
Our GUI targets:
Forms, 2d canvas surfaces for stuff like flow diagrams.
3d for 3d models and for computation using Vulkan.
Vulkan Run in all device targets btw.

If you interested I will shoot you a link.

gcc version is hardcoded?

Hi,

It's not a huge deal, but I noticed that for Darwin, the gcc version is hard-coded in

#cgo darwin LDFLAGS: -L/usr/local/opt/openblas/lib -L/usr/local/Cellar/gcc/7.3.0_1/lib/gcc/7/ -lopenblas -lgfortran -lm

The current version of gcc installed via homebrew is 8.1.0. How difficult would it be to change this to be more dynamic?

MPI library

It may be helpful to have some of the components as separate projects. The GO bindings for MPI would be particularly helpful to have as a separate project. There is one other set of GO bindings for MPI https://github.com/marcusthierfelder/mpi which just has the MPI libraries as a dependency. This makes it much easier to use these on HPC systems.

compiling la failed

Hi,
Was working through the steps as described in https://github.com/cpmech/gosl/blob/master/doc/InstallationOnMacOS.md and got literally stuck on the very last step. So, while trying to install the gosl package everything went well until gosl/la where I got this in my terminal:

compiling la <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
signal: killed
FAIL github.com/cpmech/gosl/la 0.005s

I was not able to find a solution on the net, so I hope to work out a solution with you guys, since my Bachelor Thesis program using Go should run as efficient as possible.

My macbook pro (early 2011) is running macOS Sierra (10.12.5) and has a Intel GPU, therefore no CUDA.

terminal1

Question about removed submodules

Hi @cpmech ! I just noticed that some useful modules such as ml, graph, plt, etc were removed. Can I ask why did you decided to do that? Is there any plan to reimplement them in the future or maybe move the implementations to a different library? Maybe I can help with any if needed.

Example problem?

Great package! I was trying the examples and got the following error. Am I missing something?

running vtk_isosurf01.go <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

github.com/cpmech/gosl/vtk

In file included from connectgovtk.cpp:10:0:
clrmap.h:12:28: fatal error: vtkLookupTable.h: No such file or directory
compilation terminated.

mpi code location

Hi gosl folks,

A while back I extracted the MPI code because I needed to do some work with it. I noticed you're no longer bundling it. Perhaps you might put a link to my repo somewhere in your README in case folks are still looking for it?

https://github.com/sbromberger/gompi is the repo. (Also, if you have any comments/suggestions on the code I'd be grateful!)

Thanks.

Autodetect Homebrew GCC and properly populate LD_FLAGS on MacOS

When attempting an install of gosl on MacOS using the instructions in the doc directory I get the following issue:

=== compiling num/qpck =============================================================
/Users/nathaniel.dean/golang/src/github.com/cpmech/gosl/num/qpck
# github.com/cpmech/gosl/num/qpck
ld: warning: directory not found for option '-L/usr/local/Cellar/gcc/7.3.0_1/lib/gcc/7/'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is because the CGO Darwin flags in num/qpck/flags.go specifically point to a particular version of GCC that according to Homebrew is out of date. It is annoyingly difficult to get Homebrew to install multiple versions of a package, and besides this should be detected somehow. Maybe a go generate line to detect gcc version and populate? Maybe setting CGO_LDFLAGS from the all.bash script? The current fix (editing line 12 of flags.go) requires a codehack to get everything to build and I think this user experience can be drastically improved.

Installation Failure on Mac

Hi,

I have tried to install this useful package on my system and I have run into an installation failure on my Mac OS X, running version 10.11.5. I believe I have gone through the appropriate installation steps 1-5, but then at step 6, when I run ./all.bash from the gosl/ directory that I cloned, I get the following error output (screenshot)
screen shot 2016-09-29 at 9 04 04 am

Any ideas what could be going wrong or how to diagnose this?

Thanks,
Tim

Is there a reason OSX isn't supported for mpi?

I just commented out all the build directives and removed mpi_notlinux.go and things appear to work on OSX 10.13.3 with openmpi 3.0.0 installed via homebrew.

Is there a reason I shouldn't do this? I've only tested a trivial program so far.

maybe a Bug

compiling la <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
platform = windows
GOPATH = E:/GoProject
GOSL = E:/GoProject/src/github.com/cpmech/gosl

github.com/cpmech/gosl/la

E:/GoProject/src/github.com/cpmech/gosl/lib/libumfpack.a(umf_dl_local_search.o): umf_local_search.c:(.text+0x162c): undefined reference to dtrsv_' E:/GoProject/src/github.com/cpmech/gosl/lib/libumfpack.a(umf_zl_local_search.o): umf_local_search.c:(.text+0x13ae): undefined reference to zgemv_'
E:/GoProject/src/github.com/cpmech/gosl/lib/libumfpack.a(umf_zl_local_search.o): umf_local_search.c:(.text+0x148a): undefined reference to ztrsv_' E:/GoProject/src/github.com/cpmech/gosl/lib/libumfpack.a(umf_zl_blas3_update.o): umf_blas3_update.c:(.text+0x649): undefined reference to zgemm_'
E:/GoProject/src/github.com/cpmech/gosl/lib/libumfpack.a(umf_zl_blas3_update.o): umf_blas3_update.c:(.text+0x6ee): undefined reference to ztrsm_' E:/GoProject/src/github.com/cpmech/gosl/lib/libumfpack.a(umf_zl_blas3_update.o): umf_blas3_update.c:(.text+0x77b): undefined reference to zgeru_'
collect2.exe: error: ld returned 1 exit status

hdf5.h error

=== compiling io/h5 =============================================================

github.com/cpmech/gosl/io/h5

.\array.go:8:10: fatal error: hdf5.h: No such file or directory
#include "hdf5.h"
^~~~~~~~
compilation terminated.

compare with gonum???

Hi,
I want to use matrix part of the gosl. In my code, I suppose using LU factorization to solving Ax=b or trans(A)x=b such form.
Because of calling frequency of solving linear systems, I hope to have efficient package to use it.
I find two main packages, GOSL and GONUM, both are support matrix computations, but I can't sure which is best for my cases. Should you give me some advices?
In fact, I want to write a linear programming solver using go language for exercise....
Thanks

Documentation

Hello!

Could you clarify - is linear algebra package used parallel algorithm? And use vectorization on processor?

gosl/la fails to compile

Hi lovlies, love all the work in gosl, thanks!!

However, I'm trying to use gosl/la in Go (not via docker), and Go 1.16 is erroring out:

# github.com/cpmech/gosl/mpi
/Users/aomeara/Downloads/go/pkg/mod/github.com/cpmech/[email protected]/mpi/mpi.go:11:10: fatal error: 'mpi.h' file not found
#include "mpi.h"
         ^~~~~~~
1 error generated.
# github.com/cpmech/gosl/la/oblas
/Users/aomeara/Downloads/go/pkg/mod/github.com/cpmech/[email protected]/la/oblas/oblas.go:23:10: fatal error: 'lapacke.h' file not found
#include <lapacke.h>
         ^~~~~~~~~~~
1 error generated.
exit status 2
Process exiting with code: 1

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.