我有一个Windows服务,我想确保我的EF ObjectContext在每次运行之间被处理掉.每次执行时,服务运行的时间都会更长.似乎ObjectContext不断增长.我的ObjectContext应该注册不同还是我做错了什么?
我正在做什么的概述.
Walkthru的代码:
当作业运行时,它会在每次运行时调出并获取我的东西需要更长的时间(例如:第一次运行时为2分钟,第二次运行服务时为4分钟,下一次为6分钟,下一次为8,依此类推) .看起来我的ObjectContext每次都变得越来越大.它拉动的数据没有改变,行数和列数仍然相同.所以我认为我的注册错了,是这样的吗?如果没有,你能看到我正在做的事情的问题吗?
程序
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main(string[] args)
{
var configuration =
Host.Configure<MyService>(c =>
{
c.AllowMultipleInstances();
c.WithRegistrations(b => b.RegisterModule(new MyModule()));
}, args);
Host.Start(configuration);
}
}
Run Code Online (Sandbox Code Playgroud)
模
public class MyModule : Module
{
protected override void Load(ContainerBuilder builder)
{
LoadQuartz(builder);
LoadServices(builder);
LoadInfrastructure(builder);
}
private void LoadInfrastructure(ContainerBuilder …Run Code Online (Sandbox Code Playgroud) 我有一个函数指针数组,我用来调用适当的cblas_xgemm(例如,cblas_dgemm或cblas_sgemm等,来自ATLAS/CBLAS).
当我告诉它使用cblas_dgemm函数指针时,这很好用; 使用适当的参数调用dgemm并返回正确的结果.
但是,当我cblas_sgemm通过函数指针调用时,我得到以下输出:
ldc must be >= MAX(N,1): ldc=0 N=2Parameter 14 to routine cblas_sgemm was incorrect
Run Code Online (Sandbox Code Playgroud)
我写了一个简短的测试程序来演示这个问题.cblas_sgemm没有函数指针的调用工作正常.
请特别注意以下gcc警告(另请参阅上面链接的gist,它具有完整的gcc输出):
test_cblas_sgemm.c:20:3: warning: initialization from incompatible pointer type [enabled by default]
Run Code Online (Sandbox Code Playgroud)
如果我cblas_sgemm在函数指针数组定义中注释掉这一行,我就不会得到这样的警告,即使对于该cblas_dgemm行也是如此.但这没有任何意义,因为这两个函数都应该具有相同的返回类型!
以下是适当的行cblas.h:
void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
const int K, const float alpha, const float *A,
const …Run Code Online (Sandbox Code Playgroud) 我成功编译并安装了numpy.但是当我进入
import numpy.distutils.system_info as sysinfo
sysinfo.get_info('atlas')
Run Code Online (Sandbox Code Playgroud)
命令,我得到的是:
lapack_info:
NOT AVAILABLE
lapack_opt_info:
NOT AVAILABLE
openblas_lapack_info:
NOT AVAILABLE
blas_info:
NOT AVAILABLE
atlas_3_10_blas_threads_info:
NOT AVAILABLE
atlas_threads_info:
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
atlas_3_10_threads_info:
NOT AVAILABLE
atlas_blas_info:
NOT AVAILABLE
atlas_3_10_blas_info:
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
atlas_blas_threads_info:
NOT AVAILABLE
openblas_info:
NOT AVAILABLE
blas_mkl_info:
NOT AVAILABLE
blas_opt_info:
NOT AVAILABLE
atlas_info:
NOT AVAILABLE
atlas_3_10_info:
NOT AVAILABLE
lapack_mkl_info:
NOT AVAILABLE
mkl_info:
NOT AVAILABLE
Run Code Online (Sandbox Code Playgroud)
所以我的问题是(1)我可以配置BLAS/LAPACK/ATLAS库而无需重新编译/重新安装包和(2)如何在这些之间切换?
(numpy安装在virtualenv; BLAS和ATLAS是从dnf安装的sudo).
我有一个使用在Linux机器上运行的多进程模块的多进程(不是多线程!)应用程序.这个应用程序使用该numpy.linalg.solve函数,如果我尝试创建许多进程,那么我得到错误:
assertion !pthread_create( &(ROOT->pid), ATTR, ROOT->fun, ROOT ) failed, line 84 of file /build/buildd-atlas_3.8.4-9-amd64-jk6dgk/atlas-3.8.4/build/atlas-base/../..//src/pthreads/misc/ATL_thread_tree.c
Run Code Online (Sandbox Code Playgroud)
请注意,在我开始使用函数之前numpy.linalg,我没有遇到任何问题.
知道问题可能是什么?
编辑:我试过用scipy.linalg.solve,问题是一样的!
编辑:通过用blas替换地图集,问题就消失了.所以看来这个问题确实存在于地图集中
两天来,我一直在尝试使用 Lapack 安装 Openblas/atlas 并在 R 中使用它。这让我发疯了。我已经到了无法再思考的地步。
我的服务器使用:
Red Hat Enterprise Linux Server 6.6 版(圣地亚哥)
这是我到目前为止安装的内容:
[root@tpdb05 atlas]# yum install atlas.x86_64 blas.x86_64 lapack.x86_64 Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Setting up Install Process
Package atlas-3.8.4-2.el6.x86_64 already installed and latest version
Package blas-3.2.1-4.el6.x86_64 already installed and latest version
Package lapack-3.2.1-4.el6.x86_64 already installed and latest version
[root@tpdb05 ruser]#
yum install lapack.i686
Installed:
lapack.i686 0:3.2.1-4.el6
Dependency Installed:
blas.i686 0:3.2.1-4.el6 glibc.i686 0:2.12-1.166.el6_7.3 libgfortran.i686 0:4.4.7-16.el6
nss-softokn-freebl.i686 0:3.14.3-23.el6_7
Dependency Updated:
glibc.x86_64 0:2.12-1.166.el6_7.3 glibc-common.x86_64 0:2.12-1.166.el6_7.3 glibc-devel.x86_64 …Run Code Online (Sandbox Code Playgroud) 在我的RHEL7上,我正在尝试安装py-earth 并收到此链接错误:
/usr/bin/ld: cannot find -lcblas
Run Code Online (Sandbox Code Playgroud)
我安装了包blas,blas-devel,atlas和atlas-devel.
此错误指定后打印的编译命令
-L/usr/lib64/atlas -lcblas -lm ....
Run Code Online (Sandbox Code Playgroud)
为了完整/usr/lib64/atlas起见,该目录包含以下文件和符号链接
libsatlas.so -> libsatlas.so.3.10
libsatlas.so.3 -> libsatlas.so.3.10
libsatlas.so.3.10
libtatlas.so -> libtatlas.so.3.10
libtatlas.so.3 -> libtatlas.so.3.10
libtatlas.so.3.10
Run Code Online (Sandbox Code Playgroud)
有帮助吗?
好吧,我知道float16它不是一个真正的原始类型,但它是由Python/numpy模拟的.但问题是:如果存在且Python允许在使用该numpy.dot()函数的数组乘法中使用它,为什么OpenBlas(或ATLAS)不能正常工作?我的意思是,乘法有效,但并行计算没有.或者,再次,以不同的方式(在我看来更好),为什么Python/numpy允许使用,float16如果那时我们不能利用OpenBlas/ATLAS提供的高级功能?
我正在尝试安装numpy==1.10.2,scipy并matplotlib在服务器上基于opensuse.我已经从源头安装numpy了virtualenv(我也尝试过pip - 当然也是同样的结果).现在,当我尝试numpy在python控制台中导入时,我收到以下错误:
ImportError: /home/user/.virtualenvs/project/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: cblas_sgemm
Run Code Online (Sandbox Code Playgroud)
注意:我不是这台服务器的超级用户.
编辑:
ldd /home/user/.virtualenvs/project/lib/python2.7/site-packages/numpy/core/multiarray.so`
linux-vdso.so.1 (0x00007fffa0d69000)
libtatlas.so.3 => /home/user/.local/usr/lib64/atlas/libtatlas.so.3 (0x00007fe366d66000)
libm.so.6 => /lib64/libm.so.6 (0x00007fe366a50000)
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007fe3666b2000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe366496000)
libc.so.6 => /lib64/libc.so.6 (0x00007fe3660f0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe367a15000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fe365eec000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007fe365ce9000)
Run Code Online (Sandbox Code Playgroud)
libtatlas.so.3 => /home/user/.local/usr/lib64/atlas/libtatlas.so.3 - 我因为libatlas的其他问题而将此链接起来:
ImportError: /usr/lib64/atlas/libtatlas.so.3: undefined symbol: clapack_ilaenv
SOLLUTION
问题出在ATLAS lib上.根据@ali_m建议我numpy从源代码安装OpenBLAS而不是ATLAS.这里链接到如何使用BLAS安装numpy的说明.
我刚刚创建了一个MongoDB Atlas帐户.
但我无法通过我的应用程序进行连接.
但似乎sails-mongo只是不使用该数据库,这需要一个非常新的mongo版本
有人使用MDB Atlas && sailsjs吗?(我想重构我的应用程序,但它开始是huuge,似乎不可能使用"mongodb"适配器)
版本: - 节点:6.3.1 - npm:3.10.6 - mongo(shell):3.4.2 - sails-mongo npm模块:sails-mongo@0.12.2
atlas ×10
numpy ×4
python ×4
blas ×2
openblas ×2
.net ×1
autofac ×1
c ×1
cappuccino ×1
cblas ×1
css ×1
fedora ×1
installation ×1
lapack ×1
linux ×1
mongodb ×1
opensuse ×1
performance ×1
quartz.net ×1
r ×1
redhat ×1
sails-mongo ×1
sails.js ×1
scikit-learn ×1