FDPS(Framework for Developing Particle Simulator)をdocker(42)で. 量子(8) coding(86)

剛体球の大規模数値計算をしたい人生だった
https://qiita.com/NatsukiLab/items/476e00fea40b86ece31f

で紹介のあった

粒子模擬試験開発枠組　FDPS, Framework for Developing Particle Simulator
https://github.com/FDPS/FDPS

をdockerで利用する。

```shell-session:macOS
$ docker run -it gcc /bin/bash
```
dockerが起動したら

```shell-session:docker/ubuntu
# cd home
# apt update; apt -y upgrade

# apt install -y vim sudo wget git curl fortran

# git clone https://github.com/FDPS/FDPS.git
Cloning into 'FDPS'...
remote: Enumerating objects: 1686, done.
remote: Total 1686 (delta 0), reused 0 (delta 0), pack-reused 1686
Receiving objects: 100% (1686/1686), 61.39 MiB | 10.09 MiB/s, done.
Resolving deltas: 100% (850/850), done.

# cd FDPS
# ls
LICENSE  README.md  doc  sample  scripts  src  tests

# cd sample
# ls
c  c++	fortran
```
# c++

```shell-session:docker/ubuntu
# cd c++
# ls
nbody  nbody+sph  nbodysph  p3m  sph  treepm  vdw-test	water

# cd vdw-test
# ls
Makefile  test.py  vdwtest.cpp

# make
g++  -I../../../src/ -std=c++11 -O3 -Wall -ffast-math -funroll-loops -o vdwtest.out vdwtest.cpp
In file included from ../../../src/tree_for_force.hpp:1680,
                 from ../../../src/particle_simulator.hpp:7,
                 from vdwtest.cpp:17:
../../../src/tree_for_force_impl.hpp: In instantiation of 'void ParticleSimulator::TreeForForce<TSM, Tforce, Tepi, Tepj, Tmomloc, Tmomglb, Tspj>::initialize(ParticleSimulator::U64, ParticleSimulator::F64, ParticleSimulator::U32, ParticleSimulator::U32) [with TSM = ParticleSimulator::SEARCH_MODE_SCATTER; Tforce = FPLJ; Tepi = FPLJ; Tepj = FPLJ; Tmomloc = ParticleSimulator::MomentSearchInAndOut; Tmomglb = ParticleSimulator::MomentSearchInAndOut; Tspj = ParticleSimulator::SuperParticleBase; ParticleSimulator::U64 = long long unsigned int; ParticleSimulator::F64 = double; ParticleSimulator::U32 = unsigned int]':
vdwtest.cpp:479:72:   required from here
../../../src/tree_for_force_impl.hpp:89:19: warning: unused variable 'n_proc' [-Wunused-variable]
   89 |         const S64 n_proc = Comm::getNumberOfProc();
      |                   ^~~~~~
vdwtest.cpp: In function 'int main(int, char**)':
vdwtest.cpp:445:29: warning: '/t-de.dat' directive writing 9 bytes into a region of size between 1 and 1024 [-Wformat-overflow=]
  445 |         sprintf(sout_de, "%s/t-de.dat", dir_name);
      |                             ^~~~~~~~~
vdwtest.cpp:445:16: note: 'sprintf' output between 10 and 1033 bytes into a destination of size 1024
  445 |         sprintf(sout_de, "%s/t-de.dat", dir_name);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vdwtest.cpp:446:31: warning: '/t-tcal.dat' directive writing 11 bytes into a region of size between 1 and 1024 [-Wformat-overflow=]
  446 |         sprintf(sout_tcal, "%s/t-tcal.dat", dir_name);
      |                               ^~~~~~~~~~~
vdwtest.cpp:446:16: note: 'sprintf' output between 12 and 1035 bytes into a destination of size 1024
  446 |         sprintf(sout_tcal, "%s/t-tcal.dat", dir_name);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vdwtest.cpp:505:32: warning: '%s' directive writing up to 1023 bytes into a region of size 256 [-Wformat-overflow=]
  505 |             sprintf(filename, "%s/%04d.dat", dir_name, snp_id++);
      |                                ^~            ~~~~~~~~
vdwtest.cpp:505:31: note: directive argument in the range [0, 2147483647]
  505 |             sprintf(filename, "%s/%04d.dat", dir_name, snp_id++);
      |                               ^~~~~~~~~~~~~
vdwtest.cpp:505:20: note: 'sprintf' output between 10 and 1039 bytes into a destination of size 256
  505 |             sprintf(filename, "%s/%04d.dat", dir_name, snp_id++);
      |             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# ./vdwtest.out
     //==================================\\
     ||                                  ||
     || ::::::: ::::::. ::::::. .::::::. ||
     || ::      ::    : ::    : ::       ||
     || ::::::  ::    : ::::::'  `:::::. ||
     || ::      ::::::' ::      `......' ||
     ||     Framework for Developing     ||
     ||        Particle Simulator        ||
     ||     Version 5.0e (2019/07)       ||
     \\==================================//

       Home   : https://github.com/fdps/fdps 
       E-mail : fdps-support@mail.jmlab.jp
       Licence: MIT (see, https://github.com/FDPS/FDPS/blob/master/LICENSE)
       Note   : Please cite the following papers.
                - Iwasawa et al. (2016, Publications of the Astronomical Society of Japan, 68, 54)
                - Namekata et al. (2018, Publications of the Astronomical Society of Japan, 70, 70)

       Copyright (C) 2015 
         Masaki Iwasawa, Ataru Tanikawa, Natsuki Hosono,
         Keigo Nitadori, Takayuki Muranushi, Daisuke Namekata,
         Kentaro Nomura, Junichiro Makino and many others
******** FDPS has successfully begun. ********
Directory "./result" is successfully made.
./result/t-de.dat
./result/t-tcal.dat
MakeUniformCube: n_loc=512 and n_1d=8
time:  0.0625000 energy error: +4.895409e-05
time:  0.1250000 energy error: +8.980742e-05
time:  0.1875000 energy error: +8.766743e-05
time:  0.2500000 energy error: +7.985932e-05
time:  0.3125000 energy error: +8.562922e-05
time:  0.3750000 energy error: +9.459152e-05
time:  0.4375000 energy error: +1.000724e-04
time:  0.5000000 energy error: +9.642181e-05
time:  0.5625000 energy error: +8.655761e-05
time:  0.6250000 energy error: +7.656963e-05
time:  0.6875000 energy error: +6.919837e-05
time:  0.7500000 energy error: +6.455025e-05
time:  0.8125000 energy error: +6.181174e-05
time:  0.8750000 energy error: +6.011242e-05
time:  0.9375000 energy error: +5.891818e-05
time:  1.0000000 energy error: +5.810548e-05
time:  1.0625000 energy error: +5.783009e-05
time:  1.1250000 energy error: +5.795745e-05
time:  1.1875000 energy error: +5.738983e-05
time:  1.2500000 energy error: +5.631495e-05
time:  1.3125000 energy error: +5.588529e-05
time:  1.3750000 energy error: +5.735197e-05
time:  1.4375000 energy error: +6.249522e-05
time:  1.5000000 energy error: +7.039456e-05
time:  1.5625000 energy error: +6.161995e-05
time:  1.6250000 energy error: +6.929036e-05
time:  1.6875000 energy error: +8.880458e-05
time:  1.7500000 energy error: +6.661185e-05
time:  1.8125000 energy error: +8.002650e-05
time:  1.8750000 energy error: +9.608846e-05
time:  1.9375000 energy error: +7.851315e-05
time:  2.0000000 energy error: +1.037240e-04
time:  2.0625000 energy error: +1.200962e-04
time:  2.1250000 energy error: +8.788197e-05
time:  2.1875000 energy error: +1.058195e-04
time:  2.2500000 energy error: +1.292356e-04
time:  2.3125000 energy error: +1.196776e-04
time:  2.3750000 energy error: +1.360356e-04
time:  2.4375000 energy error: +1.251725e-04
time:  2.5000000 energy error: +1.662038e-04
time:  2.5625000 energy error: +1.694231e-04
time:  2.6250000 energy error: +1.181159e-04
time:  2.6875000 energy error: +1.948801e-04
time:  2.7500000 energy error: +1.927403e-04
time:  2.8125000 energy error: +2.028372e-04
time:  2.8750000 energy error: +1.574029e-04
time:  2.9375000 energy error: +2.338144e-04
time:  3.0000000 energy error: +1.863501e-04
time:  3.0625000 energy error: +2.271916e-04
time:  3.1250000 energy error: +2.246509e-04
time:  3.1875000 energy error: +2.212063e-04
time:  3.2500000 energy error: +3.096583e-04
time:  3.3125000 energy error: +1.556735e-04
time:  3.3750000 energy error: +2.697267e-04
time:  3.4375000 energy error: +2.442649e-04
time:  3.5000000 energy error: +2.503679e-04
time:  3.5625000 energy error: +2.345722e-04
time:  3.6250000 energy error: +1.915760e-04
time:  3.6875000 energy error: +2.376862e-04
time:  3.7500000 energy error: +2.072566e-04
time:  3.8125000 energy error: +2.271266e-04
time:  3.8750000 energy error: +2.022672e-04
time:  3.9375000 energy error: +1.928621e-04
time:  4.0000000 energy error: +2.280476e-04
time:  4.0625000 energy error: +1.961681e-04
time:  4.1250000 energy error: +1.830592e-04
time:  4.1875000 energy error: +1.931110e-04
time:  4.2500000 energy error: +1.808048e-04
time:  4.3125000 energy error: +1.999679e-04
time:  4.3750000 energy error: +1.698473e-04
time:  4.4375000 energy error: +1.963733e-04
time:  4.5000000 energy error: +1.586836e-04
time:  4.5625000 energy error: +1.688274e-04
time:  4.6250000 energy error: +1.993932e-04
time:  4.6875000 energy error: +1.420659e-04
time:  4.7500000 energy error: +1.733650e-04
time:  4.8125000 energy error: +1.969367e-04
time:  4.8750000 energy error: +1.513112e-04
time:  4.9375000 energy error: +1.688848e-04
time:  5.0000000 energy error: +1.846817e-04
time:  5.0625000 energy error: +1.457938e-04
time:  5.1250000 energy error: +1.593504e-04
time:  5.1875000 energy error: +1.608945e-04
time:  5.2500000 energy error: +1.455650e-04
time:  5.3125000 energy error: +1.536915e-04
time:  5.3750000 energy error: +1.486506e-04
time:  5.4375000 energy error: +1.544169e-04
time:  5.5000000 energy error: +1.541288e-04
time:  5.5625000 energy error: +1.533681e-04
time:  5.6250000 energy error: +1.417185e-04
time:  5.6875000 energy error: +1.576059e-04
time:  5.7500000 energy error: +1.519407e-04
time:  5.8125000 energy error: +1.650200e-04
time:  5.8750000 energy error: +1.322121e-04
time:  5.9375000 energy error: +1.614222e-04
time:  6.0000000 energy error: +1.296995e-04
time:  6.0625000 energy error: +1.538029e-04
time:  6.1250000 energy error: +1.712992e-04
time:  6.1875000 energy error: +1.332953e-04
time:  6.2500000 energy error: +1.352961e-04
time:  6.3125000 energy error: +1.297478e-04
time:  6.3750000 energy error: +1.596823e-04
time:  6.4375000 energy error: +1.343722e-04
time:  6.5000000 energy error: +1.365134e-04
time:  6.5625000 energy error: +1.629807e-04
time:  6.6250000 energy error: +1.396740e-04
time:  6.6875000 energy error: +1.237643e-04
time:  6.7500000 energy error: +1.620308e-04
time:  6.8125000 energy error: +1.424209e-04
time:  6.8750000 energy error: +1.446613e-04
time:  6.9375000 energy error: +1.497141e-04
time:  7.0000000 energy error: +1.290188e-04
time:  7.0625000 energy error: +1.706831e-04
time:  7.1250000 energy error: +1.310293e-04
time:  7.1875000 energy error: +1.603677e-04
time:  7.2500000 energy error: +1.219796e-04
time:  7.3125000 energy error: +1.516785e-04
time:  7.3750000 energy error: +1.487438e-04
time:  7.4375000 energy error: +1.222623e-04
time:  7.5000000 energy error: +1.485574e-04
time:  7.5625000 energy error: +1.419554e-04
time:  7.6250000 energy error: +1.375075e-04
time:  7.6875000 energy error: +1.422288e-04
time:  7.7500000 energy error: +1.453303e-04
time:  7.8125000 energy error: +1.704285e-04
time:  7.8750000 energy error: +1.114891e-04
time:  7.9375000 energy error: +1.552635e-04
time:  8.0000000 energy error: +1.476664e-04
time:  8.0625000 energy error: +1.258020e-04
time:  8.1250000 energy error: +1.530508e-04
time:  8.1875000 energy error: +1.322968e-04
time:  8.2500000 energy error: +1.706870e-04
time:  8.3125000 energy error: +1.356899e-04
time:  8.3750000 energy error: +1.629047e-04
time:  8.4375000 energy error: +1.489609e-04
time:  8.5000000 energy error: +1.401322e-04
time:  8.5625000 energy error: +1.798460e-04
time:  8.6250000 energy error: +1.450938e-04
time:  8.6875000 energy error: +1.276411e-04
time:  8.7500000 energy error: +1.552186e-04
time:  8.8125000 energy error: +1.437827e-04
time:  8.8750000 energy error: +1.481276e-04
time:  8.9375000 energy error: +1.529112e-04
time:  9.0000000 energy error: +1.352680e-04
time:  9.0625000 energy error: +1.444853e-04
time:  9.1250000 energy error: +1.708734e-04
time:  9.1875000 energy error: +1.736753e-04
time:  9.2500000 energy error: +1.394408e-04
time:  9.3125000 energy error: +1.434578e-04
time:  9.3750000 energy error: +1.706438e-04
time:  9.4375000 energy error: +1.604433e-04
time:  9.5000000 energy error: +1.532629e-04
time:  9.5625000 energy error: +1.734271e-04
time:  9.6250000 energy error: +1.431837e-04
time:  9.6875000 energy error: +1.386869e-04
time:  9.7500000 energy error: +1.650665e-04
time:  9.8125000 energy error: +1.475458e-04
time:  9.8750000 energy error: +1.317852e-04
time:  9.9375000 energy error: +1.581291e-04
time: 10.0000000 energy error: +1.590795e-04
******** FDPS has successfully finished. ********
```
# fortran

```shell-session:docker/ubuntu
# cd ../fortran
# ls
nbody  nbody+sph  p3m  sph  vdw-test

# cd vdw-test
# ls
Makefile  Makefile.intel  f_main.F90  test.py  user_defined.F90

# make
gfortran -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions -c ../../..//src/fortran_interface/modules/FDPS_time_profile.F90
gfortran -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions -c ../../..//src/fortran_interface/modules/FDPS_matrix.F90
gfortran -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions -c ../../..//src/fortran_interface/modules/FDPS_vector.F90
gfortran -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions -c ../../..//src/fortran_interface/modules/FDPS_super_particle.F90
gfortran -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions -c user_defined.F90
../../..//scripts/gen_ftn_if.py user_defined.F90 --output ./ 
################################################

Python script to generate FDPS Fortran interface 
(C) Copyright 2016  FDPS developer team. 

Log information 
   Python version   = sys.version_info(major=2, minor=7, micro=16, releaselevel='final', serial=0)
   Input files      = ['user_defined.F90']
   Output directory = ./
   Dimension number = 3

################################################

[check point] reading user's Fortran files
--- reading user_defined.F90
[check point] analyzing Fortran files ...
identifying modules and structures ...
processing ... the file user_defined.F90
identifying member variables in each structure ...
checking the consistency of members variables
making method_DB
... fplj
[check point] checking consistency....
--> the file user_defined.F90
-----> the module user_defined_types
--------> the structure fplj
[check point] generating FDPS Fortran interface programs ....
gfortran -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions -c FDPS_module.F90
gfortran -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions -c f_main.F90
g++ -std=c++11 -O3 -ffast-math -funroll-loops -I../../..//src  -c FDPS_ftn_if.cpp
g++ -std=c++11 -O3 -ffast-math -funroll-loops -I../../..//src  -c FDPS_Manipulators.cpp
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_psys_memsize(int)':
FDPS_Manipulators.cpp:261:4: warning: control reaches end of non-void function [-Wreturn-type]
  261 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'int FDPS_Manipulators::get_nptcl_loc(int)':
FDPS_Manipulators.cpp:404:4: warning: control reaches end of non-void function [-Wreturn-type]
  404 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'int FDPS_Manipulators::get_nptcl_glb(int)':
FDPS_Manipulators.cpp:432:4: warning: control reaches end of non-void function [-Wreturn-type]
  432 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'void* FDPS_Manipulators::get_psys_cptr(int)':
FDPS_Manipulators.cpp:461:4: warning: control reaches end of non-void function [-Wreturn-type]
  461 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'int FDPS_Manipulators::get_boundary_condition(int)':
FDPS_Manipulators.cpp:782:4: warning: control reaches end of non-void function [-Wreturn-type]
  782 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_tree_memsize(int)':
FDPS_Manipulators.cpp:1197:4: warning: control reaches end of non-void function [-Wreturn-type]
 1197 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_num_interact_ep_ep_loc(int)':
FDPS_Manipulators.cpp:1456:4: warning: control reaches end of non-void function [-Wreturn-type]
 1456 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_num_interact_ep_sp_loc(int)':
FDPS_Manipulators.cpp:1542:4: warning: control reaches end of non-void function [-Wreturn-type]
 1542 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_num_interact_ep_ep_glb(int)':
FDPS_Manipulators.cpp:1628:4: warning: control reaches end of non-void function [-Wreturn-type]
 1628 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_num_interact_ep_sp_glb(int)':
FDPS_Manipulators.cpp:1714:4: warning: control reaches end of non-void function [-Wreturn-type]
 1714 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_num_tree_walk_loc(int)':
FDPS_Manipulators.cpp:1886:4: warning: control reaches end of non-void function [-Wreturn-type]
 1886 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'long long int FDPS_Manipulators::get_num_tree_walk_glb(int)':
FDPS_Manipulators.cpp:1972:4: warning: control reaches end of non-void function [-Wreturn-type]
 1972 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'int FDPS_Manipulators::mtts_genrand_int31(int)':
FDPS_Manipulators.cpp:3627:4: warning: control reaches end of non-void function [-Wreturn-type]
 3627 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'double FDPS_Manipulators::mtts_genrand_real1(int)':
FDPS_Manipulators.cpp:3634:4: warning: control reaches end of non-void function [-Wreturn-type]
 3634 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'double FDPS_Manipulators::mtts_genrand_real2(int)':
FDPS_Manipulators.cpp:3641:4: warning: control reaches end of non-void function [-Wreturn-type]
 3641 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'double FDPS_Manipulators::mtts_genrand_real3(int)':
FDPS_Manipulators.cpp:3648:4: warning: control reaches end of non-void function [-Wreturn-type]
 3648 |    }
      |    ^
