| 74 | |
| 75 | |
| 76 | Memory Debugging |
| 77 | |
| 78 | There are several extra steps needed for memory debugging. The model must be linked with the appropriate library - this is easiest done by modifying the bld.cfg file. For the UM 8.2 example discussed here, I added |
| 79 | |
| 80 | {{{ |
| 81 | -L $ALLINEA_TOOLS_DIR/lib/64 -Wl,--whole-archive -ldmallocthcxx -Wl,--no-whole-archive |
| 82 | }}} |
| 83 | |
| 84 | at the beginning of the link line, the same should hold for other UM versions; then relink the code - at the ARCHER command line type |
| 85 | |
| 86 | {{{ |
| 87 | module load allinea |
| 88 | fcm build |
| 89 | }}} |
| 90 | |
| 91 | make sure the new executable is copied to the appropriate place so that it is picked up when the model runs. |
| 92 | |
| 93 | Change the ddt line in qsatmos thus, ie remove -start and add -memory |
| 94 | {{{ |
| 95 | ddt -noqueue -memory -n $UM_IOS_NPES -mpiargs "-N $NTASKS_PER_NODE -d $NTHREADS_PER_TASK -S $NTASKS_PER_NUMANODE -ss" $LOADMODULE >>$OUTPUT |
| 96 | }}} |
| 97 | |
| 98 | Get an interactive session as before and follow the same submission procedure. You should now see |