Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suma alpha #637

Merged
merged 7 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .codespell-ignores
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ba
basci
belwo
BIGEST
bigest
binar
bloc
blocs
Expand All @@ -34,13 +35,16 @@ boun
bount
bu
bufer
bufferin
builded
bund
buton
calld
cant
cant'
checkin
cleann
clearification
clen
clens
cna
Expand All @@ -60,6 +64,7 @@ dont'
dota
dout
dum
dyin
ede
emiss
empy
Expand All @@ -81,6 +86,7 @@ falg
fasle
fave
fiels
fillin
finsh
firt
fisrt
Expand Down Expand Up @@ -128,6 +134,7 @@ idel
infor
inh
inout
inpt
inpu
inthe
isnt
Expand Down Expand Up @@ -195,18 +202,24 @@ paied
parm
parms
pary
patchin
pattrn
perrty
pickin
poped
prefixin
pres
publick
pyton
quitt
raison
readin
realy
reponse
reson
re-use
rime
rin
sais
sates
sav
Expand All @@ -225,6 +238,7 @@ singl
siz
skeep
smoot
smoothin
som
somme
sord
Expand All @@ -234,10 +248,13 @@ sqare
stil
sting
stip
stoopid
stoopidity
strng
struc
studi
sur
switchin
swith
sxl
syle
Expand All @@ -256,8 +273,10 @@ thie
thik
thn
thre
threshol
tht
tooo
trailin
tread
tring
trough
Expand All @@ -283,6 +302,7 @@ whats
wheight
wher
whish
whit
whith
wholy
whos
Expand Down
2 changes: 1 addition & 1 deletion cmake/afni_system_dependency_overwrites.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# We will consider the GLW C library as an example of the sort of issues we are
# attempting to resolve here... This software made certain variables global for
# downsteam users to use. AFNI uses these variables (widget drawing classes) but at some
# downstream users to use. AFNI uses these variables (widget drawing classes) but at some
# point (8 years ago) the symbol visibility was changed. Now, while neurodebian
# distributes a version of GLW with these widget variables once more externally visible,
# no other operating system package manager has been found that does this. The solution
Expand Down
2 changes: 1 addition & 1 deletion src/3dECM.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static long total_mem = 0;

