LANケーブルを接続したら
/etc/rc.d/init.d/network start
でネットワークを再起動してやる必要がある。
これでネットワークがつながるようになる。
ping 192.168.***.***
でネットワークがつながったかどうかをチェックする。
Tweet
var s = 'string = 文字列';
p(chars = s.split('')); p([].slice.call(s)); p([].map.call(s, function( c ){ return c.charCodeAt(0) })); try{ p([].shift.call(s)); p(s); p([].pop.call(s)); p(s); p([].push.call(s, 'string')); p(s); p([].unshift.call(s, '文字列')); p(s); }catch(e){ p(e); }
#!/bin/sh
hosts = "puzzel11 puzzle12 puzzle14 puzzle15 puzzle16 puzzle17 puzzle19 puzzle20 puzzle21 puzzle23 puzzle24"
user = "mame"
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
for host in ${hosts}
do
ssh ${user}@${host} 'ssh-keygen -t rsa'
ssh ${user}@${host} 'cat ~/.ssh/id_rsa.pub' |cat ->> ~/.ssh/authorized_keys
done
for host in ${hosts}
do
scp ~/.ssh/authorized_keys ${host}:~/.ssh
ssh ${user}@${host} 'chmod 700 ~/.ssh; chmod 600 ~/.ssh/*'
done
exit
うまくいったよー。
で紹介されているスクリプトを<head>の直後に入れる。
そうすると$e^{i\pi}=-1$とlatexで書いた部分が数式に変換される。e^{i\pi}=-1
$\sin{x}+\tan x , \log_{10} x$\sin{x}+\tan x , \log_{10} x
$ S_n=\displaystyle\sum_{k=1}^{n} (x_k)^2 $S_n=\displaystyle\sum_{k=1}^{n} (x_k)^2
\[ I=\int_{0}^{ \frac {1}{2}} \frac{x}{\sqrt{1-x^2}} dx \]I=\int_{0}^{ \frac {1}{2}} \frac{x}{\sqrt{1-x^2}} dx
def f(x): return 4.0/(1.0+x*x) def main(): import numpy import mpi from mpi import mpi_init, mpi_finalize from mpi import mpi_comm_size, mpi_comm_rank, MPI_COMM_WORLD from mpi import mpi_reduce, mpi_bcast, mpi_barrier,mpi_recv, mpi_send from mpi import MPI_SUM, MPI_FLOAT,MPI_INT,MPI_TAG_UB import sys sys.argv = mpi_init(len(sys.argv),sys.argv) number_of_proc = mpi_comm_size(MPI_COMM_WORLD) myid = mpi_comm_rank(MPI_COMM_WORLD) main_node = 0 n = 10000 #mpi_bcast(n, 1, MPI_INT, 0, MPI_COMM_WORLD) h = 1.0 / n sum = 0.0 for i in range(myid,n,number_of_proc): x = h * (i -0.5) sum += f(x) mypi = h * sum #mpi_barrier(MPI_COMM_WORLD) cpi = mpi_reduce(mypi, 1, MPI_FLOAT,MPI_SUM, 0, MPI_COMM_WORLD) if myid == main_node: print cpi mpi_finalize() if __name__=="__main__": main()
import numpy from numpy import * import mpi from mpi import * import sys sys.argv = mpi.mpi_init(len(sys.argv),sys.argv) print "after ",len(sys.argv),sys.argv myid=mpi.mpi_comm_rank(mpi.MPI_COMM_WORLD) numprocs=mpi.mpi_comm_size(mpi.MPI_COMM_WORLD) print "Hello from ",myid print "Numprocs is ", numprocs print "python is not about snakes" mpi.mpi_finalize()
server1@~/test_mympi> mpirun --hostfile hosts -np 10 python example1.py
[puzzle15:26782] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle11:27440] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle15:26783] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle12:23530] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle11:27439] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle11:27441] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle11:27442] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle12:23529] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle12:23531] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
[puzzle12:23532] mca: base: component_find: unable to open osc pt2pt: file not found (ignored)
after 1 ('example1.py',)
Hello from 6
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 8
after 1 ('example1.py',)
Hello from 2
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 0
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 3
Numprocs is 10
python is not about snakes
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 9
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 4
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 5
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 7
Numprocs is 10
python is not about snakes
after 1 ('example1.py',)
Hello from 1
Numprocs is 10
python is not about snakes
setenv LD_LIBRARY_PATH $HOME/openmpi/libとパスを通しておく。
pythonとしてうまく行けばオッケー。
import mpi
make distclean
autoreconf --force --install
./configure --enable-shared --prefix=/home/openmpi/
make
make install
../../libtool: line 463: CDPATH: command not found
../../libtool: line 1266: func_opt_split: command not found
libtool: Version mismatch error. This is libtool 2.1a, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.1a
libtool: and run autoconf again.
tar jxf openmpi-1.2.8.tar.bz2なんと通った。
cd openmpi-1.2.8
./configure --enable-shared --prefix=/home/openmpi/
make all install
<script type="text/javascript"><!--
google_ad_client = "pub-nnnnnnnnnnnnnnnn";
google_ad_slot = "nnnnnnnnnn";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"
type="text/javascript">
</script>
<script type="text/javascript"><!--
google_ad_client = "pub-nnnnnnnnnnnnnnnn";
google_ad_slot = "nnnnnnnnnn";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"
type="text/javascript">
</script>
1. bloggerにログインしてブログを選びます。 2. 「テンプレート」タブから「HTMLの編集」を選択して 3. 「ウィジェットのテンプレートを展開」にチェックマークを入れます。(これを入れないと<data:post.body>が表示されません。) 4. <data:post.body>を探して、その直下にコードを挿入します。