NEMO notes


Compiling the code:
-------------------
Of course you should read the GalIC/README file, but here are some Ubuntu
notes how to do this within NEMO. Adapt where needed.


1) You will need MPI installed

      apt install openmpi-bin openmpi-common libopenmpi-dev

   If you install mpich instead, this may have an impact on 4) below
      
2) You will need gsl installed

      apt install libgsl-dev

   or internally to NEMO:

      mknemo gsl

   but for this you will need to add a line
       CFLAG += $(NEMO)/opt/include
   to their Makefile (see item 4)
      
3) create two system files for compiling:
   (if you used our make, the copy was already done)

- cp Template-Makefile.systype Makefile.systype
  edit it to comment out the line containing
      #SYSTYPE="Ubuntu"

- cp Template-Config.sh Config.sh
  edit it to ensure the HDF5 is commented out
      #HAVE_HDF5 

4) Edit their GalIC/Makefile , I needed this for my openmpi
   

#MPICHLIB = -lmpich
MPICHLIB =

   for mpich you probably should leave it alone. Didn't test this.

5) Now make it:

    make CC=mpicc
    cp GalIC $NEMOBIN

   I also copied the GalIC executable to $NEMOBIN



Running the code and a benchmark
--------------------------------


time mpirun -np 4 GalIC Model_B1.param
    laptop  i7-8550U CPU @ 1.80GHz             151m (605m  user, 29s sys)  NP=4
                                               171m (1228m user, 43s sys)  NP=8
    desktop i7-3820  CPU @ 3.60GHz             132m (529m  user,  2s sys)  NP=4
            Xeon(R) CPU E5-2623 v4 @ 2.60GHz    76m (606m  user,  4s sys)  NP=8   Model_B1b
36362.681u 4.607s 1:15:53.55 798.6%

- The code uses a random number generator that in its current form doesn't
  enable running with the same random number seed. Thus
  

- Only B1,B2,H1,H2,H3,H4 seem to work. The rest crashes.

GalIC  Model_M1.param

Not enough memory in mymalloc_fullinfo() to allocate 19940.4 MB for variable 'P'

You can also get this message:

There are not enough slots available in the system to satisfy the 16 slots
that were requested by the application
