how to compile multi-folder Fortran Project having interfaces, modules and subroutines

后端 未结 2 468
傲寒
傲寒 2020-12-10 07:24

I am new to Fortran. I am working on a research project where I am using an open source project that has several files distributed in multiple folders. i found the dependenc

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-10 08:26

    You can create your Makefiles as usual. The biggest problem should be the .mod files. The easiest solution to this problem is to create a separate folder, where these files are stored and searched for.

    This can be achieved with the -J and the -module flags for gfortran and ifort, respectively.

提交回复
热议问题