avatar
求购或推荐 PE Environ Eng 书# Environmental - 环境科学与工程
c*x
1
由于我们夫妇工作都很忙,夜里实在没有精力和时间带孩子。孩子快满月了,白天有老
人带,但晚上和夜里希望能有保姆带。保姆需要住家,但除了夜里带孩子,其它事情基
本不用管。希望保姆对孩子有爱心,而且爱干净。
我们是住在Cleveland郊区,Ohio
avatar
n*n
2
【 以下文字转载自 Hardware 讨论区 】
发信人: nanbowan (水泥), 信区: Hardware
标 题: 救命啊,电脑这几天奇慢。
发信站: BBS 未名空间站 (Mon Jan 18 23:54:15 2010, 美东)
不知道发这个版对不对,因为从来没在计算机这发过帖子,如果不对麻烦大侠转发到合
适的版。
我笔记本电脑是dell,Dual Core Processor TK-53, 将近三年老。2G内存, 128G硬盘
。本来都好好的,可是最近忽然变的很慢,甚至输入密码什么的都费劲。System Idle
占用CPU一直比较高。几年前的一个Toshiba硬盘损坏之前具这样,现在很担心。
我用MacAfee查毒什么都查不到,将所有临时文件删除,临时internet文件都删除,
clean up磁盘,磁盘defragmentation都做过了,还是不管用。
请问这是怎么回事啊?如何解决呢?要不要做硬盘损坏的打算了?
本人对电脑所知有限的还能,在此多谢了。
avatar
l*G
3
I run matlab in linux with a batch like this:
===matlab_batch.sh===============
#!/bin/bash
#this is my bash program to run matlab code matlab_program.m
#repeatedly without GUI
loopindices="1 2 3 4 5"
for loopind in $loopindices
do
echo running matlab $loopind
matlab -nodesktop <matlab_program
$loopind
EOF1
echo finished running matlab $loopind
done
==================
where matlab_program is another matlab code (matlab_program.m) which can run
in matlab command line prompt and it takes an integer $loopind as input
from matlab command line.
The code above (matlab_batch.sh) runs well, however, as the index $loopind
increases from 1 to 5, it slows down like crazy! Even if each time the
actual matlab program matlab_program.m is doing the same exact thing!!!
So what is going on with consecutive matlab processes being initialized from
linux shell ??? The "EOF1 EOF1" section above is a usual trick for
bash in linux to call a non-bash program like matlab. Within each for loop
of loopind, a matlab is invoked and then closed after matlab_program
finishes. So does an earlier matlab process affect a later matlab process?
If it does, how and why? Matlab must be leaking a lot of memory. Oops, my
program takes 2 hours to run when loopind =1, yet it takes 20 hrs to run by
the time loopind=5....
My program is not trivial (took me long time to code it up) to and it is
painstaking to see it would slow down like this. I have 24G memory on a
cluster and the matlab program is running on head node without any
parallelization.
Mathworks must be doing a very bad job in memory management especially with
the newer versions of matlab. Oops, time to abandon matlab for me.
avatar
J*Y
4
想问下,在当地的中文学校当老师工资如何
avatar
g*r
5
IF anyone want to sell your PE books, please send me a message.
I already bought the Env. Eng. Manual and Practice book. 其它书都没有。。读书的时候没舍得买书:-)
如果不卖,推荐书名也非常感谢!多谢!!!
avatar
l*G
6
I finally found the reason. When the directory under which I run the
code has too many (>5000) files, matlab gets very very very slow. Because in
each of the for loop iteration ($loopind), I create about 1500 temp files
to save data onto disk, and then I will load these files one by one. Before
loading them, I use calls to exist(filename,'file') to make sure the file
exists. It turns
out that exist(filename,'file') gets very very slow when there are many
files in the folder even though an exact filename is given. Matlab shouldn't
be checking every file in the folder to see if a specific file exists or
not since no wild card symbols (*) are used in the check. It is kind of
ironic that a piece of code runs slower and slower when you increase number
of files stored under that folder.
Otherwise seem to have the same problem:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/3

