VILLASframework / node

Connecting real-time power grid simulation equipment
https://fein-aachen.org/projects/villas-node/
Apache License 2.0
10 stars 5 forks source link

Shared Memory Example not working #798

Open morje-datta opened 1 month ago

morje-datta commented 1 month ago

Hello,

Current I have install fedora 36 install on my desktop,I have read the documentation regarding villas node, i am trying for shared memory example but seem its not working for me. i have follow the same.when i run villas-shmem client there no data present. for more details i have added the screen shot.

Example https://villas.fein-aachen.org/docs/node/nodes/shmem

Screenshot from 2024-07-24 18-02-54

stv0g commented 1 month ago

The invocation of villas-Sheen is missing mandatory arguments as the usage message indicates. You will need to pass the name of the shared memory segments.

Can you please also provide the config file used by villas-node?

morje-datta commented 1 month ago

Hello,

I have added the share memory name as the argument but its saying segmentation fault. For reference i have added the screenshot. configuration file: https://github.com/VILLASframework/node/blob/master/etc/examples/nodes/shmem.conf

Example that i have run is https://github.com/VILLASframework/node/blob/master/clients/shmem/villas-shmem.cpp

Screenshot from 2024-07-29 11-26-28

stv0g commented 1 month ago

The example shmem.conf config file is made in such a way that it tests a loopback connection. Hence, the settings nodes.shmem_node.{in,out}.name are the same (sn1_in) in both directions.

If you want to test the shared memory connection between a VILLASnode instance (villas-ndoe) and the test program villas-shmem, you will need to use different names for each direction and also pass those different names as command line arguments to villas-shmem.

Please also note, that the shared memory node-type has note been used that much in the past. Are you sure that you really need it? Maybe socket-based communication e.g. mqtt or plain UDP socket are better suited for your use case.

morje-datta commented 1 month ago

actually i want to import/export data to DPSIM for that reason i am using the share memory. so could you guide me how i can import/export data from DPSIM. Or is there any other way via which i can import/export data from DPSIM

stv0g commented 1 month ago

Ah I see. The interface between VILLASnode and DPsim is no longer using the shared memory interface. This is obsolete. VILLASnode is now embedded into DPsim directly. I suggest you have a look at the DPsim examples. Especially those using the VillasInterface.