Patches -> success with sprng2.0b on Ubuntu; Centos/Rocks Cluster still mysterious in Fortran
Hello, everybody. I stubbornly persist (for replication purposes) toward the goal of building sprng on a cluster running Rocks Linux (Centos based) in order to use Rmpi. =============Chapter 1: Ubuntu likes me================ My laptop is Ubuntu 8.10, and I have been doing the development there. I ended up taking advantage of fixes discovered by Dirk E in his package for Debian/Ubuntu and the fixes proposed for ALTLinux. And advice from several others in various email lists. I have worked with sprng versions 2.0a and 2.0b. 2.0a is used in the libsprng package in Debian/Ubuntu channels, but it is no longer available from the FSU website. From the FSU site, they offer version 2.0b. I uploaded a series of patches, a copy of the source code (for your convenience), and output to this directory: http://pj.freefaculty.org/linux/sprng sprng2.0b.tar.gz sprng-01-C-comments-onlyfor2.0a.patch sprng-02-dirk-misc.patch sprng-03-makefiles.patch sprng-04-AllCFixes.patch sprng-05-fixmenu.patch sprng-06-openmpi.patch The first patch is only used if you are working with sprng2.0a.tar.gz, it is NOT used with 2.0b. All of the rest apply to both. The last is strictly optional. The steps to open the code, apply the patches, and, most importantly, to demonstrate the full functionality (results of "checksprng" and "timespring") are in this text files: Ubuntu-build-check.txt timesprng.txt The C and Fortran examples work fine. As a result, I consider the question of compiling "cleanly" and "testing" on Ubuntu to be solved. It works with or without MPI. That may seem trivial, but it takes some effort. The Debian/Ubuntu package libsrpng does not currently conduct the testing phase. In the files I uploaded, you can see full functioning versions of checksprng and testsprng. ==========Chapter 2: Centos hate me ======== The report on my final goal--installing this in a Rocks cluster--is not so perfect. The C examples work. The Fortran with pointer checking examples don't work. Maybe I don't care?? The libraries do compile. Maybe that's good enough for Rmpi? I put the output from "make" and the check programs in this file: Centos-build.txt Even getting this to compile on Centos is a hassle. The versions of the compilers, openmpi, and the "echo" program are different. For example, the fortran compiler on Centos enforces a line length limitation, so several print statements in Fortran examples cause compiler failures. I also learned that, unlike Ubuntu where "echo" will translate \134 into the "backslash" character, on Centos it is necessary to add a zero, as in \0134. After hacking and such, I'm able to compile sprng2.0b on Centos, and I can run all of the C-based random generator tests. The Fortran scripts with pointer checking fail. I'm trying to decide if that's important. I don't write Fortran programs. But I'd hate to release this on an unsuspecting user group unless I can understand what's going on. If you are a Fortran user, perhaps you can advise me how to debug this. Observe the last part of the output: ./checksprng lfg: Checking Default C interface: Result: PASSED lfg: Checking Simple C interface: Result: PASSED lfg: Checking C interface with pointer checking: Result: PASSED lcg: Checking Default C interface: Result: PASSED lcg: Checking Simple C interface: Result: PASSED lcg: Checking C interface with pointer checking: Result: PASSED lcg64: Checking Default C interface: Result: PASSED lcg64: Checking Simple C interface: Result: PASSED lcg64: Checking C interface with pointer checking: Result: PASSED cmrg: Checking Default C interface: Result: PASSED cmrg: Checking Simple C interface: Result: PASSED cmrg: Checking C interface with pointer checking: Result: PASSED mlfg: Checking Default C interface: Result: PASSED mlfg: Checking Simple C interface: Result: PASSED mlfg: Checking C interface with pointer checking: Result: PASSED pmlcg: Checking Default C interface: Result: PASSED pmlcg: Checking Simple C interface: Result: PASSED pmlcg: Checking C interface with pointer checking: Result: PASSED lfg: Checking Default FORTRAN interface: ./checksprng: line 57: 6879 Segmentation fault ./check.fsprng < gen0_lfg.data 2> /dev/null lfg: Checking Simple FORTRAN interface: Expect SPRNG ERROR: packed string invalid. Result: PASSED lfg: Checking FORTRAN interface with pointer checking: FAILED: Integer generator incorrect. FAILED: Float generator incorrect. FAILED: Double generator incorrect stream. FAILED: Generator was unable to spawn. FAILED: Generator incorrect after spawning. Probable error in spawning the generators. FAILED: Generator was unable to pack. FAILED: Incorrect stream after pack/unpack. Probable error in (un)packing the generators. FAILED: Generator incorrect stream after pack/unpack. Probably an error in (un)packing the generators. FAILED: Free returns -1 instead of 6. FAILED: Free returns -1 instead of 0. FAILED: Generator does not produce expected stream ... when ngens <= 0. FAILED: Generator produces more than 1 stream ... when ngens = 0. FAILED: Spawn returned 0 instead of 1 ... when nspawned was 0. FAILED: Generator wrong when nspawned = -1. Expect SPRNG ERROR: packed string invalid Result: FAILED lcg: Checking Default FORTRAN interface: ./checksprng: line 66: 6882 Segmentation fault ./check.fsprng < gen1_lcg.data 2> /dev/null lcg: Checking Simple FORTRAN interface: Expect SPRNG ERROR: packed string invalid. Result: PASSED lcg: Checking FORTRAN interface with pointer checking: FAILED: Integer generator incorrect. FAILED: Float generator incorrect. FAILED: Double generator incorrect stream. FAILED: Generator was unable to spawn. FAILED: Generator incorrect after spawning. Probable error in spawning the generators. FAILED: Generator was unable to pack. FAILED: Incorrect stream after pack/unpack. Probable error in (un)packing the generators. FAILED: Generator incorrect stream after pack/unpack. Probably an error in (un)packing the generators. FAILED: Free returns -1 instead of 6. FAILED: Free returns -1 instead of 0. FAILED: Generator does not produce expected stream ... when ngens <= 0. FAILED: Generator produces more than 1 stream ... when ngens = 0. FAILED: Spawn returned 0 instead of 1 ... when nspawned was 0. FAILED: Generator wrong when nspawned = -1. Expect SPRNG ERROR: packed string invalid Result: FAILED lcg64: Checking Default FORTRAN interface: ./checksprng: line 75: 6885 Segmentation fault ./check.fsprng < gen2_lcg64.data 2> /dev/null lcg64: Checking Simple FORTRAN interface: Expect SPRNG ERROR: packed string invalid. Result: PASSED lcg64: Checking FORTRAN interface with pointer checking: FAILED: Integer generator incorrect. FAILED: Float generator incorrect. FAILED: Double generator incorrect stream. FAILED: Generator was unable to spawn. FAILED: Generator incorrect after spawning. Probable error in spawning the generators. FAILED: Generator was unable to pack. FAILED: Incorrect stream after pack/unpack. Probable error in (un)packing the generators. FAILED: Generator incorrect stream after pack/unpack. Probably an error in (un)packing the generators. FAILED: Free returns -1 instead of 6. FAILED: Free returns -1 instead of 0. FAILED: Generator does not produce expected stream ... when ngens <= 0. FAILED: Generator produces more than 1 stream ... when ngens = 0. FAILED: Spawn returned 0 instead of 1 ... when nspawned was 0. FAILED: Generator wrong when nspawned = -1. Expect SPRNG ERROR: packed string invalid Result: FAILED cmrg: Checking Default FORTRAN interface: ./checksprng: line 84: 6888 Segmentation fault ./check.fsprng < gen3_cmrg.data 2> /dev/null cmrg: Checking Simple FORTRAN interface: Expect SPRNG ERROR: packed string invalid. Result: PASSED cmrg: Checking FORTRAN interface with pointer checking: FAILED: Integer generator incorrect. FAILED: Float generator incorrect. FAILED: Double generator incorrect stream. FAILED: Generator was unable to spawn. FAILED: Generator incorrect after spawning. Probable error in spawning the generators. FAILED: Generator was unable to pack. FAILED: Incorrect stream after pack/unpack. Probable error in (un)packing the generators. FAILED: Generator incorrect stream after pack/unpack. Probably an error in (un)packing the generators. FAILED: Free returns -1 instead of 6. FAILED: Free returns -1 instead of 0. FAILED: Generator does not produce expected stream ... when ngens <= 0. FAILED: Generator produces more than 1 stream ... when ngens = 0. FAILED: Spawn returned 0 instead of 1 ... when nspawned was 0. FAILED: Generator wrong when nspawned = -1. Expect SPRNG ERROR: packed string invalid Result: FAILED mlfg: Checking Default FORTRAN interface: ./checksprng: line 93: 6891 Segmentation fault ./check.fsprng < gen4_mlfg.data 2> /dev/null mlfg: Checking Simple FORTRAN interface: Expect SPRNG ERROR: packed string invalid. Result: PASSED mlfg: Checking FORTRAN interface with pointer checking: FAILED: Integer generator incorrect. FAILED: Float generator incorrect. FAILED: Double generator incorrect stream. FAILED: Generator was unable to spawn. FAILED: Generator incorrect after spawning. Probable error in spawning the generators. FAILED: Generator was unable to pack. FAILED: Incorrect stream after pack/unpack. Probable error in (un)packing the generators. FAILED: Generator incorrect stream after pack/unpack. Probably an error in (un)packing the generators. FAILED: Free returns -1 instead of 6. FAILED: Free returns -1 instead of 0. FAILED: Generator does not produce expected stream ... when ngens <= 0. FAILED: Generator produces more than 1 stream ... when ngens = 0. FAILED: Spawn returned 0 instead of 1 ... when nspawned was 0. FAILED: Generator wrong when nspawned = -1. Expect SPRNG ERROR: packed string invalid Result: FAILED pmlcg: Checking Default FORTRAN interface: ./checksprng: line 102: 6894 Segmentation fault ./check.fsprng < gen5_pmlcg.data 2> /dev/null pmlcg: Checking Simple FORTRAN interface: Expect SPRNG ERROR: packed string invalid. Result: PASSED pmlcg: Checking FORTRAN interface with pointer checking: FAILED: Integer generator incorrect. FAILED: Float generator incorrect. FAILED: Double generator incorrect stream. FAILED: Generator was unable to spawn. FAILED: Generator incorrect after spawning. Probable error in spawning the generators. FAILED: Generator was unable to pack. FAILED: Incorrect stream after pack/unpack. Probable error in (un)packing the generators. FAILED: Generator incorrect stream after pack/unpack. Probably an error in (un)packing the generators. FAILED: Free returns -1 instead of 6. FAILED: Free returns -1 instead of 0. FAILED: Generator does not produce expected stream ... when ngens <= 0. FAILED: Generator produces more than 1 stream ... when ngens = 0. FAILED: Spawn returned 0 instead of 1 ... when nspawned was 0. FAILED: Generator wrong when nspawned = -1. Expect SPRNG ERROR: packed string invalid
Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas