Giter Site home page Giter Site logo

ayonsn017 / lens Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crcox/lens

0.0 1.0 0.0 12.79 MB

The Light Efficient Network Simulator (LENS) was originally written by Douglas Rhode, copyright 1998-2004.

Makefile 1.46% C 73.70% C++ 0.35% Tcl 9.60% Objective-C 0.05% CMake 0.02% SAS 0.01% CLIPS 0.01% Pascal 0.20% Ada 0.25% Assembly 0.39% C# 0.15% Batchfile 0.02% M4 3.77% DIGITAL Command Language 0.08% Groff 9.31% HTML 0.08% Module Management System 0.01% Perl 0.01% BlitzBasic 0.54%

lens's Introduction

LENS

The Light Efficient Network Simulator (LENS) was originally written by Douglas Rhode, copyright 1998-2004. Prior to this repo, the last "stable" release was version 2.64-cnbc.1, hosted at Stanford University at http://web.stanford.edu/group/mbc/LENSManual/. This release was still being built against Tcl/Tk 8.3, and was a challenge to build on modern systems.

The source code in this repo has been updated to build against Tcl/Tk 8.6.4. It has been tested on:

  • Ubuntu 14.04 (trusty) 64-bit.
  • Ubuntu 15.10 (Wily) 64-bit.
  • Scientific Linux 6 64-bit.

Install

The build process is laid out in compile.sh.

First, create a directory to install this local build of Tcl/Tk into:

mkdir -p usr/local
TOP=$(pwd)

Then, build Tcl:

# Compile Tcl
cd "TclTk/tcl8.6.4/unix"
./configure --enable-shared --prefix=${TOP}/usr/local
make
make install

Then, build Tk:

# Compile Tk
cd "../../tk8.6.4/unix"
./configure --enable-shared --prefix=${TOP}/usr/local --with-tcl=../../tcl8.6.4/unix/
make
make install

Finally, build Lens:

# Compile Lens
cd ${TOP}
make

Running Lens

For Lens to run, some environment variables need to be set. If you are running Lens on a distributed cluster, run_Lens.sh will handle setting up the environment on the remote machine.

The spirit of the instructions at http://web.stanford.edu/group/mbc/LENSManual/Manual/running.html still apply to setting up your environment to run Lens, with slight differences. The following instructions will work with bash or zsh.

First, set the LENSDIR environment variable.

# Your LENSDIR will probably be $TOP, created at the start of the build process.
export LENSDIR=<your Lens directory>

Next, you need to let Lens/your system know where to find the Tcl/Tk libraries we compiled. Add this location to your LD_LIBRARY_PATH environment variable.

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${LENSDIR}/usr/local/lib

Finally, you need to let your system know where the the Lens executable is on your system. Note that the build process did not install Lens anywhere other than ${LENSDIR}/Bin. So, you need to add that to the system path:

export PATH=${PATH}:${LENSDIR}/Bin

You might add all of these export commands to your .bashrc (or .zshrc, as the case may be). Equivalent commands are different in other shells, so you may need to Google to make this work with your shell of choice.

Why LENS?

LENS is a neural network simulator written specifically for cognitive science, and so has many features that more generic packages do not have. It is also lightweight, and can be run in batch mode without ever loading a GUI. This is useful when scaling up or when running many iterations of a simulation in a distributed computing environment. It is written to be extensible. The LENS is (Tcl) script driven, and so you have a great deal of flexibility without needing to write a new C extension.

Help Wanted

I am working on this revitilization of LENS because I see a pressing need for it. However, there are many things that I am learning as I go in order to do so---this is my first project in C, and by extension using the Tcl API. I have never written a make file, and know very little about configuration and build tools. I am excited to learn, but also very much looking for help even on things that strike you as trivial, because it's probably not trivial from where I am sitting.

lens's People

Contributors

crcox avatar

Watchers

Ayon Sen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.