首页 \ 问答 \ 在Scala交互式shell中执行时定时MLlib算法(Timing MLlib algorithms when executed in Scala interactive shell)

在Scala交互式shell中执行时定时MLlib算法(Timing MLlib algorithms when executed in Scala interactive shell)

我正在使用Spark的Scala(交互式)Shell来测试MLlib算法,例如奇异值分解(SVD),将它们应用于不同大小的数据集。 有没有办法找出在Shell中执行算法时执行多长时间?


I am using Spark’s Scala (interactive) Shell to experiment with MLlib algorithms, e.g. singular value decomposition (SVD), by applying them to different size datasets. Is there a way to find out how long the execution of an algorithm takes when it is executed in the Shell?


原文:https://stackoverflow.com/questions/27125639
更新时间:2023-08-26 14:08

最满意答案

gcc告诉你问题是什么:它找不到你指定的包含文件。

这不是图书馆的问题。

您需要先从.y文件创建该文件

bison --debug --verbose -d ifanw.y

您可能会发现这个小教程很有用。

如果你没有.y文件,那么你正在尝试编译一个不完整的包,那就是不行。 你必须以某种方式从你已经拥有的文件的任何地方获取丢失的文件。


gcc is telling you what the trouble is: it cannot find the include file you specified.

It's not a problem of libraries.

You need to create that file from your .y file first

bison --debug --verbose -d ifanw.y

You might find this small tutorial useful.

If you do not have the .y file, then you're trying to compile an incomplete package, and that just won't work. You will have to somehow obtain the missing files from wherever you got the files you already have.

相关问答

更多
  • 主要问题 Lex(Flex)分析仪中只能有两个%%行。 ...definitions... %% ...lexical patterns... %% ...everything else... 程序Lex和Flex只是将第二个%%逐字的文件内容复制到生成的C代码中。 而C在任何时候都不喜欢%% 。 鸡蛋里挑骨头 你不应该像你想要的那样将函数嵌套在彼此中: int main(){ void showToken(char* name){ printf("<%s,%s>",name,yytext ...
  • gcc告诉你问题是什么:它找不到你指定的包含文件。 这不是图书馆的问题。 您需要先从.y文件创建该文件 bison --debug --verbose -d ifanw.y 您可能会发现这个小教程很有用。 如果你没有.y文件,那么你正在尝试编译一个不完整的包,那就是不行。 你必须以某种方式从你已经拥有的文件的任何地方获取丢失的文件。 gcc is telling you what the trouble is: it cannot find the include file you specified. ...
  • 一个起点是 LEX = lex .l.c: $(LEX) -t $< >$@ .c.o: $(CC) -o $@ -c $< lexy: lexical.o $(CC) -o $@ $^ -ll 这需要通过clean规则,依赖关系跟踪等进行扩展,但我认为您应该能够了解Makefile的工作原理。 A starting point would be LEX = lex .l.c: $(LEX) -t $< >$@ .c.o: ...
  • 我喜欢LLVM教程 - 首先介绍一种叫做Kaleidoscope的玩具语言的手写词法分析器,首先是一个“文字编程”练习,每个位都有很好的文本解释; 它继续构建一个以相同样式构建抽象语法树的解析器; 然后整个事情(400行手写的独立C ++ for lexer,parser和AST builder)再次显示为一个完整的.cpp源文件,因此您不必自己将它们全部放在一起。 以下章节展示了代码生成,JIT,优化......真正有用的小教程! 但是,你可以停止使用词法分析器,如果这是你现在想要了解的全部内容;-)。 ...
  • 在你耗尽所有输入之前,我不认为你正在退出第一个循环。 c永远不会更新(除非在else if中, else if从未调用过)。 在程序结束时, c仍然等于'4' 。 作为解决方案的一般途径,您应该检查peek()的值是否为可接受的值。 这样,如果是,你调用cl.read() ,如果不是,你的数字就结束了。 I don't think you are exiting the first loop until you have exhausted all input. c is never updated (ex ...
  • 尝试改变 seps[15]=" \t\n,;(){}[]#\"<>" 至 seps[16]=" \t\n,;(){}[]#\"<>" 也尝试改变 main() 至 int main() 也许改变 exit(0); 至 return 0; Try changing seps[15]=" \t\n,;(){}[]#\"<>" to seps[16]=" \t\n,;(){}[]#\"<>" Also try changing main() to int main() And maybe ch ...
  • 事实证明,我的Mac OS X Mavericks上的gcc编译器与我通过ssh在线访问的GNU gcc编译器有不同的行为。 本地编译器忽略了在线编译器生成的错误,以及具有与GNU gcc无关的本地错误。 因此,部分问题是我的困惑。 事实证明这是正确的代码: "FUNC" {RETURN(FUNC);} "START" {RETURN(START);} "PRINT" {RETURN(PRINT);} . { RETURN( yytext[0] ); } I ...
  • 您的文件包含: ” 而你的词法分析器寻找: “ 这些是截然不同的 Your file contains: ” whereas your lexer looks for: " These are distinct.
  • 有趣的是,Qt如何演变成一个全罗盘框架,使得使用它的程序员相信任何有用的东西都必须以字母Q开头。非常有点网络。 Qt只是一个在该语言之上运行的类库,它不排除使用日常库来完成工作。 特别是当这是一个与呈现用户界面几乎没有关系的库时,Qt的工作做得很好。 有许多库可以很好地进行词法分析和解析。 首先是Lex和Yacc,Flex和Bison,等等。 你只需要Qt启用它来获取错误消息,他们很乐意支持它。 It is kinda interesting how Qt has evolved into an all-c ...
  • 我会尝试看一下那些更好的源代码。 我过去使用过Sablecc 。 如果您转到此页面,描述如何设置您的环境,则可以找到指向其源代码的链接 。 Antlr也是一个非常常用的。 这是它的源代码。 此外, 龙书真的很棒。 正如SK-logic建议的那样,我将现代编译器实现添加为另一种选择。 I would try taking a look at the source code for some of the better ones out there. I have used Sablecc in the pas ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)