Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include create_xgrid_util.h header file #263

Merged
merged 5 commits into from
Dec 19, 2023
Merged

Conversation

mlee03
Copy link
Contributor

@mlee03 mlee03 commented Dec 6, 2023

During the process of cleaning up FRE-NCTOOLS in gpu_dev, all miscellaneous non-create_xgrid* functions were moved to a new file called create_xgrid_util.c file.

This change requires changes to all tools/*.c files that contains #include "create_xgrid.h": these c files also need to include #include "create_xgrid_util.h"

Without this change, answers produced with make_coupler_mosaic will disagree with those from the main branch.

@mlee03
Copy link
Contributor Author

mlee03 commented Dec 6, 2023

@ngs333, c works in mysterious ways. Just to double check, would you be able to test this branch to see if all agrees with the main branch?

@ngs333 ngs333 self-requested a review December 8, 2023 20:28
@ngs333 ngs333 self-assigned this Dec 8, 2023
Copy link
Contributor

@ngs333 ngs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks fine except for one item. See comnent and question on make_coupler mosaic Makefile.am file.

@@ -23,7 +23,8 @@ if WITH_MPI
endif

AM_CFLAGS = -I$(top_srcdir)/tools/libfrencutils \
$(NETCDF_CFLAGS)
$(NETCDF_CFLAGS) \
-I$(top_srcdir)/tools/fregrid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think other tools (make_coupler mosaic and the others) should not depend on the fregrid tool. What is this tool picking up from the fregrid directory that the AM flags now have -I$(top_srcdir)/tools/fregrid ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does not compile without that include in AM_CFLAGS. I think it's because create_xgrid.h needs global.h which is in the fregrid directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mlee03 So perhaps it makes more sense to put global.h in the same place as constant.h - in directory libfrencutils ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved global.h to libfrenctools. Ready for final review :)

@ngs333 ngs333 merged commit 1b03998 into NOAA-GFDL:gpu_dev Dec 19, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants