Questions tagged [mathlink-or-wstp]
MathLink is a suite of Mathematica functions that implement a protocol for the communication/interfacing of Mathematica with external programs.
264
questions
4
votes
2
answers
158
views
Help with using the flux balance analysis tool SNA of R. Urbanczyk
I would like to call a function from the SNA package at https://www.bioinformatics.org/groups/?group_id=546, but this doesn't work, and the email of the provider doesn't accept messages. Trying to ...
1
vote
0
answers
45
views
How to print multiple lines back to Wolfram from external C program?
I am developing a WSTP application using C and for debugging purposes, I am trying to print back multiple messages on to the kernel. This is what I have tried so far:
...
1
vote
0
answers
25
views
How to handle unsigned long integers when returning values from C?
This is my function in C:
uint64_t f(){
return 2147483648;
}
This is my function template specification:
...
2
votes
0
answers
62
views
How to load a .dylib library (C++ not compile with Mathematica library) on Mac with Mathematica?
I work on a mac M1 with MacOS Sonoma and i use Mathematica 12.3.1 and 14.0
I wanted to ask if there is a way to load a .dylib library on Mac with Mathematica, which was compiled without using the ...
0
votes
0
answers
39
views
The mcc command generated program segfaults
I am trying to get FormCalc to work with FeynArts, the only problem is that the ReadForm program that is required for FormCalc to work compiles fine but segfaults...
I am using Mathematica 14, should ...
3
votes
1
answer
70
views
How to display the terminal for a WSTP program
I have a need for integrating/running C++ code in Mathematica. To this extend I've been using MathLink, and now since sth like 10 years WSTP. I have created tooling for using C++ the C code in the ...
0
votes
0
answers
50
views
On MacOs, I cannot use Needs["QDENSITY`Qdensity`"]
I am trying to get
Needs["QDENSITY`Qdensity`"]
from (https://library.wolfram.com/infocenter/MathSource/5715/), however, it failed and I get this error:
...
18
votes
1
answer
720
views
Fast Hankel Function in Mathematica
I am working on a project that requires repeated calls to HankelH1[0, r] for $r$ spanning the full real axis. When I use the mathematica routine, it can be as much ...
0
votes
1
answer
112
views
Error "cannot find the required native library named JLinkNativeLibrary"
I have a problem running my test program on linux. I want to connect to mathematica kernel using java API. On windows, I put both jlink.jar and JLinkNativeLibrary.dll next to my executable file, let's ...
0
votes
1
answer
172
views
Call executable .exe in C
I would like to improve my Mathematica code by executing some function in C, since it is way faster. The flow would be:
Mathematica: generate inputs and store in .dat file, then call .exe previously ...
4
votes
0
answers
71
views
Inserting data into a mathlink slave kernel via Table
I'm trying to perform a computation that will:
Be long on my machine (I estimate 24-48 hours)
Consume a lot of memory
Generate ~1 gig of data at the end
To manage the calculation I'd like to chunk ...
1
vote
0
answers
88
views
In version 13, WSTPServer cannot execute LaunchKernels[]
When I execute LaunchKernels[] or Kernels[], I get the following errors.The output of Kernels[] is {}.
"WSTPServer" is not among the known evaluation environments
{Session, RemoteSession, ...
1
vote
1
answer
79
views
Cannot render boxes from WSTP C++
I am attempting to send text from a WSTP C++ backend to the Mathematica kernel which should be parsed and rendered as boxes.
The goal is for the user to see the ...
5
votes
1
answer
114
views
Detect front-end Abort in C WSTP process
I have a long loop in a C WSTP process, within which I intermittently check for abort messages sent by the front-end:
...
1
vote
0
answers
112
views
It is possible to call C functions with pointers as arguments in Mathematica?
Here is my goal: I want to call external library functions, written in C (not by me), in Mathematica.
I may have found a way to do it using LibraryLink by following this scheme:
First, for each ...