We recently upgraded OS; reinstalled AFNI and XQuartz and all seems to be ok, except for trying to run @chauffeur_afni as part of some fat_proc_convert scripts.
@chauffeur_afni fails to open xvfb – mentioning no display.
I’ve replicated the error outside of fatcat by calling @chauffeur_afni directly.
++ My command:
@chauffeur_afni -ulay /Users/jared/abin/TT_152_2009c+tlrc.HEAD -prefix pretty -montx 5 -monty 3 -do_clean
\n------------------ start of optionizing ------------------\n
+* Noting: you did NOT provide an overlay, and yet
you did NOT turn off the overlay with '-olay_off'
--> so I assume you just want to view the underlay.
++ Using blowup factor: 2
++ Using opacity: 6
++ Making temporary work directory to copy vis files: ./__tmp_chauf_7nIKCMxqfqR
++ Copying ulay to visualize between 2%-98% (volumetric):
[79.000000,236.000000]
++ 3dcalc: AFNI version=AFNI_18.2.04 (Jul 6 2018) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tmp_chauf_7nIKCMxqfqR/tmp_ulay.nii
++ No overlay viewing
++ Cryptic info: RAI -> R A I -> 1 2 3
++ Dimensions (xyzt): 161 191 151 1
++ Slice spacing ordered (x,y,z) is: 10 12 10
++ pfrac = .50000
++ Will have: SET_IJK 80 95 75
\n------------------- end of optionizing -------------------\n
usage: count <expected line count>
usage: count <expected line count>
-- trying to start Xvfb :
[1] 39862
Bad display name:
use: X [:<display>] [option]
AFNI itself loads appropriately and opens X just fine.
Has anyone run into this?
My AFNI_SYSTEM_CHECK is printed below…
Thanks!
Jared
-------------------------------- general ---------------------------------
architecture: 64bit
system: Darwin
release: 17.7.0
version: Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64
distribution: 10.13.6 x86_64
number of CPUs: 8
apparent login shell: zsh
shell RC file: NONE (does not exist)
--------------------- AFNI and related program tests ---------------------
which afni : /Users/jared/abin/afni
afni version : Precompiled binary macosx_10.7_local: Jul 6 2018
: AFNI_18.2.04
AFNI_version.txt : AFNI_18.2.04, macosx_10.7_local, Jul 06 2018
which python : /usr/local/bin/python
python version : 2.7.15
which R : /usr/local/bin/R
R version : R version 3.5.1 (2018-07-02) -- "Feather Spray"
which tcsh : /bin/tcsh
instances of various programs found in PATH:
afni : 1 (/Users/jared/abin/afni)
R : 1 (/usr/local/Cellar/r/3.5.1/bin/R)
python : 2
/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/usr/bin/python
python2 : 1 (/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
python3 : 1 (/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/bin/python3.7)
testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
uber_subject.py : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
checking for R packages...
rPkgsInstall -pkgs ALL -check : success
checking for $HOME files...
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found
------------------------------ python libs -------------------------------
++ module 'PyQt4' found at /usr/local/lib/python2.7/site-packages/PyQt4
++ module loaded: PyQt4
-------------------------------- env vars --------------------------------
PATH = /usr/local/opt/llvm/bin:/Applications/TORTOISE_V3.1.2/DRTAMASV312/bin:/Applications/TORTOISE_V3.1.2/DRBUDDIV312/bin:/Applications/TORTOISE_V3.1.2/DIFFCALC/DIFFCALCV312:/Applications/TORTOISE_V3.1.2/DIFFPREPV312/bin/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/local/fsl/bin:/Applications/freesurfer/mni/bin:/usr/local/fsl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/jared/abin
PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = /Applications/freesurfer/lib/gcc/lib:/opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =
------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /Users/jared/abin
------------------------------ OS specific -------------------------------
which brew : /usr/local/bin/brew
brew version : Homebrew 1.7.0
++ found valid link /usr/local/lib/libgomp.1.dylib
to /usr/local/Cellar/gcc/8.1.0/lib/gcc/8/libgomp.1.dylib
++ found valid link /usr/local/lib/libglib-2.0.dylib
to ../Cellar/glib/2.56.1/lib/libglib-2.0.dylib
++ found 1 dylib files under '/opt/X11/lib/flat_namespace'
-- found 'libXt' dylib files:
/opt/X11/lib/flat_namespace/libXt.6.dylib
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell 'zsh'...
++ found evar DYLD_LIBRARY_PATH = /Applications/freesurfer/lib/gcc/lib:/opt/X11/lib/flat_namespace
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in shell 'tcsh'...
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace
========================= summary, please fix: =========================
* login shell 'zsh', trusting user to translate from 'tcsh'
* insufficient data for AFNI bootcamp
Well, even though that looks odd to me (on my Ubuntu computer, I just get “:0”), I did a test on a colleague’s Mac computer-- “echo $DISPLAY” gave a similar-looking result, and she could still run @snapshot_volreg (which uses xvfb in the same way that @chauffeur* does).
Sooo… I don’t know.
I notice you are using “zsh” as your terminal shell instead of “tcsh” or “bash”, and that the ASC states that there doesn’t appear to be an RC file for that shell: “shell RC file: NONE (does not exist)”; though, your environment variables do appear set to the ASC. Was this the same setup you had previously?
We do use ZSH, but it’s never given us trouble, as long as the path is correct.
I’ve pasted our OLD afni_system_check output below. Everything used to work fine (we use the fat_proc_* commands to do preprocessing of structural and dwi data).
Though the RC file is still NONE on the old one, so I’m not sure.
Save trying to clear everything off and reinstalling all key software from scratch (already reinstalled X)
~Jared
-------------------------------- general ---------------------------------
architecture: 64bit
system: Darwin
release: 17.6.0
version: Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64
distribution: 10.13.5 x86_64
number of CPUs: 8
apparent login shell: zsh
shell RC file: NONE (does not exist)
--------------------- AFNI and related program tests ---------------------
which afni : /Users/jared/abin/afni
afni version : Precompiled binary macosx_10.7_local: Nov 9 2017
: AFNI_17.3.03
AFNI_version.txt : AFNI_17.3.03, macosx_10.7_local, Nov 09 2017
which python : /usr/local/bin/python
python version : 2.7.13
which R : /usr/local/bin/R
R version : R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
which tcsh : /bin/tcsh
instances of various programs found in PATH:
afni : 1 (/Users/jared/abin/afni)
R : 1 (/Library/Frameworks/R.framework/Versions/3.2/Resources/bin/R)
python : 3
/opt/local/bin/python2.7
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/usr/bin/python
python2 : 1 (/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
python3 : 1 (/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/bin/python3.6)
testing ability to start various programs...
afni : success
suma : success
3dSkullStrip : success
uber_subject.py : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
checking for R packages...
rPkgsInstall -pkgs ALL -check : FAILURE
This package has been verified on the computer: afex
This package has been verified on the computer: phia
This package has been verified on the computer: snow
This package has been verified on the computer: nlme
This package has been verified on the computer: lme4
This package has been verified on the computer: paran
This package has been verified on the computer: psych
Warning message:
In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'default/America/New_York'
checking for $HOME files...
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found
------------------------------ python libs -------------------------------
++ module 'PyQt4' found at /usr/local/lib/python2.7/site-packages/PyQt4
++ module loaded: PyQt4
-------------------------------- env vars --------------------------------
PATH = /Applications/MATLAB_R2017a.app/bin:/Applications/TORTOISE_V3.1.0/DRBUDDIV31/bin:/Applications/TORTOISE_V3.1.0/DIFFCALC/DIFFCALCV31:/Applications/TORTOISE_V3.1.0/DIFFPREPV31/bin/bin:/Applications/Postgres.app/Contents/Versions/9.5/bin/:/usr/local/mysql/bin/:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/local/fsl/bin:/Applications/freesurfer/mni/bin:/usr/local/fsl/bin:/Users/jared/abin:/Users/jared/antsbin/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/texbin
PYTHONPATH = /usr/local/lib/python2.7/site-packages:
R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = /Applications/TORTOISE_V3.1.0/DRBUDDIV31/bin:/opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) = /Users/jared/abin
------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /Users/jared/abin
------------------------------ OS specific -------------------------------
which brew : /usr/local/bin/brew
brew version : Homebrew 1.3.6-109-g0cec599
which port : /opt/local/bin/port
port version : Error: Current platform "darwin 17" does not match expected platform "darwin 16"
++ found valid link /usr/local/lib/libgomp.1.dylib
to /usr/local/Cellar/gcc/7.2.0/lib/gcc/7/libgomp.1.dylib
++ found valid link /usr/local/lib/libglib-2.0.dylib
to ../Cellar/glib/2.52.0/lib/libglib-2.0.dylib
++ found 1 dylib files under '/opt/X11/lib/flat_namespace'
-- found 'libXt' dylib files:
/opt/X11/lib/flat_namespace/libXt.6.dylib
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell 'zsh'...
++ found evar DYLD_LIBRARY_PATH = /Applications/TORTOISE_V3.1.0/DRBUDDIV31/bin:/opt/X11/lib/flat_namespace
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in shell 'tcsh'...
** env var DYLD_LIBRARY_PATH not set to contain /opt/X11/lib/flat_namespace
========================= summary, please fix: =========================
* login shell 'zsh', trusting user to translate from 'tcsh'
* missing R packages (see rPkgsInstall)
* insufficient data for AFNI bootcamp
* please set DYLD_LIBRARY_PATH to /opt/X11/lib/flat_namespace in tcsh
if you type “ps”, you don’t have any Xvfb jobs that are still hanging around from previous runs, by any chance?
What is the output of
ls /tmp/.X*lock
on your computer?
To see where exactly this is failing, the following is a stripped-down version of @chauffeur*, namely the Xvfb setup trying to find an available display:
#!/bin/tcsh
set ranval = `count -dig 1 1 999999 R1`
echo "MSG_AA. ranval = $ranval"
if( $?xdisplay == 0 )then
set killX = 1
set ntry = 1
set Xnotfound = 1
while( $Xnotfound )
set xdisplay = `count -dig 1 3 999 R1`
echo "MSG_BB. xdisplay = $xdisplay"
if( -e /tmp/.X${xdisplay}-lock ) then
echo "MSG_CC. Found tmpfile = /tmp/.X${xdisplay}-lock"
endif
if( -e /tmp/.X${xdisplay}-lock ) continue
echo " -- trying to start Xvfb :${xdisplay}"
Xvfb :${xdisplay} -screen 0 1024x768x24 &
sleep 1
jobs > zzerm.$ranval.txt
grep -q Xvfb zzerm.$ranval.txt
set Xnotfound = $status
echo "MSG_DD. status = $status"
cat zzerm.$ranval.txt
\rm -f zzerm.$ranval.txt
if( $Xnotfound == 0 )break ;
@ ntry++
if( $ntry > 99 )then
echo "** ERROR: can't start Xvfb -- exiting"
exit 1
endif
end
endif
setenv DISPLAY :${xdisplay}
# A la bob: stop Xvfb if we started it ourselves
if( $?killX ) kill %1
echo "\n\n\n\n\nDONE. Bye.\n\n\n\n"
If you save that to a text file called “do_teset_xvfb.tcsh” and run:
tcsh -ef do_test_xvfb.tcsh > asdfasdf.txt
what are the contents of asdfasdf.txt? For me, it is just a once through:
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell 'zsh'...
++ found evar DYLD_LIBRARY_PATH = /Applications/freesurfer/lib/gcc/lib:/opt/X11/lib/flat_namespace
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in shell 'tcsh'...
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace
I’m not sure that you have to remove those /tmp/*lock files, but OK (I think).
I think you should stop the other xvfb process, just so it isn’t running in background (you can “kill” is, after running “ps” to see its PID).
the problem might be with ‘count’ and not xvfb, actually; see the other post from above-- ‘count’ is program distributed with AFNI (“Written by RWCox back in the ancient mists of forgotten time”), so this would surprise me, since you say your AFNI stuff is working, but let’s see…
I googled a bit, and I think it comes with xcode; I don’t know whether it is a particular option flag the puts it there, but we will try to keep an eye out for it…
I think this may have come from a homebrew install of llvm based on this bit I found. count is one of our oldest programs. It’s also very simply named, but used in many scripts, so I hope this doesn’t become more of an issue.
brew install llvm
Once you’re done with that, Homebrew will tell you something like this:
To use the bundled libc++ please add the following LDFLAGS:
LDFLAGS=“-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib”
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have this software first in your PATH run:
echo ‘export PATH=“/usr/local/opt/llvm/bin:$PATH”’ >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/llvm/lib
CPPFLAGS: -I/usr/local/opt/llvm/include
If you need Python to find bindings for this keg-only formula, run:
echo /usr/local/opt/llvm/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/llvm.pth
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.