How to include Eigen library for Linear algebra in ns-3

174 views
Skip to first unread message

Raj Jaiswal

unread,
Jul 12, 2016, 10:52:54 AM7/12/16
to ns-3-users
Hi,
     I need to run ns-3 simulation using Eigen library. Since Eigen is a header-only library. I tried to include but its not working.
Kindly suggest me the procedure.

Regards


Raj K Jaiswal


Tommaso Pecorella

unread,
Jul 12, 2016, 7:24:47 PM7/12/16
to ns-3-users
Hi,

please read the posting guidelines. In particular the section where it's suggested that "it's not working" is not enough to provide a meaningful answer (other than a generic "too bad").

T.

Raj Jaiswal

unread,
Jul 13, 2016, 1:42:30 AM7/13/16
to ns-3-...@googlegroups.com
Hi,
     I need to run a simulation in which Eigen (Linear algebra) external library is required. Eigen is a headers only library viz. it does not have lib.a file(Only header files are there) . My program is working as a stand alone program using Eigen library but this library is not getting accessed in ns-3 simulator.  To include the library I modified the Wscprit  by using following steps as explained in:


However, I found a step which involve the inclusion of lib.a file too which is not available in my case. Hence, I included the following two commands in wscript in build section:

module.env.append_value("CXXFLAGS", "-I/usr/include/eigen2/Eigen")
module.env.append_value("LIB", ["Eigen"]) 


after inclusion when I run the program it throws the error that the variable is not defined, but the variable is defined using eigen.

Kindly suggest some solution.

Location of library : usr/include/eigen2/Eigen


Raj K Jaiswal  
 

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/EhzsowNrC4U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Jul 13, 2016, 4:56:24 AM7/13/16
to ns-3-users
Hi,

if the library is header-only, then you shouldn't need "module.env.append_value("LIB", ["Eigen"]) ".

T.

Bao Trinh

unread,
Oct 4, 2017, 8:40:58 AM10/4/17
to ns-3-users
Hi Raj.
I am trying to run some NS-3 scripts that needs linking to Eigen. Could you please let me know did you fix that ? and steps that you modify wscrips file ?

Thank you very much.

Raj Jaiswal

unread,
Oct 8, 2017, 2:54:49 AM10/8/17
to ns-3-...@googlegroups.com
You copy the complete eigen folder in ns-3 directory and call it into your main script where linear algebra is used.

To unsubscribe from this group and all its topics, send an email to ns-3-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages