diff --git a/fftma_module/gen/build/lib.linux-x86_64-3.6/FFTMA.cpython-36m-x86_64-linux-gnu.so b/fftma_module/gen/build/lib.linux-x86_64-3.6/FFTMA.cpython-36m-x86_64-linux-gnu.so deleted file mode 100755 index 0e9d35f..0000000 Binary files a/fftma_module/gen/build/lib.linux-x86_64-3.6/FFTMA.cpython-36m-x86_64-linux-gnu.so and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/FFTPressure.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/FFTPressure.o deleted file mode 100644 index dcbec4a..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/FFTPressure.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/FFTtest.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/FFTtest.o deleted file mode 100644 index 8135237..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/FFTtest.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/Py_getvalues.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/Py_getvalues.o deleted file mode 100644 index bc122de..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/Py_getvalues.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/Py_kgeneration.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/Py_kgeneration.o deleted file mode 100644 index c09a496..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/Py_kgeneration.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/addstat.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/addstat.o deleted file mode 100644 index 4235fd9..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/addstat.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/addstat2.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/addstat2.o deleted file mode 100644 index ab189e5..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/addstat2.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/axes.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/axes.o deleted file mode 100644 index ebed1ac..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/axes.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_pressure.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_pressure.o deleted file mode 100644 index 6343993..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_pressure.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_real.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_real.o deleted file mode 100644 index bd7459f..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_real.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_velocity.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_velocity.o deleted file mode 100644 index e8c8380..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/build_velocity.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cardsin.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cardsin.o deleted file mode 100644 index 2ab6d5d..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cardsin.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cgrid.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cgrid.o deleted file mode 100644 index 49afcd1..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cgrid.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/clean_real.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/clean_real.o deleted file mode 100644 index 07a02fe..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/clean_real.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/clean_real2.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/clean_real2.o deleted file mode 100644 index 7449249..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/clean_real2.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cov_value.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cov_value.o deleted file mode 100644 index 288c576..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cov_value.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/covariance.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/covariance.o deleted file mode 100644 index 61949ae..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/covariance.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cubic.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cubic.o deleted file mode 100644 index 882a9ff..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/cubic.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/debuginput.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/debuginput.o deleted file mode 100644 index e4ff9f4..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/debuginput.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/derivReal.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/derivReal.o deleted file mode 100644 index a2a94df..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/derivReal.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/exponential.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/exponential.o deleted file mode 100644 index badfdaa..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/exponential.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fftma.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fftma.o deleted file mode 100644 index 46e889b..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fftma.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fftma2.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fftma2.o deleted file mode 100644 index 71d86b7..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fftma2.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fourt.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fourt.o deleted file mode 100644 index 4bb8f9f..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/fourt.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gammf.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gammf.o deleted file mode 100644 index 18da2b9..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gammf.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gasdev.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gasdev.o deleted file mode 100644 index 457b314..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gasdev.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gaussian.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gaussian.o deleted file mode 100644 index 8b6e75f..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/gaussian.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/generate.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/generate.o deleted file mode 100644 index 4befda7..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/generate.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/genlib.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/genlib.o deleted file mode 100644 index 06cb9a3..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/genlib.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/inputdata.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/inputdata.o deleted file mode 100644 index 2552a0e..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/inputdata.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/inputfiledata.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/inputfiledata.o deleted file mode 100644 index ab3aa11..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/inputfiledata.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/kgeneration.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/kgeneration.o deleted file mode 100644 index a49f4ce..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/kgeneration.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/kgeneration2.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/kgeneration2.o deleted file mode 100644 index 3fe6e8a..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/kgeneration2.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/length.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/length.o deleted file mode 100644 index e33b672..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/length.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/mat_vec.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/mat_vec.o deleted file mode 100644 index ee117bb..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/mat_vec.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/maxfactor.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/maxfactor.o deleted file mode 100644 index 2a17cc2..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/maxfactor.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/nor2log.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/nor2log.o deleted file mode 100644 index 6d9508a..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/nor2log.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/nugget.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/nugget.o deleted file mode 100644 index d74a5f8..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/nugget.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/pgeneration.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/pgeneration.o deleted file mode 100644 index ed962d5..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/pgeneration.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/pgeneration2.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/pgeneration2.o deleted file mode 100644 index 373f4ef..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/pgeneration2.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/power.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/power.o deleted file mode 100644 index dfc1b1b..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/power.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/prebuild_gwn.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/prebuild_gwn.o deleted file mode 100644 index 06f8a37..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/prebuild_gwn.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/ran2.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/ran2.o deleted file mode 100644 index 9fa2f30..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/ran2.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/random.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/random.o deleted file mode 100644 index 3d275ef..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/random.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readdata.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readdata.o deleted file mode 100644 index 208e045..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readdata.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readdata3.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readdata3.o deleted file mode 100644 index b0a6b38..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readdata3.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readfile_bin.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readfile_bin.o deleted file mode 100644 index dadedd8..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/readfile_bin.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/scanadt.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/scanadt.o deleted file mode 100644 index 102ed8f..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/scanadt.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/simpio.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/simpio.o deleted file mode 100644 index a883a75..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/simpio.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/spherical.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/spherical.o deleted file mode 100644 index 21f2b50..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/spherical.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/stable.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/stable.o deleted file mode 100644 index 4312568..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/stable.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/stack.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/stack.o deleted file mode 100644 index 630a231..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/stack.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/strlib.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/strlib.o deleted file mode 100644 index 48ae5a5..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/strlib.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/symtab.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/symtab.o deleted file mode 100644 index 58d3db4..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/symtab.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/test_fact.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/test_fact.o deleted file mode 100644 index 7887255..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/test_fact.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/testmemory.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/testmemory.o deleted file mode 100644 index b8ee6e2..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/testmemory.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/testopenfile.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/testopenfile.o deleted file mode 100644 index 9aed3c0..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/testopenfile.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/total_pressure.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/total_pressure.o deleted file mode 100644 index 2228f81..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/total_pressure.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/total_velocity.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/total_velocity.o deleted file mode 100644 index 1a89472..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/total_velocity.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/waveVectorCompute3D.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/waveVectorCompute3D.o deleted file mode 100644 index 0d4b50c..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/waveVectorCompute3D.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/writefile.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/writefile.o deleted file mode 100644 index 5973e58..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/writefile.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/writefile_bin.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/writefile_bin.o deleted file mode 100644 index 20d7baa..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/lib_src/writefile_bin.o and /dev/null differ diff --git a/fftma_module/gen/build/temp.linux-x86_64-3.6/moduleFFTMA.o b/fftma_module/gen/build/temp.linux-x86_64-3.6/moduleFFTMA.o deleted file mode 100644 index ee3b56d..0000000 Binary files a/fftma_module/gen/build/temp.linux-x86_64-3.6/moduleFFTMA.o and /dev/null differ diff --git a/fftma_module/gen/lib_src/Py_getvalues.c b/fftma_module/gen/lib_src/Py_getvalues.c index 8133a13..ad2ea6b 100644 --- a/fftma_module/gen/lib_src/Py_getvalues.c +++ b/fftma_module/gen/lib_src/Py_getvalues.c @@ -1,5 +1,6 @@ #include "Py_py-api.h" #include "genlib.h" +#include "log.h" #include "geostat.h" #include "pressure.h" #include "simpio.h" @@ -40,8 +41,8 @@ #endif #endif -int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario_mod* variogram, struct statistic_mod* stat) -{ +int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario_mod* variogram, struct statistic_mod* stat) { + log_info("RESULT = in progress"); int i, varioNargs = 12, j = 0; PyObject* listvario; PyObject* vgr; @@ -55,6 +56,7 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario stat->variance = (double*)malloc(stat->nblock_var * sizeof(double)); if (stat->variance == NULL) { free(stat->mean); + log_error("RESULT = failed"); return 0; } @@ -73,6 +75,7 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario &(stat->type))) { free(stat->mean); free(stat->variance); + log_error("RESULT = failed"); return 0; } @@ -82,6 +85,7 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario if (variogram->var == NULL) { free(stat->mean); free(stat->variance); + log_error("RESULT = failed"); return 0; } variogram->vario = (int*)malloc(variogram->Nvario * sizeof(int)); @@ -89,6 +93,7 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario free(stat->mean); free(stat->variance); free(variogram->var); + log_error("RESULT = failed"); return 0; } variogram->alpha = (double*)malloc(variogram->Nvario * sizeof(double)); @@ -97,6 +102,7 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario free(stat->variance); free(variogram->var); free(variogram->vario); + log_error("RESULT = failed"); return 0; } variogram->scf = (double*)malloc(3 * variogram->Nvario * sizeof(double)); @@ -106,6 +112,7 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario free(variogram->var); free(variogram->vario); free(variogram->alpha); + log_error("RESULT = failed"); return 0; } variogram->ap = (double*)malloc(9 * variogram->Nvario * sizeof(double)); @@ -116,12 +123,15 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario free(variogram->vario); free(variogram->alpha); free(variogram->scf); + log_error("RESULT = failed"); return 0; } for (i = 0; i < variogram->Nvario; i++) { vgr = PyList_GetItem(listvario, i); - if (PyTuple_Size(vgr) != 12) + if (PyTuple_Size(vgr) != 12) { + log_error("RESULT = failed"); return 0; + } (variogram->var)[i] = PyFloat_AsDouble(PyTuple_GetItem(vgr, j++)); (variogram->vario)[i] = (int)PyInt_AsLong(PyTuple_GetItem(vgr, j++)); (variogram->alpha)[i] = PyFloat_AsDouble(PyTuple_GetItem(vgr, j++)); @@ -136,5 +146,6 @@ int Py_getvalues(PyObject* args, long* seed, struct grid_mod* grid, struct vario (variogram->ap)[i * 9 + 5] = PyFloat_AsDouble(PyTuple_GetItem(vgr, j++)); } + log_info("RESULT = success"); return 1; } diff --git a/fftma_module/gen/lib_src/Py_kgeneration.c b/fftma_module/gen/lib_src/Py_kgeneration.c index 668e7b6..fba9662 100644 --- a/fftma_module/gen/lib_src/Py_kgeneration.c +++ b/fftma_module/gen/lib_src/Py_kgeneration.c @@ -4,6 +4,7 @@ #include "simpio.h" #include "toolsFFTMA.h" #include "toolsIO.h" +#include "log.h" #include #include #include @@ -17,7 +18,7 @@ /* Y is the realization with mean and variance wanted */ void Py_kgeneration(long seed, struct grid_mod grid, struct statistic_mod stat, struct vario_mod variogram, struct realization_mod* Z, struct realization_mod* Y, int n[3]) -{ +{ int i, N; int typelog; @@ -27,6 +28,8 @@ void Py_kgeneration(long seed, struct grid_mod grid, struct statistic_mod stat, n[1] = 0; n[2] = 0; + log_info("RESULT = in progress, N = %d", N); + generate(&seed, N, Z); /*FFTMA*/ @@ -37,4 +40,6 @@ void Py_kgeneration(long seed, struct grid_mod grid, struct statistic_mod stat, typelog = stat.type + 2; nor2log(Y, typelog, Y); } + + log_info("RESULT = success"); } diff --git a/fftma_module/gen/lib_src/build_real.c b/fftma_module/gen/lib_src/build_real.c index f35b0c6..c2b70d2 100644 --- a/fftma_module/gen/lib_src/build_real.c +++ b/fftma_module/gen/lib_src/build_real.c @@ -1,4 +1,5 @@ #include "geostat.h" +#include "log.h" #include #include #include @@ -18,10 +19,10 @@ /*realization: vector defining the real part */ /*ireal: vector defining the i-part */ -void build_real(int n[3], int NTOT, double* covar, double* realization, double* ireal) -{ +void build_real(int n[3], int NTOT, double* covar, double* realization, double* ireal) { int i, j, k, maille1; double temp; + log_info("RESULT = in progress, NTOT = %d, covar = %f, n[0] = %d, n[1] = %d, n[2] = %d", NTOT, *covar, n[0], n[1], n[2]); /*decomposition and multiplication in the spectral domain*/ for (k = 1; k <= n[2]; k++) { @@ -40,5 +41,5 @@ void build_real(int n[3], int NTOT, double* covar, double* realization, double* } } - return; + log_info("RESULT = success, realization = %f, ireal = %f", *realization, *ireal); } diff --git a/fftma_module/gen/lib_src/cardsin.c b/fftma_module/gen/lib_src/cardsin.c index 8c4cd89..63674fe 100644 --- a/fftma_module/gen/lib_src/cardsin.c +++ b/fftma_module/gen/lib_src/cardsin.c @@ -1,10 +1,12 @@ #include "genlib.h" +#include "log.h" #include #include /*cardsin covariance function*/ -double cardsin(double h) -{ +double cardsin(double h) { + log_info("RESULT = in progress, h = %f", h); + float delta = 20.371; double z; @@ -14,5 +16,8 @@ double cardsin(double h) } else { z = 1.; } - return (z); + + log_info("RESULT = success, z = %f", z); + + return z; } diff --git a/fftma_module/gen/lib_src/cgrid.c b/fftma_module/gen/lib_src/cgrid.c index 743b8cf..0f2e604 100644 --- a/fftma_module/gen/lib_src/cgrid.c +++ b/fftma_module/gen/lib_src/cgrid.c @@ -1,4 +1,5 @@ #include "geostat.h" +#include "log.h" #include /*computes the size of the grid for FFTs*/ @@ -9,10 +10,11 @@ /*n: vector with the number of cells along the */ /* X, Y and Z axes for the underlying grid */ /* i = [0 1 2] */ -void cgrid(struct vario_mod variogram, struct grid_mod grid, int n[3]) -{ +void cgrid(struct vario_mod variogram, struct grid_mod grid, int n[3]) { int i, N; double D; + + log_info("RESULT = in progress"); if (n == NULL || n[0] == 0 || n[1] == 0 || n[2] == 0) { for (i = 0; i < 3; i++) { @@ -34,9 +36,10 @@ void cgrid(struct vario_mod variogram, struct grid_mod grid, int n[3]) } } else { if ((n[0] < grid.NX) || (n[1] < grid.NY) || (n[2] < grid.NZ)) { - printf("Indicated dimensions are inappropriate in cgrid"); + log_error("RESULT = failed - Indicated dimensions are inappropriate in cgrid"); exit; } } - return; + + log_info("RESULT = success, n[0] = %d, n[1] = %d, n[2] = %d", n[0], n[1], n[2]); } diff --git a/fftma_module/gen/lib_src/clean_real.c b/fftma_module/gen/lib_src/clean_real.c index d826832..25bd9fe 100644 --- a/fftma_module/gen/lib_src/clean_real.c +++ b/fftma_module/gen/lib_src/clean_real.c @@ -1,4 +1,5 @@ #include "geostat.h" +#include "log.h" #include #include #include @@ -6,8 +7,7 @@ #include #include -void clean_real(struct realization_mod* realin, int n[3], struct grid_mod grid, double* vectorresult, struct realization_mod* realout) -{ +void clean_real(struct realization_mod* realin, int n[3], struct grid_mod grid, double* vectorresult, struct realization_mod* realout) { int i, j, k, maille0, maille1; double NTOT; @@ -15,10 +15,12 @@ void clean_real(struct realization_mod* realin, int n[3], struct grid_mod grid, /*is the output realization already allocated?*/ /*if not, memory allocation*/ + log_info("RESULT = in progress, NTOT = %f", NTOT); + if (realout->vector == NULL || realout->n != realin->n) { realout->vector = (double*)malloc(realin->n * sizeof(double)); if (realout->vector == NULL) { - printf("Clean_real.c: No memory available\n"); + log_error("RESULT = failed - No memory available"); exit; } } @@ -37,5 +39,5 @@ void clean_real(struct realization_mod* realin, int n[3], struct grid_mod grid, } } - return; + log_info("RESULT = success"); } diff --git a/fftma_module/gen/lib_src/cov_value.c b/fftma_module/gen/lib_src/cov_value.c index 540c5b8..f123c55 100644 --- a/fftma_module/gen/lib_src/cov_value.c +++ b/fftma_module/gen/lib_src/cov_value.c @@ -1,10 +1,12 @@ #include "genlib.h" #include "geostat.h" +#include "log.h" #include /*selection of model covariance*/ -double cov_value(struct vario_mod variogram, double di, double dj, double dk) -{ +double cov_value(struct vario_mod variogram, double di, double dj, double dk) { + log_info("RESULT = in progress, di = %f, dj = %f, dk = %f", di, dj, dk); + double hx, hy, hz, h; double cov; int k; @@ -49,5 +51,7 @@ double cov_value(struct vario_mod variogram, double di, double dj, double dk) } } - return (cov); + log_info("RESULT = success, hx = %f, hy = %f, hz = %f, h = %f, cov = %f", hx, hy, hz, h, cov); + + return cov; } diff --git a/fftma_module/gen/lib_src/covariance.c b/fftma_module/gen/lib_src/covariance.c index c3d13bd..a5c1cd4 100644 --- a/fftma_module/gen/lib_src/covariance.c +++ b/fftma_module/gen/lib_src/covariance.c @@ -1,13 +1,14 @@ #include "geostat.h" +#include "log.h" /*builds the sampled covariance function*/ /*dimensions are even*/ -void covariance(double* covar, struct vario_mod variogram, struct grid_mod mesh, int n[3]) - -{ +void covariance(double* covar, struct vario_mod variogram, struct grid_mod mesh, int n[3]) { int i, j, k, maille, n2[3], symmetric; double di, dj, dk; + log_info("RESULT = in progress"); + for (i = 0; i < 3; i++) n2[i] = n[i] / 2; @@ -76,5 +77,5 @@ void covariance(double* covar, struct vario_mod variogram, struct grid_mod mesh, } } - return; + log_info("RESULT = success, di = %f, dj = %f, dk = %f", di, dj, dk); } diff --git a/fftma_module/gen/lib_src/cubic.c b/fftma_module/gen/lib_src/cubic.c index 9fbfd03..670031d 100644 --- a/fftma_module/gen/lib_src/cubic.c +++ b/fftma_module/gen/lib_src/cubic.c @@ -1,10 +1,12 @@ #include "genlib.h" +#include "log.h" #include #include /*cubic covariance function*/ -double cubic(double h) -{ +double cubic(double h) { + log_info("RESULT = in progress, h = %f", h); + double z; if (h >= 1.) { @@ -12,5 +14,8 @@ double cubic(double h) } else { z = 1. - 7. * (double)(h * h) + (35. / 4.) * (double)(h * h * h) - 3.5 * (double)(h * h * h * h * h) + .75 * (double)(h * h * h * h * h * h * h); } - return (z); + + log_info("RESULT = success, z = %f"); + + return z; } diff --git a/fftma_module/gen/lib_src/exponential.c b/fftma_module/gen/lib_src/exponential.c index c27ee4c..ab06305 100644 --- a/fftma_module/gen/lib_src/exponential.c +++ b/fftma_module/gen/lib_src/exponential.c @@ -1,9 +1,11 @@ #include "genlib.h" +#include "log.h" #include #include /*exponential covariance function*/ -double exponential(double h) -{ +double exponential(double h) { + log_info("RESULT = in progress, h = %f", h); + return (exp(-3. * (double)h)); } diff --git a/fftma_module/gen/lib_src/fftma2.c b/fftma_module/gen/lib_src/fftma2.c index b74d324..dae4d29 100644 --- a/fftma_module/gen/lib_src/fftma2.c +++ b/fftma_module/gen/lib_src/fftma2.c @@ -1,4 +1,5 @@ #include "geostat.h" +#include "log.h" #include #include #include @@ -21,9 +22,10 @@ /*output: */ /*realout: structure defining a realization - */ -void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct realization_mod* realin, struct realization_mod* realout) -{ - int NTOT, i, j, k, NMAX, NDIM, ntot, nmax, NXYZ, nxyz, maille0, maille1; +void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct realization_mod* realin, struct realization_mod* realout) { + log_info("RESULT = in progress"); + + int NTOT, i, j, k, NMAX, NDIM, ntot, nmax, NXYZ, nxyz; int solver; double temp; double *ireal, *covar, *workr, *worki, *realization; @@ -94,4 +96,6 @@ void FFTMA2(struct vario_mod variogram, struct grid_mod grid, int n[3], struct r clean_real(realin, n, grid, realization, realout); free(realization); + + log_info("RESULT = success, NTOT = %d, NMAX = %d, NDIM = %d, ntot = %d, nmax = %d, NXYZ = %d, nxyz = %d", NTOT, NMAX, NDIM, ntot, nmax, NXYZ, nxyz); } diff --git a/fftma_module/gen/lib_src/fourt.c b/fftma_module/gen/lib_src/fourt.c index 8776660..b9360c6 100644 --- a/fftma_module/gen/lib_src/fourt.c +++ b/fftma_module/gen/lib_src/fourt.c @@ -1,3 +1,4 @@ +#include "log.h" #include #include @@ -89,8 +90,8 @@ /* PROGRAM MODIFIED FROM A SUBROUTINE OF BRENNER */ /* 10-06-2000, MLR */ -void fourt(double* datar, double* datai, int nn[3], int ndim, int ifrwd, int icplx, double* workr, double* worki) -{ +void fourt(double* datar, double* datai, int nn[3], int ndim, int ifrwd, int icplx, double* workr, double* worki) { + log_info("RESULT = in progress"); int ifact[21], ntot, idim, np1, n, np2, m, ntwo, iff, idiv, iquot, irem, inon2, non2p, np0, nprev, icase, ifmin, i, j, jmax, np2hf, i2, i1max, i3, j3, i1, ifp1, ifp2, i2max, i1rng, istep, imin, imax, mmax, mmin, mstep, j1, j2max, j2, jmin, j3max, nhalf; double theta, wstpr, wstpi, wminr, wmini, wr, wi, wtemp, thetm, wmstr, wmsti, twowr, sr, si, oldsr, oldsi, stmpr, stmpi, tempr, tempi, difi, difr, sumr, sumi, TWOPI = 6.283185307179586476925286766559; @@ -583,5 +584,6 @@ void fourt(double* datar, double* datai, int nn[3], int ndim, int ifrwd, int icp nprev = n; } L920: + log_info("RESULT = succes"); return; } diff --git a/fftma_module/gen/lib_src/gammf.c b/fftma_module/gen/lib_src/gammf.c index c2c31cf..cbf5842 100644 --- a/fftma_module/gen/lib_src/gammf.c +++ b/fftma_module/gen/lib_src/gammf.c @@ -1,14 +1,18 @@ #include "genlib.h" +#include "log.h" #include #include /*gamma covariance function*/ -double gammf(double h, double alpha) -{ +double gammf(double h, double alpha) { + log_info("RESULT = in progress, h = %f, alpha = %f", h, alpha); + float delta; double z; delta = pow(20., 1. / alpha) - 1.; z = 1. / (double)(pow(1. + h * delta, alpha)); - return (z); + + log_info("RESULT = success, delta = %f, z = %f", delta, z); + return z; } diff --git a/fftma_module/gen/lib_src/gasdev.c b/fftma_module/gen/lib_src/gasdev.c index c66f9c9..5f1392a 100644 --- a/fftma_module/gen/lib_src/gasdev.c +++ b/fftma_module/gen/lib_src/gasdev.c @@ -1,13 +1,15 @@ #include "genlib.h" +#include "log.h" #include #define NTAB 32 -double gasdev(long* idum, long* idum2, long* iy, long iv[NTAB]) -/*returns a normally distributed deviate with 0 mean*/ -/*and unit variance, using ran2(idum) as the source */ -/*of uniform deviates */ -{ +double gasdev(long* idum, long* idum2, long* iy, long iv[NTAB]) { + /*returns a normally distributed deviate with 0 mean*/ + /*and unit variance, using ran2(idum) as the source */ + /*of uniform deviates */ + log_info("RESULT = in progress, idum = %f, idum2 = %f, iy = %f", *idum, *idum2, *iy); + double ran2(long* idum, long* idum2, long* iy, long iv[NTAB]); static int iset = 0; static double gset; @@ -23,9 +25,11 @@ double gasdev(long* idum, long* idum2, long* iy, long iv[NTAB]) fac = sqrt(-2.0 * log(rsq) / rsq); gset = v1 * fac; iset = 1; + log_info("RESULT = success, gset = %f, fac = %f, v1 = %f", gset, fac, v1); return (v2 * fac); } else { iset = 0; - return (gset); + log_info("RESULT = success, gset = %f", gset); + return gset; } } diff --git a/fftma_module/gen/lib_src/gaussian.c b/fftma_module/gen/lib_src/gaussian.c index a8f85f2..d571f70 100644 --- a/fftma_module/gen/lib_src/gaussian.c +++ b/fftma_module/gen/lib_src/gaussian.c @@ -1,9 +1,10 @@ #include "genlib.h" +#include "log.h" #include #include /*gaussian covariance function*/ -double gaussian(double h) -{ +double gaussian(double h) { + log_info("RESULT = in progress, h = %f", h); return (exp(-3. * (double)(h * h))); } diff --git a/fftma_module/gen/lib_src/generate.c b/fftma_module/gen/lib_src/generate.c index 99786e5..dc4efbe 100644 --- a/fftma_module/gen/lib_src/generate.c +++ b/fftma_module/gen/lib_src/generate.c @@ -1,6 +1,7 @@ #include "geostat.h" #include #include +#include "log.h" /* GENERATION OF A GAUSSIAN WHITE NOISE VECTOR */ /*input: */ @@ -9,8 +10,9 @@ /*output: */ /* realization: structure defining the realization*/ -void generate(long* seed, int n, struct realization_mod* realization) -{ +void generate(long* seed, int n, struct realization_mod* realization) { + log_info("RESULT = in progress, n = %d", n); + int i; long idum2 = 123456789, iy = 0; long* iv; @@ -27,7 +29,7 @@ void generate(long* seed, int n, struct realization_mod* realization) (*realization).code = 0; (*realization).vector = (double*)malloc(n * sizeof(double)); if ((*realization).vector == NULL) { - printf("No memory available in generate"); + log_error("RESULT = failed - No memory available in generate"); exit; } @@ -35,5 +37,6 @@ void generate(long* seed, int n, struct realization_mod* realization) for (i = 0; i < n; i++) (*realization).vector[i] = gasdev(seed, &idum2, &iy, iv, &iset); + log_info("RESULT = success"); free(iv); } diff --git a/fftma_module/gen/lib_src/length.c b/fftma_module/gen/lib_src/length.c index 7534a35..fd9e12a 100644 --- a/fftma_module/gen/lib_src/length.c +++ b/fftma_module/gen/lib_src/length.c @@ -1,8 +1,10 @@ +#include "log.h" #include /* compute the length for one dimension*/ -int length(int N, int i, double* scf, double* ap, double D, int Nvari) -{ +int length(int N, int i, double* scf, double* ap, double D, int Nvari) { + log_info("RESULT = in progress, N = %d, i = %d, D = %f, Nvari = %d", N, i, D, Nvari); + int maxfactor(int n); double temp1, temp2; int n, j, k, nmax; @@ -35,5 +37,7 @@ int length(int N, int i, double* scf, double* ap, double D, int Nvari) nmax = maxfactor(n); } } - return (n); + + log_info("RESULT = success, n = %d", n); + return n; } diff --git a/fftma_module/gen/lib_src/maxfactor.c b/fftma_module/gen/lib_src/maxfactor.c index 7658d93..cf6c970 100644 --- a/fftma_module/gen/lib_src/maxfactor.c +++ b/fftma_module/gen/lib_src/maxfactor.c @@ -1,8 +1,10 @@ #include "genlib.h" +#include "log.h" /*determines the greatest prime factor of an integer*/ -int maxfactor(int n) -{ +int maxfactor(int n) { + log_info("RESULT = in progress, n = %d", n); + int test_fact(int* pnum, int fact, int* pmaxfac); int lnum, fact; int maxfac; @@ -31,5 +33,7 @@ int maxfactor(int n) maxfac = lnum; } } - return (maxfac); + + log_info("RESULT = success, maxfac = %d", maxfac); + return maxfac; } diff --git a/fftma_module/gen/lib_src/nor2log.c b/fftma_module/gen/lib_src/nor2log.c index 09167f5..085070a 100644 --- a/fftma_module/gen/lib_src/nor2log.c +++ b/fftma_module/gen/lib_src/nor2log.c @@ -1,4 +1,5 @@ #include "geostat.h" +#include "log.h" #include #include @@ -12,9 +13,8 @@ /*realout: structure defining a realization - */ /* lognormal numbers */ -void nor2log(struct realization_mod* realin, int typelog, struct realization_mod* realout) -{ - printf("Estoy en nor2log\n"); +void nor2log(struct realization_mod* realin, int typelog, struct realization_mod* realout) { + log_info("RESULT = in progress"); int i; double coeff; @@ -63,11 +63,11 @@ void nor2log(struct realization_mod* realin, int typelog, struct realization_mod (*realout).vector[i] = exp((*realin).vector[i] * coeff); break; default: - printf("Unexpected case in nor2log"); + log_error("RESULT = failed - Unexpected case in nor2log"); return; break; } } - return; + log_info("RESULT = success"); } diff --git a/fftma_module/gen/lib_src/nugget.c b/fftma_module/gen/lib_src/nugget.c index 31e3e4c..4aec020 100644 --- a/fftma_module/gen/lib_src/nugget.c +++ b/fftma_module/gen/lib_src/nugget.c @@ -1,10 +1,12 @@ #include "genlib.h" +#include "log.h" #include #include /*nugget covariance function*/ -double nugget(double h) -{ +double nugget(double h) { + log_info("RESULT = in progress, h = %f", h); + if (h == 0) { return (1.); } else { diff --git a/fftma_module/gen/lib_src/power.c b/fftma_module/gen/lib_src/power.c index 1026213..b0f3d40 100644 --- a/fftma_module/gen/lib_src/power.c +++ b/fftma_module/gen/lib_src/power.c @@ -1,9 +1,10 @@ #include "genlib.h" +#include "log.h" #include #include /*power covariance function*/ -double power(double h, double alpha) -{ - return (pow(h, alpha)); +double power(double h, double alpha) { + log_info("RESULT = in progress, h = %f, alpha = %f", h, alpha); + return pow(h, alpha); } diff --git a/fftma_module/gen/lib_src/prebuild_gwn.c b/fftma_module/gen/lib_src/prebuild_gwn.c index b7f03e3..2e31024 100644 --- a/fftma_module/gen/lib_src/prebuild_gwn.c +++ b/fftma_module/gen/lib_src/prebuild_gwn.c @@ -1,4 +1,5 @@ #include "geostat.h" +#include "log.h" #include #include #include @@ -19,12 +20,12 @@ /* must be a Gaussian white noise */ /*realization: structure defining a realization*/ -void prebuild_gwn(struct grid_mod grid, int n[3], struct realization_mod* realin, double* realization, int solver) - -{ +void prebuild_gwn(struct grid_mod grid, int n[3], struct realization_mod* realin, double* realization, int solver) { int i, j, k, maille0, maille1; int ntot; + log_info("RESULT = in progress, n[0] = %d, n[1] = %d, n[2] = %d, solver = %d", n[0], n[1], n[2], solver); + ntot = n[0] * n[1] * n[2]; realization[0] = 0.; if (solver == 1) { @@ -46,5 +47,5 @@ void prebuild_gwn(struct grid_mod grid, int n[3], struct realization_mod* realin } } } - return; + log_info("RESULT = success"); } diff --git a/fftma_module/gen/lib_src/ran2.c b/fftma_module/gen/lib_src/ran2.c index db0750e..5a1ba58 100644 --- a/fftma_module/gen/lib_src/ran2.c +++ b/fftma_module/gen/lib_src/ran2.c @@ -1,4 +1,5 @@ #include "genlib.h" +#include "log.h" #define IM1 2147483563 #define IM2 2147483399 @@ -15,13 +16,13 @@ #define EPS 1.2e-7 #define RNMX (1.0 - EPS) -double ran2(long* idum, long* idum2, long* iy, long iv[NTAB]) - -{ +double ran2(long* idum, long* idum2, long* iy, long iv[NTAB]) { int j; long k; double temp; + log_info("RESULT = in progress"); + if (*idum <= 0) { if (-(*idum) < 1) *idum = 1; @@ -52,8 +53,12 @@ double ran2(long* idum, long* idum2, long* iy, long iv[NTAB]) iv[j] = *idum; if (*iy < 1) (*iy) += IMM1; - if ((temp = AM * (*iy)) > RNMX) + if ((temp = AM * (*iy)) > RNMX) { + log_info("RESULT = success"); return (RNMX); - else - return (temp); + } + else { + log_info("RESULT = success, temp = %f, temp"); + return temp; + } } diff --git a/fftma_module/gen/lib_src/spherical.c b/fftma_module/gen/lib_src/spherical.c index 18a3712..dee26b7 100644 --- a/fftma_module/gen/lib_src/spherical.c +++ b/fftma_module/gen/lib_src/spherical.c @@ -1,16 +1,19 @@ #include "genlib.h" +#include "log.h" #include #include /*spherical covariance function*/ -double spherical(double h) -{ +double spherical(double h) { double z; + log_info("RESULT = in progress, h = %f", h); if (h >= 1.) { z = 0.; } else { z = 1. - 1.5 * (double)h + 0.5 * (double)(h * h * h); } - return (z); + log_info("RESULT = success, z = %f", z); + + return z; } diff --git a/fftma_module/gen/lib_src/stable.c b/fftma_module/gen/lib_src/stable.c index 36608a2..c94c39e 100644 --- a/fftma_module/gen/lib_src/stable.c +++ b/fftma_module/gen/lib_src/stable.c @@ -3,7 +3,6 @@ #include /*stable covariance function*/ -double stable(double h, double alpha) -{ +double stable(double h, double alpha) { return (exp(-3. * (double)pow(h, alpha))); } diff --git a/fftma_module/gen/moduleFFTMA.c b/fftma_module/gen/moduleFFTMA.c index ea8844d..0ba5239 100644 --- a/fftma_module/gen/moduleFFTMA.c +++ b/fftma_module/gen/moduleFFTMA.c @@ -7,6 +7,7 @@ #include "toolsFFTMA.h" #include "toolsFFTPSIM.h" #include "toolsIO.h" +#include "lib_src/log.h" #include #include #include @@ -20,8 +21,8 @@ /* Z is the GWN with 0-mean and 1-variance */ /* Y is the realization with mean and variance wanted */ -static PyObject* genFunc(PyObject* self, PyObject* args) -{ +static PyObject* genFunc(PyObject* self, PyObject* args) { + log_info("RESULT = in progress"); int n[3]; struct realization_mod Z, Y; struct grid_mod grid; @@ -53,6 +54,8 @@ static PyObject* genFunc(PyObject* self, PyObject* args) free(variogram.scf); free(variogram.ap); free(Z.vector); + + log_info("RESULT = success"); return out_array; } diff --git a/fftma_module/gen/setup.py b/fftma_module/gen/setup.py index 36852cd..fd52f70 100644 --- a/fftma_module/gen/setup.py +++ b/fftma_module/gen/setup.py @@ -42,6 +42,7 @@ module_FFTMA = Extension( "./lib_src/clean_real.c", "./lib_src/testmemory.c", "./lib_src/genlib.c", + "./lib_src/log.c" ], ) diff --git a/fftma_module/gen/test.py b/fftma_module/gen/test.py index 6e537f4..b74340f 100644 --- a/fftma_module/gen/test.py +++ b/fftma_module/gen/test.py @@ -2,7 +2,7 @@ from FFTMA import gen import numpy as np import gc -N=512 +N=16 nx, ny, nz = N,N,N dx, dy, dz = 1.0, 1.0, 1.0 @@ -27,7 +27,7 @@ mean=15.3245987 variance=3.5682389 typ=3 -for i in range(2): +for i in range(1): k=gen(nx, ny, nz, dx, dy, dz, seed, variograms, mean, variance, typ) np.save(f"out_{i}.npy",k)