noaa-oar-arl / canopy-app

Stand-alone/column canopy codes and parameterizations
MIT License
6 stars 7 forks source link

Modified Makefile to work with both ifort or gfortran to build canopy-app (Tested on Hera for ifort) #75

Closed quaz115 closed 1 year ago

quaz115 commented 1 year ago

FCFLAGS := -g -warn all -implicitnone -O1 -stand f90 -error-limit 5 #Equivalent to gfortran Debug flags, builds with warnings on Hera

FCFLAGS  := -g -warn all -check bounds -traceback #builds without warnings on Hera

-stand flag works for different Fortran version (say for Fortran 2008, f90 can be replaced by f08) Optimization flag can also be changed accordingly (-O1, -O2 etc.)

drnimbusrain commented 1 year ago

@quaz115 Thanks for the PR! I do agree with Zach's comments and we should not make most of these changes though, except for the additional ifort debug flags starting at line 27. The Makefile has already been made to accept whatever FC chosen, with default being gfortran if not specified. So, this should be OK. @zmoon Can we revert those changes?

However, please lets also address the "builds with warnings on Hera" flags for ifort in this PR, as we should determine what in canopy-app is causing this. Thanks for the testing!

drnimbusrain commented 1 year ago

Quazi,

The FC=ifort can be argument given when compiling. gfortran should be left as the default, and that command is just an override.

On Thu, Jun 8, 2023, 10:57 PM quaz115 @.***> wrote:

@.**** commented on this pull request.

In src/Makefile https://github.com/noaa-oar-arl/canopy-app/pull/75#discussion_r1223782608 :

Compiler

FC ?= gfortran ifeq ($(FC), f77) # override possible Make default

  • FC := ifort

@zmoon https://github.com/zmoon @drnimbusrain https://github.com/drnimbusrain , i think we need this change, When i revert back, FC shows as gfortran and i get build error: Fatal Error: File 'netcdf.mod' opened at (1) is not a GNU Fortran module file make: *** [canopy_ncf_io_mod.o] Error 1 I think we need these changes (or FC to be assigned ifort somewhere)

— Reply to this email directly, view it on GitHub https://github.com/noaa-oar-arl/canopy-app/pull/75#discussion_r1223782608, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNWE4MLNESZHLHLL53TXKKGKNANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.***>

quaz115 commented 1 year ago

Quazi, The FC=ifort can be argument given when compiling. gfortran should be left as the default, and that command is just an override. On Thu, Jun 8, 2023, 10:57 PM quaz115 @.> wrote: @*.*** commented on this pull request. ------------------------------ In src/Makefile <#75 (comment)> : > # Compiler FC ?= gfortran ifeq ($(FC), f77) # override possible Make default + FC := ifort @zmoon https://github.com/zmoon @drnimbusrain https://github.com/drnimbusrain , i think we need this change, When i revert back, FC shows as gfortran and i get build error: Fatal Error: File 'netcdf.mod' opened at (1) is not a GNU Fortran module file make: [canopy_ncf_io_mod.o] Error 1 I think we need these changes (or FC to be assigned ifort somewhere) — Reply to this email directly, view it on GitHub <#75 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNWE4MLNESZHLHLL53TXKKGKNANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.***>

Agreed

drnimbusrain commented 1 year ago

@quaz115 Thanks for checking with the FC=ifort appropriately. Seems like only changes needed then are for your additions to the ifort FC flags. The gfortran equivalent flags are having the warning:

FCFLAGS := -g -warn all -implicitnone -O1 -stand f90 -error-limit 5 #Equivalent to gfortran Debug flags #builds but with WARNINGS to be resolved

Seems like its mainly the ifort f90 standards (-stand f90) having issues with the following in canopy-app:

@zmoon Am I missing anything? We should likely fix these up for ifort.

drnimbusrain commented 1 year ago

@quaz115 Also, can you include the development practices described in the README under image

This should fix the Lint formatting issues with your PR. Thanks!

quaz115 commented 1 year ago

@quaz115 Also, can you include the development practices described in the README under image

