Re: sbt/sbt run command returns a JVM problem

2014-09-23 Thread christy
thanks very much, seems working...



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p14870.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org



RE: sbt/sbt run command returns a JVM problem

2014-05-05 Thread Carter
hi I still have over 1g left for my program.

Date: Sun, 4 May 2014 19:14:30 -0700
From: ml-node+s1001560n5340...@n3.nabble.com
To: gyz...@hotmail.com
Subject: Re: sbt/sbt run command returns a JVM problem



the total memory of your machine is 2G right?then how much memory is 
left free? wouldn`t ubuntu take up quite a big portion of 2G?
just a guess!


On Sat, May 3, 2014 at 8:15 PM, Carter [hidden email] wrote:

Hi, thanks for all your help.

I tried your setting in the sbt file, but the problem is still there.



The Java setting in my sbt file is:

java \

  -Xmx1200m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=256m \

  -jar ${JAR} \

  $@



I have tried to set these 3 parameters bigger and smaller, but nothing

works. Did I change the right thing?



Thank you very much.







--

View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5267.html


Sent from the Apache Spark User List mailing list archive at Nabble.com.














If you reply to this email, your message will be added to the 
discussion below:

http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5340.html



To unsubscribe from sbt/sbt run command returns a JVM 
problem, click here.

NAML
  



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5412.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Re: sbt/sbt run command returns a JVM problem

2014-05-04 Thread Carter
 to download sbt locally to ${JAR} failed. Please
install sbt manually from http://www.scala-sbt.org/\n;
  exit -1
fi
printf Launching sbt from ${JAR}\n
java \
  -Xmx1200m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=256m \
  -jar ${JAR} \
  $@


Thank you very much.



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5306.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.


Re: sbt/sbt run command returns a JVM problem

2014-05-04 Thread phoenix bai
the total memory of your machine is 2G right?
then how much memory is left free? wouldn`t ubuntu take up quite a big
portion of 2G?

just a guess!


On Sat, May 3, 2014 at 8:15 PM, Carter gyz...@hotmail.com wrote:

 Hi, thanks for all your help.
 I tried your setting in the sbt file, but the problem is still there.

 The Java setting in my sbt file is:
 java \
   -Xmx1200m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=256m \
   -jar ${JAR} \
   $@

 I have tried to set these 3 parameters bigger and smaller, but nothing
 works. Did I change the right thing?

 Thank you very much.



 --
 View this message in context:
 http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5267.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.



Re: sbt/sbt run command returns a JVM problem

2014-05-03 Thread Carter
Hi, thanks for all your help.
I tried your setting in the sbt file, but the problem is still there.

The Java setting in my sbt file is:
java \
  -Xmx1200m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=256m \
  -jar ${JAR} \
  $@

I have tried to set these 3 parameters bigger and smaller, but nothing
works. Did I change the right thing?

Thank you very much.



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5267.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.


Re: sbt/sbt run command returns a JVM problem

2014-05-03 Thread Michael Armbrust
The problem is probably not with the JVM running sbt but with the one that
sbt is forking to run your program.

See here for the relevant option:
https://github.com/apache/spark/blob/master/project/SparkBuild.scala#L186

You might try starting sbt with no arguments (to bring up the sbt console).
 You can then set javaOptions += -Xmx1G and afterwards try run.

Michael


On Sat, May 3, 2014 at 5:15 AM, Carter gyz...@hotmail.com wrote:

 Hi, thanks for all your help.
 I tried your setting in the sbt file, but the problem is still there.

 The Java setting in my sbt file is:
 java \
   -Xmx1200m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=256m \
   -jar ${JAR} \
   $@

 I have tried to set these 3 parameters bigger and smaller, but nothing
 works. Did I change the right thing?

 Thank you very much.



 --
 View this message in context:
 http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5267.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.



Re: sbt/sbt run command returns a JVM problem

2014-05-03 Thread Carter
Hi Michael,

Thank you very much for your reply.

Sorry I am not very familiar with sbt. Could you tell me where to set the
Java option for the sbt fork for my program? I brought up the sbt console,
and run set javaOptions += -Xmx1G in it, but it returned an error: 
[error] scala.tools.nsc.MissingRequirementError: object scala not found.
[error] Use 'last' for the full log.

Is this the right way to set the java option? Thank you very much.



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157p5294.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.


sbt/sbt run command returns a JVM problem

2014-05-01 Thread Carter
Hi, I have a very simple spark program written in Scala:
/*** testApp.scala ***/
object testApp {
  def main(args: Array[String]) {
println(Hello! World!)
  }
}
Then I use the following command to compile it:
$ sbt/sbt package
The compilation finished successfully and I got a JAR file.
But when I use this command to run it:
$ sbt/sbt run
it returned an error with JVM:
[info] Error occurred during initialization of VM 
[info] Could not reserve enough space for object heap 
[error] Error: Could not create the Java Virtual Machine. 
[error] Error: A fatal exception has occurred. Program will exit. 
java.lang.RuntimeException: Nonzero exit code returned from runner: 1   
at scala.sys.package$.error(package.scala:27)

My machine has 2G memory, and runs on Ubuntu 11.04. I also tried to change
the setting of java parameter (e.g.,  -Xmx, -Xms, -XX:MaxPermSize,
-XX:ReservedCodeCacheSize) in the file sbt/sbt, but it looks like non of the
change works. Can anyone help me out with this problem? Thank you very much.



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.


Re: sbt/sbt run command returns a JVM problem

2014-05-01 Thread Sean Owen
Here's how I configure SBT, which I think is the usual way:

export SBT_OPTS=-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -Xmx1g

See if that takes. But your error is that you're already asking for
too much memory for your machine. So maybe you are setting the value
successfully, but it's not valid. How big?


On Thu, May 1, 2014 at 2:57 PM, Chester Chen chesterxgc...@yahoo.com wrote:
 You might want to check the memory settings in sbt itself, which its a shell 
 scripts run a java command. I don't have computer at hand, but if you vim or 
 cat the sbt/sbt , you might see the memory settings , you change it to fit 
 your need

 You might also can overwrite the setting by change .sbtopts  without change 
 the script , but google it for sure.

 Chester

 Sent from my iPhone

 On May 1, 2014, at 6:47 AM, Carter gyz...@hotmail.com wrote:

 Hi, I have a very simple spark program written in Scala:
 /*** testApp.scala ***/
 object testApp {
  def main(args: Array[String]) {
println(Hello! World!)
  }
 }
 Then I use the following command to compile it:
 $ sbt/sbt package
 The compilation finished successfully and I got a JAR file.
 But when I use this command to run it:
 $ sbt/sbt run
 it returned an error with JVM:
 [info] Error occurred during initialization of VM
 [info] Could not reserve enough space for object heap
 [error] Error: Could not create the Java Virtual Machine.
 [error] Error: A fatal exception has occurred. Program will exit.
 java.lang.RuntimeException: Nonzero exit code returned from runner: 1
 at scala.sys.package$.error(package.scala:27)

 My machine has 2G memory, and runs on Ubuntu 11.04. I also tried to change
 the setting of java parameter (e.g.,  -Xmx, -Xms, -XX:MaxPermSize,
 -XX:ReservedCodeCacheSize) in the file sbt/sbt, but it looks like non of the
 change works. Can anyone help me out with this problem? Thank you very much.



 --
 View this message in context: 
 http://apache-spark-user-list.1001560.n3.nabble.com/sbt-sbt-run-command-returns-a-JVM-problem-tp5157.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.