龙之谷为什么一直报错会runtest报错

安卓单元测试错误Test run failed: Unable to find instrumentation target package解决办法 - 推酷
安卓单元测试错误Test run failed: Unable to find instrumentation target package解决办法
写好了数据库的代码,进行单元测试
FriendInfoDAOTest.java
package com.example.sqlite.
import java.util.L
import com.example.sqlite.dao.FriendInfoDAO;
import com.example.sqlite.model.FriendI
import android.test.AndroidTestC
import android.util.L
public class FriendInfoDAOTest extends AndroidTestCase
private final static String TAG=&FriendInfoDAOTest&;
public void testAdd()
FriendInfoDAO FriendInfoDAO=new FriendInfoDAO(this.getContext());
FriendInfo FriendInfo=new FriendInfo(001,&GuGuTian&,&男生&,&代码&,&&,&sd/images&);
FriendInfoDAO.add(FriendInfo);
Log.i(TAG, &add successed&);
public void testUpdate()
FriendInfoDAO FriendInfoDAO=new FriendInfoDAO(this.getContext());
FriendInfo FriendInfo=FriendInfoDAO.find(1);
FriendInfo.setNickname(&xing&);
FriendInfoDAO.update(FriendInfo);
Log.i(TAG, &update successed&);
public void testFind()
FriendInfoDAO FriendInfoDAO=new FriendInfoDAO(this.getContext());
FriendInfo FriendInfo=FriendInfoDAO.find(1);
if (null==FriendInfo)
Log.i(TAG, &not find&);
Log.i(TAG, FriendInfo.toString());
public void testDetele()
FriendInfoDAO FriendInfoDAO=new FriendInfoDAO(this.getContext());
FriendInfoDAO.delete(1,2,3);
Log.i(TAG, &delete successed&);
public void testGetScrollData()
FriendInfoDAO FriendInfoDAO=new FriendInfoDAO(this.getContext());
List&FriendInfo& FriendInfos=FriendInfoDAO.getScrollData(0, 1);
for (FriendInfo FriendInfo : FriendInfos)
Log.i(TAG, FriendInfo.toString());
public void testGetCount()
FriendInfoDAO FriendInfoDAO=new FriendInfoDAO(this.getContext());
Long count=FriendInfoDAO.getCount();
Log.i(TAG, &&+count);
发现有这个错误:
AndroidManifest.xml
&?xml version=&1.0& encoding=&utf-8&?&
&manifest xmlns:android=&/apk/res/android&
package=&com.example.test_intent&
android:versionCode=&1&
android:versionName=&1.0& &
android:minSdkVersion=&8&
android:targetSdkVersion=&17& /&
&uses-permission android:name=&android.permission.READ_CONTACTS& /&
&application
android:allowBackup=&true&
android:icon=&@drawable/ic_launcher&
android:label=&@string/app_name&
android:theme=&@style/AppTheme& &
&uses-library android:name=&android.test.runner&/&
android:name=&com.example.test_intent.MainActivity&
android:label=&@string/app_name& &
&intent-filter&
&action android:name=&android.intent.action.MAIN& /&
&category android:name=&android.intent.category.LAUNCHER& /&
&/intent-filter&
&/activity&
android:name=&com.example.test_intent.login&
android:label=&@string/sec_string&
&&/activity&
android:name=&com.example.test_intent.Friend&
android:label=&@string/my_friend&
android:logo=&@drawable/search_icon&
&&/activity&
android:name=&com.example.test_intent.FriendSearch&
&&/activity&
&/application&
&instrumentation android:name=&android.test.InstrumentationTestRunner&
android:targetPackage=&com.example.sqlite.activity&
android:label=&Test My App&&&/instrumentation&
&/manifest&
原因:是因为
&manifest xmlns:android=&/apk/res/android&
package=&com.example.test_intent&
的package的名字com.example.test_intent与
&instrumentation android:name=&android.test.InstrumentationTestRunner&
android:targetPackage=&com.example.sqlite.activity&
的targetPackage的名字com.example.sqlite.activity不同的缘故
解决办法:把两者名字改为一样即可。一般把后者改为与前者相同,这样可以不必改变程序的主入口。
已发表评论数()
&&登&&&录&&
已收藏到推刊!
请填写推刊名
描述不能大于100个字符!
权限设置: 公开
仅自己可见在跑CTS的时候,报错,求指教
[问题点数:40分]
在跑CTS的时候,报错,求指教
[问题点数:40分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
2015年8月 移动开发大版内专家分月排行榜第三2014年9月 移动开发大版内专家分月排行榜第三2014年7月 移动开发大版内专家分月排行榜第三
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。15728人阅读
准备部分:
什么是redis?
Redis是REmote DIctionary Server的缩写。一个非关系型数据库
为什么要用redis?
1, 因为redis快,Redis is pretty fast!, 110000 SETs/second, 81000 GETs/second
2, 省去了复杂的SQL。
3, 可以省去memcache了。
下载redis:
可以在redis的官网下载 :
也可以去谷歌的code下载:
谷歌code是一个版本列表,在列表里找出你想要安装的redis版本。这里我选择安装的是最新的2.0.4稳定版: redis-2.0.4.tar.gz
(在2.0以上版本中,增加了VM(Virtual Memory)特性,使我们不必再为那些不会被使用,而加载到内存的冷数据买单。但是,最新的消息是,有可能把VM也拿掉,采用diskstore模型)
当然也可以用wget命令:
wget /files/redis-2.0.4.tar.gz
安装redis:
下面按照官方维基的方法进行编译(详见)
tar xvzf redis-2.0.4.tar.gz
cd redis-2.0.4
为什么没用标准的Linux安装三板斧呢?官方维基是这样说的:Redis can run just fine without a configuration file (when executed without a config file a standard configuration is used). With the
Redis will log to the standard output so you can check what happens. Later, you can.
也可以make install,这样就是把可运行文件复制到/usr/local/bin里而已。
make之后,会出现一句提示:
Hint: To run 'make test')&
其实不测试,一般都可以用。但是既然人家建议了,咱们就走一下make test吧。
运行#make test
报错,提示没有You need 'tclsh8.5' in order to run the Redis test
然后到Tcl的官方网站下载8.5版本
然后安装tcl8.5:
(configure和make的位置比较特殊,在安装目录的unix下,所以下面是tcl官方安装法)
#tar xvzf tcl8.5.12-src.tar.gz
#cd tcl8.5.13/unix/
#./configure
#make test
#make install
注:当然,也可以简单一点,用 yum install tcl 来安装。
好了,安装好tcl之后,可以去redis目录下运行make test了,这次正常跑通。提示:
\o/ All tests passed without errors!
Cleanup: may take some time... OK
说明redis安装正常。可以运行。
简单配置一下redis:
在运行redis前,我们要配置一下。redis的配置文件在你的安装目录里。名为:redis.conf。
简单说几点redis.conf:
redis默认不是用守护进程的,如果需要更改,把daemonize no改成daemonize yes。(测试的时候可以不改,看看打印信息。)
如果对redis默认6379端口不爽的,可以更改port 6379
如果想把数据文件放到一个指定文件夹,更改dir /opt/data/
默认是dir ./ 也就是默认放到安装目录下。
连接超时时间,timeout 300,没什么改头……
dir 是数据文件路径。默认在安装目录下。
*下面的配置二选一,详见本文注释部分2。
###### SNAPSHOTTING ######内存快照方式:
默认的内存快照策略是,
在900秒(15分钟)内,至少有1次数据变更;
或者300秒内,有至少10次数据变更;
或者60秒内,有至少1000次数据变更;时间+数据变更次数,共同影响内存快照的出现。
###### APPEND ONLY MODE ###### AOF方式
appendfsync everysec 每秒同步。这里可以注释掉,打开下面的选项appendfsync no
其余的配置,conf里面的注释写的挺清楚,我就不多废话了。大家看着自己配就行了。
运行redis:
2.2.7版本,redis-server被放到了src文件夹下,要这么运行:
在安装目录下# cd src
#./redis-server ./../redis.conf
2.0.4以前的老版本,运行很简单,在安装目录下:
#./redis-server
就可以了。如果没有更改daemonize no配置,会看见运行的信息。好,现在redis运行起来了!
▲redis的默认端口号是6379,(据redis的作者antirez的博文说,6379在是手机按键上MERZ对应的号码,而MERZ取自意大利歌女Alessia Merz的名字。而MERZ长期以来被antirez及其朋友当作愚蠢的代名词。)
▲Redis有两种存储方式,默认是snapshot方式,实现方法是定时将内存的快照(snapshot)持久化到硬盘,这种方法缺点是持久化之后如果出现crash则会丢失一段数据。因此在完美主义者的推动下作者增加了aof方式。aof即append only mode,在写入内存数据的同时将操作命令保存到日志文件。
nosql发烧友集散地:
redis认识的几个误区:
版权声明:本文为博主原创文章,未经博主允许不得转载。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:916962次
积分:8612
积分:8612
排名:第1057名
原创:133篇
评论:230条
(3)(1)(3)(1)(4)(1)(4)(3)(3)(4)(7)(4)(5)(2)(6)(2)(2)(5)(2)(7)(12)(1)(2)(3)(2)(1)(1)(8)(3)(9)(2)(3)(1)(2)(3)(4)(4)(2)(4)(2)(2)(3)caffe make runtest error(core dumped)Check failed: status
6 tests from CuDNNConvolutionLayerTest/1, where TypeParam = double[ RUN ] CuDNNConvolutionLayerTest/1.TestSimpleConvolutionGroupCuDNNF:30.08
=================================================================
简单讲就是GPU的加速性能不够,CUDNN只支持CUDA Capability 3.0以上的GPU加速
==================================================================
在实验室台式机上(I7+GeForce GTX TITAN Black With CUDA CAPABILITY 3.5)成功配置caffe并测试数据无误、训练数据也开始以后,也打算笔记本上(I5+GEFORCE GT540M--With CUDA CAPABILITY 2.1)配上caffe.
于是安装了cuda和cudnn加速,make和make test都过了,而make runtest时报错,大概是这样滴错误
&pre name=&code& class=&plain&&[----------] 6 tests from CuDNNConvolutionLayerTest/1, where TypeParam = double
] CuDNNConvolutionLayerTest/1.TestSimpleConvolutionGroupCuDNN
F:30.68 cudnn_conv_layer.cpp:30] Check failed: status == CUDNN_STATUS_SUCCESS (6 vs. 0)
CUDNN_STATUS_ARCH_MISMATCH
*** Check failure stack trace: ***
0x2b082d0a8daa
0x2b082d0a8ce4
0x2b082d0a86e6
0x2b082d0ab687
caffe::CuDNNConvolutionLayer&&::LayerSetUp()
caffe::Layer&&::SetUp()
caffe::CuDNNConvolutionLayerTest_TestSimpleConvolutionGroupCuDNN_Test&&::TestBody()
testing::internal::HandleExceptionsInMethodIfSupported&&()
testing::Test::Run()
testing::TestInfo::Run()
testing::TestCase::Run()
testing::internal::UnitTestImpl::RunAllTests()
testing::UnitTest::Run()
make: *** [runtest] Aborted (core dumped) caffe::NetTest_TestReshape_Test&&::TestBody()
testing::internal::HandleExceptionsInMethodIfSupported&&()
testing::Test::Run()
testing::TestInfo::Run()
testing::TestCase::Run()
testing::internal::UnitTestImpl::RunAllTests()
testing::UnitTest::Run()
0x2b2a9f778ec5
make: *** [runtest] Aborted (core dumped)
在内网找了半天无果,终于在墙外找到了解决办法,不,是问题所在。因为笔记本上的GT540M的CUDA Capability是2.1,而官方的cudnn加速是不支持3.0以下的版本的,因此只能在Makefile.config中注释掉USE_CUDNN这行,重新执行以下
make clean
make all -j4
make test -j4
make runtest -j4
最后除了make runtest中2 DISABLED TESTS之外,,没有其他问题。make runtest中出现几个测试例子不过不影响使用。
你最喜欢的& 相关文章 &
caffe make runtest error(core dumped)Check failed: status == CUDNN_STATUS_SUCCESS (6 vs. 0)
TypeParam = double
] CuDNNConvolutionLayerTest/1.TestSimpleConvolutionGroupCuDNN
F:30.68 cudnn_conv_layer.cpp:30] Check failed: status == CUDNN_STATUS_SUCCESS (6 vs. 0)
CUDNN_STATUS_ARCH_MISMATCH
*** Check failure stack
caffe卷积神经网络框架安装
在makefile中有
MKL_LIB_DIR := $(MKL_DIR)/lib $(MKL_DIR)/lib/intel64
把intel64改为ia32,因为我电脑的libmkl_rt.so在/opt/intel/mkl/lib/ia32下。
然后执行make test,没事。
继续执行 make runtest,有很多输出了。
不过出现了
*** Check failure stack trace: ***
make: *** [runtest] 已放弃 (core dumped)
据网上说是段错误。估计是caffe代码有bug。
目前为止,总算算是安装成功了。
接下来就是解决上面的bug了。
Install the new caffe with support cuDNN library
the boost-1.53 by source code), then this error gone. So I successfully finished the make test, but when I try make runtest, another error occurs!
Its say cudnn not initilize, this confusing me.
Luckly I heard some suggestions from the caffe user group
文件,修改“BLAS := mkl”, 修改Makefile文件,将BLAS ?= atlas修改为BLAS ?= mkl,不然后面编译会报错(如下面红色字体部分)。
make runtest /usr/bin/g++ src/caffe/solver.cpp -pthread -fPIC -DNDEBUG -O2 -I/usr/local/include/python2.7 -I/usr/local/lib/python2.7
在Ubuntu 14.04 上安装Caffe碰到的问题
。我这样作会不会太暴力了,但幸运的是,这样make all就通过了。 七、Boost安装 接下来顺利执行了make all,make test,以为make runtest也可以顺利通过了,然后就可以收拾下回寝室回家了,可是可是,它还是错了。 错误提示: [ PASSED ] 832 tests.
[ FAILED ] 6 tests, listed below:
[ FAILED ] PowerLayerTest/0.TestPowerGradientShiftZero, where
Ubuntu14.04 Caffe安装
//usr/lib/x86_64-linux-gnu/libvorbis.so.0:对‘__acosf_finite@GLIBC_2.15’未定义的引用 解决方法:如果你装了anaconda包的话,删除anaconda/lib/下面的 libm sudo rm -rf libm* 最后编译成功,哈哈。 make all make test 最后一步 make runtest 有错误 .build_release/test/test_all.testbin 0 --gtest_shuffle
Caffe 编译安装
make runtest
编译的时候如果要引入cuDNN加速,你需要在文件Makefile.config中解注释USE_CUDNN := 1。 如果你的电脑上没有 GPU,你应该使用CPU-only模式的Caffe,请在文件Makefile.config中解注释CPU_ONLY := 1 。 要编译 Python 和 MATLAB 包,请独立的执行make pycaffe和make matcaffe . 请务必首先在Makefile.config中配置你的MATLAB 和 Python路径
。 在anaconda官网下载.sh文件,执行,最后添加bin目录到环境变量即可。 7. 编译Caffe 进入caffe根目录, 首先复制一份Makefile.config cp Makefile.config.example Makefile.config 编译: make all make test make runtest 在make时可能会出现error: “src/caffe/util/math_functions.cu(140): error: calling a host function("std
粗略 ubuntu下配置caffe
make all make test make runtest 到此处caffe的安装工作已完成。下面是安装python wrapper的过程(optional) 切换到 caffe/python,选用豆瓣的源: 1. pip install numpy (如果跳过这一步,后面会出错,我猜是requirements.txt中package顺序的问题) 2. pip install -r /path/to/caffe/python/requirements.txt
链接地址 3. 切换到 caffe的根目录然后 make pycaffe
caffe+Ubuntu14.0.4 64bit 环境配置说明(无CUDA,caffe在CPU下运行)
模式,打开此选项则可以在eclipse或者NSight中debug程序
完成上述设置后,开始编译:
make all -j4
make runtest
注意:-j4 是指使用几个线程来同时编译,可以加快速度,j后面的数字可以根据CPU core的个数来决定,如果CPU是4核的,则参数为-j4,也可以不添加这个参数,直接使用“make all”,这样速度可能会慢一点儿。 6.使用MNIST数据集进行测试
Caffe默认情况会安装在
can help you make sense out of those obscure core dumps. We'll look at one of the most simple problem analysis available, backtracing. This article is filed under the Linux section, but it's equally applicable to any other platform on which you have
./libcxxtest.a 然后直接make,但此时会报编译错误,诸如: ./cxxtest/Descriptions.cpp:18: error: ‘numberToString’ was not declared in this scope ./cxxtest/LinkedList.cpp:9: error: ‘RealSuiteDescription’ has not been declared 需要对Root.cpp稍作改动,有两种方式: 一是Roo.cpp的#include所有其他.cpp
Caffe + Ubuntu 14.04 64bit + CUDA 6.5 配置说明
make runtest 注意 -j4 是指使用几个线程来同时编译, 可以加快速度, j后面的数字可以根据CPU core的个数来决定, 我的CPU使4核, 所以-j4. 然后去尿个尿,喝杯茶, 回来就差不多编译好了.. 9.1. 编译Matlab wrapper 执行如下命令 make matcaffe 然后就可以跑官方的matlab demo啦。 9.2. 编译Python wrapper
make pycaffe 然后基本就全部安装完拉. 接下来大家尽情地跑demo吧~
make runtest 注意 -j4 是指使用几个线程来同时编译, 可以加快速度, j后面的数字可以根据CPU core的个数来决定, 我的CPU使4核, 所以-j4. 8.2 编译Matlab wrapper 执行如下命令 make matcaffe 然后就可以跑官方的matlab demo啦。 8.3 编译Python wrapper
make pycaffe 然后基本就全部安装完拉. 接下来大家尽情地跑demo吧~
[root@localhost lyl]# make install [root@localhost build]# make 问题: omp.c:9714: error: implicit declaration of function ‘g_utf8_substring’ 将g_utf8_substring(text, 0, 60)替换为g_strndup(text, 60); [root@localhost build]# make install ——————/安装
坑爹的Caffe + Ubuntu14.04 + NVIDIA 环境配置
取到某个路径 然后再开始编译 cp Makefile.config.example
Mkefile.config make all -j8 make test -j8 make runtest -j8 (有时候,如果环境变量和共享库那一步没做好,runtest的时候会报错,是cudart找不到文件,各种查都不知道为什么,最后用了个博客的做法) (sudo ldconfig /usr/local/cuda-6.5/bin) 实验跑一个MNIST 下载MNIST数据库,放在caffe/data
Caffe + Ubuntu 14.04 64bit + CUDA 6.5 配置说明
MATLAB wrapper的同学需要指定matlab的安装路径, 如我的路径为 /usr/local/MATLAB/R2013b (注意该目录下需要包含bin文件夹,bin文件夹里应该包含mex二进制程序) DEBUG 是否使用debug模式,打开此选项则可以在eclipse或者NSight中debug程序 完成设置后, 开始编译 make all -j4
make runtest 注意 -j4 是指使用几个线程来同时编译, 可以加快速度, j后面的数字可以根据CPU core的个
Core Dump解析
%e_%s" &/proc/sys/kernel/core_pattern [root@yyy]# ./test Segmentation fault (core dumped) [root@yyy]# ls core.2890 core_test_11.2898 libmylib.so main.c Makefile mylib.c mylib.h test 6)调试 [root@yyy]# gdb test core.2890 GNU gdb Red Hat Linux
linux 执行 iptables 命令出错 segmentation fault (core dumped) 的解决
linux 执行 iptables 命令出错: segmentation fault (core dumped) systemctl status iptables.service
出错 code=dumped signal=SEGV 现象: 一台机器被强制手动关闭了,重新启动后,防火墙(iptables)不能启动,系统启动日志 /var/log/boot.log 中出现如下错误: failed to start ipv4 firewall with iptables failed
在SRTP目录下运行: make runtest 出现: [runtest] Error 254
解决方法: 在test目录下修改rtpw_test.sh 中line 7 : RTPW=rtpw 改为: RTPW=./rtpw line 21:
killall rtpw 2&&/dev/null 改为: killall rtpw 2&/dev/null
参考:链接地址 在执行: make progdocs 出现: /bin/bash: line 1: doxygen: command
& 2012 - 2014 &
&All Rights Reserved. &

我要回帖

更多关于 caffe runtest 的文章

 

随机推荐