This should fix the Lint formatting issues with your PR. Thanks!

@zmoon if i follow the above steps on my local develop branch fork , would it fix the lint formatting issue on this PR or i need to re-commit the Makefile changes again and create a new PR?

zmoon commented 1 year ago

@quaz115 after you install the pre-commit hooks you can just do pre-commit run --all-files and commit the result of that to please the formatter. That can be in your develop branch (this PR).

zmoon commented 1 year ago

We need to use a higher standard, e.g. 2003 (for associate), but enable the compiler extensions in order to use the exit subroutine (which is not part of the Fortran standard, but is included in both GNU and Intel's extensions).

For GFortran, if desired, we can achieve this with -std=f2003 -fall-intrinsics.

For Intel I can't find how to do that so we can just not use -stand.

bbakernoaa commented 1 year ago

we should probably think in a future PR to move to CMake. This will likely be a requirement for integration into CATChem later on.

drnimbusrain commented 1 year ago

Thanks Barry, yes that is already an issue to move to CMake.

On Fri, Jun 9, 2023, 11:53 AM Barry Baker @.***> wrote:

we should probably think in a future PR to move to CMake. This will likely be a requirement for integration into CATChem later on.

— Reply to this email directly, view it on GitHub https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1584803033, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNR7JXZP3JGL527YKH3XKNBGVANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.***>

drnimbusrain commented 1 year ago

@quaz115 Do you mind making Zach's suggestions and test compiling the DEBUG mode flags for both gfortran and ifort compilers and make the commits here? We just need to have one for each and make sure no warnings are thrown.

We need to use a higher standard, e.g. 2003 (for associate), but enable the compiler extensions in order to use the exit subroutine (which is not part of the Fortran standard, but is included in both GNU and Intel's extensions).

For GFortran we can achieve this with -std=f2003 -fall-intrinsics.

For Intel I can't find how to do that so we can just not use -stand. (Maybe you can figure out how to do it for Intel)

zmoon commented 1 year ago

For Intel I can't find how to do that so we can just not use -stand. (Maybe you can figure out how to do it for Intel)

FWIW, seems like they don't use -stand with FV3.

zmoon commented 1 year ago

We can include ifort in the CI tests[^1] with setup-fortran. But I can do that in a separate PR, unless @quaz115 you want to do it here.

[^1]: probably just non-netCDF build initially

drnimbusrain commented 1 year ago

For Intel I can't find how to do that so we can just not use -stand. (Maybe you can figure out how to do it for Intel)

FWIW, seems like they don't use -stand with FV3.

OK Zach, lets just remove -stand from the ifort DEBUG flags, and test your suggestion for gfortran: -std=f2003 -fall-intrinsics

@quaz115 Can you test these in your branch and commit if both ifort and gfortran compile OK with no warnings.

quaz115 commented 1 year ago

@quaz115 after you install the pre-commit hooks you can just do pre-commit run --all-files and commit the result of that to please the formatter. That can be in your develop branch (this PR).

@zmoon i am getting following issue when i try to install the pre-commit hooks:

pre-commit --version pre-commit 3.3.2 (base) |12:11:52|Quazi.Rasool@hfe08:[canopy-app-forkqzr]> pre-commit install --install-hooks pre-commit installed at .git/hooks/pre-commit [INFO] Installing environment for https://github.com/kynan/nbstripout. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... An unexpected error has occurred: CalledProcessError: command: ('/home/Quazi.Rasool/.cache/pre-commit/repo4ydrc5pt/py_env-python3.10/bin/python', '-mpip', 'install', '.') return code: 1 stdout: Processing /home/Quazi.Rasool/.cache/pre-commit/repo4ydrc5pt Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting nbformat (from nbstripout==0.6.1) stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f2b7dddfe80>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/e1/ce/7f0f454b4e7f1cb31345f9f977bdce7486033a1c08b5945b17ea95c4afbc/nbformat-5.9.0-py3-none-any.whl WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f2b7dddfd90>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/e1/ce/7f0f454b4e7f1cb31345f9f977bdce7486033a1c08b5945b17ea95c4afbc/nbformat-5.9.0-py3-none-any.whl WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f2b7dddd330>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/e1/ce/7f0f454b4e7f1cb31345f9f977bdce7486033a1c08b5945b17ea95c4afbc/nbformat-5.9.0-py3-none-any.whl WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f2b7dddf880>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/e1/ce/7f0f454b4e7f1cb31345f9f977bdce7486033a1c08b5945b17ea95c4afbc/nbformat-5.9.0-py3-none-any.whl WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f2b7ddddba0>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/e1/ce/7f0f454b4e7f1cb31345f9f977bdce7486033a1c08b5945b17ea95c4afbc/nbformat-5.9.0-py3-none-any.whl ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/e1/ce/7f0f454b4e7f1cb31345f9f977bdce7486033a1c08b5945b17ea95c4afbc/nbformat-5.9.0-py3-none-any.whl (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f2b7dddec80>: Failed to establish a new connection: [Errno 101] Network is unreachable')) Check the log at /home/Quazi.Rasool/.cache/pre-commit/pre-commit.log

drnimbusrain commented 1 year ago

We can include ifort in the CI tests1 with setup-fortran. But I can do that in a separate PR, unless @quaz115 you want to do it here.

Footnotes

  1. probably just non-netCDF build initially

Yes, we need that in the CI so either here or new PR, but should be included in conjunction for completeness to test both compilers.

zmoon commented 1 year ago

@quaz115 looks like it is having trouble reaching PyPI to download packages to install. Not sure why. I think on Hera only the login nodes have internet access.

To please the formatter manually just remove the trailing whitespace from the end of lines in the Makefile. There are two lines that have some.

quaz115 commented 1 year ago

For Intel I can't find how to do that so we can just not use -stand. (Maybe you can figure out how to do it for Intel)

FWIW, seems like they don't use -stand with FV3.

OK Zach, lets just remove -stand from the ifort DEBUG flags, and test your suggestion for gfortran: -std=f2003 -fall-intrinsics

@quaz115 Can you test these in your branch and commit if both ifort and gfortran compile OK with no warnings.

@drnimbusrain I was able to build with ifort (without the -stand f90 flag option) without any warnings. But on Hera, i get this error with FC=gfortran (i added -std=f2003 -fall-intrinsics in the debug flags)

canopy_ncf_io_mod.F90:121.12:

    USE netcdf
        1

Fatal Error: File 'netcdf.mod' opened at (1) is not a GNU Fortran module file make: *** [canopy_ncf_io_mod.o] Error 1

@drnimbusrain Can you check for gfortran on your end ?

drnimbusrain commented 1 year ago

@quaz115 Something seems strange in your revised Makefile. I tested your branch on Hera.

I first do make DEBUG=1 NETCDF=1 FC=ifort and it compiles fine with no warnings, but then make clean gives the following error:

FC setting: 'gfortran' DEBUG setting: '0' NETCDF setting: '/apps/netcdf/4.6.1/intel/16.1.150' Makefile:49: *** invalid setting for NETCDF, should be 0 or 1 but is '/apps/netcdf/4.6.1/intel/16.1.150'. Stop.

quaz115 commented 1 year ago

@quaz115 Something seems strange in your revised Makefile. I tested your branch on Hera.

I first do make DEBUG=1 NETCDF=1 FC=ifort and it compiles fine with no warnings, but then make clean gives the following error:

FC setting: 'gfortran' DEBUG setting: '0' NETCDF setting: '/apps/netcdf/4.6.1/intel/16.1.150' Makefile:49: *** invalid setting for NETCDF, should be 0 or 1 but is '/apps/netcdf/4.6.1/intel/16.1.150'. Stop.

Yes, i also see that now on make clean

zmoon commented 1 year ago

@drnimbusrain looks like the environment has NETCDF env var set. You can use NETCDF=1 with your make clean as well to get around this. We could change the option to NC or something so that that isn't necessary though. Or something more verbose like WITH_NETCDF.

drnimbusrain commented 1 year ago

Yes, exactly Zach. Maybe we should change this here to avoid the $NETCDF conflict on certain systems...

quaz115 commented 1 year ago

@drnimbusrain looks like the environment has NETCDF env var set. Can use NETCDF=1 with your make clean as well to get around this. We could change the option to NC or something to avoid this.

Yes, it actually out netcdf env set for wrf-chem etc. on hera : echo $NETCDF /apps/netcdf/4.6.1/intel/16.1.150

drnimbusrain commented 1 year ago

OK, and I can reproduce Quazi's error there on Hera:

make DEBUG=1 NETCDF=1 FC=gfortran

canopy_ncf_io_mod.F90:121.12:

    USE netcdf
        1

Fatal Error: File 'netcdf.mod' opened at (1) is not a GNU Fortran module file make: *** [canopy_ncf_io_mod.o] Error 1

drnimbusrain commented 1 year ago

Seems a conflict with the $NETCDF library compiled with intel on Hera.

zmoon commented 1 year ago

Seems a conflict with the $NETCDF library compiled with intel on Hera.

You have to use one compiled with GFortran

e.g.

module load gnu/9.2.0 netcdf/4.7.2

standard Hera modules

drnimbusrain commented 1 year ago

I think they only have Intel ones, so Quazi, seems like you can just move forward using ifort compiler and there are no warnings or issues, correct?

I still think we should change the setting NETCDF to NCDF in the Makefile to avoid the other system environment variable issue.

drnimbusrain commented 1 year ago

Lets get the following changes made in this PR so it can be merged to develop:

Anything else @zmoon and @quaz115 ?

quaz115 commented 1 year ago

I think they only have Intel ones, so Quazi, seems like you can just move forward using ifort compiler and there are no warnings or issues, correct?

Yes, that's correct. I can only build with ifort, and there are no warnings when i remove the -stand f90

I still think we should change the setting NETCDF to NCDF in the Makefile to avoid the other system environment variable issue.

Agree

drnimbusrain commented 1 year ago

module load gnu/9.2.0 netcdf/4.7.2

Oh right Zach, I switched over to gnu netcdf on Hera. OK, tested this:

make DEBUG=1 NCDF=1 FC=gfortran

/apps/spack/linux-centos7-x86_64/gcc-9.2.0/netcdf-c-4.7.2-btfhbjvmwttboik5vd7ty6afd6h6w56u/lib/libnetcdf.so: undefined reference to H5Pset_dxpl_mpio' /apps/spack/linux-centos7-x86_64/gcc-9.2.0/netcdf-c-4.7.2-btfhbjvmwttboik5vd7ty6afd6h6w56u/lib/libnetcdf.so: undefined reference toH5Pset_fapl_mpio' /apps/spack/linux-centos7-x86_64/gcc-9.2.0/netcdf-c-4.7.2-btfhbjvmwttboik5vd7ty6afd6h6w56u/lib/libnetcdf.so: undefined reference to H5Pset_all_coll_metadata_ops' /apps/spack/linux-centos7-x86_64/gcc-9.2.0/netcdf-c-4.7.2-btfhbjvmwttboik5vd7ty6afd6h6w56u/lib/libnetcdf.so: undefined reference toH5Pset_coll_metadata_write'

zmoon commented 1 year ago

Change NETCDF to NCDF or something else

I vote for NC or WITH_NETCDF. Not a fan of NCDF lol.

drnimbusrain commented 1 year ago

I think they only have Intel ones, so Quazi, seems like you can just move forward using ifort compiler and there are no warnings or issues, correct?

Yes, that's correct. I can only build with ifort, and there are no warnings when i remove the -stand f90

I still think we should change the setting NETCDF to NCDF in the Makefile to avoid the other system environment variable issue.

Agree

Thanks @quaz115: Please change NETCDF to NC option in the Makefile for this PR, but I still getting H5 errors with gfortran testing.

zmoon commented 1 year ago

getting H5 errors with gfortran testing

@drnimbusrain I think you have other modules loaded. With just

Currently Loaded Modules:
  1) gnu/9.2.0   2) netcdf/4.7.2

