Access a cluster via SSH in a Java macro

49 Views Asked by At

I have a Star-CCM (CFD software) java macro that tells the CFD simulation to run on my local machine,through the line:

simulation_0.getSimulationIterator().runAutomation();

I want to tell Star-CCM to run the simulation on a cluster (usually I use PuTTY for this, but this have to be automatic), via SSH. What should I change in this line?

Best regards, Carlos

I did not try anything yet, I'm a newbie in Java, so any help would be greatly appreciated.

1

There are 1 best solutions below

1
Zufar Sunagatov On

I want to tell Star-CCM to run the simulation on a cluster (usually I use PuTTY for this, but this have to be automatic), via SSH. What should I change in this line?

You can try to follow this code:

import java.io.IOException;

import com.cdadapco.star.RemoteMachine;
import com.cdadapco.star.Simulation;

public class Main {

    public static void main(String[] args) throws IOException {
        String remoteMachineHostname = ...;

        RemoteMachine remoteMachine = new RemoteMachine(remoteMachineHostname);

        Simulation simulation = Simulation.getActiveSimulation();

        simulation.getSimulationIterator().runAutomation(remoteMachine);
    }
}