Closed Kai2510 closed 1 month ago
Problem solved. Firstly I installed openmp, then errors about omp_*** was eliminated. Then I manually specified mpicc, mpif90's path, and openmpi's library path.
./configure --prefix=/opt/p3dfft/ --enable-fftw --with-fftw=/opt/fftw --enable-openmpi --enable-gnu CC=/opt/openmpi/4.1.6/bin/mpicc FC=/opt/openmpi/4.1.6/bin/mpif90 FCFLAGS="-I/opt/openmpi/4.1.6/include/ -fno-strict-aliasing" CFLAGS=-I/opt/openmpi/4.1.6/include/ LIBS="-L/opt/openmpi/4.1.6/lib -lmpi_mpifh -lm"
Note that -lm
should be specified in LIBS
instead of FCFLAGS
to avoid DSO link error mentioned in #17.
Hello! I'm compiling p3dfft on ubuntu 22.04 (gcc 11.4) with openmpi 4.1.6, mpif90 and fftw 3.3.9 already installed. However, the openmpi is compiled and installed in '/opt/openmpi/' directory. I've ran configure script like this:
./configure --prefix=/opt/p3dfft/ --enable-fftw --with-fftw=/opt/fftw --enable-openmpi --enable-gnu LDFLAGS="-L/opt/openmpi/lib -lmpi_mpifh -lm" FCFLAGS="-fno-strict-aliasing"
The question is that I can't find method to specify the directory of openmpi. I can't even find variable related to openmpi's library. Currently,
make
leads to errors like this:Obviously, the paralleled fortran code cannot be compiled properly. I have no idea about the error... So, has anyone met same problems? And how can I fix it? Thanks in advance.