我们一直试图使用新的GCC 5.1版本将OpenMP块卸载到Intel MIC(即Xeon Phi),但未成功.在GCC Offloading页面之后,我们将build.sh脚本放在一起,为"intelmic"和主机编译器构建"accel"目标编译器.编译似乎成功完成.
env.sh然后使用该脚本,我们尝试编译hello.c下面列出的简单程序.但是,此程序似乎只在主机上运行,而不是在目标设备上运行.
由于我们不熟悉卸载,以及编译GCC,我们可能会做错多少事情.但是,我们已经调查了已经提到的资源以及以下内容(我没有足够的代表来发布链接):
最大的问题是他们通常会参考英特尔编译器.虽然我们计划购买副本,但目前我们没有副本.此外,我们的大部分开发流程已经与GCC集成,我们更愿意保持这种方式(如果可能的话).
我们安装了最新的MPSS 3.5发行版,对Ubuntu下的工作进行了必要的修改.我们可以在我们的系统中成功地沟通和检查Xeon Phis的状态.
在我们的努力中,我们从未看到代码在麦克风仿真模式下运行的任何迹象.
谢谢!
#!/usr/bin/env bash
set -e -x
unset LIBRARY_PATH
GCC_DIST=$PWD/gcc-5.1.0
# Modify these to control where the compilers are installed
TARGET_PREFIX=$HOME/gcc
HOST_PREFIX=$HOME/gcc
TARGET_BUILD=/tmp/gcc-build-mic
HOST_BUILD=/tmp/gcc-build-host
# i dropped the emul since we are not planning to emulate!
TARGET=x86_64-intelmic-linux-gnu
# should this be a quad (i.e. pc)?? default …Run Code Online (Sandbox Code Playgroud) 我有兴趣使用OpenMP将工作卸载到GPU.
下面的代码给出sum了CPU 的正确值
//g++ -O3 -Wall foo.cpp -fopenmp
#pragma omp parallel for reduction(+:sum)
for(int i = 0 ; i < 2000000000; i++) sum += i%11;
Run Code Online (Sandbox Code Playgroud)
它也适用于像OpenACC这样的GPU
//g++ -O3 -Wall foo.cpp -fopenacc
#pragma acc parallel loop reduction(+:sum)
for(int i = 0 ; i < 2000000000; i++) sum += i%11;
Run Code Online (Sandbox Code Playgroud)
nvprof 表明它在GPU上运行,并且它也比CPU上的OpenMP更快.
但是,当我尝试使用这样的OpenMP卸载到GPU时
//g++ -O3 -Wall foo.cpp -fopenmp -fno-stack-protector
#pragma omp target teams distribute parallel for reduction(+:sum)
for(int i = 0 ; i < 2000000000; i++) sum += i%11;
Run Code Online (Sandbox Code Playgroud)
它得到了错误的结果 …
ethtool手册页只给出了一个模糊的解释:
rxvlan on|off
Specifies whether RX VLAN acceleration should be enabled
txvlan on|off
Specifies whether TX VLAN acceleration should be enabled
Run Code Online (Sandbox Code Playgroud)
假设您可以启用它们,这些选项到底完成了什么?
我正在尝试将一些 OpenMP 卸载到使用 GTX 1060 显卡的本地计算机上的 GPU。我的所有 CUDA 和 Cublas 示例都运行良好。然而,当我尝试运行一些 OpenMP 卸载时,它根本不起作用。为了获得 OpenMP 5.0 支持,我编译了 GCC 10.2.0 工具链。经过一些调试,我发现 OpenMP 运行时看不到任何设备。例如,此代码显示零:
#include <omp.h>
#include <stdio.h>
int main() {
printf("%d\n", omp_get_num_devices());
return 0;
}
Run Code Online (Sandbox Code Playgroud)
不过,Nvidia 工具链已启动并正在运行:
$ nvidia-smi
Sun Feb 21 23:06:40 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.06 Driver Version: 450.51.06 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG …Run Code Online (Sandbox Code Playgroud) 我在项目中使用 Grails (2.2.2),并且我的应用程序发出不需要的 http 重定向而不是 https 重定向。
目前,我们在 Oracle Weblogic 前面有一个 F5 负载均衡器。F5 正在从 Weblogic 卸载我们的 SSL。F5仅接受https请求,Weblogic仅接受http请求。
我的 Grails 项目使用 Spring Security 和 Spring Security CAS 插件。
该问题通常发生在成功登录 CAS 时。Grails 似乎总是发出 HTTP 重定向。
我的 serverURL 指定 HTTPS,就像我的所有 CAS 配置变量一样。喜欢
grails.serverURL = "https://example.com/${appName}"
Run Code Online (Sandbox Code Playgroud)
有没有办法强制 GRAILS/Weblogic 仅发出 https 重定向?
编辑 #1 - 更多信息
我尝试这样做但没有运气:
grails.plugin.springsecurity.secureChannel.useHeaderCheckChannelSecurity = true
grails.plugin.springsecurity.secureChannel.definition = [
'/**': 'REQUIRES_SECURE_CHANNEL'
]
grails.plugin.springsecurity.portMapper.httpPort = 80
grails.plugin.springsecurity.portMapper.httpsPort = 443
grails.plugin.springsecurity.secureChannel.secureHeaderName = 'WL-Proxy-SSL'
grails.plugin.springsecurity.secureChannel.secureHeaderValue = 'http'
grails.plugin.springsecurity.secureChannel.insecureHeaderName = 'WL-Proxy-SSL'
grails.plugin.springsecurity.secureChannel.insecureHeaderValue = 'https'
Run Code Online (Sandbox Code Playgroud)
另外,该行为似乎可能与 …
我正在尝试使用 OpenMP 卸载到 AMD GPU,我在 OpenMP 4.5 规范中阅读了目标设备表示可以卸载代码和数据的设备,但我无法判断卸载是否成功,或者是否成功确实已卸载到我的 AMD GPU。
为了测试卸载是否确实有效,我尝试计算使用和不使用编译指示的时间,并使用挂墙时间检查差异,但两种情况下返回的时间都是 0:
这是用于测试的简单代码,我将尝试在我的项目中使用它:
int n = 10240; float a = 2.0f; float b = 3.0f;
float *x = (float*) malloc(n * sizeof(float));
float *y = (float*) malloc(n * sizeof(float));
double start = omp_get_wtime();
#pragma omp target data map(to:x)
{
#pragma omp target map(tofrom:y)
#pragma omp teams
#pragma omp distribute parallel for
for (int i = 0; i < n; ++i){
y[i] = a*x[i] + y[i];
}
#pragma omp …Run Code Online (Sandbox Code Playgroud) 我试图使用OpenMP在GPU上运行一些代码,但我没有成功.在我的代码中,我使用for循环执行矩阵乘法:一次使用OpenMP pragma标签,一次不使用.(这样我可以比较执行时间.)在第一个循环后我调用omp_get_num_devices()(这是我的主要测试,看看我是否真的连接到GPU.)无论我尝试什么,omp_get_num_devices()总是返回0.
我使用的电脑有两个NVIDIA Tesla K40M GPU.CUDA 7.0和CUDA 7.5在计算机上作为模块提供,而CUDA 7.5模块通常是活动的.gcc 4.9.3,5.1.0和7.1.0都可用作模块,gcc 7.1.0模块通常是活动的.我正在编译我的代码$ g++ -fopenmp -omptargets=nvptx64sm_35-nvidia-linux ParallelExperimenting.cpp -o ParallelExperimenting.我已经使用CPU成功并行化了OpenMP代码,但没有使用GPU.
我的主要目标是omp_get_num_devices()返回2作为我可以检测并使用带有OpenMP的GPU的证据.我收到的任何帮助将不胜感激.
这是我用来检查GPU是否正确使用的代码:
#include <omp.h>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <iomanip>
#include <cstdio>
#include <stdlib.h>
#include <iostream>
#include <time.h>
using namespace std;
double A [501][501];
double B [501][501];
double C [501][501][501];
double D [501][501];
double E [501][501];
double F [501][501][501];
double dummyvar;
int Mapped [501]; …Run Code Online (Sandbox Code Playgroud) 我一直在尝试将 OpenMP 4.5 卸载安装到 gcc 的 Nvidia GPU 版本有一段时间,但到目前为止没有成功,尽管我越来越近了。
这一次,我按照这个脚本做了两个更改:首先我指定了gcc的trunk版本而不是7.2,其次nvptx-newlib现在根据github存储库包含在nvptx-tools中,所以我删除了那部分剧本。为了方便参考,原始脚本是
#!/bin/sh
#
# Build GCC with support for offloading to NVIDIA GPUs.
#
work_dir=$HOME/offload/wrk
install_dir=$HOME/offload/install
# Location of the installed CUDA toolkit
cuda=/usr/local/cuda
# Build assembler and linking tools
mkdir -p $work_dir
cd $work_dir
git clone https://github.com/MentorEmbedded/nvptx-tools
cd nvptx-tools
./configure \
--with-cuda-driver-include=$cuda/include \
--with-cuda-driver-lib=$cuda/lib64 \
--prefix=$install_dir
make
make install
cd ..
# Set up the GCC source tree
git clone https://github.com/MentorEmbedded/nvptx-newlib
svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_7_2_0_release gcc
cd gcc
contrib/download_prerequisites …Run Code Online (Sandbox Code Playgroud) http://www.percona.com/ppc2009/PPC2009_Boring_MySQL.pdf:
如果您可以在其他地方执行此操作,请不要在数据库中工作
我必须说我不太明白这个说法.有人可以详细说明吗?
这是否意味着我们应该在应用程序级别而不是在数据库级别强制执行完整性?
或者它完全意味着什么呢?
通用接收卸载(GRO)是Linux中的一种软件技术,用于聚合属于同一流的多个传入数据包。链接的文章声称降低了CPU利用率,因为单个聚合的数据包会遍历网络堆栈,而不是每个数据包单独遍历网络堆栈。
但是,如果您查看GRO的源代码,那感觉就像是一个网络堆栈。例如,传入的TCP / IPv4数据包需要经过:
每个功能都执行解封装,并查看相应的帧/网络/传输头,如“常规”网络堆栈所期望的那样。
假设计算机不执行防火墙/ NAT或其他明显昂贵的每数据包处理,那么“常规”网络堆栈中的速度如此慢,以至于“ GRO网络堆栈”可以加速呢?
我正在尝试使用 nvidia GPU 进行 OpenMP 卸载,并尝试在 C++ 中使用它进行一些数组计算。
现在我的输出并不理想,因为我是使用 OpenMP 卸载计算的新手。如果有人能指出我正确的方向,我将不胜感激。
代码片段:
#include <omp.h>
#include <iostream>
using namespace std;
int main(){
int totalSum, ompSum;
const int N = 1000;
int array[N];
for (int i=0; i<N; i++){
array[i]=i;
}
#pragma omp target
{
#pragma omp parallal private(ompSum) shared(totalSum)
{
ompSum=0;
#pragma omp parallel for
for (int i=0; i<N; i++){
ompSum += array[i];
}
#pragma omp critical
totalSum += ompSum;
}
printf ( "Caculated sum should be %d but is %d\n", N*(N-1)/2, …Run Code Online (Sandbox Code Playgroud) 我的任务是编写一个通过 OpenMP 卸载到 GPU 的程序。目前我使用 Intel oneAPI DPC++ 编译器编译我的代码icpxv2022.1.0 编译代码,目标是在后端使用 NVIDIA Tesla V100。请在下面找到我的相关部分Makefile:
MKLROOT = /lustre/system/local/apps/intel/oneapi/2022.2.0/mkl/latest
CXX = icpx
INC =-I"${MKLROOT}/include"
CXXFLAGS =-qopenmp -fopenmp-targets=spir64 ${INC} --gcc-toolchain=/lustre/system/local/apps/gcc9/9.3.0
LDFLAGS =-qopenmp -fopenmp-targets=spir64 -fsycl -L${MKLROOT}/lib/intel64
LDLIBS =-lmkl_sycl -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lsycl -lOpenCL -lstdc++ -lpthread -lm -ldl
${EXE}: ${OBJ}
${CXX} ${CXXFLAGS} $^ ${LDFLAGS} ${LDLIBS} -o $@
Run Code Online (Sandbox Code Playgroud)
该代码编译时没有错误和警告,但我不完全确定它在运行时确实使用了 GPU。
offloading ×12
openmp ×8
c++ ×5
gcc ×5
gpgpu ×2
gpu ×2
networking ×2
c ×1
cuda ×1
database ×1
grails ×1
intel-oneapi ×1
linux-kernel ×1
mysql ×1
nvidia ×1
openacc ×1
sql-server ×1
ssl ×1
vlan ×1
weblogic ×1
xeon-phi ×1