Top Page > Browsing
For parallel compile "make -j"
Date: 2017/01/19 12:03
Name: Atsushi M. Ito

Dear Prof. Ozaki and everybody

I compile OpenMX on multi-core environment using the command "make -j".
However, parallel compilation of Fortran source becomes error sometimes. This reason is dependency of the Fortran module because the order of the compilation of multi-files is important to link Fortran code. (And, the order of compilation does not becomes problem for C/C++ code because the link of C/C++ is performed after all compilation. But, link of Fortran is performed every the compilation of target source file.)

To solve above problem for parallel compile, I suggest modification of "makefile" as follows

elpa1.o: elpa1.f90
$(FC) -c elpa1.f90
solve_evp_real.o: solve_evp_real.f90
$(FC) -c solve_evp_real.f90
solve_evp_complex.o: solve_evp_complex.f90
$(FC) -c solve_evp_complex.f90

elpa1.o: elpa1.f90
$(FC) -c elpa1.f90
solve_evp_real.o: solve_evp_real.f90 elpa1.o
$(FC) -c solve_evp_real.f90
solve_evp_complex.o: solve_evp_complex.f90 elpa1.o
$(FC) -c solve_evp_complex.f90

Just "elpa1.o" is added in dependency of solve_evp_real and solve_evp_complex.

Page: [1]

Title (must) Move the thread to the top
Your Name (must)
E-Mail (must)
Password (used in modification of the submitted text)
Comment (must)

   Save Cookie