I don't get any errors/warnings.

drnimbusrain commented 1 year ago

Thanks Zach, should have done a module purge.

Great! Seems just the NETCDF to NC change is needed and the ifort CI check for this right?

On Fri, Jun 9, 2023, 2:58 PM Zachary Moon @.***> wrote:

getting H5 errors with gfortran testing

@drnimbusrain https://github.com/drnimbusrain I think you have other modules loaded. With just

Currently Loaded Modules: 1) gnu/9.2.0 2) netcdf/4.7.2

I don't get any errors/warnings.

— Reply to this email directly, view it on GitHub https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1585011982, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNQ6CKYTKABUL2WCTA3XKNW65ANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.***>

quaz115 commented 1 year ago

Thanks Zach, should have done a module purge. Great! Seems just the NETCDF to NC change is needed and the ifort CI check for this right? On Fri, Jun 9, 2023, 2:58 PM Zachary Moon @.> wrote: getting H5 errors with gfortran testing @drnimbusrain https://github.com/drnimbusrain I think you have other modules loaded. With just Currently Loaded Modules: 1) gnu/9.2.0 2) netcdf/4.7.2 I don't get any errors/warnings. — Reply to this email directly, view it on GitHub <#75 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNQ6CKYTKABUL2WCTA3XKNW65ANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.>

