Re: dub ldc2 static linking

2022-10-28 Thread Yura via Digitalmars-d-learn
On Friday, 28 October 2022 at 09:02:22 UTC, Kagamin wrote: On Friday, 28 October 2022 at 02:46:42 UTC, ryuukk_ wrote: I'm just right now having an issue with glibc version mismatch for my server Just compile with an old enough glibc, 2.14 works for me. Indeed, if I got it right it seems to

Re: dub ldc2 static linking

2022-10-27 Thread Yura via Digitalmars-d-learn
Thank you! I tried this one, but it did not help. All these warnings survived : "... Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking" On Thursday, 27 October 2022 at 14:18:01 UTC, Anonymouse wrote: On

dub ldc2 static linking

2022-10-27 Thread Yura via Digitalmars-d-learn
Dear All, I am trying to create a static executable to be able to run it on virtually any linux x86_64 OS. At the end I get a binary, however, multiple warnings are printed after compilation. My dub.sdl: dependency "mir" version="~>3.2.3" dependency "lubeck" version="~>1.5.1" lflags

Re: library to solve the system of linear equations

2022-10-26 Thread Yura via Digitalmars-d-learn
The workaround is to compile without --release mode, but using the "O3" ldc flag instead does the job - the binary is fast, yet the try - catch block executes properly. On Wednesday, 26 October 2022 at 20:13:37 UTC, Yura wrote: OK, got the problem solved by adding the following lines in my

Re: library to solve the system of linear equations

2022-10-26 Thread Yura via Digitalmars-d-learn
OK, got the problem solved by adding the following lines in my dub.sdl file: lflags "-lopenblas" "-lgfortran" dflags "--static" However, one problem still remains. Apparently, when compiled with dub --release mode I got segfault in my try - catch block. Any solution to this? On Wednesday,

Re: library to solve the system of linear equations

2022-10-26 Thread Yura via Digitalmars-d-learn
I am now trying to compile the code statically using the dub manager via the following command line: dub build --force --build=release --compiler=path_to_ldc2/ldc2 and having these lines in my dub.sdl file: dependency "mir" version="~>3.2.3" dependency "lubeck" version="~>1.5.1" dflags

Re: library to solve the system of linear equations

2022-10-18 Thread Yura via Digitalmars-d-learn
Yes, did the same and it worked. The amazing thing is that the system solver turned out to be natively parallel and runs smoothly! On Tuesday, 18 October 2022 at 15:22:02 UTC, mw wrote: On Tuesday, 18 October 2022 at 09:56:09 UTC, Siarhei Siamashka wrote: On Monday, 17 October 2022 at

Re: parallel is slower than serial

2022-10-18 Thread Yura via Digitalmars-d-learn
Thank you, folks, for your hints and suggestions! Indeed, I re-wrote the code and got it substantially faster and well paralleled. Insted of making inner loop parallel, I made parallel both of them. For that I had to convert 2d index into 1d, and then back to 2d. Essentially I had to

parallel is slower than serial

2022-10-18 Thread Yura via Digitalmars-d-learn
Dear All, I am trying to make a simple code run in parallel. The parallel version works, and gives the same number as serial albeit slower. First, the parallel features I am using: import core.thread: Thread; import std.range; import std.parallelism:parallel; import std.parallelism:taskPool;

Re: library to solve the system of linear equations

2022-10-17 Thread Yura via Digitalmars-d-learn
Dear All, Thank you so much for your replies and hints! I got it working today. All the libraries are properly linked and the Equation solver runs smoothly. The compilers turned out to be problematic though. The "Mir" library does not work with the Ubuntu 18.04 gdc and ldc compilers. I have

Re: library to solve the system of linear equations

2022-10-14 Thread Yura via Digitalmars-d-learn
On Friday, 14 October 2022 at 18:37:00 UTC, Sergey wrote: On Friday, 14 October 2022 at 17:41:42 UTC, Yura wrote: Dear All, I am very new to D, and it has been a while since I coded in anything than Python. I am using just notepad along with the gdc compiler. At the moment I need to solve

library to solve the system of linear equations

2022-10-14 Thread Yura via Digitalmars-d-learn
Dear All, I am very new to D, and it has been a while since I coded in anything than Python. I am using just notepad along with the gdc compiler. At the moment I need to solve the system of liner equations: A00*q0 + A01*q1 + A02*q2 ... = -V0 A10*q0 + A11*q1 + A12*q2 ... = -V1 ... I have