CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Close remote access without shut down simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ping

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2018, 10:38
Default Close remote access without shut down simulation
  #1
New Member
 
Carlos Cordeiro
Join Date: Mar 2018
Location: Denmark
Posts: 10
Rep Power: 8
ccordeiro is on a distinguished road
I have several simulations running on a server through Putty. This allows me to launch the simulations with GUI interface. I disconnected and I have my simulations running in the background.
My question is: can I shut down the Putty connection to the server without stopping the simulations? I saw somewhere there's a way to do this if I run the simulations through command prompt, however, I'm not familiar with this method at all, that's why I'm using GUI interface.

Advice requested before I shut down and lose some hours of simulations.

Regards
Carlos
ccordeiro is offline   Reply With Quote

Old   April 8, 2018, 19:53
Default
  #2
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
putty is a terminal emulator primarily and in your current application is allowing you to use the star gui client on a remote computer
remember star is a true client - server program with the gui being the light weight java client and the server being the process that does all the hard work of meshing solving display etc
once a server is running you can disconnect or kill the client and the server will continue to run either doing nothing or meshing or solving etc so killing putty will have the same effect
that means you can start putty again and then start a client and reconnect to any of your server processes
and dont forget that you can start the server from a command line without any client and then optionally connect a client to check its progress or even adjust settings during a solve
ccordeiro likes this.
ping is offline   Reply With Quote

Old   April 9, 2018, 04:31
Default
  #3
New Member
 
Carlos Cordeiro
Join Date: Mar 2018
Location: Denmark
Posts: 10
Rep Power: 8
ccordeiro is on a distinguished road
Thanks ping! Now it's getting more clear all these definitions and terms which are brand new for me.
About your last sentence: you mean run a simulation without even open GUI on the server through PuTTY? How can I do that? I have currently around 20 simulations I need to run. All are set up on my laptop ready to run. What is the best or more efficient approach to do it?

Really appreciate the help since CFD. STAR-CCM+ and all these server stuff and command line options are really new for me, and unfortunately not that much time left until hand in my work.

Regards
Carlos
ccordeiro is offline   Reply With Quote

Old   April 9, 2018, 06:22
Default
  #4
New Member
 
Carlos Cordeiro
Join Date: Mar 2018
Location: Denmark
Posts: 10
Rep Power: 8
ccordeiro is on a distinguished road
Just risked to make a trial following the answer above and, unfortunately, lost 30h of simulations.
Maybe I've made something wrong but closing PuTTY session, also closed down GUI and although the simulations were on background, when I restarted the session couldn't see any of them, neither recover it.
ccordeiro is offline   Reply With Quote

Old   April 9, 2018, 07:06
Default
  #5
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
if you logged in under the same name you should see all your own server processes in the gui client server window if they are still running

you should also have enabled auto save to periodically save your results in case the worst happens during a long solve

to run just the server process read the command line options in the user guide

for all the runs you are doing maybe design manager option is the way to set them all up automatically and then submit them in batch mode on the server computer but you need to read the user guide on this too
ping is offline   Reply With Quote

Old   April 9, 2018, 12:08
Default
  #6
New Member
 
Carlos Cordeiro
Join Date: Mar 2018
Location: Denmark
Posts: 10
Rep Power: 8
ccordeiro is on a distinguished road
ccorde16@student.aau.dk@srv-staging01:~$ /opt/13.02.011/STAR-CCM+13.02.011/star/bin/starccm+ -server -rsh ssh -power -licpath 1999@flex.cd-adapco.com -np 3 -podkey <MY POD KEY> /nfsscratch/ccorde16/Model_1

Is this correct ping? I've searched a bunch of places as well the user guide and since we have 2 versions installed on the server I assume I need to specify the one I want to use right? Also if the simulation is in a different folder than the software the entire path should be specified.

I chose 3 parallel processes since I want to run 3 simulations simultaneously.

Am I doing it right?

Thanks for the help.
ccordeiro is offline   Reply With Quote

Old   April 10, 2018, 06:30
Default
  #7
Senior Member
 
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20
ping is on a distinguished road
it looks fine for a basic server process but I would add the .sim to the end of the filename

best to always put the full path to the required exe so you know you have the required version since some machines have many versions installed

i would normally ensure i cd to the directory where the sim file is to run this command since files will be created in that location etc

-np 3 means partition this one simulation to run as 3 processes each running on one core
ping is offline   Reply With Quote

Old   April 11, 2018, 04:19
Default
  #8
New Member
 
Matthias Fitl
Join Date: Mar 2009
Location: Austria
Posts: 20
Rep Power: 17
MFitl is on a distinguished road
When you close the putty session the starccm+ server you started from this session is also closed.

You can avoid this by using the following command in the putty

nohup starccm+ {starccm+ parameters} & disown

nohup: Do not end the session if the connection to the terminal is lost (NOHangUp)
{starccm+ parameter}: All the parameters you want to give to starccm+ i.e. -np 3 -server -batch MyCase.sim .... but without the {}
&: Put in background
disown: Detach the complete server process from the bash and the terminal session

Hope it helps,
Matthias
MFitl is offline   Reply With Quote

Old   April 11, 2018, 04:27
Default
  #9
New Member
 
Carlos Cordeiro
Join Date: Mar 2018
Location: Denmark
Posts: 10
Rep Power: 8
ccordeiro is on a distinguished road
Thanks a lot for the hints Matthias.
One last doubt: if I’ll do as you said, how can I check if the simulations are over? Can I access to the GUI and under “servers” be able to see what jobs are running?

Thanks again for the help
Carlos
ccordeiro is offline   Reply With Quote

Old   April 11, 2018, 04:39
Default
  #10
New Member
 
Matthias Fitl
Join Date: Mar 2009
Location: Austria
Posts: 20
Rep Power: 17
MFitl is on a distinguished road
You can start a GUI on Windows or Linux and you should see your server processes running. You can connect and disconnect as you like.

Good thing to save licenses by ending the server process with the following JAVA


// STAR-CCM+ macro: start_ccm.java
package macro;

import java.util.*;

import star.common.*;
import star.base.neo.*;


public class RunModel extends StarMacro {

public void execute() {

Simulation simulation_0 =
getActiveSimulation();

simulation_0.getSimulationIterator().run(true);

simulation_0.saveState(resolvePath(simulation_0.ge tSessionPath()));

simulation_0.close(ServerConnection.CloseOption.Fo rceClose);

}
}
MFitl is offline   Reply With Quote

Reply

Tags
putty, remote access, server


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access error while solving stops simulation SMagee FLUENT 4 May 2, 2017 11:58
Control simulation to apply different fields with chtMultiRegionFoam jmdf OpenFOAM Running, Solving & CFD 0 February 29, 2016 08:05
How can I use solution from one simulation as initial condition on a remote solver? Dano62 CFX 0 October 21, 2015 18:45
How to access the mesh quality before simulation? Cheng CFX 2 November 18, 2006 00:56
3-D Contaminant Dispersal Simulation Apple L S Chan Main CFD Forum 1 December 23, 1998 11:06


All times are GMT -4. The time now is 01:06.