Tuesday, February 25, 2014

Using the GPU for Real Work: A Postmortem


After doing about a dozen projects with CUDA/GPU for my own edification, I made the mistake of trying to help out some friends on their project.

After working through various issues / problems I am came up with a list of somewhat obvious conclusions. I knew some of these going in, but some of them were a surprise and some were confirmed as being really true, not just sort of true.

I showed this to a friend who has spent a great deal of his career designing graphics hardware and he confirmed these and added a few of his own. I showed this list to another friend who has used the GPU commercially and he tells me I am all wrong. He always got 50-100 times speedup without any problems and things just work.

So you are on your own, kids.

Believe these or not as you please.

1. An algorithm that has been optimized for a conventional computer will be so completely unsuitable for the GPU that you should not even try to port it. One is much better off abandoning what you did before and rethink the problem for the GPU.

2. A major part of any GPU solution is getting the data to and from the GPU. Depending on what else you are doing, this could have a serious impact on the performance of the application and its design.

3. In general you should not expect to just tack a GPU program/shader/whatever onto an already existing program. You should expect to have to do major work to rearchitect your program to use the GPU.

4. Do not expect to be able to do a lot of magic things with the display and still be able to do intensive work on the GPU. Under those circumstances, plan to have a second GPU for your compute work.  I am still not completely clear on how NVIDIA shares one GPU with two very different tasks (the computers window system and your program, for example), but it does, up to a point.

4. As part of planning to use the GPU in your application, you should budget/allocate time for the core developer to work with your GPU programmer to hash out ideas, issues, problems. If your core developer does not have the time or the interest, do not try to use the GPU.

5. Debugging GPU programs is much harder than debugging normal programs. Think microcode but a little better than that.

6. Performance for the GPU is something of a black art. Small differences in algorithm can have impressive differences in the received performance. It can be remarkably difficult to predict in advance what kind of performance you are to see ultimately on your algorithm and project, even after optimization.

7. Not all GPUs are created equal even if they are software compatible.

8. And of the unequal GPUs, GPUs for laptops are particularly unequal.

9. Although the technology of GPUs and their programming is maturing, and NVIDIA has done a very good job, things are not perfect and when you run into a problem you may spend weeks and weeks getting yourself out. Examples upon request.

10. When you add a GPU to a mix of a larger application, you have complicated testing, deployment and support. If you do not have the budget for this, do not try to use the GPU.

In conclusion, GPUs are not a magic solution that just makes things faster. Under the right circumstances, performance of GPU can be impressive, but lots of things have to go right and nothing is free.

Unless you are my friend who says that GPUs just work and speed things up. In that case, I guess they are free.

Sunday, February 23, 2014

The Infinite Mystery of NVIDIA Linux Device Drivers 2/2


In our previous post we outlined what you have to do to install the NVIDIA graphics device driver under Centos / Redhat Linux 6.5 and similar systems.

In this post we go over each item in boring detail.

