Regarding my first question in my previous post below, the same error occurs even when I run my script (containing many repetition of mris_pmake command) on only one terminal window.
From: Jungwon Ryu [mailto:rjungwon@snu.ac.kr] Sent: Tuesday, October 25, 2011 8:11 PM To: 'freesurfer@nmr.mgh.harvard.edu' Subject: Question on mris_pmake
Hi,
I'm trying to get distances on a cortical surface between sets of voxels in visual areas and I have two questions;
1) I have the following error message so often;
===
System error: Address already in use
Fatal error encountered.
SSocket `Unnamed SSocket_UDP_receive' (id: 0)
Current function: c_SSocket_UDP_receive::c_SSocket_UDP_receive
Problem binding to socket 1701
Error returned from system: Address already in use
Throwing exception to (this) with code 1
terminate called after throwing an instance of 'c_SSocket*'
runSh_Ori_1_02_01.sh: line 5789: 93334 Abort trap mris_pmake --subject JR20110819 --hemi rh --surface0 white --curv0 sulc --curv1 sulc --mpmOverlay euclidean --mpmProg pathFind --mpmArgs startVertex:907,endVertex:731 >> result_Ori_1_02_01.txt
===
I have around 10,000 voxel pairs to run mris_pmake( ) command. Since I have to call mris_pmake( ) so many times (one pair by one pair), I splitted the whole list of voxel pairs into four script files, containing many mris_pmake commands with 2,500 voxel pairs as arguments, then I ran scripts with four terminal windows saparately to parallelize the processing. All script files are located in the same diretory. Then I had the message as above. What might be the problem? (It seems as if multiple terminal instances share the socket port number)
2) How can I get interhemispheric distances between visual areas across hemispheres?
Ryu
PhD student
Department of Brain and Cognitive Sciences,
Seoul National University, Korea
Yes -- the problem is that each 'mris_pmake' instance listens on a socket. This socket is used for communicating and controlling an mris_pmake instance that is already running.
If you open multiple 'mris_pmake's they will collide with the "Address already in use".
How to fix?
Each 'mris_pmake' instance reads an options file that controls its behavior. This file is called "options.txt" and resides in the same directory from which you started 'mris_pmake'.
Edit the file, and look for
# Control flags and settings controlPort = 1701
Change the controlPort to a different port and you should be fine. Of course, you'll need to probably start each of your 4 'mris_pmake' instances in separate directories so that they each get their own 'controlPort'.
There is a much simpler way to run 'mris_pmake' and even specify a script that it can execute using a python script called 'dsh' (also part of FreeSurfer). I will add some documentation to the FS wiki (but probably only at the end of November).
On 10/27/11 10:41 , Jungwon Ryu wrote:
Regarding my first question in my previous post below, the same error occurs even when I run my script (containing many repetition of mris_pmake command) on only one terminal window.
*From:*Jungwon Ryu [mailto:rjungwon@snu.ac.kr] *Sent:* Tuesday, October 25, 2011 8:11 PM *To:* 'freesurfer@nmr.mgh.harvard.edu' *Subject:* Question on mris_pmake
Hi,
I'm trying to get distances on a cortical surface between sets of voxels in visual areas and I have two questions;
*1)*I have the following error message so often;
===
System error: Address already in use
Fatal error encountered.
SSocket `Unnamed SSocket_UDP_receive' (id: 0)
Current function: c_SSocket_UDP_receive::c_SSocket_UDP_receive
Problem binding to socket 1701
Error returned from system: Address already in use
Throwing exception to (this) with code 1
terminate called after throwing an instance of 'c_SSocket*'
runSh_Ori_1_02_01.sh: line 5789: 93334 Abort trap mris_pmake --subject JR20110819 --hemi rh --surface0 white --curv0 sulc --curv1 sulc --mpmOverlay euclidean --mpmProg pathFind --mpmArgs startVertex:907,endVertex:731 >> result_Ori_1_02_01.txt
===
I have around 10,000 voxel pairs to run mris_pmake( ) command. Since I have to call mris_pmake( ) so many times (one pair by one pair), I splitted the whole list of voxel pairs into four script files, containing many mris_pmake commands with 2,500 voxel pairs as arguments, then I ran scripts with four terminal windows saparately to parallelize the processing. All script files are located in the same diretory. Then I had the message as above. What might be the problem? (It seems as if multiple terminal instances share the socket port number)
*2)*How can I get interhemispheric distances between visual areas across hemispheres?
Ryu
PhD student
Department of Brain and Cognitive Sciences,
Seoul National University, Korea
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu