Coder Social home page Coder Social logo

poisfft's People

Contributors

clarkguilty avatar ladaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poisfft's Issues

parallelization related problems

I try to use this solver with openmp for parallelization. I start with the example given in testpoisson.cc.
However, no mater what the value I set for np (as below), the computational time is the same.
PoisFFT::Solver<3, double> S(ns, Ls, BCs, POISFFT_SPECTRAL, NULL, NULL, NULL, np);

Makefile compiling

Hi, I'm trying to linking the library to my source code.
I already tested that the library works; I compiled with 'scons test' and run the test case and it works well.
Then, I recompiled with 'scons'. It generate a library in in lib/gcc/libpoisfft.so and modules in bin/gcc/*.mod
But when I try to link the library to my source code I got this error message:

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_plan_dft_3d' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to GOMP_parallel'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_plan_dft_1d' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to GOMP_single_start'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_plan_r2r_1d' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_plan_r2r_1d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_plan_dft_2d' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to omp_get_thread_num_'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_plan_r2r_3d' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_plan_r2r_2d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_plan_dft_2d' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_plan_dft_1d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to omp_get_num_threads_' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_plan_r2r_3d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to omp_get_num_threads' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_execute_dft'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_execute_r2r' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_execute_dft'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_destroy_plan' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to GOMP_barrier'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_plan_with_nthreads' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_plan_dft_3d'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_free' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_execute_r2r'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftwf_plan_r2r_2d' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to omp_get_thread_num'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_init_threads' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: PoisFFT-master/lib/gcc//libpoisfft.so: undefined reference to fftw_malloc'

In my source code I enable poisFFT as shown 'usage_Fortran.txt'
This is my Makefile:

FC=gfortran

FFLAGS := -O3 -ffixed-line-length-none -fdefault-real-8

BIG := # -mcmodel=medium
DBG :=# -g -traceback
OMP := #-openmp

INCLUDE = -I PoisFFT-master/bin/gcc/

LIB = -L PoisFFT-master/lib/gcc/ -lpoisfft

TARGET = flowclub

SRC = param.f90 common.f90 init.f90 bound.f90 chkdiv.f90 mom.f90 forcing.f90 adam.f90 fillps.f90 solverfft.f90 correc.f90 output.f90 main.f90

OBJ = $(SRC:.f90=.so)

all: $(TARGET)

$(TARGET): $(OBJ)
$(FC) $(FFLAGS) $(BIG) $(DBG) $(OMP) -o $@ $(OBJ) $(LIB)

.PHONY: clean
clean:
rm -f *.so *.mod $(TARGET)

%.so: %.f90
$(FC) $(INCLUDE) -c -o $@ $(FFLAGS) $(BIG) $(DBG) $(PROF) $(OMP) $<

Numerical errors when running testmpi.f90 with multiple processors with MPI

Hi,

I am getting errors when solving a 2D domain in parallel with MPI. My code is based on your 'testmpi.f90', which is also attached here just to show that it wasn't something I introduced.

I am setting up a sine wave as my RHS as a benchmark case:
rhs = -2 sin(x) sin(y)
exact = sin(x) sin(y)

The solution is correct when including the PoisFFT_FiniteDifference2 flag in the Execute procedure for both serial and parallel computations. When removing the option and thus using the FFT solver, the results are only correct for serial computations and off by a factor of 2 for the parallel ones.

I am using gfortran with gcc 5.4.0 and Open MPI 2.0.1. For completeness, both my version (my_own.f90) and yours (testmpi.f90) are included with a Makefile.

Thanks,

Solal

Makefile.txt
my_own.f90.txt
testmpi.f90.txt

Problem for the compilation of the MPI version

Hello,

I have a problem for the compilation of the MPI version of PoisFFT. During the compilation of this version the code or the preprocessing seems to have some errors.
Can you help me with these errors ?

Thanks

Errors when getting started with simple fortran program

Dear LadaF,
I am trying to use the library, however I fail to compile a very simple program following the usage_Fortran.txt directions.

I am compiling using this command:

gcc -IPoisFFT/bin/gcc -LPoisFFT/lib/gcc -lpoisfft testPoisFFT.f90

But I get the error:

testPoisFFT.f90:33:9:

 Solver = PoisFFT_Solver3D([nx,ny,nz],[1.0,1.0,1.0],[(PoisFFT_Periodic, i = 1,6)])
         1
Error: No initializer for component ‘nxyz’ given in the structure constructor at (1)!
testPoisFFT.f90:35:32:

 call Execute(Solver, Phi, srhod)
                                1
Error: There is no specific subroutine for the generic ‘execute’ at (1)

I have compiled the dynamic and static libraries, and the tests runs fine.

I bet I am missing something very basic, I am very new on linking libraries.

Thanks!

installation problems using GNU compilers

Hello, I have installed your library in Ubuntu 18.04 and Manjaro using the GNU compilers, however, the line 137 of the SConstruct file (env.Append(FORTRANMODDIRPREFIX = '-J') ) seems to be unnecessary now and harms the install process.

I simply commented the line and the installation proceed flawlessly.

Installation problems with c_binding.f90

Hello, I tried to install your software on the server, but have some problems in the installation of c_binding,f90. The version of Linux is Red Hat Enterprise 7.3.
Firstly, I tried to compile the lib with gcc-4.8.4,the error reports :
f951: internal compiler error: Segmentation fault
0x8a05ff crash_signal
../../gcc-4.8.4/gcc/toplev.c:332
0x57be32 load_derived_extensions
../../gcc-4.8.4/gcc/fortran/module.c:4245
0x57be32 read_module
../../gcc-4.8.4/gcc/fortran/module.c:4783
0x57c38b gfc_use_module
../../gcc-4.8.4/gcc/fortran/module.c:6216
0x57d453 gfc_use_modules()
../../gcc-4.8.4/gcc/fortran/module.c:6339
0x582317 use_modules
../../gcc-4.8.4/gcc/fortran/parse.c:86
0x583ba4 decode_statement
../../gcc-4.8.4/gcc/fortran/parse.c:301
0x584ea4 next_free
../../gcc-4.8.4/gcc/fortran/parse.c:782
0x584ea4 next_statement
../../gcc-4.8.4/gcc/fortran/parse.c:975
0x585534 parse_spec
../../gcc-4.8.4/gcc/fortran/parse.c:2743
0x588431 parse_module
../../gcc-4.8.4/gcc/fortran/parse.c:4311
0x588431 gfc_parse_file()
../../gcc-4.8.4/gcc/fortran/parse.c:4592
0x5c40f5 gfc_be_parse_file
../../gcc-4.8.4/gcc/fortran/f95-lang.c:189
Please submit a full bug report.

Then I tried to use intel compiler (ifort version 19.0.5.281) , and the error report:
./c_new-inc.f90(29): error #8212: Omitted field is not initialized. Field initialization missing: [BCS]
f_D = PoisFFT_Solver1D_DP(int(nxyz(1:1:-1)), &
--------------------------------^
compilation aborted for c_binding.f90 (code 1)
scons: *** [/bwfefs/home/.../test_PoisFFT/PoisFFT-master/bin/intel/c_binding.os] Error 1

Could you please tell me what's wrong and how to fix it.

internal compiler error in c_new-inc.f90

Dear LadaF,
I instantly fell in love with PoisFFT because of it's simplicity and portability. I was planning to use it for my dislocation dynamics simulations.
Well, I already have the FFTw+MPI libraries. I saw that I need to the pFFT libraries too. So, I downloaded and installed the pFFT libraries too (I get a an error when I do "make check").
Now, coming to the main part. When I try to compile a mpi version of PoisFFT, it gives me an error of not recognising the libraries. I drop a step back and tried to install atlest the single core version. Here, I get the ICE error(gcc 4.9.2)!!!!
I will attach some snapshots of the problem if you think this is a problem which you can help me with!

HT-NaN-HT

Some tests failed when with OpenMP

Compiled the library using

scons comp=intel openmp=yes

then the tests

scons comp=intel openmp=yes test

And these tests failed

$ ./c_testpoisson 
FAIL, residuum 2.815387

$ ./cc_testpoisson 
FAIL, residuum2.81539

$ ./testpoisson
 ----
 3D  |Dirichlet regular|Dirichlet regular|Dirichlet regular|Dirichlet regular|Dirichlet regular|Dirichlet regular|
 Spectral FAIL
 Spectral residuum:  0.141491213006055     
 FD2 FAIL
 Finite difference 2 residuum:   1.92554165807776     

 ----
 3D  |Dirichlet staggered|Dirichlet staggered|Dirichlet staggered|Dirichlet staggered|Dirichlet staggered|Dirichlet staggered|
 Spectral FAIL
 Spectral residuum:  0.132820078333749     
 FD2 FAIL
 Finite difference 2 residuum:   1.95833611599937     

 ----
 3D  |Neumann regular|Neumann regular|Neumann regular|Neumann regular|Neumann regular|Neumann regular|
 FD2 FAIL
 Finite difference 2 residuum:   2.52419027322218     

 ----
 3D  |Neumann staggered|Neumann staggered|Neumann staggered|Neumann staggered|Neumann staggered|Neumann staggered|
 FD2 FAIL
 Finite difference 2 residuum:   2.48632335787074  

Other tests in testpoisson were passed.

Recompiled the tests, but not the library, without OpenMP

scons comp=intel openmp=no test

And then all tests were passed, for all three interfaces.

internal compiler error in c_binding.f90

Hi, I already compiled and used the library on my personal computer, and it works very well!!
But when I try to compile the library on another computer (I'm not the administrator) I get
f951: internal compiler error: Segmentation fault, when gfortran try to compile c_binding.f90.
The version of gfortran is GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28).

What do I need to solve this problem?

How to use PoisFFT from Visual Studio

dear LadaF;
I want to solve a hydrological problem using your solver in 2D and 3D. I have a problem compiling the files in windows visual studio for FORTRAN; Can you please help me in this regard?

Many thanks in advance

Boundary conditions

Is it possible to use this library with mixed BC, i.e. Dirichlet on one side of my domain and Neumann on the other side?
Thanks a lot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.