I am pretty sure there is a mistake in here somewhere (builds confidence, doesn't it?) because I distinctly recall doing an /sbin/telinit 3 and 5 at some point in the process, but obviously I have edited this out of my longer term memory.  But have no fears, if this doesn't work exactly I am sure you will get the general idea and improvise as necessary.  You have my greatest faith in your abilities.

Remember, before you begin you are expected to sacrifice a goat at least and say the proper prayers spreading the prayer cloth and so forth.

1. Are you already running the NVIDIA driver? How can you tell for sure?

The way I do this is by running "nvidia-settings" from the shell. If a window comes up, everything is installed and working. If it can't find it or it doesn't run, you do not have the driver installed and should proceed.

    nvidia-settings

2. Install the development tools.

Become su and run the command

    yum groupinstall "Development Tools" --skip-broken

Notice the quotes and capitalization. Say yes when it asks you if its ok. Then go get coffee and come back in 15 minutes.

3. Figure out the model of your graphics card.

As su, use the command

    /sbin/lspci -nn | grep VGA

The reported line will have the model of the card. It will probably begin with the word "Geforce" or "Quadro".

4. Figure out if your Linux is 32 or 64 bit

Run the command

    uname -m

and it will tell you.

5. Download the driver from Nvidia.

With your browser of choice, navigate to www.nvidia.com and click on "Drivers". You should find a menu which will ask you which OS you are running (e.g. Mac, Windows, Linux 32, Linux 64), which series of graphics card (e.g. 9 series, 8 series, 200 series, 600 series, etc) and the specific model.  Fill these in and hit search and it will find your driver. A 9xxx card is the 9 series, but a 4xx card is a 400 series.  If you do not find the model of your card then you gave it the wrong series and you should try again.

Click yes or agree on the license agreement and save the driver some place you can find it again. Get another cup of coffee and go play with your dog or something. Come back in a few minutes.

6. Put that driver someplace easy to get to, like /tmp and make it executable.

I used to skip this step but it was too much work. Copy the file you just downloaded to someplace easy to type, like /tmp. Then make it executable with the command

    cp NV* /tmp
    chmod 755 NV*

Ok, now we get to the weirder stuff.

7. Change /etc/inittab to bring the system up at level 3

    su
    cd /etc
    cp inittab inittab.orig
    vi inittab

and change the "5" in the last line to "3".

8. Blacklist Nouveau, Part 1

    su
    cd /etc/modprobe.d
    cp blacklist.conf blacklist.conf.orig
    vi blacklist.conf

and add three lines to the bottom of the file which say

    # get rid of nouveau driver
    blacklist nouveau
    options nouveau modeset=0

and save the file.

9. Blacklist Nouveau, Part 2

    su
    cd /boot/grub
    cp grub.conf grub.conf.orig
    vi grub.conf

and add the word "rdblacklist=nouveau" to the end of the lines that specify the kernel to boot. These are the longest lines in the file and begin with the phrase "kernel /vmlinux-blah-blah-blah".

Dont fuck this up or you wont be able to reboot the system without some major help.

10. Reboot the system

11. Log in as root

12. Verify the location of the system kernel libraries

    cd /usr/src/kernels
    ls

You should see some horrible name that starts with 2.6. You either want to remember that name, or if you are like me, you want to save it as a shell variable. I use csh or tcsh, if you don't then you will have to figure out how your shell does this.

    cd 2.6<esc>
    set kernelpath=`pwd`

Notice the funny direction of the quotes on that set command.

13. Install the Nvidia driver

You should still be root. Change directory to /tmp or where you put the nvidia driver and say

    cd /tmp
    ./NV<esc> --kernel-source-path=$kernelpath

You will need to use the mouse, agree to the license agreement, and watch with your breath held while it jumps through hoops. When it asks you if it can create a new X11.conf say yes. When it asks you if it can install 32 bit compatibility say yes.

If it completes without complaining much we are almost done.

14. Restore the /etc/inittab runlevel to 5

Still as root say

    cd /etc
    cp inittab.orig inittab

It will ask you if its ok to overwrite a file, say yes.

15. Reboot the system

Hopefully the system will come up and the window system will come up, and you will log in.

16. As su, run "nvidia-xconfig"

    su
    nvidia-xconfig

17. Run "nvidia-settings" and save your work.

Say

    nvidia-settings

and goof around with the different options and screens and set things to your liking. Or just say ok and quit.

That is it.

You are done.

The Infinite Mystery of NVIDIA Linux Device Drivers 1/2


We are now going to do a series of boring technical notes that nevertheless fulfill a more noble purpose.

Those of us who are interested in doing or fostering independent production with computers and computer animation have a lot to be grateful for with Linux, particularly with Centos/Redhat Linux. It is stable, scalable, various applications work with it and it is remarkably Unix-like for something that isn't Unix.

And it has so far avoided the insane Linux-of-the-day bullshit of Ubuntu, praise Allah.

But we do not live in a perfect world and a well-tempered Linux is going to be running the NVIDIA device driver with a solid, respectable NVIDIA graphics card and we are going to discuss why and then dive into the crazy shit you have to do to make it all work.

The only manufacturer out there that really supports Linux is NVIDIA, in spite of what you may have heard of Linus fingering NVIDIA. His frustration is real, but it is bullshit. For a variety of reasons NVIDIA is not able to put their device drivers in the open source because it contains proprietary information they just do not want to give their competitors. So that means that certain purists can not include it with the standard distributions. That means you have to install it yourself.

With Centos / Redhat, one also has the option of using the so-called "nouveau" driver which supposedly supports NVIDIA. I have crashed my system so many times using the nouveau driver that I do not recommend you use it for serious work. Since I also do things like CUDA/GPU development, it isnt a serious option anyway.

So we are going to install the NVIDIA driver, and it is a little wacky to do so. There are three fundamental reasons why installing the driver is so convoluted and they are (a) you can not install a graphics driver if you have graphics running, (b) in particular you have to get rid of the nouveau driver and its non-trivial to do so, and finally (c) you have to be able to "compile" the NVIDIA driver against your current Linux and that means having the development environment loaded.

There is one more reason too that this note was written. There is so much craziness on the Internet about what to do with graphics drivers that I am adding my own opinion to the mix, along with clear instructions.

In order to follow these steps, you need to know how to do basic Unix/Linux things like ls, cd, chmod and so forth, have the su/root password, be able to use a text editor like vi that can work without X running, have access to the Internet, be able to use a web browser to download files, and be able to follow instructions.

In this post, I am just going to outline what you will have to do to install the driver. In the next post, I will fill in the details of how to actually do these things.

So hold on everybody, here we go!

1. Are you already running the NVIDIA driver? How can you tell for sure?
2. Install the development tools.
3. Figure out the model of your graphics card.
4. Figure out if your Linux is 32 or 64 bit
5. Download the driver from NVIDIA.
6. Put that driver someplace easy to get to, like /tmp and make it executable.

Now we get into the more tricky stuff.

7. Change /etc/inittab to bring the system up at level 3
8. Blacklist Nouveau, Part 1
9. Blacklist Nouveau, Part 2
10. Reboot
11. Log in as root
12. Verify the location of the system kernel libraries
13. Install the Nvidia driver (say yes to compatibility mode if you are asked)
14. Restore the /etc/inittab runlevel to 5
15. Reboot the system

We are almost done, hang in there!

16. As su, run "nvidia-xconfig"
17. Run "nvidia-settings" and save your work.

My goodness, that was annoying wasn't it?

The next post will have the mere details of how you actually do these things. The only thing really, really arcane is the blacklist of Nouveau.



Wednesday, February 19, 2014

Order Out of Chaos in Pi (1998)


NB: The following does not contain a spoiler but it does refer to one of the fundamental concepts of the movie Pi (1998)..

There is a sequence in the movie Pi which I am very fond of and which I wish to bring to your attention.  The purpose of the sequence is, imho, to explain to the audience what is meant by the idea of nature exhibiting mathematical principles.  This is a rather abstract concept for our filmgoers who are used to a steady diet of giant robots and teenage lust dilemmas.

The heart of the movie Pi (1998) by Darren Aronofsky is the search by a mathematician for a number, a number which describes the underlying structure of reality. In a sense this missing number would be to chaos theory what 3.14159 is to geometry but even more profound, it would be the single number that is the key to understanding the chaos that is our universe. Finding such a number would bring meaning to randomness, and order out of chaos. It would change everything: one could predict the weather or know which way Wall Street was going to go, and this very same number may even contain the secret name of God, according to some orthodox Jewish mystics.

Of course no such single number exists, that we know of, but its still an amusing premise and Aronofsky extracts some entertaining plot points from the idea.

The filmmaking problem becomes how do you explain to a general audience what it means to say that there is mathematics underlying the structure of reality. The audience for Pi will be a bright independent film going crowd, but likely math is not their strong subject. Probably most of the audience gets no closer to number theory than figuring out how to calculate the mortgage on their house or the interest on their student loan. So how do you explain this to them?

Well, one way to do this, and the way I think would also be entertaining, would be to stop the movie, bring up a white board, and have a famous mathematician give a short lecture on the origins and meaning of chaos theory. But there is this age old bias against this sort of thing in the conventional and anti-intellectual motion picture business, so giving a lecture in the middle of the film is out.

How else would one present the idea that that there is math everywhere in nature?

I put the 2:28 minute sequence up on Youtube and the right thing to do is to watch it before I say anything more. The mathematician is the guy sitting at the counter reading the paper.

The sequence is at http://youtu.be/wQnaMUoC1G8



 

                                  





So Max, our mathematician, is at the counter in a coffee shop trying to get some work done when someone he has recently met, but doesn't really know, comes in. Its Lenny, the orthodox student of Jewish mysticism who proceeds to explain the number theory of the Gematria (1) to Max. The idea is that Hebrew is all numbers and the Torah is a long series of cyphers and crossword puzzles. As Lenny starts to add up the "garden of Eden" and the "Tree of Knowledge", while Max looks on, he comes up with two numbers in the Fibonacci sequence. Max hijacks this discussion of numerology in the Torah and moves it to more standard high school math.   The Fibonacci sequence is one of those concepts that keep mathematicians happy because there are so many uses and weird coincidences, but the only one that Max/Aronofsky goes for here is that you can use the Fibonacci sequence to calculate Theta which is a number that describes a kind of spiral.   So we go effortlessly from Torah numerology to Fibonacci numbers to spirals and boom we are home.   All that is left to do is smoke your cigarette or pour cream in your coffee and the point is made.

"You see", says Lenny, "there is math everywhere".

I still think having a mathematician give a lecture would have worked, but this is probably more concise and any excuse to discuss numerology is OK by me.
__________________________________________________

For an introduction to Fibonacci numbers see

An introduction to Numerology in general

A reasonable introduction to Gematria and Jewish Mysticism in general

A Gematria Calculator

Pi (1998) on IMDB

____________________________________________________

Notes

1. Actually he fails to explain the Gematria to Max, getting a variety of things wrong but hey its good enough to get the point across.

Saturday, February 15, 2014

The Subtext of the Animated Explanation in The President's Analyst (1967)


NB: This post refers to a key point in the climax of the film The President's Analyst (1967).

There is an obscure sub-genre of animated shorts that has the role of explaining a science-based plot point in a major motion picture. In general it is considered bad form to stop the action of a movie to explain something, but many great movies have done this in spite of the low esteem with which this technique is held. As a variation on this otherwise discredited approach, filmmakers have occassionally used the animated short to do the explaining for them.

An important example of this technique in a major motion picture was Jurassic Park (1991) in which an animated character is used to explain how DNA extracted from a drop of blood preserved in amber can be used to create an entire franchise of films without ideas. This classic animation was done by Kurtz & Friends Animation and they have a pencil test of their work online at this link.


Classically cute DNA Fragment


Another example is that fabulous but sadly overlooked film from the cold war, The President's Analyst (1967). In the climax of the film, the villain reveals himself to be the CEO of TPC, The Phone Company, and explains to our hero, James Coburn, the psychiatrist to the President of the United States, why they need his help to get legislation passed to require the implant of a new communication device in everyone's brain.

This sequence is more than just an explanation, although it is an explanation, it is also the climax of the movie, everything else is mere gun fights and denouement.



The Cerebrum Communicator happily does its thing.

In order to completely appreciate both of these sequences there are two important things that the audience should realize, and which will become more and more obscure as time goes by. You see these shorts are more than mere animated explanations with cute animated characters, they are in fact double-barrelled nostalgia aimed directly at the baby-boomer demographic, and thus as this demographic ages and then departs, these nuances will be lost on all but the most informed audiences.

The first and overt nostalgia item are the films themselves, which are clearly references to the Bell Laboratories Science Films. Readers will recall that many years ago there used to be a company called AT&T which had a state-enforced monopoly on certain kinds of telephone service in this country. The profits from this monopoly were so extraordinary that the company was able to finance an important scientific laboratory known as Bell Labs. This now defunct entity was responsible for many, many key inventions in our daily lives before we turned R&D, and every other vital function, over to the Red Chinese in a desire to be "more efficient" and increase the profits of the rich.

But back in the day, and that day was the late 1950s and early 60s, we were involved in something called the Cold War, and the nation was concerned about having enough scientists and engineers in order to build nuclear weapons and the rockets to propel them, so there was an emphasis on science education. And to help serve that need, Bell Labs created films for young students to introduce them to important scientific concepts. Thus, the Bell Labs science films such as Our Mr. Sun (1956) and Hemo the Magnificent (1957) to name two. As you might have guessed by now, or recalled if you were there, these films featured a combination of live action and 2D (hand-drawn animation) in a dialogue with each other to explain some scientific concept.


The Sun and Father Time have a few words

Michael Sporn has an excellent discussion of this film on his blog at this location.

But if we reach a little further we can find yet another point of obscure nostalgia that these science films, and hence our animated scientific explanations, appealed to. Back when those of us who saw these films in their proper environment, which was about 4th - 6th grade in elementary school, one did not regularly see videos whenever one wanted. In fact, you did not see video much at all, except on broadcast television and then not in color unless you were rich or had a rich friend. Anything that was video-like was actually projected on film, normally 16mm film, with all the shades drawn to make the room dark.  This was a real treat for those of us in the early days of being educated. What a relief this was compared to the normal curriculum!

Even more obscure, the films were shown on the esteemed "multimedia" or "A/V" (as in audio/visual) cart, a cart that contained a 16 mm projector, a slide strip viewer, and an overhead projector, and was rolled from classroom to classroom as needed.

The classic form of the A/V Cart


The Bell & Howell 16 mm Film Projector


All of this goes through the mind of the baby boomer as he or she watches these animated explanations and that is the subtext that will be lost as these films are viewed in the future, assuming they are viewed in the future, that is.

We can only hope that there will be the equivalent of liner notes to explain these critical issues to the audiences of that distant time that they might understand our culture and context a little better.

_________________________________________________________

Notes

Perhaps the best known of the Bell Labs Science films is Our Mr. Sun, directed by Frank Capra, staring Eddie Albert. It is one of the first uses of front projection in narrative film.

You can download Our Mr. Sun from the following web site:

The sequence from The President's Analyst (1967) can be viewed at

Kurtz & Friends Animation web page on Jurassic Park

Our Mr. Sun (1956) on IMDB

Jurassic Park (1991) on IMDB

The President's Analyst (1967) on IMDB
http://www.imdb.com/title/tt0062153/

Bell Laboratory Science Films on Wikipedia


Friday, February 14, 2014

WebGL on Second Thought and a Brief Note on OpenGL ES 3.0


This is a brief note to say that after all the sturm und drang expressed on this blog while learning WebGL 1.0, that it has become my favorite way to write little graphics programs.

I now realize that it is very unusual to be able to do anything dynamic in HTML/Browsers without always having to deal with the server for information. And yet I am able to write very complicated WebGL (or at least reasonably complicated) WebGL programs without using the server at all (except for saving images).

The "framework" mess in writing "dynamic web pages" for browsers is astounding, but I would not necessarily count on finding a framework that worked well with WebGL. Such a thing may in fact exist, but it is far outside the normal range of what the frameworks are intended (and tested) for.

Even Javascript has grown on me such that it has become a pleasant language to write in.

I think this is moderately funny given the amount of noise I made learning these two things (javascript development and WebGL).

On a related matter, I spent a half day or so reading the specification of OpenGL ES 3.0 and it is far different from WebGL 1.0, no matter what you hear. Although the shading language part is nearly identical, the OpenGL part is richer in capability. OpenGL 4.x, however, upon reading is vastly more complicated and a completely different beast.

So the takeaway information of this post is: WebGL is very useful if a little annoying to learn, and WebGL is remarkably different from OpenGL ES 3.0. The power of WebGL comes from its shader language, its integration into the browser and HTML, and the interactive nature of Javascript and Javascript development.

I apologize for lapsing into optimism and a positive attitude in this post.   I will no doubt resume my normal negative approach in future posts.

Tuesday, February 11, 2014

Alan Turing Set to Challenge Lego for Boxoffice Fame


[Update 2-11-2014  My correspondents in Berlin tell me that Harvey and Bob Weinstein are on the very top level of the Hilton .... whereas my correspondents are forced to endure on the lower levels.   More news as we have it from Berlin]

Turing.   A man whose work seems to be ripped from the pages of today's newspapers Internet news sites.   Is there a more glamourous name in all of Mathematics?   Secret counter spy, a life filled with illicit sex, known eccentric, colorful suicide, cut off before his time, whose work famously set the stage for the second half of the 20th century and beyond. 

Now Hollywood has discovered Alan Turing.


Serendipitously coming across an important Internet-based Hollywood journal,  Deadline Hollywood, it is jam-packed with important and exciting news from the glamourous and rewarding entertainment industry. I realized as I read this drivel that I was falling deeper and deeper under its spell with important news about at least two different 3D animated films I knew nothing about, not to mention the new "Dreamworks Press" which is to market in print the "Dreamworks Classics".   
Classics? Already? How old does it have to be to be a classic?  Does 10 years old make something a classic?  Are there standards for such things?

But the most exciting news was the "heat" generated at the Berlin film festival, the Berlinale, by none other than Alan Turing and his film The Imitation Game (2014).  Although famously dead, his legacy lives on.   The Weinstein Company, the Deadline breathlessly tells us, bought the rights to this film for 7 million ($US) based on a 15 minute compilation reel of scenes from the film. In other words, the film itself is not finished, so the filmmakers put together a 15 minute "show reel" and used it to sell the Weinstein's for all they were worth.   Thats Hollywood. Thats the kind of crazy stuff that makes Hollywood so entertaining.  (1) 

None other than Benedict Cumberbatch plays Turing.



A great picture of Cumberbach as Turing with his computer


The real Alan Turing 


To recap, Alan Turing was the mathematician famous for his work at Bletchley Park during WWII doing what the British have always done: reading other people's secret communications.   In so doing he also casually invented computer science (with a few other people) and threw challenges down to other fields which continue to this day (see "The Chemical Basis of Morphogenesis",  link below).  A long-distance runner, he was also famously homosexual (or bisexual) who committed suicide young rather than submit to a barbaric medical regime by court order to "cure" his homosexuality.  His chosen method of killing himself was by painting an apple with arsenic and taking a bite from it.  

Just the average life of the Cambridge mathematician.

It was an amazing tragedy and Great Britain has formally apologized for their scandalous behavior with a pardon from the Queen and a formal apology from the Prime Minister.  Better late than never, I suppose.  (A BBC article on the pardon is here)

With A Beautiful Mind (2001), Pi (1998) and now this, The Imitation Game (2014), we have three movies based on the exciting and tragic lives of mathematicians, admittedly one of them fictional. Does this bode a whole slew of films about tragic and exciting mathematicians? Are there enough tragic and exciting mathematicians around to supply this new craze?


The Competition looks worried.

"Will Alan Turing be able to compete against movies about Lego?", the Deadline site breathlessly asks.  This and other vital questions will be answered in our lifetime, it is hoped.  I am putting my money behind Turing and holding my breath.

_______________________________________________


"The Chemical Basis of Morphogenesis" can be found at the following URL:

http://www.dna.caltech.edu/courses/cs191/paperscs191/turing.pdf

See the article here in Deadline Hollywood here: 
http://www.deadline.com/2014/02/berlin-record-deal-harvey-weinstein-pays-7-million-for-alan-turing-wwii-tale-the-imitation-game/

The Imitation Game (2014) on IMDB

http://www.imdb.com/title/tt2084970/

A Beautiful Mind (2001) on IMDB

http://www.imdb.com/title/tt0268978/

Pi (1998) on IMDB

http://www.imdb.com/title/tt0138704/

The Berlinale Web Site

http://www.berlinale.de/en/HomePage.html


1. Of course 7 million dollars seems a little low in the context of a Facebook valued at over 100 billion.  

Thursday, February 6, 2014

Can Glenn Greenwald be Tried for a Crime in the Snowden/NSA Affair?


I realize that not many of my readers may be very interested in the NSA/Snowden affair, or at least not very interested in what I have to say about it.

But since this blog is in part for my own education and improvement of *my* moral character, not to mention *your* moral character, I think it is my duty to soldier on and educate myself and my fellow Americans about some of the background and law involved.

The question of the day is whether or not on paper Glenn Greenwald has violated American law. Which is different from whether or not he will be tried for this alleged crimes or, if convicted, those convictions will stand.

To recap, when Ed Snowden violated his oath and released information with the clear result of damaging the United States national security, he did so with the help of various accomplices around the world. A few of those accomplices are publicly so, and most of them are not public.(1)  

Foremost among the public conspirators is Glenn Greenwald, an independent journalist, and author of several best-selling books. He has been instrumental in transmitting and publishing this information and very public about it.

So here are the questions we want to answer. 1. Is there a law prohibiting what Greenwald did? 2. Is there a special exemption in this law for 1st amendment purposes? and 3. If there is a law and no special exemption, why has the government not issued warrants of arrest for Greenwald?

The answer to question 1 is simple: yes. It is Title 18, part I, Chapter 37.798, Disclosure of Classified Information, and I have quoted the relevant text below.

The answer to question 2 is not at all clear. The only way to find out if a law is constitutional is for someone to be judged, found guilty, and to appeal. If the law is struck down by an appeals court, it may still not be clear. The ultimate judgment comes from the Supreme Court, as imperfect as it may be. Thus all those people who go around saying "this is unconstitutional" quite probably do not have a clue what they are talking about. Yes, the 1st Amendment is pretty clear about "free speech". But it does not say you can sell stolen goods, nor does it say anywhere that you can conspire to kill Americans (in an indirect or a direct fashion, with the differences between those two being very germane to this and other cases).

Therefore if there is a law, and there is, and if that law stands and has not been found unconstitutional, why has the Obama Administration not filed charged against Glenn Greenwald? Perhaps they feel that it would stir up more opposition to America in the world. Perhaps they are afraid of testing the law in the case of a journalist.  Perhaps they are taking a wait and see attitude to see how things develop.  I have no doubt the Greenwald must be under intense surveillance.

Is there a statute of limitations on these alleged crimes? Maybe, but its also a loose thing and not as black and white as some people think particularly because of the issue of continuing activities of a conspiracy, which is certainly the case here. In other words, is Greenwald still conspiring with Snowden to publish classified material? Yes? Then the statute of limitation clock has not started running yet.

So the answers to our questions are 1. Yes, 2. Unknown you just have to try it, and 3. Unknown but they still have time should they decide later to do so.

The relevant federal statute: 

TITLE 18 - CRIMES AND CRIMINAL PROCEDURE
PART I - CRIMES   CHAPTER 37 - ESPIONAGE AND CENSORSHIP
§ 798. Disclosure of classified information

(a) Whoever knowingly and willfully communicates, furnishes, transmits, or otherwise makes
available to an unauthorized person, or publishes, or uses in any manner prejudicial to the safety or
interest of the United States or for the benefit of any foreign government to the detriment of the United
States any classified information—

(1) concerning the nature, preparation, or use of any code, cipher, or cryptographic system of the
United States or any foreign government; or

(2) concerning the design, construction, use, maintenance, or repair of any device, apparatus, or
appliance used or prepared or planned for use by the United States or any foreign government for
cryptographic or communication intelligence purposes; or

(3) concerning the communication intelligence activities of the United States or any foreign
government; or

(4) obtained by the processes of communication intelligence from the communications of any
foreign government, knowing the same to have been obtained by such processes—
Shall be fined under this title or imprisoned not more than ten years, or both.

(b) As used in subsection (a) of this section—

The term “classified information” means information which, at the time of a violation of this section,
is, for reasons of national security, specifically designated by a United States Government Agency for
limited or restricted dissemination or distribution; ....


You may find the complete statute here:

A discussion on statute of limitations can be found here:

Glenn Greenwald on Wikipedia


_____________________________________________________________

1. Russian intelligence services aided and abetted Snowden is apparently the belief of many in the intelligence community. I have heard various explanations for why they believe this but I suspect that the real reasons also lie in the areas of secret intelligence so we are not likely to know the details for some while.


Monday, February 3, 2014

Notes on Taking the Train from Oceanside to Culver City 1/31/14


In order to understand the context of this post, its important to know that when the City of Los Angeles planned the Red Line into Hollywood, then down to Wilshire Blvd and out west to Santa Monica, that Rep Waxman got federal legislation passed that declared a "methane zone" and prevented the planned subway from getting federal money.  Its a complicated story (at least to me) but it is widely believed that we have a classic case of corruption and the influence of the rich.   There is also the issue of the Red vs the Purple line not to mention the Orange line.  In any case, the line(s) was/were rerouted and ended up on Hollywood Blvd which is, oh by the way, not entirely stupid but mostly stupid.    (1)    The furthest west one of the lines came was Highland (and Hollywood) and another line ended at Wilshire and Western.   In both cases, they are far east of where they need to be, which is, ultimately, the beach.

A metropolitan transit system is only as good as the parts of town it connects to.  It needs to achieve a critical mass before people feel able to give up their cars and take the train.  If they know they can not get to Westwood and they know they *might* need to go there, then it does them no good if the train goes to Hollywood, they will still need their car to get to Westwood.

This was about 1990 when this happened.  LA has been scrambling ever since to find a way to get rail out to the westside in any way that they can.  So finally they ended up using an old right of way, the original Exposition Line, destroyed many decades ago with the rest of LA mass transit, which runs through some very bad parts of LA but ends up in Culver City which is a reasonable place to be.  They called it the Expo Line and it started running out to Culver City about six months ago.   Waxman has also repealed his own legislation and plans are being made to extend the Purple line along Wilshire to Westwood by 2035 or so.

But in the meantime, we do have the Expo line to go from downtown LA to Culver City.

I come to LA about once or twice a month to deal with my various medical overhead.  I would prefer not to drive if I can avoid it, its boring and stupid.   But ending up at Hollywood and Highland, which was as close as I could get to Beverly Hills before, meant taking a $40 ++ cab ride each way after arriving.   So if the train is $56 round trip, the metro is $5 and the cab is $80, thats $135 vs driving your car and spending maybe $40 on gas, or a little less.

But with the Expo line, I could take the train to Culver City and back again for $56 + $5.  And I have a friend who lives and works in Culver City and who was able to drive me the three miles from the train stop to the doctors office in Beverly Hills.

It all worked fine.

It was moderately convenient and there are a few things to know which I have itemized below in case you are thinking of doing something similar.  The big problem, as always with these systems, is your schedule and how it interacts with theirs.  And that becomes more of a problem the more you need to go (or in this case return) after 6PM.   This is normal in one way or another in most mass transit systems, even ones that are 24 hour a day.  The question is whether you can live with what is there or if the schedule makes it impossible.

Here are some notes of the trip from Oceanside to Culver City and back again.  The total fee was $61 including the Metro day pass.  It took about 3 hours including waiting for my connection to the Red line and then to the Expo line.  The trip from the 7th and Metro station to Culver City takes about 1/2 hour.  This total of three hours is about the same as driving but less tiring.  On most trips one runs into traffic and therefore driving can take up to 5 hours on the return trip.

Whether taking the train or driving one is essentially spending all day getting to and from Los Angeles. 

Notes.

1. The trains in Oceanside all leave/depart from one area called the Oceanside Transit Center. It has a nice sign, but if you are looking for the Amtrak Station you have to know that it is the transit center that you want, and that is not at all clear from the Internet or the ground. You can look for 100 years for the Amtrak Station and never find it. 2. Parking at Oceanside is free (amazing). 3. There are four different train systems using that transit center, believe it or not, and three of them use the same lines north and south. Amtrak and Metrolink both go to LA, and they do not seem to communicate. I took Amtrak. There is also Metrolink, and God only knows which one you should use. 4. When you arrive at Union Station, you are expected to know that you need to take the Red line to the 7th & Metro stop to take the Expo line. 5. The Expo line has one color of blue dot and the Long Beach train has another color of blue dot. So all trains at 7th & Metro outside the Red line have blue dots. Ignore the dots and take the Culver City train. 6. It is not clear (to me anyway) how often the Expo line runs. Maybe every half an hour is my guess but it is just a guess. 7. Because there are no attendents you can ask questions of, you have to use the other passengers and the maintenance (janitorial) and security people to find out where to go. 8. The transfer from the Red line to the Expo line is not a transfer really, it is a new fare entirely. But since you bought a day pass you do not really care. 9. There is no where to really meet anyone at the arrival in Culver City. You just show up and are dumped into a parking lot. You basically have to get people to pick you up by stopping in the middle of the street. I think that is weird. 10. The biggest issue with using these trains is that they run less often outside the prime commuter times. So, there are two trains south from LA after 6pm. A roughly 7 pm train and a 10 pm train. If you miss your 7pm train, you have one more option, and that is the 10pm. This means that you either have to leave work relatively close to 5 pm, or take a taxi, or take the 10 pm train and get home at midnight. It would be nice if there were a few more trains in the evening. It is extremely conceivable the way things are set up that you could be stuck for the night.

I would call the current situation a major improvement.   One day LA may have a mass transit system.  Just in time for autonomous vehicles and other new technologies, I presume.

Wikipedia page on the promising Purple Line Extension
http://en.wikipedia.org/wiki/Westside_Subway_Extension_(Los_Angeles_Metro)
______________________________________________

1. I know that some of the very few people who read this blog think I am overstating the case, being paranoid, etc.   Guess what, I'm not.   Don't believe me, do your research and then come back and apologize.  It is well known what happened here.