FDPS_Manipulators.cpp: In function 'double FDPS_Manipulators::mtts_genrand_res53(int)':
FDPS_Manipulators.cpp:3655:4: warning: control reaches end of non-void function [-Wreturn-type]
 3655 |    }
      |    ^
g++ -std=c++11 -O3 -ffast-math -funroll-loops -I../../..//src  -c main.cpp
mkdir result
g++ FDPS_time_profile.o FDPS_matrix.o FDPS_vector.o FDPS_super_particle.o user_defined.o FDPS_module.o f_main.o FDPS_ftn_if.o FDPS_Manipulators.o main.o -std=c++11 -O3 -ffast-math -funroll-loops -I../../..//src  -o vdwtest.out -lgfortran 
```

どこまで行ったかわからない。Makefile を拝見

```makefile:~/FDPS/sample/fortran/vdw-test/Makefile
#-----------------------------------------------------------------------
#   Configuration of compile
#-----------------------------------------------------------------------
# Variables that must be specified by users
# (i) Variables related to FDPS
FDPS_LOC = ../../../
FDPS_INC = -I$(FDPS_LOC)/src 
FDPS_FTN_MOD_DIR = $(FDPS_LOC)/src/fortran_interface/modules
FDPS_FTN_IF_GENERATOR = $(FDPS_LOC)/scripts/gen_ftn_if.py

