DriveSuma not driving

Hi there,

I am trying to learn how to drive suma from the command line by following the example from this video
https://www.youtube.com/watch?v=KaN1Om3EZuQ&list=PL_CD549H9kgqSs51SCNZQ4q57IguXvFI8&index=6

I am using this code (running from inside the SUMA folder of my subject)

#!/bin/tcsh

## Set up vars
set subj = P007_FR
set spec_file = {$subj}_lh.spec
set surf_vol = {$subj}_SurfVol+orig

## Set up afni vars
set portnum = `afni -available_npb_quiet`
setenv SUMA_DriveSumaMaxWait "30"


# Open surface
suma \
	-echo_edu \
	-npb $portnum \
	-spec $spec_file \
	-sv $surf_vol &

sleep 1

# Give side view for LH
DriveSuma \
	-echo_edu \
	-npb $portnum \
	-com viewer_cont -key 'Ctrl+left'

But I am getting this error

Error SUMA_niml_call (SUMA_niml.c:597):
WriteCheck timed out (> 30000 ms).
--     Error SUMA_SendToSuma (SUMA_niml.c:4335):
Failed in SUMA_niml_call
--     Error DriveSuma (SUMA_DriveSuma.c:58):
Failed to initialize SUMA_SendToSuma
--     Error SUMA_SendToSuma (SUMA_niml.c:4363):
You must call SUMA_SendToSuma with action 0 before action 1.
No Communcation cleanup done.
oo     Warning SUMA_ProcessCommand (SUMA_driver.c:628):
Failed in SUMA_SendToSuma
Communication halted.

Does anyone have any idea what I am doing wrong?

Thank you for your help,

Harriet

Update - this code works on my local computer, but does not run on my university’s remote computer.

The IT person suggested it could be a problem with some of my environment variables.

Could someone suggest what environment variables I should check given the above error to try get DriveSuma working on my remote machine?

Or perhaps another thing to check/ try? Has anyone encountered anything like this before?

Thank you for your help,

Harriet

Hi Harriet,

Your script worked perfectly on my (local) system so an environmental variable is a possibility. Do you have any text output other than what you initially posted?

Thanks,
Peter

To be sure, are you even able to run suma on that remote computer?
Try simply running “suma” by hand. That might fail in such a case.

  • rick

Hi both,

Trying to drive suma again (a couple years on)

Run suma works fine on my remote machine:

#!/bin/tcsh
set portnum = 0
suma \
	-onestate \
	-npb ${portnum} \
	-spec $data_dir/SUMA/${spec} \
	-sv $data_dir/SUMA/${sv} &

But drive suma does not:

DriveSuma \
	-npb ${portnum} \
	-com viewer_cont -key '.'

I get the following:

WriteCheck timed out (> 300000 ms).
--     Error SUMA_SendToSuma (SUMA_niml.c:4347):
Failed in SUMA_niml_call
--     Error DriveSuma (SUMA_DriveSuma.c:58):
Failed to initialize SUMA_SendToSuma
--     Error SUMA_SendToSuma (SUMA_niml.c:4375):
You must call SUMA_SendToSuma with action 0 before action 1.
No Communcation cleanup done.
oo     Warning SUMA_ProcessCommand (SUMA_driver.c:628):
Failed in SUMA_SendToSuma
Communication halted.

Any suggestions?

Howdy-

Just to check, what is your AFNI version:

afni -ver

on that system?

--pt

Hi, thanks for getting back

afni -ver output
Precompiled binary linux_openmp_64: Mar 1 2023 (Version AFNI_23.0.07 'Commodus')

Just realised there was a bit more message (about the sumarc file), so here is the whole output in case that is important:

tcsh suma_drive
[1] 51418

vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #1/18(Local Domain Parent), loading ...
SUMA_niml_call: Contacting on tcp:127.0.0.1:1032 (6), maximum wait 300.000 sec
(You can change max. wait time with env. SUMA_DriveSumaMaxWait)
.....................................
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #2/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #3/18 (mappable via Local Domain Parent), loading ...
...
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #4/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #5/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #6/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #7/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #8/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #9/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #10/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #11/18 (mappable via Local Domain Parent), loading ...
...
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #12/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #13/18 (mappable via Local Domain Parent), loading ...
...
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #14/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #15/18 (mappable via Local Domain Parent), loading ...
......
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #16/18 (mappable via Local Domain Parent), loading ...
....
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #17/18 (mappable via Local Domain Parent), loading ...
......
vvvvvvvvvvvvvvvvvvvvvvvvvvvvSurface #18/18 (mappable via Local Domain Parent), loading ...
....oo Warning suma (SUMA_suma.c:1201):

No sumarc file found. You should create one by running the following:

          suma -update_env

I also recommend you run 'suma -update_env' whenever you update AFNI.

See details for -environment and -update_env options in suma -help's output.

....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................-- Error SUMA_niml_call (SUMA_niml.c:607):
WriteCheck timed out (> 300000 ms).
-- Error SUMA_SendToSuma (SUMA_niml.c:4347):
Failed in SUMA_niml_call
-- Error DriveSuma (SUMA_DriveSuma.c:58):
Failed to initialize SUMA_SendToSuma
-- Error SUMA_SendToSuma (SUMA_niml.c:4375):
You must call SUMA_SendToSuma with action 0 before action 1.
No Communcation cleanup done.
oo Warning SUMA_ProcessCommand (SUMA_driver.c:628):
Failed in SUMA_SendToSuma
Communication halted.

++ Should be up and working now...

Hi there, I am still getting this error. Does anyone know how to fix it?

As a reminder, the code works on my local computer but not on the university's remote machine which I am trying to use for this job.

Any help very appreciated!

Did you try the command recommended in the message?

That worked! Thank you :)