× If you run into troubles, it is always a good habit to report the following information:
  • the way build.mrcc was invoked
  • the output of build.mrcc
  • compiler version (for example: ifort -V, gfortran -v)
  • blas/lapack versions
  • as well as gcc and glibc versions

as well as the value of the relevant environmental variables, such OMP_NUM_THREADS, etc.

This information helps us a lot when figuring out what is going on with your compilation :)

Parallel compilation of MRCC using CMake

8 months 2 days ago - 8 months 2 days ago #1327 by i.s.ger
Dear developers,

I tried to compile MRCC using build.mrcc script, unfortunately, this script compiles MRCC in single-thread mode. So, compilation takes time.

Then, I decided to use CMake for the build automatization of MRCC. Initially, I moved all source files (*.f, *.f90, *.F90) into the `source/` directory. Using this directory structure, I have written CMakeLists.txt for CMake. Currently, it has some limitations:
  • Only dynamic builds (no static)
  • Only OpenMPI is supported (I would prefer to modify the source code rather than the build system in this case)
  • No HDF5 and Q5cost libraries (I have no idea where I can get Q5cost lib)
  • GCC and Intel compilers are supported (I tested armflang also, but I got internal compiler error)
A new build system natively supports file separation into several ones. For this, the user should create a directory as the name of the file for separation without its extension, then, separate the file into multiple ones in the created directory. 
For example, for `intsub.f `, the user should 
  • create `intsub` directory inside of `source/`
  • move `intsub.f` into `intsub`
  • split `intsub.f` into multiple files by routines (for example, using f90split)
  • remove `intsub.f`
I did it for `intsub.f` and `intsub_rangesep.f`, then, the compilation times of these files were reduced significantly.

The structure of MRCC project after patching is presented in `tree` file in the attachment. `patch.diff` contains diff after moving source files into `source/` directory.


File Attachment:

File Name: tree.txt
File Size:70 KB


File Attachment:

File Name: patch.diff.txt
File Size:16 KB

Best regards,
Last edit: 8 months 2 days ago by i.s.ger.

Please Log in or Create an account to join the conversation.

Time to create page: 0.037 seconds
Powered by Kunena Forum