- get the code displaying which version is installed
- update the doc since my first compilation attempt failed, so
document the trap that got me stuck
bash patches/make/link-patch-dirs.sh sources patches
# Test wether the previous command worked with
ls -i patches/hotspot/series sources/hotspot/.hg/patches/series
bash patches/make/link-patch-dirs.sh sources patches
# Test wether the previous command worked with
ls -i patches/hotspot/series sources/hotspot/.hg/patches/series
-# It should display something like the following. Note that both file
-# share the same inode number.
+# It should display something like the following.
+# (note that both file share the same inode number)
# 9707849 patches/hotspot/series
# 9707849 sources/hotspot/.hg/patches/series
# 9707849 patches/hotspot/series
# 9707849 sources/hotspot/.hg/patches/series
-# Specify what to compile. If this does not work, edit patches/make/Makefile and add coro-simple to GLOBAL_GUARSD
+# Specify what to compile.
export davinci=$(pwd) guards="buildable testable coro-simple"
# Apply the patches
sh patches/make/each-patch-repo.sh hg qselect --reapply $guards '$(sh $davinci/patches/make/current-release.sh)'
export davinci=$(pwd) guards="buildable testable coro-simple"
# Apply the patches
sh patches/make/each-patch-repo.sh hg qselect --reapply $guards '$(sh $davinci/patches/make/current-release.sh)'
+# Check that it understood that you want the patch applied:
+grep GLOBAL_GUARDS patches/make/* -r
+# this should display something like the following (maybe amonst other unrelated lines)
+# GLOBAL_GUARDS=buildable testable coro-simple
+# If this does not work, edit patches/make/Makefile,
+# manually coro-simple to GLOBAL_GUARDS and then
+# rerun the patches/make/each-patch-repo.sh script as earlier
+
+
+# Finish the setup
+(cd patches/make; make setup && make force && make && make FORCE_VERSIONS=1 && echo "Sources are properly setup")
+# If this last command failed, check your mercurial config within ~/.hgrc (see above)
\endverbatim
-# Compile it all
\verbatim
\endverbatim
-# Compile it all
\verbatim
-# Prepare the sources
-(cd patches/make; make setup && make force && make && make FORCE_VERSIONS=1 && echo "Sources are properly setup")
-# If the previous command failed, check your mercurial config within ~/.hgrc (see above)
-
unset LD_LIBRARY_PATH
export ALT_BOOTDIR=/usr/lib/jvm/java-7-openjdk-amd64/
unset LD_LIBRARY_PATH
export ALT_BOOTDIR=/usr/lib/jvm/java-7-openjdk-amd64/
# Check that everything is fine
make sanity
# Check that everything is fine
make sanity
+# Go for it (it takes about half an hour on my machine)
+
+# Check that the coroutine library got compiled in
+ls sources/build/linux-amd64/classes/java/dyn/
+# This should display a bunch of class files. If not, something went wrong, you need to investigate further
\endverbatim
\subsection bindings_java_coro_use Using coroutine contexts
\endverbatim
\subsection bindings_java_coro_use Using coroutine contexts
SimGrid Java will automatically switch to the coroutine context
factory if your JVM support it, so you will just need to execute your
simulation with the correct JVM. The selected context factory gets
SimGrid Java will automatically switch to the coroutine context
factory if your JVM support it, so you will just need to execute your
simulation with the correct JVM. The selected context factory gets
-displayed when enabling the verbose logs of jmsg
-(--log=jmsg.thres:verbose in the following).
+displayed automatically.
-$ $PATH_TO_COROUTINE_JVM/java -cp .:../simgrid.jar --log=jmsg.thres:verbose basic/BasicTest platform.xml basic/basicDeployment.xml
+export LD_LIBRARY_PATH=/path/to/simgrid.so:/path/to/libSG_java.so
+cd examples
+$PATH_TO_COROUTINE_JVM/java -cp .:../simgrid.jar masterslave.Masterslave masterslave/ masterslaveDeployment.xml platform.xml
\endverbatim
Note that you may have to adjust the "coro.stacksPerThread"
\endverbatim
Note that you may have to adjust the "coro.stacksPerThread"
(*env)->GetJavaVM(env, &__java_vm);
if ((*env)->FindClass(env, "java/dyn/Coroutine")) {
(*env)->GetJavaVM(env, &__java_vm);
if ((*env)->FindClass(env, "java/dyn/Coroutine")) {
- XBT_VERB("Using Coroutines");
+ XBT_INFO("Using Coroutines. Your simulation is on steroid.");
smx_factory_initializer_to_use = SIMIX_ctx_cojava_factory_init;
}
else {
smx_factory_initializer_to_use = SIMIX_ctx_cojava_factory_init;
}
else {
- XBT_VERB("Using java threads");
+ XBT_INFO("Using regular java threads. Coroutines could speed your simulation up.");
smx_factory_initializer_to_use = SIMIX_ctx_java_factory_init;
}
jthrowable exc = (*env)->ExceptionOccurred(env);
smx_factory_initializer_to_use = SIMIX_ctx_java_factory_init;
}
jthrowable exc = (*env)->ExceptionOccurred(env);