Package: mpgrafic Version: 0.3.7.8-1 Severity: serious Tags: upstream Justification: fails to build from source
Dear Maintainer, Description: After installing mpgrafics-0.3.7.8-1 on mips by the debian buildd system, `make check' runs `regression-test-0.3.7.8.sh', which runs `mpirun -n 1 --mca plm_rsh_agent sh ${srcdir}/src/mpgrafic --np=32 < ${srcdir}/Input.stdin and gives the output: Record size 0 is different from expected 4096 and then fatally exits (as it should in such a case). Log: https://buildd.debian.org/status/fetch.php?pkg=mpgrafic&arch=mips&ver=0.3.7.8-1&stamp=1484927169&raw=0 (line 1010 of the raw html file) Analysis: The error is presumably triggered at line 308 (v0.3.7.8-1) of src/grafic_io.f90 - taille_tampon is read by f77_parallel_read() in src/parallel_io.c . The function f77_parallel_read() is a front end to parallel_read(), in the same .c file, which calls pread() <unistd.h> to read bytes from a disk file into a buffer. The disk file is (previously to this) written by a similar hierarchy of f90 and C functions to `white-outfile.dat' (assuming that `Input.stdin' is the source package input file above). Hypothesis: This looks like an endianness/word size problem - bytes are written to disk and read from disk as a raw sequence of bytes without any casting, neither in writing nor in reading. Proposed solution method: On a real or emulated mips machine, a quick hack would be to play around with casting and byte-swapping to find a way that the test script is successful. An acceptable solution would be to make changes that are not machine dependent. The AC_C_BIGENDIAN should probably be added to configure.ac and then the preprocessor macro WORDS_BIGENDIAN could be used. See the autoconf documentation for details. Appropriate use of casting and USE_ISO_C in src/grafic_io.f90 would probably give a more elegant and robust solution in terms of portability. -- System Information: Debian Release: sid Architecture: mips