@zmoon Should NETCDF_FLIBS and NETCDF_INC also be edited to NC_FLIBS and NC_INC? and what about: FCFLAGS += -DNETCDF

drnimbusrain commented 1 year ago

No, I don't think so.

On Fri, Jun 9, 2023, 3:57 PM quaz115 @.***> wrote:

Thanks Zach, should have done a module purge. Great! Seems just the NETCDF to NC change is needed and the ifort CI check for this right? … <#m-1963340890694455230> On Fri, Jun 9, 2023, 2:58 PM Zachary Moon @.> wrote: getting H5 errors with gfortran testing @drnimbusrain https://github.com/drnimbusrain https://github.com/drnimbusrain https://github.com/drnimbusrain I think you have other modules loaded. With just Currently Loaded Modules: 1) gnu/9.2.0 2) netcdf/4.7.2 I don't get any errors/warnings. — Reply to this email directly, view it on GitHub <#75 (comment) https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1585011982>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNQ6CKYTKABUL2WCTA3XKNW65ANCNFSM6AAAAAAY77ZZUM https://github.com/notifications/unsubscribe-auth/AGLFYNQ6CKYTKABUL2WCTA3XKNW65ANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.>

Should NETCDF_FLIBS and NETCDF_INC also be edited to NC_FLIBS and NC_INC?

