wait
Tuesday, October 31st, 2006这一年,有些事发生了 结束了 犹如游船剪开河水独自抚平
有些事本该是沉船的宝藏 却被我从记忆中捞起 在盛行的季风中晾干
轻薄得出乎意料 犹如蜕下的蛇皮 脆弱有如奶酪的表皮
终于在不经意中被梦中的一场林火焚化 留给我几颗舍利
自然 也有些事不期开始了 还没有可期的结果
时间之河中 我们至少也只能漂流七八十年
而能激起浪花的岁月更少
因此,一段时间 既然烙着批号 自然不算短暂
这一年,有些事发生了 结束了 犹如游船剪开河水独自抚平
有些事本该是沉船的宝藏 却被我从记忆中捞起 在盛行的季风中晾干
轻薄得出乎意料 犹如蜕下的蛇皮 脆弱有如奶酪的表皮
终于在不经意中被梦中的一场林火焚化 留给我几颗舍利
自然 也有些事不期开始了 还没有可期的结果
时间之河中 我们至少也只能漂流七八十年
而能激起浪花的岁月更少
因此,一段时间 既然烙着批号 自然不算短暂
用 Matlab 进行大规模科学计算或仿真时,内存是一个需要时常注意的问题。当你写的 Matlab 程序跳出“Out of Memory” 时,以下几点措施是需要优先考虑的解决方法:
1. 确保内存的连续性
Matlab 中数组必须占用连续分配的内存段,当无法为新建的数组分配连续的内存段的时候,”Out of Memory” 就会出现。由于反复分配和释放数组会使可用的连续内存段减少,因此当 Matlab 刚刚启动时其连续内存最多,此时往往可以新建非常大的数组,这一点可以用命令 feature(’memstats’)(在 7.0 版本以上)看出。如果现实的最大连续内存段很小,但实际可用内存(非连续的)仍旧很多,则表明内存中碎片太多了。此时可以考虑用 pack 命令,pack 命令的作用就是将所有内存中的数组写入硬盘,然后重新建立这些数组,以减少内存碎片。此外,在命令行或者程序中都可以使用 clear 命令,随时减少不必要的内存。
2. 3GB 开关
由于32位 Windows 操作系统的限制,每个进程只能使用最多 2GB 的虚拟内存地址空间,因此 Matlab 的可分配内存也受到相应的限制。Matlab 7.0.1 引进了新的内存管理机制,可以利用 Windows 的 3GB 开关,使用 3GB 开关启动的 Windows 每个进程可以在多分配 1 GB 的虚拟地址空间,具体的操作方法可见:http://www.mathworks.com/support/tech-notes/1100/1106.html
3. 减少使用双浮点数
Matlab 默认的数字类型是双精度浮点数 (double),每个双浮点数占用 8 个字节。对于一些整数操作来说,使用双浮点数显得很浪费。在 Matlab 中可以在预先分配数组时指定使用的数字类型如以下命令:zero(10, 10, ‘uint8′) 。对于浮点数,在很多精度要求不高的情况下,可以使用4个字节的单浮点数 (single),可以减少一半的内存。关于单、双浮点数的精度对照如下,以便根据需要选择使用:
single: 精度 (1.1921e-007) 最大数 (3.4028e+038)
double: 精度 (2.2204e-016) 最大数 (1.7977e+308)
IBM researchers look beyond silicon technology from PhysOrg.com
Scientists at the IBM Zurich Research Laboratory have demonstrated how a single molecule can be switched between two distinct conductive states, which allows it to store data. [...]
站的更高,摔死的更快。水至清则无鱼,人至贱则无敌! 走自己的路,让别人打车去吧。穿别人的鞋,走自己的路,让他们找去吧。打台湾我捐一个月的生活费,打美国我捐一年的生活费, 打日本我捐他妈的一条命! 我不是随便的人,我随便起来不是人。女人无所谓正派,正派是因为受到的引诱不够;男人无所谓忠诚,忠诚是因为背叛的筹码太低…… 骑白马的不一定是王子,可能是唐僧;带翅膀的也不一定是天使,有时候是鸟人。 俺的最低奋斗目标:农妇,山泉,有点田。再过几十年,我们来相会,送到火葬场,全部烧成灰,你一堆,我一堆,谁也不认识谁,全部送到农村做化肥
今天参加科研处的学术道德和学术失范的会议,转录Supriyo Datta教授个人主页上的文章如下:
Along with the rest of the ECE faculty, I expect each student to practice honorable and ethical behavior both inside and outside the classroom. Any actions that might unfairly improve a student’s score on homework, quizzes, or examinations will be considered cheating and will not be tolerated. Examples of cheating include (but are not limited to):
Cheating on an assignment or examination will result in a reduced score, a zero score, or a failing grade for the course - at my discretion depending on the severity of the incident as I judge it. All occurrences of academic dishonesty will be reported to the Assistant Dean of Students and copied to the ECE Assistant Head for Education. If there is any question as to whether a given action might be construed as cheating, see me before you engage in any such action.
Each of us has watched a loved one die, been the victim of a crime, lived among the poverty-stricken, or in some way been confronted with the reality of suffering. Human history sometimes seems like one long chronicle of suffering and despair. In the midst of suffering we cry out,
Why is light given to those in misery, and life to the bitter of the soul, to those who long for death that does not come, who search for it more than for hidden treasure. . . . For sighing comes to me instead of food; my groans pour out like water. What I feared has come upon me; what I dreaded has happened to me. I have no peace, no quietness; I have no rest, but only turmoil.
Why is there suffering? Why are the innocent victimized? Is there purpose in pain? Is there any escape? For the Christian, who believes that God is all-good and all-powerful, answers to these questions are especially important.
Skeptics frequently challenge Christians with the problem of a good God allowing suffering. Usually their argument says, “If God is all-powerful, he could prevent or eliminate suffering. If God is all-good, he would not want his creation to suffer. Since you say God is both, suffering should not exist. In fact, however, we see suffering all around us and experience it ourselves. Therefore, God doesn’t exist, or he’s not all-powerful, or he’s not all-good.”
First, we need to distinguish between philosophical and personal engagement with suffering. When someone is in the midst of anguish, all the logic and truth in the world is incomplete without a demonstration of compassionate love. Answers are not merely conclusions of mental exercises, they should have consequences in our lives.
Second, we need to consider the consequences of accepting the skeptic’s alternatives: Suffering proves that God does not exist, or He is not all-powerful, or He is not all-good. If God does not exist, then all of existence, including our suffering, has no enduring value, purpose, or goal. If God is not all-powerful, then we have no hope that suffering will ever be eliminated. If God is not all-good, then to pain and despair we must add the threat of immanent divine sadism. Each of these alternatives is at least as problematic as the Christian alternative, so the skeptic has merely exchanged one answer he doesn’t like for others equally unpleasant. The skeptic has not solved the problem of suffering merely by refusing to solve it. We should judge answers by truth, not emotion.
Third, we need to understand that many problems with theology come from problems with personal world views and values. For example, the pleasure of helping someone who is needy has absolutely no value to the person to whom self-indulgence is the highest good. Many people struggle with the problem of God and suffering because they reject a Christian world view. Avoiding suffering has become preferable to learning patience; immediate gratification means more than self-discipline; self-gratification is more important than sharing; and physical pleasure is superior to spiritual joy.
Fourth, the skeptic assumes parts of the Christian world view in order to indict the Christian God, but he is unwilling to acknowledge the other parts of the Christian world view that answer his indictments. He assumes a standard of “good” that is absolute and eternal (and, therefore, cannot have its source in changing, finite humans), but denies the existence of the absolute and eternal.
In a non-theistic world where values are social conventions, survival mechanisms, majority opinions, or assertions of the most powerful, there can be no absolute, eternal values. “Good” as a social convention is merely what a society declares to be good; in one society it might be eating one’s enemies, in another it may be loving one’s enemies. “Good” as a survival mechanism could include killing off imperfect, non-productive members of the species, such those with less than average intelligence or poor eyesight, or restricting reproduction to the physical and mental elite; etc. If the skeptic wants to borrow the Christian definition of values as absolute and eternal, then he can’t reject the Christian explanation of suffering which is consistent with such values.
If the Christian world view is considered, there are a variety of approaches to the question of God and suffering. Biblical convictions include (1) suffering does not originate with God and will be eliminated at some point; (2) God works good in the midst of suffering; (3) not all pain is suffering in the moral sense; (4) and physical, transient suffering and death are relatively inconsequential compared to spiritual, eternal suffering and death.
God is all-powerful, meaning He can accomplish anything that can be accomplished with power. He cannot use power to do “non-power” kinds of things, such as the logically impossible. He cannot make two plus two equal five, violate His unchangeable nature, make Himself go out of existence and come back into existence, and He cannot make morally responsible persons without allowing for the possibility of those persons making wrong choices. The Bible says that suffering is the consequence of the wrong choice (sin) of morally responsible persons. If God always prevented people from sinning, or always prevented the consequences of sin, then human goodness would be mere programming, not true goodness. We do not pat a computer on its head when it executes its program — it is a determined function, not an exercise of moral responsibility. Suffering, the consequence of human sin, is not caused by God, but by the sin of persons with moral responsibility. Also, God has not abandoned the world to eternally suffer the consequences of sin. He sent His Son, Jesus Christ, to provide ultimate freedom from the consequences of sin. It is wrong to indict God because suffering is not yet eliminated, just as it would be wrong to indict a doctor who treats a gunshot wound he didn’t cause, simply because the wound is not healed instantly.
Our assurance that God will eliminate suffering is not the only comfort God gives us. While God did not cause suffering, he has given it purpose. It became the vehicle for our salvation when “Jesus, the author and perfecter of our faith, who for the joy set before him endured the cross, scorning its shame” (Hebrews 12:2). Complete avoidance of suffering is not an option for any of us. Our option is to waste our experience or realize God’s purposes in the midst of suffering. Through suffering we can learn patience, self-discipline, trust, and many other “virtues.” When we suffer we can experience the love, compassion, and self-denial of those who help us. When we help someone who is suffering, we find significance in our own lives as well.
Not all pain is “bad” in the moral sense. God created us with nerve endings that use pain to protect us. Pain keeps us from burning our hands in a campfire, bending our legs back until the joint breaks, neglecting nourishment until we starve, etc. Suffering can also be a direct, just consequence of our own actions. Our sense of justice says that it is “good” when an exploiter loses his friends, even though loneliness is “painful.” It is good when a mugger is locked up, even though he “suffers” the loss of his freedom.
All humans have a moral conscience, even corrupted by sin and often ignored. Our conscience should not rejoice in sin, suffering, and death. When we see innocents suffering, we should experience moral outrage and seek to rescue the sufferer. When we see someone suffer death, we should experience loss and sorrow. Sin, suffering, and death are not the destinies for which God created us. He created us to enjoy perfect, good, loving fellowship with Him for eternity. Despite our moral betrayal, he continues to offer eternal life.
The skeptic has it partly right — suffering should offend our sense of goodness and justice. Sadly, he misses the rest of the argument: Because suffering violates goodness and justice, there must be an all-good, all-powerful God whose remedy restores the perfection he created. This is the hope that the Christian offers in the midst of suffering:
I consider the that our present sufferings are not worth comparing with the glory that will be revealed in us. The creation waits in eager expectation for the sons of God to be revealed.
Suffering and death in this sinful world are not without remedy. The only reasonable response to the existence of suffering is confidence in God’s promises for eternity:
Blessed are those who mourn, for they will be comforted. . . . Blessed are the merciful, for they will be shown mercy. . . . Blessed are those who are persecuted because of righteousness, for theirs is the kingdom of heaven.
在格致上看到中科大的闫沫霖教授在演讲中提到了de Sitter狭义相对论,是爱因斯坦狭义相对论的一种推广。问题的解决是从Lagrange量开始的。分为三部分:牛顿力学、爱因斯坦狭义相对论、de Sitter不变狭义相对论。通过对比三种理论在同样的原理要求下后者是前者的推广形式。有趣的是,他提出了三个理论中分别有0、1、2个普适常数,其中de Sitter不变狭义相对论的普适常数是光速和宇宙常数。
de Sitter不变狭义相对论是有陆启铿教授在70年代提出的,由于其实验上难以实施证明,所以这方面似乎没有多大的发展。不知这里是否有人从事这方面的研究的,或者知道这方面内容的。
闫教授推荐了一篇关于这方面的论文。
最近忙于看世界杯
很少有时间写blog了,明天转一贴!
芝加哥大学计算机系教授Lance Fortnow在他的Blog上写的一篇短文“The Secret of Success”.
What does it take to be a successful in our profession?
Intelligence. You need an innate talent in different forms to succeed as a scientist.
Hard work. Enough said.
Luck. Working on the right problem at the right time. If you work long enough` the law of averages will catch up with you (for good or for bad).
Discipline. The discipline to focus on research for a period of time without getting distracted from other responsibilities or by the internet or other activities. Some people find it best to schedule time for research and hole themselves up somewhere to think about a problem.
Commitment. Be willing to spend a considerable amount of time on a problem even if you keep running into dead ends.
Training. Taking and working hard in classes. Having and taking advantage of a good advisor. Reading papers and textbooks. When you see a theorem in a paper try to prove it yourself first. Only then can you truly appreciate a proof and learn from it.
Colleagues. Having co-authors, especially those that complement your talents, can help you do more than you could on your own. But just having good people to talk to, to bounce off proof ideas and discuss research directions can greatly help you find the right approach to a problem.