OpenSSI and mono/.NET
Daniel Seifert <[email protected]>
| Newsgroups | gmane.linux.cluster.ssic.user |
|---|---|
| Message-ID | <1145042480.8957.19.camel@localhost> |
Hi,
I am trying to write a small application in .NET/C# (mono 1.1.13.6) for
OpenSSI 1.2.2.
For testing, I wrote a small test app that is just trying to migrate the
app through all nodes and output it's current node (source is at end of
mail).
Unfortunately the migrate call does not seem to work. It simply returns
-1 and in syslog I see a message like
add_thread_group: pid 68497 partially shared with pid 68498
The relevant entries in the process list at that moment are:
68497 pts/3 S+ 0:00 mono migratetest.exe
68498 pts/3 S+ 0:00 mono migratetest.exe
68499 pts/3 S+ 0:00 mono migratetest.exe
68500 pts/3 S+ 0:00 mono migratetest.exe
FYI, I only found this error message mentioned once on the web at
http://article.gmane.org/gmane.linux.cluster.ssic.user/3180
I've also been told that mono has always at least 4 threads running (see
above) and uses thread-local storage.
Does the above error message imply that it will be impossible to develop
for OpenSSI using Mono?
P.S.: Is there any documentation for the commands in the cluster.h file?
Thanks in advance for any reply,
Daniel
-------------------------------------------------------------
using System;
using System.IO;
using System.Runtime.InteropServices;
public class MigrateTest {
[DllImport("libcluster")]
static extern int clusternode_num();
[DllImport("libcluster")]
static extern int migrate(int node);
[DllImport("libcluster")]
static extern int cluster_maxnodes();
[DllImport("libcluster")]
static extern int clusternode_avail(int node);
static void Main() {
int maxnodes=cluster_maxnodes();
for (int i=1; i<=maxnodes; i++) {
if (clusternode_avail(i) == 1) {
migrate(i);
int thisnode=clusternode_num();
System.Console.WriteLine("We should be on node " + i + " and we are on " + thisnode);
}
}
}
}
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642