Hello, I am looking for a solution for a tomcat container, which is supposed to serve a web application, which is using MPI (openmpi) internally. (The servlet is making JNI calls to C library functions. I have validated that this Java-MPI connection runs without problems when NOT using tomcat.)
In catalina.sh, I have changed the lines which actually starts tomcat eval "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER ... into the same command preceded by mpirun: eval mpirun -n 2 "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER ... However, in catalina.out I get errors like "... java.net.BindException: Address already in use ..." This makes sense, because both MPI processes will try to bind to the same address. Is there any chance to have tomcat serve a web application which is using native MPI functions inside one of its servlets? I am using apache-tomcat-7.0.65 on Ubuntu 15.04. Thank you Martijn