# (ii) Variables to specify compilers and compile options
# Serial or OpenMP cases
FC=gfortran
CXX=g++
# MPI case
#FC=mpif90
#CXX=mpic++
# [Option 1] w/o optimization
#FCFLAGS = -std=f2003 -O0 -Wall
#CXXFLAGS = -std=c++11 -Wall -Wextra -ftrapv -fexceptions -g3 $(FDPS_INC)
# [Option 2] w/ optimization 
FCFLAGS = -std=f2003 -O3 -ffast-math -funroll-loops -finline-functions
CXXFLAGS = -std=c++11 -O3 -ffast-math -funroll-loops $(FDPS_INC)
LDFLAGS = -lgfortran 
# OpenMP options
#FCFLAGS  += -DPARTICLE_SIMULATOR_THREAD_PARALLEL -fopenmp
#CXXFLAGS += -DPARTICLE_SIMULATOR_THREAD_PARALLEL -fopenmp
# MPI options
#FCFLAGS  += -DPARTICLE_SIMULATOR_MPI_PARALLEL
#CXXFLAGS += -DPARTICLE_SIMULATOR_MPI_PARALLEL

# fdps-autotest-set-vars (DO NOT CHANGE THIS LINE)

#-----------------------------------------------------------------------
#   Source files
#-----------------------------------------------------------------------
%.o : %.F90
	$(FC) $(FCFLAGS) -c $<
