Skip to content

Commit 7144dc1

Browse files
authored
Merge pull request #13 from a-roberts/patch-10
Add comment to help users run with prebuilt Spark
2 parents 10bdb70 + db28a5c commit 7144dc1

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

als/runALS.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/bin/bash
22

3-
# Runs the MovieLensALS application with netflix data, this script
4-
# allows us to easily modify GPU usage
3+
# Runs the MovieLensALS application using a given file, this script
4+
# allows us to easily control GPU usage
55

6-
# Check input arguments, we want five and cpu or gpu specified
7-
# the input format is the same as it is for the MovieLens example
8-
# except with the addition of the cpu/gpu parameter and the file name to use
9-
# arg 1 = execution method e.g. cpu or gpu
6+
# Note that you should change the spark-submit command if you're working with a prebuilt distribution of Spark
7+
# e.g. use $SPARK_HOME/examples/jars/spark-examples*.jar and $SPARK_HOME/examples/jars/scopt*.jar
8+
9+
# The input format is the same as it is for the MovieLens example
10+
# except with the addition of the CPU/GPU parameter and the file name to use
11+
# arg 1 = execution method e.g. CPU or GPU
1012
# arg 2 = master e.g. local[*] or spark://foo.com:7077
1113
# arg 3 = rank e.g. 100
1214
# arg 4 = numIterations e.g. 10
@@ -22,11 +24,12 @@ fi
2224
gpu=""
2325
if [ "$1" = "gpu" ]; then
2426
gpu="--conf spark.mllib.ALS.useGPU=$SPARK_HOME/../CUDA-MLlib/als/libGPUALS.so"
25-
echo "Using gpu library: $gpu"
27+
echo "Using GPU library: $gpu"
2628
fi
2729

2830
# For the netflix sample data we know ideal parameters are
2931
# rank 100, numIterations 10, lambda 0.058
32+
3033
$SPARK_HOME/bin/spark-submit --class org.apache.spark.examples.mllib.MovieLensALS $gpu \
3134
--master $2 \
3235
--jars $SPARK_HOME/examples/target/scala-2.11/jars/spark-examples*.jar \

0 commit comments

Comments
 (0)