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

pio_nc4.c:1341:47: error: macro "PLOG" passed 4 arguments, but takes just 1 #1987

Open
j34ni opened this issue Mar 4, 2024 · 1 comment
Open

Comments

@j34ni
Copy link

j34ni commented Mar 4, 2024

Hi,

I am getting these errors with CESM 2.3 (alpha 17a) and pio2.6.2 when compiling in debug mode with GNU and MPIch:

/scratch/cesm2_3_alpha17a/libraries/parallelio/src/clib/pio_nc4.c: In function 'PIOc_def_var_filter':
/scratch//cesm2_3_alpha17a/libraries/parallelio/src/clib/pio_nc4.c:1340:9: error: 'i' undeclared (first use in this function); did you mean 'id'?
 1340 |     for(i=0; i<nparams; i++)
      |         ^
      |         id
/scratch/cesm2_3_alpha17a/libraries/parallelio/src/clib/pio_nc4.c:1340:9: note: each undeclared identifier is reported only once for each function it appears in
/scratch/cesm2_3_alpha17a/libraries/parallelio/src/clib/pio_nc4.c:1341:47: error: macro "PLOG" passed 4 arguments, but takes just 1
 1341 |         PLOG(1, "  param %d %d\n",i, params[i]);
      |                                               ^
In file included from /scratch/cesm2_3_alpha17a/libraries/parallelio/src/clib/pio_nc4.c:8:
**/scratch/cesm2_3_alpha17a/libraries/parallelio/src/clib/pio_internal.h:97: note: macro "PLOG" defined here
   **97 | #define PLOG(e) pio_log e****
      |
/scratch/cesm2_3_alpha17a/libraries/parallelio/src/clib/pio_nc4.c:1341:9: error: 'PLOG' undeclared (first use in this function)
 1341 |         PLOG(1, "  param %d %d\n",i, params[i]);

Is it normal?

@jedwards4b
Copy link
Contributor

The PLOG macro requires two sets of parenthesis:
For example line 1341 of pio_nc4.c should be
PLOG((1, " param %d %d\n",i, params[i]));
I've corrected this in main but haven't made a new tag yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants