1

I'm trying to initialize the MPJ inside a function but I cant make the MPI.Init(args) work. I tried dragging along the args like this

    import mpi.*

    public class Test {
        String [] args
        public static void main(String [] args){
            Test.args = args;
            t.testFunction();
        }

        public void testFunction() {
            MPI.Init(args);
        }
    }

but I get an exception like this

Exception in thread "AWT-EventQueue-0" mpi.MPIException: Usage: java MPI conf_file can be, ../conf/xdev.conf OR http://holly.dsg.port.ac.uk:15000/xdev.conf at mpi.MPI.Init(MPI.java:232)

The problem is my program works with an action listener on timer interrupts so I cant put it all inside the main method.

Thanks in advance for any solutions or even ideas.

Mirt Hlaj
  • 173
  • 10

0 Answers0