|
| 1 | +large malloc problem |
| 2 | +==================== |
| 3 | + |
| 4 | +Description |
| 5 | +----------- |
| 6 | + |
| 7 | +alquimia >= r144 8e9ef8e, <= r148 |
| 8 | +running: batch_chem -i general-reaction-pc.cfg -d |
| 9 | + |
| 10 | +alquimia <= r143 2e6ed9f |
| 11 | +running: batch_chem -i general-reaction-ac.cfg -d |
| 12 | + |
| 13 | + |
| 14 | +cause an attempt to malloc huge (~1.3-1.8GB) of memory during a |
| 15 | +function call in pflotran:database_module%basisinit to |
| 16 | +database_aux_module%DatabaseRxnCreateFromRxnString at |
| 17 | +~database.F90:2898 |
| 18 | + |
| 19 | +screen output |
| 20 | +~~~~~~~~~~~~~ |
| 21 | +PFloTran_Alquimia_Setup() : |
| 22 | + Reading : general-reaction.in |
| 23 | + WARNING: Card (NONISOTHERMAL) not found in input file.batch_chem(48324) malloc: *** mmap(size=132224767150366720) failed (error code=12) |
| 24 | +*** error: can't allocate region |
| 25 | +*** set a breakpoint in malloc_error_break to debug |
| 26 | +Operating system error: Cannot allocate memory |
| 27 | +Memory allocation failed |
| 28 | + |
| 29 | +backtrace |
| 30 | +~~~~~~~~~ |
| 31 | +#5 0x00007fff97f9d1b3 in malloc_zone_malloc () |
| 32 | + from /usr/lib/system/libsystem_c.dylib |
| 33 | +#6 0x00007fff97f9dc07 in malloc () from /usr/lib/system/libsystem_c.dylib |
| 34 | +#7 0x00000001004335a9 in _gfortrani_get_mem () |
| 35 | + from /opt/local/lib/gcc46/libgfortran.3.dylib |
| 36 | +#8 0x000000010050a1b0 in _gfortran_internal_pack () |
| 37 | + from /opt/local/lib/gcc46/libgfortran.3.dylib |
| 38 | +#9 0x000000010005eafb in __database_module_MOD_basisinit (reaction=..., |
| 39 | + option=...) at database.F90:2898 |
| 40 | +#10 0x000000010000eb84 in __pflotranalquimiainterface_module_MOD_initializepflotranreactions (option=0x101020a00, input=0x101022400, reaction=0x101028c00) |
| 41 | + at pflotran_alquimia_interface.F90:902 |
| 42 | +#11 0x000000010001123f in __pflotranalquimiainterface_module_MOD_setup ( |
| 43 | + input_filename=..., pft_engine_state=0x400, sizes=..., functionality=..., |
| 44 | + status=..., _input_filename=1) at pflotran_alquimia_interface.F90:163 |
| 45 | +#12 0x00000001000115b7 in pflotran_alquimia_setup (input_filename=..., |
| 46 | + pft_engine_state=0x400, sizes=..., functionality=..., status=...) |
| 47 | + at pflotran_alquimia_wrappers.F90:46 |
| 48 | +#13 0x0000000100002924 in BatchChemWithAlquimia (demo_simulation=..., |
| 49 | + demo_state=..., demo_material_props=..., demo_conditions=..., |
| 50 | + output=<optimized out>) at batch_chem.cc:176 |
| 51 | + |
| 52 | + |
| 53 | +Notes |
| 54 | +----- |
| 55 | + |
| 56 | +* Using Mac OS X 10.8.4, gcc 4.7.3, mpich-3.0.4, I've worked back |
| 57 | +through the alquimia history from r143(2e6ed9f)--r112(57432fd) and |
| 58 | +general-reaction-ac.cfg exhibits this error in all versions. |
| 59 | + |
| 60 | +* Not using the debug flag '-d' does not generate this error. Harding |
| 61 | +coding the internal debug flag to on and leaving the command line flag |
| 62 | +off does not generate this error. --> implies an issue with command |
| 63 | +line processing. |
| 64 | + |
| 65 | + * getopt, petsc, and mpi all touch the command line flags. |
| 66 | + |
| 67 | + * Commenting out the getopt calls and simply hard coding the values, |
| 68 | + passing no command line args --> ok. passing command line args --> |
| 69 | + fails. Not a problem with getopt |
| 70 | + |
| 71 | + * passing command line args and using PetscInitializeNoArguements() --> |
| 72 | + ok, appears to be a problem with petsc or mpi commandline processing. |
| 73 | + |
| 74 | + * passing commandline args but adding a call to |
| 75 | + PetscOptionsView(PETSC_STDOUT_VIEWER?) immediately after |
| 76 | + PetscInitialize() --> ok. Moving PetscOptionsView(...) down eventually |
| 77 | + causes the same error when it comes after cfg_reader.ReadInputFile(). |
| 78 | + |
| 79 | + * Doing commandline processing in petsc using PetscOptionsGetXXX() |
| 80 | + seems to side step this problem with when running |
| 81 | + general-reaction-pc.cfg with debug. It's not clear if this |
| 82 | + actually fixes the problem, or is a bandaid like the |
| 83 | + PetscOptionsView() described above. This "fix" will be committed |
| 84 | + as r149 as part of the work to remove getopt/xgetopt. |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +Platform Status |
| 89 | +--------------- |
| 90 | + |
| 91 | +Mac OS X |
| 92 | +~~~~~~~~ |
| 93 | + |
| 94 | +alquimia(639283b202dd) : pflotran(8083548d3f59) : petsc(61d360f) |
| 95 | + |
| 96 | +mpich-3.0.4-106 |
| 97 | +openmpi-1.6.4 |
| 98 | + |
| 99 | +gcc46 @4.6.4_1 |
| 100 | +gcc47 @4.7.3_1 |
| 101 | +gcc48 @4.8.1_1 |
| 102 | + |
| 103 | +Darwin 12.4.0 = OS X v10.8.4 |
| 104 | + |
| 105 | +PASS : gcc4.6-openmpi-gr-pc : Darwin 12.4.0 : Xcode 4.6.3 |
| 106 | +FAIL : gcc4.6-mpich-gr-pc : Darwin 12.4.0 : Xcode 4.6.3 |
| 107 | +PASS : gcc4.7-openmpi-gr-pc : Darwin 12.4.0 : Xcode 4.6.3 |
| 108 | +FAIL : gcc4.7-mpich-gr-pc : Darwin 12.4.0 : Xcode 4.6.3 |
| 109 | +PASS : gcc4.8-openmpi-gr-pc : Darwin 12.4.0 : Xcode 4.6.3 |
| 110 | +PASS : gcc4.8-mpich-gr-pc : Darwin 12.4.0 : Xcode 4.6.3 |
| 111 | + |
| 112 | +Darwin 11.4.2 = Mac OS X v10.7.5 |
| 113 | + |
| 114 | +PASS : gcc4.6-openmpi-gr-pc : Darwin 11.4.2 : Xcode 4.4.1 |
| 115 | +PASS : gcc4.6-mpich-gr-pc : Darwin 11.4.2 : Xcode 4.4.1 |
| 116 | +PASS : gcc4.7-openmpi-gr-pc : Darwin 11.4.2 : Xcode 4.4.1 |
| 117 | +PASS : gcc4.7-mpich-gr-pc : Darwin 11.4.2 : Xcode 4.4.1 |
| 118 | +PASS : gcc4.8-openmpi-gr-pc : Darwin 11.4.2 : Xcode 4.4.1 |
| 119 | +PASS : gcc4.8-mpich-gr-pc : Darwin 11.4.2 : Xcode 4.4.1 |
| 120 | + |
| 121 | +Linux Mint 14 Nadia |
| 122 | +~~~~~~~~~~~~~~~~~~~ |
0 commit comments