%.o : %.cpp
	$(CXX) $(CXXFLAGS) -c $<

SRC_USER_DEFINED_TYPE = user_defined.F90
SRC_USER = f_main.F90
SRC_FDPS_MOD = $(wildcard $(FDPS_FTN_MOD_DIR)/*.F90)
SRC_FTN = $(SRC_FDPS_MOD) \
	  $(SRC_USER_DEFINED_TYPE) \
	  FDPS_module.F90 \
	  $(SRC_USER)
SRC_CXX = FDPS_ftn_if.cpp \
	  FDPS_Manipulators.cpp \
	  main.cpp

OBJ_USER_DEFINED_TYPE	= $(SRC_USER_DEFINED_TYPE:F90=o)
OBJ_USER		= $(SRC_USER:F90=o)
OBJ_FDPS_MOD		= $(notdir $(SRC_FDPS_MOD:F90=o))
OBJ_FTN			= $(notdir $(SRC_FTN:F90=o))
OBJ_CXX			= $(SRC_CXX:cpp=o)
OBJ			= $(OBJ_FTN) $(OBJ_CXX)

VPATH = $(FDPS_FTN_MOD_DIR)
TARGET = vdwtest.out

$(TARGET): $(OBJ) result
	$(CXX) $(OBJ) $(CXXFLAGS) -o $(TARGET) $(LDFLAGS)

result:
	mkdir result

$(SRC_CXX) FDPS_module.F90: $(SRC_USER_DEFINED_TYPE)
	$(FDPS_FTN_IF_GENERATOR) $(SRC_USER_DEFINED_TYPE) --output ./ 

FDPS_super_particle.o: FDPS_vector.o FDPS_matrix.o

$(OBJ_USER_DEFINED_TYPE): $(OBJ_FDPS_MOD)

FDPS_module.o: $(OBJ_USER_DEFINED_TYPE)

$(OBJ_USER): $(OBJ_USER_DEFINED_TYPE) FDPS_module.o

clean:
	rm -f *.o *.s *.mod $(TARGET) *.dat

distclean: clean
	rm -f $(SRC_CXX) FDPS_Manipulators.h  FDPS_module.F90 user_defined.hpp 
	rm -rf result

# fdps-autotest-run (DO NOT CHANGE THIS LINE)
```

```
# ls result
# ls -al
...
-rwxr-xr-x 1 root root 3298144 Aug 13 00:18 vdwtest.out

# ./vdwtest.out
     //==================================\\
     ||                                  ||
     || ::::::: ::::::. ::::::. .::::::. ||
     || ::      ::    : ::    : ::       ||
     || ::::::  ::    : ::::::'  `:::::. ||
     || ::      ::::::' ::      `......' ||
     ||     Framework for Developing     ||
     ||        Particle Simulator        ||
     ||     Version 5.0e (2019/07)       ||
     \\==================================//

       Home   : https://github.com/fdps/fdps 
       E-mail : fdps-support@mail.jmlab.jp
       Licence: MIT (see, https://github.com/FDPS/FDPS/blob/master/LICENSE)
       Note   : Please cite the following papers.
                - Iwasawa et al. (2016, Publications of the Astronomical Society of Japan, 68, 54)
                - Namekata et al. (2018, Publications of the Astronomical Society of Japan, 70, 70)

       Copyright (C) 2015 
         Masaki Iwasawa, Ataru Tanikawa, Natsuki Hosono,
         Keigo Nitadori, Takayuki Muranushi, Daisuke Namekata,
         Kentaro Nomura, Junichiro Makino and many others
******** FDPS has successfully begun. ********
====================================
 Paralleization infomation:
   # of processes is 1
   # of thread is    1
====================================
 nptcl_1d =            8
time:    7.8125000000E-003, energy error:    1.5220299383E-010
time:    6.2500000000E-002, energy error:    2.5923766770E-009
time:    1.2500000000E-001, energy error:    8.1257704094E-009
time:    1.8750000000E-001, energy error:    1.5891753657E-008
time:    2.5000000000E-001, energy error:    2.4465008190E-008
time:    3.1250000000E-001, energy error:    3.1380274944E-008
time:    3.7500000000E-001, energy error:    3.3204616229E-008
time:    4.3750000000E-001, energy error:    2.5851704005E-008
time:    5.0000000000E-001, energy error:    5.5990071115E-009
time:    5.6250000000E-001, energy error:   -2.9293949081E-008
time:    6.2500000000E-001, energy error:   -7.6258741295E-008
time:    6.8750000000E-001, energy error:   -1.2755357846E-007
time:    7.5000000000E-001, energy error:   -1.7216331078E-007
time:    8.1250000000E-001, energy error:   -1.9989433449E-007
time:    8.7500000000E-001, energy error:   -2.0558969538E-007
time:    9.3750000000E-001, energy error:   -1.9035984716E-007
time:    1.0000000000E+000, energy error:   -1.5956438420E-007
time:    1.0625000000E+000, energy error:   -1.2053386459E-007
time:    1.1250000000E+000, energy error:   -8.1837577083E-008
time:    1.1875000000E+000, energy error:   -5.5219422134E-008
time:    1.2500000000E+000, energy error:   -5.4043250107E-008
time:    1.3125000000E+000, energy error:   -8.6002588972E-008
time:    1.3750000000E+000, energy error:   -1.4445321255E-007
time:    1.4375000000E+000, energy error:   -2.1546930560E-007
time:    1.5000000000E+000, energy error:   -2.9350755204E-007
time:    1.5625000000E+000, energy error:   -3.7422193570E-007
time:    1.6250000000E+000, energy error:   -4.2227502283E-007
time:    1.6875000000E+000, energy error:   -3.6746961835E-007
time:    1.7500000000E+000, energy error:   -1.7470664883E-007
time:    1.8125000000E+000, energy error:    2.8108699981E-008
time:    1.8750000000E+000, energy error:    3.5303098711E-007
time:    1.9375000000E+000, energy error:    1.0879444739E-006
time:    2.0000000000E+000, energy error:    1.3801322472E-006
time:    2.0625000000E+000, energy error:    1.9358328559E-006
time:    2.1250000000E+000, energy error:    3.6586133152E-006
time:    2.1875000000E+000, energy error:    6.8004228579E-006
time:    2.2500000000E+000, energy error:    8.5454369487E-006
time:    2.3125000000E+000, energy error:    9.8730802685E-006
time:    2.3750000000E+000, energy error:    1.3774131877E-005
time:    2.4375000000E+000, energy error:    1.4116944005E-005
time:    2.5000000000E+000, energy error:    1.3624903893E-005
time:    2.5625000000E+000, energy error:    1.9856938910E-005
time:    2.6250000000E+000, energy error:    2.6296061601E-005
time:    2.6875000000E+000, energy error:    1.7438771396E-005
time:    2.7500000000E+000, energy error:    2.4137964875E-005
time:    2.8125000000E+000, energy error:    2.5786842888E-005
time:    2.8750000000E+000, energy error:    2.4608001808E-005
time:    2.9375000000E+000, energy error:    3.2008297046E-005
time:    3.0000000000E+000, energy error:    2.7594287479E-005
time:    3.0625000000E+000, energy error:    2.3342427407E-005
time:    3.1250000000E+000, energy error:    2.7884575211E-005
time:    3.1875000000E+000, energy error:    2.8503663269E-005
time:    3.2500000000E+000, energy error:    2.6732955038E-005
time:    3.3125000000E+000, energy error:    3.2538232690E-005
time:    3.3750000000E+000, energy error:    3.1620335128E-005
time:    3.4375000000E+000, energy error:    3.5347184540E-005
time:    3.5000000000E+000, energy error:    2.6742956803E-005
time:    3.5625000000E+000, energy error:    2.2294814582E-005
time:    3.6250000000E+000, energy error:    5.0426039511E-005
time:    3.6875000000E+000, energy error:    3.0406937336E-005
time:    3.7500000000E+000, energy error:    2.1710783862E-005
time:    3.8125000000E+000, energy error:    3.3858203417E-005
time:    3.8750000000E+000, energy error:    3.9203891056E-005
time:    3.9375000000E+000, energy error:    4.2686988811E-005
time:    4.0000000000E+000, energy error:    3.2007468430E-005
time:    4.0625000000E+000, energy error:    2.7238347921E-005
time:    4.1250000000E+000, energy error:    3.5658373827E-005
time:    4.1875000000E+000, energy error:    2.7366251484E-005
time:    4.2500000000E+000, energy error:    4.7719657650E-005
time:    4.3125000000E+000, energy error:    3.3270320249E-005
time:    4.3750000000E+000, energy error:    3.0065284453E-005
time:    4.4375000000E+000, energy error:    4.4252086568E-005
time:    4.5000000000E+000, energy error:    4.4193208019E-005
time:    4.5625000000E+000, energy error:    2.9920638800E-005
time:    4.6250000000E+000, energy error:    3.9855666966E-005
time:    4.6875000000E+000, energy error:    3.6548074194E-005
time:    4.7500000000E+000, energy error:    3.6705405818E-005
time:    4.8125000000E+000, energy error:    3.8064631108E-005
time:    4.8750000000E+000, energy error:    4.8019338875E-005
time:    4.9375000000E+000, energy error:    3.9373255532E-005
time:    5.0000000000E+000, energy error:    2.4958353294E-005
time:    5.0625000000E+000, energy error:    4.3832023580E-005
time:    5.1250000000E+000, energy error:    4.2088554135E-005
time:    5.1875000000E+000, energy error:    3.9077264091E-005
time:    5.2500000000E+000, energy error:    4.2250761076E-005
time:    5.3125000000E+000, energy error:    3.2824362845E-005
time:    5.3750000000E+000, energy error:    4.5955102651E-005
time:    5.4375000000E+000, energy error:    4.8758169269E-005
time:    5.5000000000E+000, energy error:    4.2270977027E-005
time:    5.5625000000E+000, energy error:    2.9784538081E-005
time:    5.6250000000E+000, energy error:    5.0439752133E-005
time:    5.6875000000E+000, energy error:    5.4438889813E-005
time:    5.7500000000E+000, energy error:    3.1267631255E-005
time:    5.8125000000E+000, energy error:    4.9959428021E-005
time:    5.8750000000E+000, energy error:    4.5716466893E-005
time:    5.9375000000E+000, energy error:    3.4536584901E-005
time:    6.0000000000E+000, energy error:    4.6837960258E-005
time:    6.0625000000E+000, energy error:    4.7826301050E-005
time:    6.1250000000E+000, energy error:    4.0698315445E-005
time:    6.1875000000E+000, energy error:    4.8912974228E-005
time:    6.2500000000E+000, energy error:    4.9110609804E-005
time:    6.3125000000E+000, energy error:    3.0444287776E-005
time:    6.3750000000E+000, energy error:    5.1572945664E-005
time:    6.4375000000E+000, energy error:    5.5920028299E-005
time:    6.5000000000E+000, energy error:    3.9418246050E-005
time:    6.5625000000E+000, energy error:    3.4959822583E-005
time:    6.6250000000E+000, energy error:    4.1883011556E-005
time:    6.6875000000E+000, energy error:    5.1811813927E-005
time:    6.7500000000E+000, energy error:    5.0000507279E-005
time:    6.8125000000E+000, energy error:    3.2634631037E-005
time:    6.8750000000E+000, energy error:    6.7725938170E-005
time:    6.9375000000E+000, energy error:    4.1857515257E-005
time:    7.0000000000E+000, energy error:    3.9450918649E-005
time:    7.0625000000E+000, energy error:    4.8565358627E-005
time:    7.1250000000E+000, energy error:    4.8720558510E-005
time:    7.1875000000E+000, energy error:    4.2563616352E-005
time:    7.2500000000E+000, energy error:    5.0287932694E-005
time:    7.3125000000E+000, energy error:    4.3207803353E-005
time:    7.3750000000E+000, energy error:    4.8262103892E-005
time:    7.4375000000E+000, energy error:    5.9650269909E-005
time:    7.5000000000E+000, energy error:    4.2695194950E-005
time:    7.5625000000E+000, energy error:    5.3263845613E-005
time:    7.6250000000E+000, energy error:    6.3663726349E-005
time:    7.6875000000E+000, energy error:    5.7503959850E-005
time:    7.7500000000E+000, energy error:    3.4940360026E-005
time:    7.8125000000E+000, energy error:    6.6938288973E-005
time:    7.8750000000E+000, energy error:    5.7750739560E-005
time:    7.9375000000E+000, energy error:    5.1370139984E-005
time:    8.0000000000E+000, energy error:    4.0201158549E-005
time:    8.0625000000E+000, energy error:    4.5752907457E-005
time:    8.1250000000E+000, energy error:    5.4060895193E-005
time:    8.1875000000E+000, energy error:    4.1387714583E-005
time:    8.2500000000E+000, energy error:    5.5920231930E-005
time:    8.3125000000E+000, energy error:    6.2149405791E-005
time:    8.3750000000E+000, energy error:    5.2257044137E-005
time:    8.4375000000E+000, energy error:    3.7709654847E-005
time:    8.5000000000E+000, energy error:    5.8978759021E-005
time:    8.5625000000E+000, energy error:    5.0163420692E-005
time:    8.6250000000E+000, energy error:    5.0123914973E-005
time:    8.6875000000E+000, energy error:    6.1417769041E-005
time:    8.7500000000E+000, energy error:    3.8373521858E-005
time:    8.8125000000E+000, energy error:    4.1082668109E-005
time:    8.8750000000E+000, energy error:    5.4292534442E-005
time:    8.9375000000E+000, energy error:    4.9407204946E-005
time:    9.0000000000E+000, energy error:    5.5144220057E-005
time:    9.0625000000E+000, energy error:    5.2870206254E-005
time:    9.1250000000E+000, energy error:    5.7226828505E-005
time:    9.1875000000E+000, energy error:    5.4465085406E-005
time:    9.2500000000E+000, energy error:    5.5991977699E-005
time:    9.3125000000E+000, energy error:    5.2390052505E-005
time:    9.3750000000E+000, energy error:    4.5386897017E-005
time:    9.4375000000E+000, energy error:    6.2412012316E-005
time:    9.5000000000E+000, energy error:    4.9518031481E-005
time:    9.5625000000E+000, energy error:    4.7003854806E-005
time:    9.6250000000E+000, energy error:    3.8085822577E-005
time:    9.6875000000E+000, energy error:    4.2081156352E-005
time:    9.7500000000E+000, energy error:    6.0718941759E-005
time:    9.8125000000E+000, energy error:    5.6239220603E-005
time:    9.8750000000E+000, energy error:    3.7749606061E-005
time:    9.9375000000E+000, energy error:    4.0086395479E-005
time:    1.0000000000E+001, energy error:    6.2026013001E-005
******** FDPS has successfully finished. ********
```
# c

```shell-session:docker/ubuntu
# cd ../../c
# ls
# cd nbody
# make
## ls -al
...
-rwxr-xr-x 1 root root 2664440 Aug 13 12:57 nbody.out
...
# ./nbody.out
FDPS on C test code
     //==================================\\
     ||                                  ||
     || ::::::: ::::::. ::::::. .::::::. ||
     || ::      ::    : ::    : ::       ||
     || ::::::  ::    : ::::::'  `:::::. ||
     || ::      ::::::' ::      `......' ||
     ||     Framework for Developing     ||
     ||        Particle Simulator        ||
     ||     Version 5.0e (2019/07)       ||
     \\==================================//

       Home   : https://github.com/fdps/fdps 
       E-mail : fdps-support@mail.jmlab.jp
       Licence: MIT (see, https://github.com/FDPS/FDPS/blob/master/LICENSE)
       Note   : Please cite the following papers.
                - Iwasawa et al. (2016, Publications of the Astronomical Society of Japan, 68, 54)
                - Namekata et al. (2018, Publications of the Astronomical Society of Japan, 70, 70)

       Copyright (C) 2015 
         Masaki Iwasawa, Ataru Tanikawa, Natsuki Hosono,
         Keigo Nitadori, Takayuki Muranushi, Daisuke Namekata,
         Kentaro Nomura, Junichiro Makino and many others
******** FDPS has successfully begun. ********
====================================
 Paralleization infomation:
   # of processes is 1
   # of thread is    1
====================================
Energies = -1.97429041121404e-01   0.00000000000000e+00  -1.97429041121404e-01
time:      0.000, energy error:  -0.0000000e+00
time:      1.000, energy error:  -3.9871569e-05
time:      2.000, energy error:  -1.0300830e-04
time:      3.000, energy error:  -2.1064106e-04
time:      4.000, energy error:  -5.7715475e-04
time:      5.000, energy error:  -1.5199796e-03
time:      6.000, energy error:  -5.6633535e-03
time:      7.000, energy error:  -3.8957312e-03
time:      8.000, energy error:  -3.7788873e-03
time:      9.000, energy error:  -3.7627744e-03
time:     10.000, energy error:  -3.7071071e-03
******** FDPS has successfully finished. ********
```
# docker hub 登録

```shell-session:macOS
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
d1269130febc        gcc                 "/bin/bash"         23 hours ago        Up 23 hours                                  stoic_blackwell
$ docker commit d1269130febc  kaizenjapan/fdps2

$ docker push  kaizenjapan/fdps2

```
なお、午前中にpushしたkaizenjapan/fdpsもある。

こちらはFDPSフォルダを/においてあります。ごめんなさい。

実行するときは

```shell-session:macOS
$ docker run -itv /Users/Administrator/Downloads/work:/home/work kaizenjapan/fdps /bin/bash
```

```shell_session:docker/ubuntu
# cd FDPS
```

# 参考資料(reference)
今日のFDPS error: mpicc: Command not found
https://qiita.com/kaizen_nagoya/items/bf19e501ea07414495a7

FDPSでヘルツ接触する(かも)(書きかけ)
https://qiita.com/NatsukiLab/items/dcb3b9d6eda407e4440b

## 一覧
物理記事　上位100
https://qiita.com/kaizen_nagoya/items/66e90fe31fbe3facc6ff

量子(0) 計算機, 量子力学 
https://qiita.com/kaizen_nagoya/items/1cd954cb0eed92879fd4

数学関連記事１００
https://qiita.com/kaizen_nagoya/items/d8dadb49a6397e854c6d

言語・文学記事　１００
https://qiita.com/kaizen_nagoya/items/42d58d5ef7fb53c407d6

医工連携関連記事一覧
https://qiita.com/kaizen_nagoya/items/6ab51c12ba51bc260a82

自動車　記事　１００
https://qiita.com/kaizen_nagoya/items/f7f0b9ab36569ad409c5

通信記事１００
https://qiita.com/kaizen_nagoya/items/1d67de5e1cd207b05ef7

日本語（０）一欄
https://qiita.com/kaizen_nagoya/items/7498dcfa3a9ba7fd1e68

英語(0) 一覧
https://qiita.com/kaizen_nagoya/items/680e3f5cbf9430486c7d

転職(0)一覧
https://qiita.com/kaizen_nagoya/items/f77520d378d33451d6fe

仮説（0）一覧（目標100現在40）
https://qiita.com/kaizen_nagoya/items/f000506fe1837b3590df

Qiita(0)Qiita関連記事一覧（自分）
https://qiita.com/kaizen_nagoya/items/58db5fbf036b28e9dfa6

鉄道（０）鉄道のシステム考察はてっちゃんがてつだってくれる
https://qiita.com/kaizen_nagoya/items/26bda595f341a27901a0

安全（0）安全工学シンポジウムに向けて: 21
https://qiita.com/kaizen_nagoya/items/c5d78f3def8195cb2409

一覧の一覧( The directory of directories of mine.) Qiita(100)
https://qiita.com/kaizen_nagoya/items/7eb0e006543886138f39

Ethernet 記事一覧　Ethernet(0)
https://qiita.com/kaizen_nagoya/items/88d35e99f74aefc98794

Wireshark 一覧 wireshark(0)、Ethernet(48) 
https://qiita.com/kaizen_nagoya/items/fbed841f61875c4731d0

線網（Wi-Fi）空中線(antenna)(0) 記事一覧(118/300目標)
https://qiita.com/kaizen_nagoya/items/5e5464ac2b24bd4cd001

OSEK OS設計の基礎　OSEK(100)
https://qiita.com/kaizen_nagoya/items/7528a22a14242d2d58a3

Error一覧 error(0)
https://qiita.com/kaizen_nagoya/items/48b6cbc8d68eae2c42b8

プログラマによる、プログラマのための、統計(0)と確率のプログラミングとその後
https://qiita.com/kaizen_nagoya/items/6e9897eb641268766909

官公庁・学校・公的団体（NPOを含む）システムの課題、官（０）
https://qiita.com/kaizen_nagoya/items/04ee6eaf7ec13d3af4c3

「はじめての」シリーズ　 ベクタージャパン　
https://qiita.com/kaizen_nagoya/items/2e41634f6e21a3cf74eb

AUTOSAR(0)Qiita記事一覧, OSEK(75)
https://qiita.com/kaizen_nagoya/items/89c07961b59a8754c869

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

LaTeX(0) 一覧　
https://qiita.com/kaizen_nagoya/items/e3f7dafacab58c499792

自動制御、制御工学一覧（０）
https://qiita.com/kaizen_nagoya/items/7767a4e19a6ae1479e6b

Rust(0) 一覧　
https://qiita.com/kaizen_nagoya/items/5e8bb080ba6ca0281927

小川清最終講義、最終講義（再）計画, Ethernet(100) 英語(100) 安全(100)
https://qiita.com/kaizen_nagoya/items/e2df642e3951e35e6a53

＜この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。＞
This article is an individual impression based on the individual's experience. It has nothing to do with the organization or business to which I currently belong.
### 文書履歴(document history)
ver. 0.01 初稿 201908013　朝
ver. 0.02 gfortran, 標題追記 20190813　午前
ver. 0.03 C言語 20190813 午後
ver. 0.04 今日のFDPS error: mpicc: Command not found 20190813 夜
ver. 0.05 ありがとう追記　20230527
### 最後までおよみいただきありがとうございました。
いいね　💚、フォローをお願いします。
####  Thank you very much for reading to the last sentence.
Please press the like icon 💚　and follow me for your happy life.