【在 l*******G 的大作中提到】
: I run matlab in linux with a batch like this:
: ===matlab_batch.sh===============
: #!/bin/bash
: #this is my bash program to run matlab code matlab_program.m
: #repeatedly without GUI
: loopindices="1 2 3 4 5"
: for loopind in $loopindices
: do
: echo running matlab $loopind
: matlab -nodesktop <
avatar
l*G
7
Oops, even though I found the cause of the problem, there doesn't seem to
exist a simple solution to it. Matlab does not have an explicit way to stop
the file checks on linux system?? I understand IDE may want to check number
of files etc in current dir in order to search for programs etc. When
running code without IDE, it makes no sense!
It is terrible that matlab would slow down because number of files in folder
is large.
A sloppy solution is to save the files in a subfolder rather than in the
current dir directly. It works but sucks! It's funny that matlab would check
and watch any file changes in the current dir but no in subfolders!
The bottom line is that matlab will monitor files in its PATH to search for
programs in case one program calls another. If you create a lot of files
during a matlab session and store those files in the PATH, then matlab gets
incredibly slow. Unfortunately, current dir is always in PATH, so creating
large number of files in current dir is bad for matlab. Creating files in a
subdir is okay as the subdir is not in PATH unless you add the subdir to the
PATH explicitly.
avatar
l*G
8
I run matlab in linux with a batch like this:
===matlab_batch.sh===============
#!/bin/bash
#this is my bash program to run matlab code matlab_program.m
#repeatedly without GUI
loopindices="1 2 3 4 5"
for loopind in $loopindices
do
echo running matlab $loopind
matlab -nodesktop <matlab_program
$loopind
EOF1
echo finished running matlab $loopind
done
==================
where matlab_program is another matlab code (matlab_program.m) which can run
in matlab command line prompt and it takes an integer $loopind as input
from matlab command line.
The code above (matlab_batch.sh) runs well, however, as the index $loopind
increases from 1 to 5, it slows down like crazy! Even if each time the
actual matlab program matlab_program.m is doing the same exact thing!!!
So what is going on with consecutive matlab processes being initialized from
linux shell ??? The "EOF1 EOF1" section above is a usual trick for
bash in linux to call a non-bash program like matlab. Within each for loop
of loopind, a matlab is invoked and then closed after matlab_program
finishes. So does an earlier matlab process affect a later matlab process?
If it does, how and why? Matlab must be leaking a lot of memory. Oops, my
program takes 2 hours to run when loopind =1, yet it takes 20 hrs to run by
the time loopind=5....
My program is not trivial (took me long time to code it up) to and it is
painstaking to see it would slow down like this. I have 24G memory on a
cluster and the matlab program is running on head node without any
parallelization.
Mathworks must be doing a very bad job in memory management especially with
the newer versions of matlab. Oops, time to abandon matlab for me.
avatar
l*G
9
I finally found the reason. When the directory under which I run the
code has too many (>5000) files, matlab gets very very very slow. Because in
each of the for loop iteration ($loopind), I create about 1500 temp files
to save data onto disk, and then I will load these files one by one. Before
loading them, I use calls to exist(filename,'file') to make sure the file
exists. It turns
out that exist(filename,'file') gets very very slow when there are many
files in the folder even though an exact filename is given. Matlab shouldn't
be checking every file in the folder to see if a specific file exists or
not since no wild card symbols (*) are used in the check. It is kind of
ironic that a piece of code runs slower and slower when you increase number
of files stored under that folder.
Others seem to have the same problem:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/3


【在 l*******G 的大作中提到】
: I run matlab in linux with a batch like this:
: ===matlab_batch.sh===============
: #!/bin/bash
: #this is my bash program to run matlab code matlab_program.m
: #repeatedly without GUI
: loopindices="1 2 3 4 5"
: for loopind in $loopindices
: do
: echo running matlab $loopind
: matlab -nodesktop <
avatar
l*G
10
Oops, even though I found the cause of the problem, there doesn't seem to
exist a simple solution to it. Matlab does not have an explicit way to stop
the file checks on linux system?? I understand IDE may want to check number
of files etc in current dir in order to search for programs etc. When
running code without IDE, it makes no sense!
It is terrible that matlab would slow down because number of files in folder
is large.
A sloppy solution is to save the files in a subfolder rather than in the
current dir directly. It works but sucks! It's funny that matlab would check
and watch any file changes in the current dir but no in subfolders!
The bottom line is that matlab will monitor files in its PATH to search for
programs in case one program calls another. If you create a lot of files
during a matlab session and store those files in the PATH, then matlab gets
incredibly slow. Unfortunately, current dir is always in PATH, so creating
large number of files in current dir is bad for matlab. Creating files in a
subdir is okay as the subdir is not in PATH unless you add the subdir to the
PATH explicitly.
avatar
b*3
11
that is informative
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。