flatironinstitute / finufft

Non-uniform fast Fourier transform library of types 1,2,3 in dimensions 1,2,3
Other
271 stars 72 forks source link

Installation issue / inverse NUFFT needed discussion #182

Closed yangpl closed 3 years ago

yangpl commented 3 years ago

Hi, I am starting to try FINUFFT. The first step to install the package gives me errors in the following: (can you help?)

g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/spreadinterp.cpp -o src/spreadinterp.o g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/utils.cpp -o src/utils.o g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/finufft.cpp -o src/finufft.o g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/simpleinterfaces.cpp -o src/simpleinterfaces.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp fortran/finufftfort.cpp -o fortran/finufftfort.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/spreadinterp.cpp -o src/spreadinterp_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/utils.cpp -o src/utils_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/finufft.cpp -o src/finufft_32.o g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/simpleinterfaces.cpp -o src/simpleinterfaces_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp fortran/finufftfort.cpp -o fortran/finufftfort_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/utils_precindep.cpp -o src/utils_precindep.o cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:150: src/spreadinterp.o] Error 1 make: Waiting for unfinished jobs.... make: [makefile:150: src/utils.o] Error 1 make: [makefile:150: src/finufft.o] Error 1 make: [makefile:150: src/simpleinterfaces.o] Error 1 g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead make: [makefile:150: fortran/finufftfort.o] Error 1 cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:152: src/simpleinterfaces_32.o] Error 1 make: [makefile:152: src/finufft_32.o] Error 1 cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch make: [makefile:152: src/spreadinterp_32.o] Error 1 cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:152: src/utils_32.o] Error 1 cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:152: fortran/finufftfort_32.o] Error 1 make: [makefile:150: src/utils_precindep.o] Error 1

ahbarnett commented 3 years ago

Dear Pengliang, It looks like you copied make.inc.powerpc to make.inc, and then did make test, correct? So, I'm guessing you have a powerpc architecture? The error is pretty clear: your version of GCC no longer allows -mcpu so you need to replace that with -march in your make.inc file. Let us know how that works out. Best, Alex

On Tue, Apr 13, 2021 at 9:44 AM Pengliang Yang @.***> wrote:

Hi, I am starting to try FINUFFT. The first step to install the package gives me errors in the following: (can you help?)

g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/spreadinterp.cpp -o src/spreadinterp.o g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/utils.cpp -o src/utils.o g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/finufft.cpp -o src/finufft.o g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/simpleinterfaces.cpp -o src/simpleinterfaces.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp fortran/finufftfort.cpp -o fortran/finufftfort.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/spreadinterp.cpp -o src/spreadinterp_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/utils.cpp -o src/utils_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/finufft.cpp -o src/finufft_32.o g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/simpleinterfaces.cpp -o src/simpleinterfaces_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -DSINGLE -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp fortran/finufftfort.cpp -o fortran/finufftfort_32.o g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead g++ -c -funroll-loops -mcpu=powerpc64 -fcx-limited-range -fPIC -g -O3 -DNEED_EXTERN_C -g -O3 -Iinclude -fPIC -std=c++14 -fopenmp src/utils_precindep.cpp -o src/utils_precindep.o cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:150: src/spreadinterp.o] Error 1 make: Waiting for unfinished jobs.... make: [makefile:150: src/utils.o] Error 1 make: [makefile:150: src/finufft.o] Error 1 make: [makefile:150: src/simpleinterfaces.o] Error 1 g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead make: [makefile:150: fortran/finufftfort.o] Error 1 cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:152: src/simpleinterfaces_32.o] Error 1 make: [makefile:152: src/finufft_32.o] Error 1 cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch make: [makefile:152: src/spreadinterp_32.o] Error 1 cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:152: src/utils_32.o] Error 1 cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: error: bad value (‘powerpc64’) for ‘-mtune=’ switch cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native cc1plus: note: valid arguments to ‘-mtune=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake bonnell atom silvermont slm goldmont goldmont-plus tremont knl knm intel x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 btver1 btver2 generic native make: [makefile:152: fortran/finufftfort_32.o] Error 1 make: [makefile:150: src/utils_precindep.o] Error 1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/182, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSV3T2LQDRFWVF3EAZTTIRDC7ANCNFSM423MCCNQ .

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