— Reply to this email directly, view it on GitHub https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1585064123, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNQH6QMDGHAHSW35XETXKN5ZVANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.***>

quaz115 commented 1 year ago

ok, just added the latest commit (tested already)

On Fri, Jun 9, 2023 at 1:19 PM Patrick Campbell @.***> wrote:

No, I don't think so.

On Fri, Jun 9, 2023, 3:57 PM quaz115 @.***> wrote:

Thanks Zach, should have done a module purge. Great! Seems just the NETCDF to NC change is needed and the ifort CI check for this right? … <#m-1963340890694455230> On Fri, Jun 9, 2023, 2:58 PM Zachary Moon @.*> wrote: getting H5 errors with gfortran testing @drnimbusrain https://github.com/drnimbusrain https://github.com/drnimbusrain https://github.com/drnimbusrain I think you have other modules loaded. With just Currently Loaded Modules: 1) gnu/9.2.0 2) netcdf/4.7.2 I don't get any errors/warnings. — Reply to this email directly, view it on GitHub <#75 (comment) < https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1585011982>>,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AGLFYNQ6CKYTKABUL2WCTA3XKNW65ANCNFSM6AAAAAAY77ZZUM < https://github.com/notifications/unsubscribe-auth/AGLFYNQ6CKYTKABUL2WCTA3XKNW65ANCNFSM6AAAAAAY77ZZUM>

