Skip to content

Commit 72cdf08

Browse files
author
Andre Lanrezac
committed
refactor: Update default port from 3000 to 8888 across multiple files
1 parent a62bfae commit 72cdf08

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

example_tool/src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ void usage()
1717
cout<<"mddriverconstraint"<<endl;
1818
cout<<"\tOptions : "<<endl;
1919
cout<<"\t\t[-host hostname] : default = localhost"<<endl;
20-
cout<<"\t\t[-port port] : default = 3000"<<endl;
20+
cout<<"\t\t[-port port] : default = 8888"<<endl;
2121
exit(1);
2222
}
2323

2424
int main( int argc, char *argv[] )
2525
{
26-
unsigned port=3000;
26+
unsigned port=8888;
2727
char hostname[HOSTMAXSIZE]="localhost";
2828
unsigned minimaloptionok=false;
2929

protocol/doc/html/mddriver.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h2>Testing MDDriver</h2>
103103
MDDriver &gt; ---- Entering in iimd_init
104104
</code></pre>
105105

106-
<p>Don't worry, it could be due to a port problem. Try to fix the problem (e.g. the hostname must be "localhost" and the port 3000) in changing the port and hostname in the file: mddriver/src/clienttest.c by the hostname and port obtained when launching ./servertest.</p>
106+
<p>Don't worry, it could be due to a port problem. Try to fix the problem (e.g. the hostname must be "localhost" and the port 8888) in changing the port and hostname in the file: mddriver/src/clienttest.c by the hostname and port obtained when launching ./servertest.</p>
107107

108108
<h2>Installing <a href="http://www.gromacs.org" title="http://www.gromacs.org">GROMACS</a> with MDDriver support:</h2>
109109

@@ -239,7 +239,7 @@ <h2>Lauching the simulation:</h2>
239239
</code></pre></li>
240240
<li><p>Then you can run the simulation, providing Gromacs with parameters for MDDriver. The parameter IMDfreq is the number of timesteps between two MDDriver exchanges. When IMDwait is set to 1 this means that the simulation will wait for a client connection before starting, The parameter IMDport is the port on which data wil be sent and IMDmsg sets the log level, from 0 for no messages to 3 for verbose logging (be careful to use the mdrun executable compiled with MDDriver).</p>
241241

242-
<pre><code>mdrun -IMDfreq 1 -IMDwait 1 -IMDport 3000 -IMDmsg 1 -s model.tpr -x output/imd -deffnm output/imd
242+
<pre><code>mdrun -IMDfreq 1 -IMDwait 1 -IMDport 8888 -IMDmsg 1 -s model.tpr -x output/imd -deffnm output/imd
243243
</code></pre>
244244

245245
<p>If you use an MPI version of Gromacs/MDDriver, pay attention to execute Gromacs with the same MPI version as it was compiled with!</p></li>

protocol/doc/markdown/mddriver_markdown.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ NB: You could have the following error message when you launch the clienttest sc
9292
MDDriver > ---- Leaving iimd_probeconnection
9393
MDDriver > ---- Entering in iimd_init
9494

95-
Don't worry, it could be due to a port problem. Try to fix the problem (e.g. the hostname must be "localhost" and the port 3000) in changing the port and hostname in the file: mddriver/src/clienttest.c by the hostname and port obtained when launching ./servertest.
95+
Don't worry, it could be due to a port problem. Try to fix the problem (e.g. the hostname must be "localhost" and the port 8888) in changing the port and hostname in the file: mddriver/src/clienttest.c by the hostname and port obtained when launching ./servertest.
9696

9797

9898
Installing [GROMACS][gmx] with MDDriver support:
@@ -212,7 +212,7 @@ Lauching the simulation:
212212

213213
4. Then you can run the simulation, providing Gromacs with parameters for MDDriver. The parameter IMDfreq is the number of timesteps between two MDDriver exchanges. When IMDwait is set to 1 this means that the simulation will wait for a client connection before starting, The parameter IMDport is the port on which data wil be sent and IMDmsg sets the log level, from 0 for no messages to 3 for verbose logging (be careful to use the mdrun executable compiled with MDDriver).
214214

215-
mdrun -IMDfreq 1 -IMDwait 1 -IMDport 3000 -IMDmsg 1 -s model.tpr -x output/imd -deffnm output/imd
215+
mdrun -IMDfreq 1 -IMDwait 1 -IMDport 8888 -IMDmsg 1 -s model.tpr -x output/imd -deffnm output/imd
216216

217217
If you use an MPI version of Gromacs/MDDriver, pay attention to execute Gromacs with the same MPI version as it was compiled with!
218218

protocol/python/mddriver0.1/mddriver/mddriver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static PyObject * mddriver_client(PyObject *self, PyObject *args)
3030
char * filename;
3131
int mode=0;
3232
int wait=0;
33-
int port=3000;
33+
int port=8888;
3434
int message=0;
3535
char * hostname;
3636
if (!PyArg_ParseTuple(args, "siis:mddriver_client", &hostname, &port, &message, &filename))
@@ -47,7 +47,7 @@ static PyObject * mddriver_server(PyObject *self, PyObject *args)
4747
char * filename;
4848
int mode=1;
4949
int wait=0;
50-
int port=3000;
50+
int port=8888;
5151
int message=0;
5252
if (!PyArg_ParseTuple(args, "iiis:mddriver_server",&port,&wait,&message,&filename))
5353
{

protocol/python/mddriverclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from time import *
33

44
clienthostname="127.0.0.1"
5-
port=3000
5+
port=8888
66
message=2
77
wait=0
88
filenameclient="client.log"

protocol/python/mddriverserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from time import *
33
from mddriver import *
44

5-
port=3000
5+
port=8888
66
message=2
77
wait=1
88
filenameserver="server.log"

protocol/src/imd_interface.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static int IMDwait = 0;
102102
static imd_int32 IMDignore = 0;
103103

104104
// Connection port number
105-
static imd_int32 IMDport = 3000 ;
105+
static imd_int32 IMDport = 8888 ;
106106

107107
// Message level
108108
// 0 -> Only error messages
@@ -833,7 +833,7 @@ FILE *IIMD_init( const char *hostname, imd_int32 *mode, imd_int32 *IMD
833833
if ( IMDport <= 1024 )
834834
{
835835
fprintf(IMDlog, "MDDriver > Bad port number (using %d) \n", IMDport);
836-
IMDport = 3000;
836+
IMDport = 8888;
837837
}
838838

839839
int newport = find_free_port(sock, hostname, IMDport);

protocol/test_exe/clienttest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ typedef float t_coord[3];
9191

9292
FILE *IMDlog;
9393
char IMDhostname[] = "localhost";
94-
int IMDport = 3000;
94+
int IMDport = 8888;
9595
int IMDmsg = 2;
9696
int IMDwait = 0; // Connection configuration
9797
int IMDmode = 0; // 0 : client , 1 : server

protocol/test_exe/protocoltest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static IMDGrid grid; // Communication buffer for energies
9292

9393
int nstximd = 0;
9494
int myimd_wait = 1;
95-
int myimd_port = -3000; // If the value is negative, we will print debug output!
95+
int myimd_port = -8888; // If the value is negative, we will print debug output!
9696

9797
void myimd_init( )
9898
{ // --- MDD Initialization function ---

protocol/test_exe/servertest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ int myimd_wait = 1;
226226
int myimd_log = 2;
227227

228228
// If the value is negative, we will print debug output!
229-
int myimd_port = 3000;
229+
int myimd_port = 8888;
230230

231231

232232
// MDD Initialization function

0 commit comments

Comments
 (0)