yangpl commented 3 years ago

Dear Alex, Thanks for the reply. It turns out to be my mistake: I should use make.inc.manylinux instead of powerpc. Now it has been installed. check_finufft.sh single-precision done. Summary: 0 segfaults out of 8 tests done 0 fails out of 8 tests done

Cheers ...

yangpl commented 3 years ago

May I ask another question regarding NUFFT? I have such a scenario that I need to convert some data from non-uniform grid to uniformly sampled Fouerier space, and then perform some algeabraic operations in Fourier domain, and finally come back. Therefore, I also need to have an inverse transform. Is that available in finufft as well?

ahbarnett commented 3 years ago

Dear Pengliang, No, the inverse is not directly available. If the problem is small, you can solve a dense linear system directly; if large, you need iterative methods (CG on normal equations) - see Greengard-Lee-Inati here: https://msp.org/camcos/2006/1-1/camcos-v1-n1-p06-p.pdf I will put up a tutorial about it in the coming days. Best, Alex

On Thu, Apr 15, 2021 at 5:31 AM Pengliang Yang @.***> wrote:

May I ask another question regarding NUFFT? I have such a scenario that I need to convert some data from non-uniform grid to uniformly sampled Fouerier space, and then perform some algeabraic operations in Fourier domain, and finally come back. Therefore, I also need to have an inverse transform. Is that available in finufft as well?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/182#issuecomment-820278889, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSVL6UYPQKMBVNQZP2LTI2W57ANCNFSM423MCCNQ .

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

ahbarnett commented 3 years ago

I forgot to say: each iteration would apply type 1 and type 2 NUFFTs. Also, the NFFT Chemnitz code has inverse available, although I've not tried it. Best, Alex

On Thu, Apr 15, 2021 at 11:39 AM Alex Barnett < @.***> wrote:

Dear Pengliang, No, the inverse is not directly available. If the problem is small, you can solve a dense linear system directly; if large, you need iterative methods (CG on normal equations) - see Greengard-Lee-Inati here: https://msp.org/camcos/2006/1-1/camcos-v1-n1-p06-p.pdf I will put up a tutorial about it in the coming days. Best, Alex

On Thu, Apr 15, 2021 at 5:31 AM Pengliang Yang @.***> wrote:

May I ask another question regarding NUFFT? I have such a scenario that I need to convert some data from non-uniform grid to uniformly sampled Fouerier space, and then perform some algeabraic operations in Fourier domain, and finally come back. Therefore, I also need to have an inverse transform. Is that available in finufft as well?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/182#issuecomment-820278889, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSVL6UYPQKMBVNQZP2LTI2W57ANCNFSM423MCCNQ .

--

*---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

yangpl commented 3 years ago

Dear Alex, Thanks for prompt reply. Maybe I should detail my problem a bit. I was considering a PDE-based nonlinear optimization problem which requires many iterations of both forward and adjoint solve of Maxwell equation for thousands of time steps, based on finite difference. However, the top boundary of this 3D computing volume is air-water boundary condition, where the wave emitted from the sea will propagate at light/infinite speed along the sea surface. This leads to the treatment of a global transform - Fourier transform - to handle this situation, because finite difference as a local operator cannot. The motivation to use non-uniform grid is to achieve efficient FDTD simulation, but that means I need NUFFT somehow as well as inverse NUFFT. Currently we can simply interpolate wavefield from non-uniform onto uniform grid and then use FFT for these treatment. I simply interpolate fields back. NUFFT and its inverse should be an ideal tool if available. But if I have to solve an linear inverse problem using CG at each time step, then it would be very computationally demanding, and it is hard to be the method of choice in this situation.

