问题标签 [hpc]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
979 浏览

language-agnostic - Multiple levels of parallelism using OpenMP - Possible? Smart? Practical?

I am currently working on a C++ sparse matrix/math/iterative solver library, for a simulation tool I manage. I would have preferred to use an existing package, however, after extensive investigation, none were found that were appropriate for our simulator (we looked at flens, it++, PetSC, eigen, and several others). The good news is my solvers and sparse matrix structures are now very efficient and robust. The bad news is, I am now looking into parallelization using OpenMP, and the learning curve is a bit steep.

The domain we solve can be broken into sub-domains, which come together in a block-diagonal format. So our storage scheme ends up looking like an array of smaller square matrices (blocks[]) each with a format appropriate to the sub-domain (e.g. Compressed Row Storage: CRS, Compressed Diagonal Storage: CDS, Dense, etc..), and a background matrix (currently using CRS) that accounts for the connectivity between sub-domains.

The "hot spot" in most (all?) iterative solvers is the Matrix Vector multiplication operation, and this is true of my library. Thus, I've been focusing my efforts on optimizing my MxV routines. For the block diagonal structure, the pseudo code for M*x=b would be as follows:

where background_matrix is the background (CRS) matrix, blocks is the array of sub-domain matrices, and .range returns the portion of the vector from a starting index to an ending index.

Obviously the loop can be (and has been) parallelized, as the operations are independent of other iterations of the loop (the ranges are non-overlapping). Since we have 10-15 blocks in a typical system, 4+ threads actually makes a significant difference.

The other place where parallelization has been seen to be a good option in is in the MxV operation for each sub-domain storage scheme (calls in lines 1 and 6 in the above code). There is plenty out there on parallelizing CRS, CDS, and dense matrix MxV operations. Typically a nice boost is seen with 2 threads, with greatly diminishing returns as more threads are added.

I am envisioning a scheme, where 4 threads would be used in the block loop for the above code, and each of those threads would use 2 threads for the sub-domain solves. However, I am not sure how, using OpenMP, one would manage the pool of threads- is it possible to limit the number of threads in an openmp for loop? Is this multi-level parallelism something that in practice makes sense? Any other thoughts on what I've proposed here would be appreciated (and thanks for reading all the way to the end!)

0 投票
1 回答
1946 浏览

c - 如何静态编译 X11?

我正在集群(HECToR)上编译并行 C 代码。

尽管我不会以交互方式运行任何并行作业,但我的代码包含对 X11 函数的一些引用,这些函数在顺序运行时使用。我使用的集群不支持共享库,这排除了 X11,至少到目前为止我一直在使用它。

你能告诉我我是否可以做些什么来静态编译 X11 吗?

在此先感谢您的帮助。

罗斯

0 投票
1 回答
2013 浏览

algorithm - 大规模伪逆

我想计算一个巨大矩阵的Moore-Penrose 伪逆。理想情况下,我想在具有 2300 万行和 1000 列的矩阵上执行此操作,但如有必要,我可以通过仅在实验的一部分上运行将行数减少到 400 万。

显然,将矩阵加载到内存中并在其上运行 SVD 是行不通的。 维基百科指向Krylov 子空间方法并提到ArnoldiLanczos共轭梯度GMRES(广义最小残差)、BiCGSTAB(双共轭梯度稳定)、QMR(准最小残差)、TFQMR(无转置 QMR)和 MINRES(最小残差) ) 方法是最好的 Krylov 子空间方法之一。但我不知道从这里去哪里。计算如此庞大的矩阵的伪逆是否可行?如果是这样,使用哪些算法或软件库?我有一个可用的大型计算集群,因此欢迎使用并行方法。

这个答案指向 R 包biglm。那行得通吗?有人用过吗?我通常使用 Python 工作,但不介意使用其他语言和工具来完成这项特定任务。

0 投票
2 回答
537 浏览

mpi - 我们可以在单个系统中运行 MPI 程序还是必须在集群中运行它?

我可以在我的大学使用 PelicanHPC 访问集群网络,在其中运行各种 MPI 程序,但在家里我想练习编写/使用其他 MPI 程序。有没有办法可以在我自己的系统上运行 MPI 程序?

(我在 Ubuntu Jaunty 上工作)

0 投票
1 回答
375 浏览

.net - 开源或免费 .NET HPC 实现

我试图找出使用 Windows XP、Vista 和 7 机器创建计算网格的可行性。我知道那里已经有 Windows HPC Server 2008,但是在研究成本时,基本上是如果你不得不问,你买不起。

我确实找到了 MPI.NET,但是看起来它已经近两年没有更新了,所以我有点怀疑。

理想情况下,我希望拥有与 .NET 4.0 并行库集成的东西,这样我就可以将其配置为知道它有一个可用的网格并且可以处理它......但我想这有点像白日梦。

