Skip to content

Issues compiling p3fft #23

Open
Open
@JayStandridge

Description

@JayStandridge

Summary of Installation and Compilation Issues with P3DFFT (Ubuntu 24.04, GCC 13.3, OpenMPI)
System Details

OS: Ubuntu 24.04

GCC: 13.3.0

MPI: OpenMPI via system package manager

FFTW: Installed libfftw3-dev via package manager

    Static library found at: /usr/lib/x86_64-linux-gnu/libfftw3.a
  1. Configuration Issues (Resolved)

Issue:
configure initially failed to locate libfftw3.a, looking in /usr/lib rather than the correct location /usr/lib/x86_64-linux-gnu.

Workaround:
Ran configure with:

./configure --with-fftw=/usr

After verifying the actual location of libfftw3.a at /usr/lib/x86_64-linux-gnu, I manually modified configure to look there for libfftw3.a.

I wasn't sure if this was intended behavior or not.

  1. Autotools Errors (Resolved)

Issue:
Errors like:

aclocal-1.13: command not found
automake-1.13: command not found

Used autoreconf -fi to regenerate the autotools build system with installed versions (aclocal, automake) rather than requiring version 1.13 specifically.

  1. Fortran Compilation Fails (Current Blocking Issue)

Problem:
During make, compilation of ftran.F90 fails due to type mismatch in calls to init_f_r2c and exec_f_r2c.

ftran.F90:811:32:
811 | call exec_f_r2c (rXgYZ, nx, cXgYZ, nxhp, nx, jisize*kjsize)
| 1
......
825 | call exec_f_r2c(source(1,j),str1,dest(1,1,j),str2,n,m)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).

ftran.F90:526:33:
526 | call init_f_r2c(XgYZ,nx,buf2,nxhp,nx,jisizekjsize)
| 1
......
810 | call init_f_r2c (rXgYZ, nx, cXgYZ, nxhp, nx, jisize
kjsize)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).

subroutine init_f_r2c(X,dimx,Y,dimy,N,m)
use p3dfft
use fft_spec

integer dimx, dimy, N, m
real(p3dfft_type) X(N*m)
complex(p3dfft_type) Y((N/2+1)*m)

In ftran.F90, the call appears as:

call init_f_r2c(XgYZ, nx, buf2, nxhp, nx, jisize*kjsize)

Where XgYZ is declared as complex(p3dfft_type) and buf2 as real(p3dfft_type), which is reversed from the expected signature.

I'm blocked at this compilation stage due to argument type mismatches that seem to contradict the subroutine definitions. Would appreciate any clarification on expected data types or whether this is a known issue with recent compiler versions.

Thanks in advance for your help. I am looking to create a 3D spectral (periodic in x and y, chebyshev in z) code for Rayleigh–Bénard convection for a class project. My professor recommended this library specifically for me to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions