v****s 发帖数: 1112 | 1 最近赶deadline,一个巨大无比的运算,已经吃掉我supercomputer account上的 5000
core hour了。。。。
不是很复杂,就是运算量太大了,如附图。
每个步骤(一共要算大概500,000次):
table 1 and table 2已经load到内存了,他们的长度各自是M, N. M,N can be upto 1
million. 要计算那个result table的每个cell,每个cell只要取对应位置的table1[i
,:], table2[j,:], 然后计算出resulttable[i,j].
现在我做的优化是把所有data都load到内存,然后搞2个for loop去sequentially
compute,但是这样太不efficient了,估计下周都没法搞完。。。大牛给出出主意,怎
么设计multi thread来加速!谢谢!! |
v****s 发帖数: 1112 | 2
5000
1
[i
【在 v****s 的大作中提到】 : 最近赶deadline,一个巨大无比的运算,已经吃掉我supercomputer account上的 5000 : core hour了。。。。 : 不是很复杂,就是运算量太大了,如附图。 : 每个步骤(一共要算大概500,000次): : table 1 and table 2已经load到内存了,他们的长度各自是M, N. M,N can be upto 1 : million. 要计算那个result table的每个cell,每个cell只要取对应位置的table1[i : ,:], table2[j,:], 然后计算出resulttable[i,j]. : 现在我做的优化是把所有data都load到内存,然后搞2个for loop去sequentially : compute,但是这样太不efficient了,估计下周都没法搞完。。。大牛给出出主意,怎 : 么设计multi thread来加速!谢谢!!
|
h**********c 发帖数: 4120 | 3 可以用一个loop
Most mpi just puts a single line here, e.g. c++
for i = M*N
do sth with table11[i%m] and table2[i%m%n]
把你们单位supercomputer 帐号给我,我 telnet.超级计算机我还没霍霍过呢,我们系
有个破sparc才800m.
不求任何报酬,抢占国际市场先。
5000
1
[i
【在 v****s 的大作中提到】 : 最近赶deadline,一个巨大无比的运算,已经吃掉我supercomputer account上的 5000 : core hour了。。。。 : 不是很复杂,就是运算量太大了,如附图。 : 每个步骤(一共要算大概500,000次): : table 1 and table 2已经load到内存了,他们的长度各自是M, N. M,N can be upto 1 : million. 要计算那个result table的每个cell,每个cell只要取对应位置的table1[i : ,:], table2[j,:], 然后计算出resulttable[i,j]. : 现在我做的优化是把所有data都load到内存,然后搞2个for loop去sequentially : compute,但是这样太不efficient了,估计下周都没法搞完。。。大牛给出出主意,怎 : 么设计multi thread来加速!谢谢!!
|
D*****r 发帖数: 6791 | 4 这年头还有人telnet?至少ssh吧
【在 h**********c 的大作中提到】 : 可以用一个loop : Most mpi just puts a single line here, e.g. c++ : for i = M*N : do sth with table11[i%m] and table2[i%m%n] : 把你们单位supercomputer 帐号给我,我 telnet.超级计算机我还没霍霍过呢,我们系 : 有个破sparc才800m. : 不求任何报酬,抢占国际市场先。 : : 5000 : 1
|
v****s 发帖数: 1112 | 5 yup.....telnet is crap coz everything is in cleartext and can be sniffed!
lol
【在 D*****r 的大作中提到】 : 这年头还有人telnet?至少ssh吧
|
h**********c 发帖数: 4120 | 6 ou think supercomputer sould be telnet friendly.
【在 D*****r 的大作中提到】 : 这年头还有人telnet?至少ssh吧
|
v****s 发帖数: 1112 | 7 our boss has to pay for the overhead above 10K corehour .....
【在 h**********c 的大作中提到】 : 可以用一个loop : Most mpi just puts a single line here, e.g. c++ : for i = M*N : do sth with table11[i%m] and table2[i%m%n] : 把你们单位supercomputer 帐号给我,我 telnet.超级计算机我还没霍霍过呢,我们系 : 有个破sparc才800m. : 不求任何报酬,抢占国际市场先。 : : 5000 : 1
|
h**********c 发帖数: 4120 | 8 you need help ?
send me each 1000 entries of your tables.
I have no NATO security clearance.
PM
【在 v****s 的大作中提到】 : our boss has to pay for the overhead above 10K corehour .....
|
k**********g 发帖数: 989 | |
u**d 发帖数: 211 | 10 就是两个矩阵相乘?
这种运算都是有现成优化的,特别是针对 memory hierarchy 和 parallel computing
直接写的两个 loop 效率非常非常的差
可以参考 http://www.cs.berkeley.edu/~demmel/cs267/
lecture 2 (memory hierarchy) 和 lecture 9 (parallel computing)
5000
1
[i
【在 v****s 的大作中提到】 : 最近赶deadline,一个巨大无比的运算,已经吃掉我supercomputer account上的 5000 : core hour了。。。。 : 不是很复杂,就是运算量太大了,如附图。 : 每个步骤(一共要算大概500,000次): : table 1 and table 2已经load到内存了,他们的长度各自是M, N. M,N can be upto 1 : million. 要计算那个result table的每个cell,每个cell只要取对应位置的table1[i : ,:], table2[j,:], 然后计算出resulttable[i,j]. : 现在我做的优化是把所有data都load到内存,然后搞2个for loop去sequentially : compute,但是这样太不efficient了,估计下周都没法搞完。。。大牛给出出主意,怎 : 么设计multi thread来加速!谢谢!!
|
|
|
v****s 发帖数: 1112 | 11 not multiplication.
computing
【在 u**d 的大作中提到】 : 就是两个矩阵相乘? : 这种运算都是有现成优化的,特别是针对 memory hierarchy 和 parallel computing : 直接写的两个 loop 效率非常非常的差 : 可以参考 http://www.cs.berkeley.edu/~demmel/cs267/ : lecture 2 (memory hierarchy) 和 lecture 9 (parallel computing) : : 5000 : 1 : [i
|
v****s 发帖数: 1112 | 12 yes but i'm not using it for this project.
【在 k**********g 的大作中提到】 : 支援 MPI / OpenMP 否?
|
b***i 发帖数: 3043 | 13 巨型机 我做过,48个核心,可以快30倍以上。
而且巨型机内存巨大。
你看看那一部分可以分开,然后直接组合。比如你可以把table1分成48组,一个线程算
table1的一组和table2的结果,然后直接合并不就行了。
虽然你算得不是乘法,但是分成线程的原则是一样的。
5000
1
[i
【在 v****s 的大作中提到】 : 最近赶deadline,一个巨大无比的运算,已经吃掉我supercomputer account上的 5000 : core hour了。。。。 : 不是很复杂,就是运算量太大了,如附图。 : 每个步骤(一共要算大概500,000次): : table 1 and table 2已经load到内存了,他们的长度各自是M, N. M,N can be upto 1 : million. 要计算那个result table的每个cell,每个cell只要取对应位置的table1[i : ,:], table2[j,:], 然后计算出resulttable[i,j]. : 现在我做的优化是把所有data都load到内存,然后搞2个for loop去sequentially : compute,但是这样太不efficient了,估计下周都没法搞完。。。大牛给出出主意,怎 : 么设计multi thread来加速!谢谢!!
|
l*********o 发帖数: 3091 | 14 能不能问问这是公司的商业项目还是学校的科学项目?
5000
1
[i
【在 v****s 的大作中提到】 : 最近赶deadline,一个巨大无比的运算,已经吃掉我supercomputer account上的 5000 : core hour了。。。。 : 不是很复杂,就是运算量太大了,如附图。 : 每个步骤(一共要算大概500,000次): : table 1 and table 2已经load到内存了,他们的长度各自是M, N. M,N can be upto 1 : million. 要计算那个result table的每个cell,每个cell只要取对应位置的table1[i : ,:], table2[j,:], 然后计算出resulttable[i,j]. : 现在我做的优化是把所有data都load到内存,然后搞2个for loop去sequentially : compute,但是这样太不efficient了,估计下周都没法搞完。。。大牛给出出主意,怎 : 么设计multi thread来加速!谢谢!!
|
a****l 发帖数: 8211 | 15 你门的core hour是怎么算的?如果是用core number * each core time的话,你改多线
程的结果就是加快老板付钱的速度.
5000
1
[i
【在 v****s 的大作中提到】 : 最近赶deadline,一个巨大无比的运算,已经吃掉我supercomputer account上的 5000 : core hour了。。。。 : 不是很复杂,就是运算量太大了,如附图。 : 每个步骤(一共要算大概500,000次): : table 1 and table 2已经load到内存了,他们的长度各自是M, N. M,N can be upto 1 : million. 要计算那个result table的每个cell,每个cell只要取对应位置的table1[i : ,:], table2[j,:], 然后计算出resulttable[i,j]. : 现在我做的优化是把所有data都load到内存,然后搞2个for loop去sequentially : compute,但是这样太不efficient了,估计下周都没法搞完。。。大牛给出出主意,怎 : 么设计multi thread来加速!谢谢!!
|