# How to compile R-LINE through gcc

**URL:** <https://forum.cmascenter.org/t/how-to-compile-r-line-through-gcc/4788>\
**Category:** R-LINE\
**Tags:** cmaq\
**Created:** [March 19, 2024, 9:41pm UTC](https://forum.cmascenter.org/t/how-to-compile-r-line-through-gcc/4788 "2024-03-19T21:41:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulopimenta6](https://avatars.discourse-cdn.com/v4/letter/p/a8b319/32.png) [@paulopimenta6](https://forum.cmascenter.org/u/paulopimenta6)\
**Post date:** [March 19, 2024, 9:41pm UTC](https://forum.cmascenter.org/t/how-to-compile-r-line-through-gcc/4788/1 "2024-03-19T21:41:11Z")

</div>

Hi!

I am using again R-LINE after long time and I forget how to compile it. Nowadays I am using a Linux PC and gcc compiler, but I am in doubt if just compiling, through gfortran, the RLINE\_Main.f90 or using cmake/make to compile all project is needed.

Please, if someone could describe the steps to compile in Linux environment and GNU (gcc/gfortran) compiler I’d be so happy and thankful.

Best regards.

Paulo.

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [March 22, 2024, 4:43pm UTC](https://forum.cmascenter.org/t/how-to-compile-r-line-through-gcc/4788/2 "2024-03-22T16:43:38Z")

</div>

In the package, there are Makefiles for intel and pgi.

I have copied and modified those files to use gfortran.

Please see the file attached that is named Makefile.gfortran.txt

Note, you will need to copy Makefile.gfortran.txt to Makefile and then run make as follows.

First download Makefile.gfortran.txt to the same directory where you have the package installed.  
Be sure that you are running on a system that has the gfortran installer loaded

```auto
module list

```

Output:

```auto
Currently Loaded Modules:
  1) gcc/9.1.0

```

Then copy the file to Makefile, and run make.

```auto
cd v1_2
cp Makefile.gfortran.txt Makefile
make |& tee make.log

```

Once it compiles, you should have an executable named:

```auto
RLINEv1_2.gfortran.x 

```

[Makefile.gfortran.txt](https://forum.cmascenter.org/uploads/short-url/zdOxgL0CokReysdBRKv8WZJiGqL.txt) (917 Bytes)