/* freeing all of the allocated mem on an error can get a little messy. instead
we can use this macro to check what has been allocated and kill it. this of
course requires strict discipline for initiazing all pointers to NULL and
course requires strict discipline for initializing all pointers to NULL and
resetting them to NULL when free'd. i should be able to handle that */
#define CHECK_AND_FREE_ALL_ALLOCATED_MEM \
{ \
Expand Down
2 changes: 1 addition & 1 deletion src/3dLFCD.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct _list_node

/* freeing all of the allocated mem on an error can get a little messy. instead
we can use this macro to check what has been allocated and kill it. this of
course requires strict discipline for initiazing all pointers to NULL and
course requires strict discipline for initializing all pointers to NULL and
resetting them to NULL when free'd. i should be able to handle that */
#define CHECK_AND_FREE_ALL_ALLOCATED_MEM \
{ \
Expand Down
2 changes: 1 addition & 1 deletion src/3dRetinoPhase.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ static void RP_tsfunc( double tzero, double tdelta ,
} else {
val[0] = phz[rpud->stk[1]];
}
/* linear interpolation between closest frequecies for amplitude */
/* linear interpolation between closest frequencies for amplitude */
val[1] = ( mag[rpud->stk[0]]*rpud->stw[0] +
mag[rpud->stk[1]]*rpud->stw[1] );
val[1] *= val[1]; /* square for power*/
Expand Down
228 changes: 228 additions & 0 deletions src/Makefile.macos_11_ARM.gcc14
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@

# This Makefile is for Mac OS 11 for 64 bit AFNI, with local linking
# the default gcc with
# Xcode (Apple clang v.12 )
# The required libraries for use should come with Xcode, XQuartz
# and homebrew

# ******* IMPORTANT - Please READ ********
# ***** SET PATH to point to /opt/homebrew/bin before /usr/local/bin
#
# 1. to get right version of brew for ARM (see below)
# 2. to get right version of autoconf for ARM to build libgts.a
# in SUMA Makefile
#
# two versions of homebrew are provided with an installation on an M1 ARM
# system. The ARM version is installed in /opt/homebrew/bin/brew
# and the Intel version is installed in /usr/local/bin/brew
# Either call the path to these explicitly or change the path to get
# the one you want.
# the Intel version must be run from a Rosetta terminal
# tested with clang is 12.0.0
# use homebrew to install the following:
#
# brew install
# libpng jpeg expat freetype fontconfig openmotif libomp
# libxt gsl glib pkg-config gcc autoconf mesa mesa-glu libxpm
# (gcc version 10 used here by default)

# also brew install netpbm libiconv


# put this symbolic link for needed library
#ln -s /usr/local/Cellar/gsl/2.6/lib/libgsl.25.dylib /usr/local/lib/libgsl.dylib
#ln -s /usr/local/Cellar/openmotif/2.3.8_1/lib/libXm.4.dylib /usr/local/lib/libXm.4.dylib
# if XQuartz doesn't include libXm (as it used to), then use this

#ln -s /usr/local/Cellar/openmotif/2.3.8_1/lib/libXm.a /usr/local/lib/libXm.a
#ln -s /usr/local/Cellar/jpeg/9d/lib/libjpeg.a /usr/local/lib/libjpeg.a
#ln -s /usr/local/Cellar/jpeg/9d/lib/libjpeg.a /usr/local/lib/libjpeg.9.a
#ln -s /usr/local/Cellar/netpbm/10.86.18/include/netpbm/pgm.h /usr/local/include/pgm.h

# ***** for MAC ARM-M1 and 10.15 clang x86_64 builds 09 Mar 2021 [drg]
# once again have confusing problem with pgm.h missing from standard
# kinds of places, so libgts has errors
# solve with symbolic link to Cellar versions in homebrew

# ARM_M1 version
# sudo ln -s /opt/homebrew/Cellar/netpbm/10.86.30/include/netpbm/pgm.h \
# /opt/homebrew/include/pgm.h

# x86_64 version as above
# sudo ln -s /usr/local/Cellar/netpbm/10.86.18/include/netpbm/pgm.h \
# /usr/local/homebrew/include/pgm.h

# I've removed libbz2.dylib from the installed dylib list because it doesn't
# seem to be used below, but on 10.15 with brew install
# there is /usr/lib/libbz2.1.0.dylib

# DRG: M1 homebrew location
usr_ROOT = /opt/homebrew
USE_ZLIB = -DHAVE_ZLIB
LZLIB = -lz
USE_GIFTI = -DHAVE_GIFTI
LGIFTI = -lexpat

# ------------------------------
# python from C
#IPYTHON = -I/Users/molfesepj/anaconda3/include/python3.8 -DSELENIUM_READY
#LPYTHON = -L/Users/molfesepj/anaconda3/lib/python3.8/config
#LDPYTHON = -lpython3.8

# ----------------------------------------------------------------------
# X configuration
#

XROOT = /opt/X11
XROOT_I = -I$(XROOT)/include
XROOT_L = -L$(XROOT)/lib

# XLIBS = -lXm -ljpeg.9 -lXt
XLIBS = -lXm -ljpeg -lXt

# ----------------------------------------------------------------------


CCDEBS = -DAFNI_DEBUG -DIMSEQ_DEBUG -DDISPLAY_DEBUG -DTHD_DEBUG
CEXTRA = -m64 -Wall -Wno-unused-variable -Wno-format-truncation -Wno-deprecated-declarations -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE \
-Wno-implicit-int -Wno-incompatible-pointer-types -DDONT_USE_MCW_MALLOC $(LESSTIF_DEFS)
# choose gcc version below from homebrew directory in
# either /opt/homebrew/bin
# or Apple clang from /usr/bin with
# architecture set for x86_64 or arm64
# set CC and CCMIN to appropriate directory
CC = /opt/homebrew/bin/gcc-14 -O1 -DDARWIN $(CEXTRA)
# MacOS default is clang
#CC = /usr/bin/gcc -O2 -arch arm64 -DDARWIN -DARM_M1 $(CEXTRA)
CCVOL = $(CC)
CCFAST = $(CC)
CCMIN = /opt/homebrew/bin/gcc-14 -arch arm64
#CCMIN = /usr/bin/gcc -arch arm64 -DDARWIN -DARM_M1
CCD = $(CC) $(CCDEBS)
CCOLD = $(CC)

# set CPU_TYPE for libgts.a building and anything else that might need it
CPU_TYPE = ARM_M1

# previous mac versions for brew put omp in a separate directory
# here it's just homebrew's standard install directories for the ARM
BREWI = /opt/homebrew/opt/libomp/include
BREWL = /opt/homebrew/opt/libomp/lib

OMPFLAG = -Xpreprocessor -fopenmp -I$(BREWI) -L$(BREWL) -lomp -DUSE_OMP

SYSTEM_NAME = macos_14_ARM_gcc-14

INSTALLDIR = $(SYSTEM_NAME)

# these are homebrew's install library and include files
# repeats definitions BREWI and BREWL above but
# separating for now in case OMP goes back to a separate directory
BREWLIBDIR = /opt/homebrew/lib
BREWINCDIR = /opt/homebrew/include

# removed this extra_install_file
# $(BREWLIBDIR)/libjpeg.9.dylib \


EXTRA_INSTALL_FILES = $(BREWLIBDIR)/libXm.4.dylib \
$(BREWLIBDIR)/libgsl.dylib \
$(BREWLIBDIR)/libglib-2.0.0.dylib \
$(BREWLIBDIR)/libgslcblas.0.dylib \
$(BREWLIBDIR)/libpng16.16.dylib \
$(BREWLIBDIR)/libintl.8.dylib \
/opt/homebrew/opt/libiconv/lib/libiconv.2.dylib

# this is called a hack - command to convert dyname -lXm to static for R_io.so
#RLIB_CONVERT = | sed 's/-lXm/\/usr\/lib\/libXm.a/'
#RLIB_CONVERT = | sed 's/-lXm/\/usr\/local\/lib\/libXm.a/'
RLIB_CONVERT = | sed 's/-lXm/\/opt\/Homebrew\/lib\/libXm.a/'

# these were the PJM's library files to copy to binary distribution directory
# The list above includes different versions to copy
#
# /usr/local/lib/libfreetype.6.dylib \
# /usr/local/lib/gcc/8/lib/libgomp.1.dylib \
# /usr/local/lib/gcc/8/lib/libgcc_s.1.dylib \
# /usr/local/lib/libgsl.0.dylib \
# /usr/local/lib/libiconv.2.dylib \
# /usr/local/lib/freetype219/lib/libfreetype.6.dylib \
# /Users/molfesepj/anaconda3/lib/python3.8/config-3.8-darwin/libpython3.8.a \
# /usr/local/lib/libbz2.1.dylib \
#

EXTRA_INSTALL_COMMANDS = ( cd $(INSTALLDIR) ; \
chmod u+w *.dylib ; \
if [ -d $(HOME)/EXTRAPROGS ]; then $(CP) $(HOME)/EXTRAPROGS/* . ; fi ; )

IFLAGS = -I. -I$(BREWINCDIR) $(XROOT_I) -I/usr/include

LFLAGS = -L. -L$(BREWLIBDIR) $(XROOT_L) -L/usr/lib -Wl,-x -Wl,-multiply_defined -Wl,warning -Wl,-bind_at_load $(LPYTHON)

CCSVD = $(CCMIN) -m64 -O0

PLUGIN_SUFFIX = so
PLUGIN_LFLAGS = -m64 -bundle -flat_namespace -undefined suppress -Wl,-x
PLUGIN_CC = $(CC) -dynamic -fno-common
PLFLAGS = -m64 -dynamic $(LFLAGS)

# include the line below if you want to include vector arith in 3dDeconvolve_f
# SPECIAL = -framework Accelerate -DUSE_ACCELERATE

AR = /usr/bin/ar
RANLIB = /usr/bin/ranlib
TAR = /usr/bin/tar
MKDIR = /bin/mkdir
GZIP = /usr/bin/gzip
LD = $(CCMIN)

RM = /bin/rm -f
MV = /bin/mv -f
CP = /bin/cp -f

LINT = /usr/bin/lint -a -b -u -v -x $(IFLAGS) $(CCDEFS)

LIBDIR = $(INSTALLDIR)
SHOWOFF = -DSHOWOFF=$(SYSTEM_NAME)

INSTALL_PREREQ = suma_gts
# uncomment if the Gnu Scientific Library is installed (libgsl, libgslcblas)
# GSLPROGS = balloon
EXPROGS = $(GSLPROGS)

# for dynamic linking

LLIBS = -lmri -lf2c $(XLIBS) -lXft -lfontconfig \
-lpng16 -liconv -lXmu -lXp -lXpm -lXext -lX11 \
$(LZLIB) $(LGIFTI) $(LDPYTHON) -lm -lc


# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# For suma
# ZSS Aug. 08. LibGLw.a now made locally and called libGLws.a

SUMA_GL_DYLIB_CMD = -lGL

GLw_IPATH =
GLw_LIB = -lGLw
# uncomment next two lines if you want to use libGLws.a, SUMA's copy of GLw
GLw_IPATH = -IGLw_local
GLw_LIB = libGLws.a


SUMA_GLIB_VER = -2.0
SUMA_INCLUDE_PATH = $(IFLAGS) $(GLw_IPATH) -I.. -I../niml -Igts/src -I${usr_ROOT}/include/glib-2.0 -I${usr_ROOT}/lib/glib-2.0/include
#SUMA_LINK_PATH = $(XROOT_L) $(LFLAGS) -L..
SUMA_LINK_PATH = $(LFLAGS) $(XROOT_L) -L..

SUMA_LINK_LIB = $(XLIBS) $(GLw_LIB) $(LLIBS) -lGLU -lGL -lmri -lf2c -lmx -lglib-2.0 $(SUMA_GL_DYLIB_CMD)
SUMA_MAKEFILE_NAME = SUMA_Makefile
SUMA_BIN_ARCHIVE = SUMA_MacOSX.tar
SUMA_MDEFS = -DSUMA_GL_NO_CHECK_FRAME_BUFFER
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


###############################################################

MAKE = make
include Makefile.INCLUDE
2 changes: 1 addition & 1 deletion src/R_scripts/3dICC.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ help.ICC.opts <- function (params, alpha = TRUE, itspace=' ', adieu=FALSE) {
intro <-
'
================== Welcome to 3dICC ==================
AFNI Program for IntraClass Correlatin (ICC) Analysis
AFNI Program for IntraClass Correlation (ICC) Analysis
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Version 1.0, Oct 4, 2023
Author: Gang Chen (gangchen@mail.nih.gov)
Expand Down
2 changes: 1 addition & 1 deletion src/R_scripts/ExamineXmat.R
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ ExamineXmat.help.select(),
'\n')
cat (sh)
#tkmessageBox(message=sh) #ugly...
#use reults output instead
#use results output instead
tkconfigure(txt, state="normal") #allow editing
tkinsert(txt,"0.0",sh)
tkconfigure(txt, state="disabled") #no more editing
Expand Down
Loading
Loading