I am keeping alert to all progresses of NUFFT in this direction. I like your work on FINUFFT very much, the documentation is much better than the other two well known packages. I think adding some information regarding inverse NUFFT is helpful: since we only approach its inverse in least-square sense, corresponding to solving a minimization problem.

Best regards, Pengliang

ahbarnett commented 3 years ago

Ok, this is getting interesting. I found your g-scholar page so I can see the application area.

Let's dissect the interp task first: going from NU to U grid. If your grids are not huge (ie <~1e4) and they are the same every timestep, you can precompute (by solving Vandermonde systems) a matrix to take you from values on NU to values on U grid, then use the matvec each time. This would be easy in 1D, but uncertain in 2D or 3D, and I'm not sure how many dims your interpolation is in.

There is a special case of NU grid where no linear solve is needed: when there is a good quadrature scheme (weights w_j) available for your NU grid. I would expect you already have this, to the h^2 accuracy of the overall solve. Then you can use values times these weights in a type-1 NUFFT to approx the Euler-Fourier formula, as in the 2D Poisson solve demo I already have, then a FFT back to U values.

Regardless of dimension, if your NU grid is fine enough (spacing always << lambda/2) then you have many options for a high-accuracy interpolation from it, since you can "go local", ie, use Lagrange interpolation (p points in each dim) from only the nearby set of points. The matrix could then be stored and applied as sparse. You would get p^th-order accuracy. No NUFFTs required. NUFFTs would be needed only if there are bigger-than-Nyquist gaps in the NU grid, which is probably not a good idea.

These are all some things I should put in a tutorial, I think.

Now to the next problem up the chain (the forward solver): are you trying to impose a non-local convolutional (radiation condition) operator on the 2D sea surface, coupling that to a face of the 3D FD grid? But the 3D grid is nonuniform so the surface grid is also, so you need to apply the convolution on a NU 2D grid? If the operator dies rapidly in k-space, and you have a quadrature scheme, then a pair of NUFFTs is a good way to do it.

Enough for now. Best, Alex

On Fri, Apr 16, 2021 at 7:43 AM Pengliang Yang @.***> wrote:

Dear Alex, Thanks for prompt reply. Maybe I should detail my problem a bit. I was considering a PDE-based nonlinear optimization problem which requires many iterations of both forward and adjoint solve of Maxwell equation for thousands of time steps, based on finite difference. However, the top boundary of this 3D computing volume is air-water boundary condition, where the wave emitted from the sea will propagate at light/infinite speed along the sea surface. This leads to the treatment of a global transform - Fourier transform - to handle this situation, because finite difference as a local operator cannot. The motivation to use non-uniform grid is to achieve efficient FDTD simulation, but that means I need NUFFT somehow as well as inverse NUFFT. Currently we can simply interpolate wavefield from non-uniform onto uniform grid and then use FFT for these treatment. I simply interpolate fields back. NUFFT and its inverse should be an ideal tool if available. But if I have to solve an linear inverse problem using CG at each time step, then it would be very computationally demanding, and it is hard to be the method of choice in this situation.

I am keeping alert to all progresses of NUFFT in this direction. I like your work on FINUFFT very much, the documentation is much better than the other two well known packages. I think adding some information regarding inverse NUFFT is helpful: since we only approach its inverse in least-square sense, corresponding to solving a minimization problem.

Best regards, Pengliang

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/182#issuecomment-821116977, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSUOD3P24GZUAJGX2LTTJAPGFANCNFSM423MCCNQ .

-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942

yangpl commented 3 years ago

Dear Alex,

Exactly as you said, I was using polynomial interpolation via the solution of Vandemonde matrix system. I precomputed the weights and tabulated them before my simulation. The EM waves decays very fast, and I found interpolation is rather accurate. The 2D top sea-water boundary condition is exactly as you described. After FDdiscretization, I have nxny \approx 200200, asking for a 2D nonuniform grid. Currently I compute all these derivatives by tensor product of 1D.

I am working at very low frequency electromagnetic propagation, which means that there are few number of wavelength in the domain. Thanks for your explanation, which indicates NUFFT is not needed for my problem.

Cheers ... Pengliang