DOC PREVIEW
CORNELL CS 404 - Lecture Notes

This preview shows page 1-2-20-21 out of 21 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 21 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

OutlineHW I IssuesSlide 3BLAS IncrementsHW II--The last wordC-Preprocessor DirectivesDisclaimerA Free Lunch?Software Licensing SpectrumCopyrightsSlide 11PatentsSlide 13Relevance to ScienceSlide 15GNU General Public LicenseSlide 17Slide 18Ethical IssuesSlide 20Slide 21OutlineOutline•Announcements–HWI key posted later–HWII revised–Sign-up for CTC account•HW I issues•HW II status•Why are there free libraries?•Software licensing spectrum•Software and scientific ethicsHW I IssuesHW I Issues•Some problems:–cc -lm csin.c -ocsin•-lm tells compiler to find a library called “libm.a,” and get any routines it needs–Searching LAPACK•much easier to go through LAPACK “Quick Search” than through GAMSHW I IssuesHW I Issues•Calling BLAS–Look on BLAS sheet for routines that do y<-Ax•nothing matches, but find several routines that solve y<-Ax+y –CALL SGEMV('n',m,n,1.0,C,NMAX,v,1, 0.0, PC, 1)•As a matrix, C is m-by-n, but as an array, it is NMAX-by-KMAX•BLAS needs both: NMAX (LDA) lets BLAS know where columns start•Also,  &  should be real (1.0 and 0.0, 1 and 0 won’t work on some systems)BLAS IncrementsBLAS Increments•BLAS lets (makes) you specify an increment. –Allows you to use 2D arrays as vectors:1 5 9 132 6 10 143 7 11 154 8 12 16? ? ? ?? ? ? ?INC=6INC=7HW II--The last wordHW II--The last word•Not sure ACCEL will get MATLAB C Library installed–I’m not entirely happy with the library though•Rather than focusing on the MATLAB library you must figure out how to call a C subroutine from FpcaPS–C routine is called SaveToMat--use it to save PC to a file–If MATLAB library becomes available, can use SaveToMat to save PC to a .mat fileC-Preprocessor DirectivesC-Preprocessor Directives•There are really two versions of SaveToMat in savemat.c–if the line “#define MATLAB” appears at the top, then the routine will call MATLAB routines–if it doesn’t appear (or #undefine MATLAB) appears, then the MATLAB calls are removed by the C-Preprocessor and the MATLAB library is not calledDisclaimerDisclaimer•The legal information presented below is for entertainment (and edification) only. No one should be trusted on legal matters, except a lawyer. Even then, I’d be careful.•Use of this information in a manner inconsistent with the product label is a violation of Federal law•Side effects may include, headaches, nausea, severe boredom, loss of appetiteA Free Lunch?A Free Lunch?•Lots of free code available from NETLIB, GAMS, and WWW–Why doesn’t NETLIB charge a fee?–Is it really free?Software Licensing Software Licensing SpectrumSpectrum•Can classify software (source code) based on–limitations on viewing–limitations on use–limitations on distribution•No license------>GPL------>Proprietary•Unprotected---->Copyrighted---->Patented---->SecretCopyrightsCopyrights•In the United States, the copyright and patent laws were created to –“to promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries.”•Legally, software is considered “Writings” and is protected by copyright–Your work is automatically copyrighted if it is original, creative, and fixed in some medium–Your code is automatically protected from unauthorized copying under copyright laws–You can make the copyright more explicit by formally registering:•www.loc.gov/copyright/forms -- cost $30CopyrightsCopyrights•But, copyright law only protects the document–ideas and concepts are not covered•Ex: Code to do LU factorization is protected, but the idea of LU factorization is not protected•Can always write your own implementationPatentsPatents•Patents are meant to cover ideas and concepts•To get a patent, the invention must be novel–no one has ever done this before–revolutionary, not evolutionary•Patents entitle you exclusive rights to copy, reproduce, or use your inventionPatentsPatents•But, getting a patent–takes a long time–cost money (legal and registration fees)•And may not be possible, at least for you.•Grad students, post-docs, faculty signed patent rights to Cornell–Applies to patents developed during official work–Still free to tinker in your garage•Undergrads are unrestrictedRelevance to ScienceRelevance to Science•Our scientific careers depend on how others view our work–We want people to see and use our code–Practically, we hope this will increase our stature (more citations)–Ethically, science has always relied on an open exchange of ideas•Being too protective of our code goes against thisRelevance to ScienceRelevance to Science•We want people to use our stuff, but–we don’t want them making money without giving us a piece of the action–we don’t want to be liable if somebody does something stupid (including us)•A software license allows you to let people see/copy your work, subject to the conditions you specify–An explicit exception to copyrightsGNU General Public GNU General Public LicenseLicense•The software “club” GNU has developed a “General Public License” (GPL)•The GPL allows someone to see/use/modify your code, IF–they document changes they made (so they reflect on their reputation, not yours)–they distribute any program derived from your work under the same license (so they can’t steal your work)–they agree not to sue you if they (or your program) do something stupidGNU General Public GNU General Public LicenseLicense•Under the GPL,–You can charge people to download your program•but, they can demand everything, including source code and can modify it•This keeps the software “free”GNU General Public GNU General Public LicenseLicense•To apply GPL to your work, include the official statement in a license or README file or comments in the source•The official statement says things like–This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License–This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.–See http://www.gnu.org/copyleft/gpl.html for more infoEthical IssuesEthical Issues•If someone puts there code on the web, without explicit licensing/restrictions–They guarantee nothing (it may not even compile)–They assert no


View Full Document

CORNELL CS 404 - Lecture Notes

Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?