jasonlarkin / p3dfft

Automatically exported from code.google.com/p/p3dfft
GNU General Public License v3.0
0 stars 0 forks source link

Errors with Fortran and C Tests #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
FORTRAN/test_spec

*** glibc detected *** FORTRAN/test_spec.x: malloc(): memory corruption:
0x0000000000d25b10 ***
*** glibc detected *** FORTRAN/test_spec.x: free(): invalid next size
(normal): 0x0000000000d1e5e0 ***
*** glibc detected *** FORTRAN/test_spec.x: malloc(): memory corruption:
0x0000000000d1e7b0 ***
*** glibc detected *** FORTRAN/test_spec.x: free(): invalid next size
(normal): 0x0000000000d30cb0 ***
*** glibc detected *** FORTRAN/test_spec.x: malloc(): memory corruption:
0x0000000000d30e80 ***
*** glibc detected *** FORTRAN/test_spec.x: free(): invalid next size
(normal): 0x0000000000d2d9d0 ***
*** glibc detected *** FORTRAN/test_spec.x: malloc(): memory corruption:
0x0000000000d2dba0 ***

C/*

Original issue reported on code.google.com by dan.djc...@gmail.com on 21 Apr 2010 at 9:31

GoogleCodeExporter commented 9 years ago
/usr/local/bin/mpicc -c -O3 -DGCC -I../../include -I/usr/local/include/ 
driver_sine.c
driver_sine.c: In function 'main':
driver_sine.c:151: warning: passing argument 1 of 'p3dfft_ftran_r2c' from
incompatible pointer type
driver_sine.c:151: warning: passing argument 2 of 'p3dfft_ftran_r2c' from
incompatible pointer type
driver_sine.c:164: warning: passing argument 1 of 'p3dfft_btran_c2r' from
incompatible pointer type
driver_sine.c:164: warning: passing argument 2 of 'p3dfft_btran_c2r' from
incompatible pointer type
/usr/local/bin/mpicc -c -O3 -DGCC -I../../include -I/usr/local/include/
driver_sine_inplace.c
driver_sine_inplace.c: In function 'main':
driver_sine_inplace.c:152: warning: passing argument 1 of 'p3dfft_ftran_r2c' 
from
incompatible pointer type
driver_sine_inplace.c:152: warning: passing argument 2 of 'p3dfft_ftran_r2c' 
from
incompatible pointer type
driver_sine_inplace.c:165: warning: passing argument 1 of 'p3dfft_btran_c2r' 
from
incompatible pointer type
driver_sine_inplace.c:165: warning: passing argument 2 of 'p3dfft_btran_c2r' 
from
incompatible pointer type
/usr/local/bin/mpicc -c -O3 -DGCC -I../../include -I/usr/local/include/ 
driver_rand.c
driver_rand.c: In function 'main':
driver_rand.c:153: warning: passing argument 1 of 'p3dfft_ftran_r2c' from
incompatible pointer type
driver_rand.c:153: warning: passing argument 2 of 'p3dfft_ftran_r2c' from
incompatible pointer type
driver_rand.c:166: warning: passing argument 1 of 'p3dfft_btran_c2r' from
incompatible pointer type
driver_rand.c:166: warning: passing argument 2 of 'p3dfft_btran_c2r' from
incompatible pointer type
/usr/local/bin/mpicc -c -O3 -DGCC -I../../include -I/usr/local/include/ 
driver_spec.c
driver_spec.c: In function 'main':
driver_spec.c:148: warning: passing argument 1 of 'p3dfft_ftran_r2c' from
incompatible pointer type
driver_spec.c:148: warning: passing argument 2 of 'p3dfft_ftran_r2c' from
incompatible pointer type

Original comment by dan.djc...@gmail.com on 21 Apr 2010 at 9:43

GoogleCodeExporter commented 9 years ago
Resolved compiler errors by adding the SINGLE_PREC flag in the makeinc/makefile

# make
cd FORTRAN && make -f makefile.loc
make[1]: Entering directory `/root/SVN/test/sample/FORTRAN'
gfortran -c -O3 -ffixed-line-length-132 -cpp -I../../include 
-I/usr/local/include/
driver_sine.f
gfortran: unrecognized option '-cpp'
gfortran -c -O3 -ffixed-line-length-132 -cpp -I../../include 
-I/usr/local/include/
driver_sine_inplace.f
gfortran: unrecognized option '-cpp'
gfortran -c -O3 -ffixed-line-length-132 -cpp -I../../include 
-I/usr/local/include/
driver_rand.f
gfortran: unrecognized option '-cpp'
gfortran -c -O3 -ffixed-line-length-132 -cpp -I../../include 
-I/usr/local/include/
driver_spec.f
gfortran: unrecognized option '-cpp'
gfortran -o test_sine.x driver_sine.o -L../../lib -lp3dfft -O3 -L/usr/local/lib
-lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90
gfortran -o test_sine_inplace.x driver_sine_inplace.o -L../../lib -lp3dfft -O3
-L/usr/local/lib -lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90
gfortran -o test_rand.x driver_rand.o -L../../lib -lp3dfft -O3 -L/usr/local/lib
-lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90
gfortran -o test_spec.x driver_spec.o -L../../lib -lp3dfft -O3 -L/usr/local/lib
-lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90
make[1]: Leaving directory `/root/SVN/test/sample/FORTRAN'
cd C && make -f makefile.loc
make[1]: Entering directory `/root/SVN/test/sample/C'
/usr/local/bin/mpicc -c -O3 -DGCC -DSINGLE_PREC -I../../include 
-I/usr/local/include/
driver_sine.c
/usr/local/bin/mpicc -c -O3 -DGCC -DSINGLE_PREC -I../../include 
-I/usr/local/include/
driver_sine_inplace.c
/usr/local/bin/mpicc -c -O3 -DGCC -DSINGLE_PREC -I../../include 
-I/usr/local/include/
driver_rand.c
/usr/local/bin/mpicc -c -O3 -DGCC -DSINGLE_PREC -I../../include 
-I/usr/local/include/
driver_spec.c
/usr/local/bin/mpicc -o test_sine.x driver_sine.o -L../../lib -lp3dfft -O3
-L/usr/local/lib -lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90  -lm
/usr/local/bin/mpicc -o test_sine_inplace.x driver_sine_inplace.o -L../../lib
-lp3dfft -O3 -L/usr/local/lib -lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90  -lm
/usr/local/bin/mpicc -o test_rand.x driver_rand.o -L../../lib -lp3dfft -O3
-L/usr/local/lib -lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90  -lm
/usr/local/bin/mpicc -o test_spec.x driver_spec.o -L../../lib -lp3dfft -O3
-L/usr/local/lib -lfftw3 -lfftw3f -lmpi -lmpi_f77 -lmpi_f90  -lm
make[1]: Leaving directory `/root/SVN/test/sample/C'

Original comment by dan.djc...@gmail.com on 21 Apr 2010 at 10:03

GoogleCodeExporter commented 9 years ago
Testing

C test_rand is good:
max diff =5.36442e-07

C test_spec
# /usr/local/bin/mpirun -np 4 C/test_spec.x 
Single precision
 (128 128 128) grid
 2 proc. dimensions
Reading proc. grid from file dims
Using processor grid 2 x 2
 Using stride-1 layout, Block sizes (NB1,NB):           32           1
Power spectrum:
(0.0 0)(1.0 0)(2.0 0)(3.0 0)(4.0 0)(5.0 0)(6.0 0)(7.0 0)(8.0 0)(9.0 0)(10.0 
0)(11.0
0)(12.0 0)(13.0 0)(14.0 0)(15.0 0)(16.0 0)(17.0 0)(18.0 0)(19.0 0)(20.0 0)(21.0
0)(22.0 0)(23.0 0)(24.0 0)(25.0 0)(26.0 0)(27.0 0)(28.0 0)(29.0 0)(30.0 0)(31.0
0)(32.0 0)(33.0 0)(34.0 0)(35.0 0)(36.0 0)(37.0 0)(38.0 0)(39.0 0)(40.0 0)(41.0
0)(42.0 0)(43.0 0)(44.0 0)(45.0 0)(46.0 0)(47.0 0)(48.0 0)(49.0 0)(50.0 0)(51.0
0)(52.0 0)(53.0 0)(54.0 0)(55.0 0)(56.0 0)(57.0 0)(58.0 0)(59.0 0)(60.0 0)(61.0
0)(62.0 0)(63.0 0)(64.0 0)(65.0 0)(66.0 0)(67.0 0)(68.0 0)(69.0 0)(70.0 0)(71.0
0)(72.0 0)(73.0 0)(74.0 0)(75.0 0)(76.0 0)(77.0 0)(78.0 0)(79.0 0)(80.0 0)(81.0
0)(82.0 0)(83.0 0)(84.0 0)(85.0 0)(86.0 0)(87.0 0)(88.0 0)(89.0 0)(90.0 0)(91.0
0)(92.0 0)(93.0 0)(94.0 0)(95.0 0)(96.0 0)(97.0 0)(98.0 0)(99.0 0)(100.0 
0)(101.0
0)(102.0 0)(103.0 0)(104.0 0)(105.0 0)(106.0 0)(107.0 0)(108.0 0)(109.0 0)(110.0
0)(111.0 0)
Time per loop=0.0380831

C test_sine is good
max diff =5.25888e-07

C test_sine_inplace is good
max diff =4.29698e-07

Original comment by dan.djc...@gmail.com on 21 Apr 2010 at 10:29

GoogleCodeExporter commented 9 years ago
Remaining issue is with FORTRAN test_spec

# /usr/local/bin/mpirun -np 4 FORTRAN/test_spec.x 
  Reading from input file stdin
 procs=           4  nx=         128  ny=         128  nz=         128 ndim=           2
 Single precision version
 Reading proc. grid from file dims
 Using processor grid            2  x            2
 Using stride-1 layout, Block sizes (NB1,NB):           32           1
*** glibc detected *** FORTRAN/test_spec.x: free(): invalid next size (normal):
0x0000000000d1d9b0 ***
*** glibc detected *** FORTRAN/test_spec.x: malloc(): memory corruption:
0x0000000000d1db80 ***
*** glibc detected *** FORTRAN/test_spec.x: free(): invalid next size (normal):
0x0000000000d2aff0 ***
*** glibc detected *** FORTRAN/test_spec.x: malloc(): memory corruption:
0x0000000000d2b1c0 ***
*** glibc detected *** FORTRAN/test_spec.x: free(): invalid next size (normal):
0x0000000000d2bbb0 ***
*** glibc detected *** FORTRAN/test_spec.x: malloc(): memory corruption:
0x0000000000d2bd80 ***
[dmitry:02402] *** Process received signal ***
[dmitry:02402] Signal: Aborted (6)
[dmitry:02402] Signal code:  (-6)
[dmitry:02402] [ 0] /lib64/libc.so.6 [0x7ffc202962d0]
[dmitry:02402] [ 1] /lib64/libc.so.6(gsignal+0x35) [0x7ffc20296265]
[dmitry:02402] [ 2] /lib64/libc.so.6(abort+0x110) [0x7ffc20297d10]
[dmitry:02402] [ 3] /lib64/libc.so.6 [0x7ffc202d084b]
[dmitry:02402] [ 4] /lib64/libc.so.6 [0x7ffc202d8f39]
[dmitry:02402] [ 5] /lib64/libc.so.6(__libc_malloc+0x6e) [0x7ffc202dabee]
[dmitry:02402] [ 6] /usr/local/lib/openmpi/mca_coll_tuned.so [0x7ffc1b8409ba]
[dmitry:02402] [ 7] /usr/local/lib/openmpi/mca_coll_sync.so [0x7ffc1ba4b8f8]
[dmitry:02402] [ 8] /usr/local/lib/libmpi.so.0(MPI_Reduce+0x1cc) 
[0x7ffc21170e9c]
[dmitry:02402] [ 9] /usr/local/lib/libmpi_f77.so.0(MPI_REDUCE+0xeb) 
[0x7ffc20f0fa9b]
[dmitry:02402] [10] FORTRAN/test_spec.x [0x40232b]
[dmitry:02402] [11] FORTRAN/test_spec.x [0x4e051e]
[dmitry:02402] [12] /lib64/libc.so.6(__libc_start_main+0xf4) [0x7ffc20283994]
[dmitry:02402] [13] FORTRAN/test_spec.x [0x401839]
[dmitry:02402] *** End of error message ***

Original comment by dan.djc...@gmail.com on 21 Apr 2010 at 10:30

GoogleCodeExporter commented 9 years ago
strace from FORTRAN test_spec

getdents(10, /* 5 entries */, 32768)    = 120
stat("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/0", 
{st_mode=S_IFDIR|0700,
st_size=4096, ...}) = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/0",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 16
fcntl(16, F_SETFD, FD_CLOEXEC)          = 0
getdents(16, /* 2 entries */, 32768)    = 48
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/0",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 16
fcntl(16, F_SETFD, FD_CLOEXEC)          = 0
getdents(16, /* 2 entries */, 32768)    = 48
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
rmdir("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/0") = 0
stat("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/2", 
{st_mode=S_IFDIR|0700,
st_size=4096, ...}) = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/2",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 16
fcntl(16, F_SETFD, FD_CLOEXEC)          = 0
getdents(16, /* 2 entries */, 32768)    = 48
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/2",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 16
fcntl(16, F_SETFD, FD_CLOEXEC)          = 0
getdents(16, /* 2 entries */, 32768)    = 48
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
rmdir("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/2") = 0
stat("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/1", 
{st_mode=S_IFDIR|0700,
st_size=4096, ...}) = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/1",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 16
fcntl(16, F_SETFD, FD_CLOEXEC)          = 0
getdents(16, /* 2 entries */, 32768)    = 48
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/1",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 16
fcntl(16, F_SETFD, FD_CLOEXEC)          = 0
getdents(16, /* 2 entries */, 32768)    = 48
getdents(16, /* 0 entries */, 32768)    = 0
close(16)                               = 0
rmdir("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1/1") = 0
getdents(10, /* 0 entries */, 32768)    = 0
close(10)                               = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 10
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
getdents(10, /* 2 entries */, 32768)    = 48
getdents(10, /* 0 entries */, 32768)    = 0
close(10)                               = 0
rmdir("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/1") = 0
getdents(8, /* 0 entries */, 32768)     = 0
close(8)                                = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 8
fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
getdents(8, /* 2 entries */, 32768)     = 48
getdents(8, /* 0 entries */, 32768)     = 0
close(8)                                = 0
rmdir("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540") = 0
stat("/tmp/openmpi-sessions-root@dmitry.djc.me_0", {st_mode=S_IFDIR|0700,
st_size=4096, ...}) = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0", 
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 8
fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
getdents(8, /* 2 entries */, 32768)     = 48
getdents(8, /* 0 entries */, 32768)     = 0
close(8)                                = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0", 
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 8
fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
getdents(8, /* 2 entries */, 32768)     = 48
getdents(8, /* 0 entries */, 32768)     = 0
close(8)                                = 0
rmdir("/tmp/openmpi-sessions-root@dmitry.djc.me_0") = 0
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOENT (No such file or directory)
unlink("/openmpi-sessions-root@dmitry.djc.me_0/contact.txt") = -1 ENOENT (No 
such
file or directory)
munmap(0x7f65815d9000, 2116672)         = 0
munmap(0x7f6581df3000, 2111816)         = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7f65832532d0},
{0x7f65840533b0, [CHLD], SA_RESTORER|SA_RESTART, 0x7f65832532d0}, 8) = 0
close(0)                                = 0
close(14)                               = 0
close(11)                               = 0
close(15)                               = 0
close(17)                               = 0
close(12)                               = 0
close(19)                               = 0
close(21)                               = 0
close(13)                               = 0
close(22)                               = 0
close(24)                               = 0
munmap(0x7f65817de000, 2115144)         = 0
munmap(0x7f6581bee000, 2102208)         = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
munmap(0x7f658280f000, 2123840)         = 0
munmap(0x7f6581ff7000, 2101104)         = 0
munmap(0x7f6582c1a000, 2107352)         = 0
munmap(0x7f65821f8000, 2112648)         = 0
close(5)                                = 0
close(6)                                = 0
close(23)                               = 0
close(20)                               = 0
close(18)                               = 0
munmap(0x7f65823fc000, 2153304)         = 0
munmap(0x7f658260a000, 2116736)         = 0
stat("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/0/0", 0x7fff57557000) = 
-1
ENOENT (No such file or directory)
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/0/0",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/0", 0x7fff57557000) = -1
ENOENT (No such file or directory)
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/0",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOENT (No such file or directory)
--- SIGCHLD (Child exited) @ 0 (0) ---
stat("/tmp/openmpi-sessions-root@dmitry.djc.me_0", 0x7fff57557000) = -1 ENOENT 
(No
such file or directory)
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0", 
O_RDONLY|O_NONBLOCK|O_DIRECTORY) =
-1 ENOENT (No such file or directory)
open("/tmp/openmpi-sessions-root@dmitry.djc.me_0/28540/0/0",
O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOENT (No such file or directory)
munmap(0x7f6582a16000, 2112352)         = 0
munmap(0x7f6582e1d000, 2101136)         = 0
munmap(0x7f658301e000, 2115040)         = 0
exit_group(134)                         = ?

Original comment by dan.djc...@gmail.com on 30 Apr 2010 at 10:17

GoogleCodeExporter commented 9 years ago
Error with all the C tests when using PGI compiler

[djchen@login-4-0 sample]$ mpirun -np 4 C/test_spec.x 
Single precision
 (128 128 128) grid
 2 proc. dimensions
Reading proc. grid from file dims
Using processor grid 2 x 2
[login-4-0:11613] *** Process received signal ***
[login-4-0:11613] Signal: Segmentation fault (11)
[login-4-0:11613] Signal code: Address not mapped (1)
[login-4-0:11613] Failing at address: 0x2aaab09f2000
[login-4-0:11613] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 2 with PID 11613 on node login-4-0.local 
exited on
signal 11 (Segmentation fault).
--------------------------------------------------------------------------

Original comment by dan.djc...@gmail.com on 1 May 2010 at 12:55

GoogleCodeExporter commented 9 years ago
FORTRAN test_spec.x works fine on Triton, possibly issue with openmpi.

Original comment by dan.djc...@gmail.com on 7 May 2010 at 2:30

GoogleCodeExporter commented 9 years ago
All tests are working on Triton with pgi compiler and custom compiled fftw3 with
single precision library.

Original comment by dan.djc...@gmail.com on 7 May 2010 at 9:24

GoogleCodeExporter commented 9 years ago
On Triton, when compiled with Double Precision, all Fortran tests complete/pass.

Original comment by dan.djc...@gmail.com on 7 May 2010 at 9:38

GoogleCodeExporter commented 9 years ago
Are we ready to close this? 

Original comment by dmitry...@gmail.com on 3 Jun 2010 at 9:03

GoogleCodeExporter commented 9 years ago

Original comment by dan.djc...@gmail.com on 4 Jun 2010 at 8:38