有没有什么东西可以让我在网格环境中使用现代C# 代码,即使它不是免费的但不是非常昂贵?

0 投票
1 回答
104 浏览

distributed - 访问依赖文件而不在 condor 中共享

我有 6 台 Windows 机器,condor 可以在其上运行作业,当我在 condor 上运行相互依赖的文件(一个文件调用另一个文件)时,我应该与所有人共享(需要管理访问权限)调用文件我正在运行作业的机器,并且碰巧提交的文件生成了放置在文本文件中的输出,如果我将作业重新提交给秃鹰,我会收到“无法访问文件:权限”的错误拒绝”输出文件,所以每次我将作业重新提交给秃鹰时,我都必须更改输出文件名。

我的提交文件看起来像这样

test_job.sub

# Universe = vanilla 可执行文件 = C:\Progra~2\R\R-2.10.1\bin\Rscript.exe 参数 = One.R getenv = true

要求 = ARCH == "INTEL" && OPSYS == "WINNT60"

输入 = One.R

should_transfer_files = YES when_to_transfer_output = ON_EXIT transfer_input_files = Two.R transfer_executable = false

输出 = test_r_out.out 日志 = test_r_log.log 错误 = test_r.error

队列

One.R 调用 Two.R

我的问题是在这台机器上运行他们的工作的每个人都应该能够直接访问依赖文件,而无需手动共享和更改输出文件名的选项。

感谢您对此的任何想法

谢谢,

0 投票
2 回答
2698 浏览

c++ - 在 64 位机器上使用 Visual Studio 配置 CUDA 和 OpenCV

自过去 1 周以来,我一直在尝试在 64 位 Windows XP 机器上的 Visual Studio 2008 上配置 OpenCV2.1 和 CUDA3.1。但一切都是徒劳的。

单独的 OpenCV 工作正常。单独的 CUDA3.1 也可以正常工作。我将 CUDA3.1 用于 64 位...但对于 OpenCV,我使用的是 32 位安装(如 Source Forge 上提供的)- 可能的错误??

在 CUDA 项目中,当我配置 OpenCV 设置并编译示例项目时,出现以下文件错误:

cxcore.hpp cxoperations.hpp cxcore.hpp cxmat.hpp 以及 CUDA 构建规则。

以上所有文件都不是我写的;但是是图书馆(我猜)。

在 64 位 XP 机器上安装 CUDA、OpenCV over VS 的任何说明?

0 投票
2 回答
6021 浏览

c# - Pass a Parameter object (PSCredential) inside a ScriptBlock programmatically in C#

I am trying to run an HPC cmdlet programmatically to change HPC install credential on a remote computer. If run the cmdlet locally, it's pretty straightforward:

However, if I want to do the same thing with remote PowerShell, I need to run Invoke-Command and pass in the credential to the ScriptBlock inside the Command. How can I do that? It might look something like this, except I need to pass in the credential as an object binded to the InstallCredential parameter inside the ScriptBlock instead of a string:

0 投票
4 回答
58653 浏览

java - ANT 问题:net/sf/antcontrib/antcontrib.properties

我正在尝试将软件安装到我的 Debian Lenny 服务器上。具体来说,Capture-HPC。我已经设置了 VMWare 服务器以及所有先决条件。当我在目录中运行 ant 时,出现以下错误:

任何人有任何想法是什么原因造成的?有关我的 ant 安装的详细信息如下:

和 build.xml 文件。. .

0 投票
7 回答
1386 浏览

.net - F# 作为 HPC 语言

我使用 F# 开发了 Lattice Boltzmann(流体动力学)代码。我现在正在 24 核、128 GB 内存服务器上测试代码。该代码基本上由一个用于时间演化的主要递归函数和一个用于 3D 维空间迭代的 System.Threading.Tasks.Parallel.For 循环组成。3D 空间是 500x500x500 大,一个时间周期需要永远:)。

我希望服务器使用所有 24 个内核,即有 100% 的使用率。我观察到的使用率在 1% - 30% 之间。

我的问题是:

  1. F# 是否适合在此类服务器上进行 HPC 计算?
  2. 将 100% 的 CPU 用于实际问题是否现实?
  3. 我应该怎么做才能获得高速?一切都在一个大的并行循环中,所以我希望这就是我应该做的一切......
  4. 如果 F# 不是合适的语言,那是什么语言?

感谢您的任何建议。

编辑:如果有人有兴趣看一下,我愿意分享代码。

EDIT2:这是代码的剥离版本:http: //dl.dropbox.com/u/4571/LBM.zip 它没有做任何合理的事情,我希望我没有通过剥离代码引入任何错误:)

启动文件是 ShearFlow.fs,文件底部是