. You are receiving this because you were mentioned.Message ID: @.*>

Should NETCDF_FLIBS and NETCDF_INC also be edited to NC_FLIBS and NC_INC?

— Reply to this email directly, view it on GitHub < https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1585064123>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AGLFYNQH6QMDGHAHSW35XETXKN5ZVANCNFSM6AAAAAAY77ZZUM>

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1585084599, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFNFOKBLXGT3SS4ZUNLMW3XKOAMHANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.***>

drnimbusrain commented 1 year ago

Thanks Quazi and Zach, both options working well for me now too. Just updates to README for the build ifort option and change to 'NC' setting and maybe the CI ifort check if Zach has time.

Maybe something like this Quazi?

Compilation options can be controlled with environment variables:

FC=gfortran (default) or ifort
DEBUG=0 (off; default) or DEBUG=1 (on)
NC=0 (off) or NC=1 (on; default)
Example:

DEBUG=1 NC=1 make -C src
quaz115 commented 1 year ago

Thanks Quazi and Zach, both options working well for me now too. Just updates to README for the build ifort option and change to 'NC' setting and maybe the CI ifort check if Zach has time.

Maybe something like this Quazi?

Compilation options can be controlled with environment variables:

FC=gfortran (default) or ifort
DEBUG=0 (off; default) or DEBUG=1 (on)
NC=0 (off) or NC=1 (on; default)
Example:

DEBUG=1 NC=1 make -C src

Just suggesting minor addition for more clarity i think:

Compilation options can be controlled with environment variables:

FC=gfortran (default) or ifort
DEBUG=0 (off; default) or DEBUG=1 (on)
NC=0 (off) or NC=1 (on; default)

Example:
a) with gfortran, Debug flags ON and with Netcdf:
       DEBUG=1 NC=1 make -C src         
b) with ifort, Debug flags ON and with Netcdf:      
       DEBUG=1 NC=1 FC=ifort make -C src 
zmoon commented 1 year ago

a) with gfortran, Debug flags ON and with Netcdf: DEBUG=1 NC=1 make -C src

We may want to note that not supplying FC in your line doesn't necessary give gfortran, since FC might already be set in the environment (seems some module load situations do this).

drnimbusrain commented 1 year ago

Good idea Zach. Go ahead and make the README changes Quazi. Thanks!

On Sat, Jun 10, 2023, 9:50 AM Zachary Moon @.***> wrote:

a) with gfortran, Debug flags ON and with Netcdf: DEBUG=1 NC=1 make -C src

We may want to note that not supplying FC in your line doesn't necessary give gfortran, since FC might already be set in the environment (seems some module load situations do this).

— Reply to this email directly, view it on GitHub https://github.com/noaa-oar-arl/canopy-app/pull/75#issuecomment-1585671385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNUSEWDN4YIIUF24US3XKR3T3ANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.***>

quaz115 commented 1 year ago

a) with gfortran, Debug flags ON and with Netcdf: DEBUG=1 NC=1 make -C src

We may want to note that not supplying FC in your line doesn't necessary give gfortran, since FC might already be set in the environment (seems some module load situations do this).

Incorporated in README.md changes

quaz115 commented 1 year ago

Good idea Zach. Go ahead and make the README changes Quazi. Thanks! On Sat, Jun 10, 2023, 9:50 AM Zachary Moon @.> wrote: a) with gfortran, Debug flags ON and with Netcdf: DEBUG=1 NC=1 make -C src We may want to note that not supplying FC in your line doesn't necessary give gfortran, since FC might already be set in the environment (seems some module load situations do this). — Reply to this email directly, view it on GitHub <#75 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGLFYNUSEWDN4YIIUF24US3XKR3T3ANCNFSM6AAAAAAY77ZZUM . You are receiving this because you were mentioned.Message ID: @.>

Done!

drnimbusrain commented 1 year ago

@zmoon are we ready to merge?

drnimbusrain commented 1 year ago

@zmoon Did you want to add the CI changes, or merge now?

drnimbusrain commented 1 year ago

OK, thank you Quazi and Zach for these updates!