Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbrackenhoff committed Aug 7, 2019
2 parents 5de4900 + 8a47ddd commit 87c7fb8
Show file tree
Hide file tree
Showing 334 changed files with 28,114 additions and 7,363 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ raytime/Raytime
MDD/mdd
marchenko3D/fmute3D
marchenko3D/marchenko3D
fdelmodc3D/fdelmodc3D
fdacrtmc/fdacrtmc
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at janth@xs4all.nl. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
2 changes: 1 addition & 1 deletion MDD/computeMatrixInverse.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void computeMatrixInverse(complex *matrix, int nxm, int rthm, float eps_a, float
S0 = S[0];
neig = 0;
for (i=0; i<N; i++) {
if (verbose=4) fprintf(stderr,"S[%d] = %e ",i,S[i]);
if (verbose==4) fprintf(stderr,"S[%d] = %e ",i,S[i]);
Si = S[i];
if ((Si/S0) > numacc) { S[i]=1.0/S[i]; neig++; }
else S[i] = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion MDD/mdd.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ int main (int argc, char **argv)
hdr[0].ntr = nstationA*nstationB;
if (!one_file) {
strcpy(filename, file_out);
sprintf(number,"Station%03d\0",jstation+1);
sprintf(number,"Station%03ld",jstation+1);
name_ext(filename, number);
if (verbose>3) fprintf(stderr,"writing to file %s\n", filename);
fpout = fopen( filename, "w+" );
Expand Down
2 changes: 1 addition & 1 deletion MDD/readShotData.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int readShotData(char *filename, float xmin, float dx, float *xrcv, float *xsrc,
fseek(fp, 0, SEEK_SET);
nread = fread( &hdr, 1, TRCBYTES, fp );
assert(nread == TRCBYTES);
if (hdr.scalco < 0) scl = 1.0/fabs(hdr.scalco);
if (hdr.scalco < 0) scl = 1.0/fabs((float)hdr.scalco);
else if (hdr.scalco == 0) scl = 1.0;
else scl = hdr.scalco;
fseek(fp, 0, SEEK_SET);
Expand Down
164 changes: 164 additions & 0 deletions Make_include_OSX
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Makefile for general rules

# To Change the compile environment to your current system you should set:
# -1- ROOT variable to the directory where you found this file
# -2- if needed use a different compiler (CC) if gcc is not available
# -3- on Solaris system use RANLIB=ranlib which is defined below

# the current directory (in vi ":r!pwd")
ROOT=/Users/jan/src/OpenSource

#############################################################################
# Some convenient abbreviations
B = $(ROOT)/bin
I = $(ROOT)/include
L = $(ROOT)/lib

########################################################################
# C compiler; change this only if you are using a different C-compiler

#GNU
#CC = gcc-mp-5
CC = gcc
FC = gfortran
# Linux gcc version 4.x
OPTC = -O3 -ffast-math
#to include parallelisation with OpenMP
OPTC += -fopenmp

# for better performing code you can try:
#OPTC = -O3 -fno-trapping-math -ffast-math -funroll-all-loops -mavx -fomit-frame-pointer -mfpmath=sse -ftree-vectorizer-verbose=1
# Linux gcc version 3.x
#OPTC = -O3 -ffast-math -funroll-all-loops -mfpmath=sse

#for double precision use FFTlib and emmod
#OPTC += -DDOUBLE
#OPTF += -fdefault-double-8 -fdefault-real-8

#Cray
#CC=cc
#FC=ftn
#OPTC = -O2
#OPTF = -O2

#Intel
#CC = icc
#FC = ifort
### Linux
##OPTC = -O3 -no-prec-div -qopt-report-phase=vec,openmp
##OPTF = -O3 -no-prec-div -qopt-report-phase=vec,openmp
#OPTC = -O3 -no-prec-div -xCORE-AVX2
#OPTF = -O3 -no-prec-div -xCORE-AVX2
##to include parallelisation with OpenMP
#OPTC += -qopenmp

# Apple OSX intel 11.1.076 snow leopard 10.6.2
#OPTC = -O3 -msse3 -no-prec-div -vec-report2 -fno-builtin-__sprintf_chk

#PGI
#CC = pgcc
#FC = pgf90
#OPTC = -fast -Minfo=vect -Mvect=simd:256 -Msafeptr
#OPTC = -fast -Minfo=vect -Mvect=simd:256 -Msafeptr -Mprof=lines
#OPTF = -fast
#LDFLAGS = -fast -Minfo=vect -Mvect=simd:256 -Msafeptr

#Pathscale
#CC = cc
#FC = ftn
#OPTC = -Ofast -OPT:Ofast -fno-math-errno
#OPTF = -Ofast -OPT:Ofast -fno-math-errno

#Apple OSX clang/gcc (10.9) llvm
CC = clang
OPTC = -Ofast
LDFLAGS = -Ofast

#AMD Open64
#CC = opencc
#FC = openf95
#OPTC = -Ofast
#OPTF = -Ofast
#LDFLAGS = -static -Ofast

#############################################################################
# BLAS and LAPACK libraries
MKLLIB=${MKLROOT}/lib
#for GNU compilers
#you might need to add intel64 to : ${MKLROOT}/lib/intel64
#BLAS = -L${MKLROOT}/lib/ -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#for GNU/clang on OSX
BLAS = -Wl,-rpath ${MKLLIB} -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#on linux you want to use groups and MKL is in lib/intel64
#MKLLIB=${MKLROOT}/lib/intel64
#BLAS = -Wl,-rpath ${MKLLIB} -Wl,--start-group -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl
#for intel compilers
#BLAS = -mkl

#############################################################################
# FOR FFT LIBRARIES
#AMD ACML 4.4.0
#AMDROOT = /home/thorbcke/amdsdk/v1.0/acml/open64_64
#OPTC += -DACML440 -I$(AMDROOT)/include
#BLAS = -L$(AMDROOT)/lib -lacml -lfortran -lffio -lrt -lm
#Intel MKL
MKLLIB=${MKLROOT}/lib
OPTC += -DMKL -I$(MKLROOT)/include -I$(MKLROOT)/include/fftw
#for GNU compilers
#FFT = -Wl,-rpath ${MKLLIB} -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#for clang on OSX
FFT = -L${MKLROOT}/lib/ -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl
#on linux you want to use groups and MKL is in lib/intel64
#MKLLIB=${MKLROOT}/lib/intel64
#FFT = -Wl,-rpath ${MKLLIB} -Wl,--start-group -L${MKLLIB} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group -lpthread -lm -ldl
#for Intel compilers
#FFT = -Wl,-rpath ${MKLLIB} -L${MKLLIB} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl

#LIBARIES
LIBS= -L$L -lgenfft $(FFT) $(BLAS)


########################################################################
# standard CFLAGS
CFLAGS = -I$I -I.

#############################################################################
# the archiver
AR = ar

#############################################################################
# ar FLAGS
ARFLAGS = rv

#############################################################################
# ranlib definition
RANLIB = ar -s
# on Sun SOLARIS use:
#RANLIB = ranlib


.SUFFIXES : .o .c .cc .f .a .F90
.c.o :
$(CC) -c $(CFLAGS) $(OPTC) $<
.c.a :
$(CC) -c $(CFLAGS) $(OPTC) $<
$(AR) $(ARFLAGS) $@ $*.o
rm -f $*.o
.o.a :
$(AR) $(ARFLAGS) $@ $*.o
rm -f $*.o
.f.o :
$(FC) -c $(FFLAGS) $(OPTF) $<
.F90.o :
$(FC) -c $(FFLAGS) $(OPTF) $<
.f.a :
$(FC) -c $(FFLAGS) -I$I $<
$(AR) $(ARFLAGS) $@ $*.o
rm -f $*.o
.cc.a :
$(C++) -c $(C++FLAGS) -I$I $<
$(AR) $(ARFLAGS) $@ $*.o
rm -f $*.o
.cc.o :
$(C++) -c $(C++FLAGS) $<

26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
all: mkdirs
cd FFTlib ; $(MAKE)
cd fdelmodc ; $(MAKE) install
cd fdelmodc3D ; $(MAKE) install
cd fdelmodc3D ; $(MAKE) install
cd utils ; $(MAKE) install
cd marchenko ; $(MAKE) install
cd marchenko3D ; $(MAKE) install
cd marchenko ; $(MAKE) install
cd marchenko3D ; $(MAKE) install
cd corrvir ; $(MAKE) install
cd raytime ; $(MAKE) install
cd MDD ; $(MAKE) install
cd zfp ; $(MAKE)
cd fdacrtmc ; $(MAKE) install


mkdirs:
-mkdir -p lib
Expand All @@ -19,24 +22,29 @@ mkdirs:
clean:
cd FFTlib ; $(MAKE) $@
cd fdelmodc ; $(MAKE) $@
cd fdelmodc3D ; $(MAKE) $@
cd fdelmodc3D ; $(MAKE) $@
cd utils ; $(MAKE) $@
cd marchenko ; $(MAKE) $@
cd marchenko3D ; $(MAKE) $@
cd marchenko ; $(MAKE) $@
cd marchenko3D ; $(MAKE) $@
cd corrvir ; $(MAKE) $@
cd raytime ; $(MAKE) $@
cd MDD ; $(MAKE) $@
cd zfp ; $(MAKE) $@
cd fdacrtmc ; $(MAKE) $@

realclean:
cd FFTlib ; $(MAKE) $@
cd fdelmodc ; $(MAKE) $@
cd fdelmodc3D ; $(MAKE) $@
cd fdelmodc3D ; $(MAKE) $@
cd fdelrtmc ; $(MAKE) $@
cd utils ; $(MAKE) $@
cd marchenko ; $(MAKE) $@
cd marchenko3D ; $(MAKE) $@
cd marchenko ; $(MAKE) $@
cd marchenko3D ; $(MAKE) $@
cd corrvir ; $(MAKE) $@
cd raytime ; $(MAKE) $@
cd MDD ; $(MAKE) $@
cd zfp ; $(MAKE) $@
cd fdacrtmc ; $(MAKE) $@
rm -f lib/*
rm -f include/*
rm -f bin/*
8 changes: 8 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ git clone https://github.com/JohnWStockwellJr/SeisUnix

==> Please make sure that SU is compiled without XDR (in $CWPROOT/Makefile.config make sure that XDRFLAG is NOT set). The SU output files of fdelmodc are all based on local IEEE data.

ZFP
---
The fdacrtmc code makes use of ZFP compression to store the snaphots in CPU memory. This package is included in this repository for
your convenience. The latest package and detailed explanation can be found on:

https://github.com/LLNL/zfp


MISC
----
Other make commands which can be useful:
Expand Down
4 changes: 2 additions & 2 deletions corrvir/corrvir.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ int main (int argc, char **argv)
if (nbm==0) { /* read only headers */
nbufmax = 0;
for (i=0; i<ntrace; i++) {
if(i % 100000 == 0) fprintf(stderr,"i=%d out of %d\n", i, ntrace);
if(i % 100000 == 0) fprintf(stderr,"i=%d out of %ld\n", i, ntrace);
offset = i*trace_sz;
ret = fseeko(fpin , offset, SEEK_SET);
if (ret<0) perror("fseeko");
Expand All @@ -222,7 +222,7 @@ int main (int argc, char **argv)
r = (float *)calloc(ntfft,sizeof(float));
c = (complex *)calloc((nf),sizeof(complex));
for (i=0; i<ntrace; i++) {
if(i % 100000 == 0) fprintf(stderr,"i=%d out of %d\n", i, ntrace);
if(i % 100000 == 0) fprintf(stderr,"i=%d out of %ld\n", i, ntrace);
offset = i*trace_sz;
ret = fseeko(fpin , offset, SEEK_SET);
if (ret<0) perror("fseeko");
Expand Down
Binary file added fdacrtmc/Doc/fdacrtmc.pdf
Binary file not shown.
Loading

0 comments on commit 87c7fb8

Please sign in to comment.