FPPFLAGS/ in tests
In tests/Makefile.tests_common, the fpp.f90 rule does not have FPPFLAGS causing compilation error in nonlinear_tests. It looks inconsistent to have different fpp.f90 rules for main sources and tests. Is there any reasons for this?
Comments (5)
-
-
reporter @Joseph Parker I’m porting GS2 to a new machine in NIFS. It’s NEC’s SX-Aurora Tsubasa--another strange environment. Here’s the error (please ignore the warnings)
make all -C nonlinear_terms/. TEST_FOLD=nonlinear_terms/.
MPI process (universe = 0, rank = 0) terminated by exit(1)
fes2: mpid(0): Program terminated before MPI_Init was called
MPI process (universe = 0, rank = 1) terminated by exit(1)
fes2: mpid(0): Program terminated before MPI_Init was called
Node '0' is Offline
Node '0' is Offline
make all -C fields_gf_local/. TEST_FOLD=fields_gf_local/.
MPI process (universe = 0, rank = 0) terminated by exit(1)
fes2: mpid(0): Program terminated before MPI_Init was called
Node '0' is Offline
make all -C gs2_main/. TEST_FOLD=gs2_main/.
cpp -I/data/lng/numata/gs2_run/gs2 test_gs2_main.fpp test_gs2_main.f90
mpinfort -fdefault-real=8 -I/data/lng/numata/gs2_run/gs2/include -I/data/lng/numata/gs2_run/gs2 -c test_gs2_main.f90
Error: test_gs2_main.f90, line 4: Invalid #line directive
Error: test_gs2_main.f90, line 13: Syntax error
detected at <invalid token>@PROGRAM
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module MPI (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module MPI_CONSTANTS (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module MPI_F08_TYPES_FOR_F90 (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module NETCDF (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module TYPESIZES (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module SIMPLEDATAIO (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module DIAGNOSTICS_CREATE_AND_WRITE (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module SIMPLEDATAIO_READ (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Warning: test_gs2_main.f90, line 14: Incompatible option setting for module SIMPLEDATAIO_WRITE (was compiled with the -fdefault-real=4 option)
detected at GS2_MAIN@<end-of-statement>
Error: test_gs2_main.f90, line 90: TEST_GS2_MAIN found when $main$ expected in END PROGRAM statement
detected at PROGRAM@TEST_GS2_MAIN
[NEC Fortran Compiler pass 1 error termination, 3 errors, 9 warnings]
make[2]: *** [test_gs2_main.o] エラー 1
rm test_gs2_main.f90
make[1]: *** [gs2_main/.] エラー 2
make: *** [unit_tests_no_message] エラー 2
-
Thanks! Do the errors go away if you pass
FPPFLAGS
? -
reporter yes.
Adding $(FPPFLAGS) in the .fpp.f90 rule works.
-
- changed status to resolved
Fixed in upcoming release 8.1 through PR #320
- Log in to comment
Thanks @Ryusuke Numata , I think you are probably right, and I don’t know of any reason for this. Out of interest, what errors do you see? I don’t get errors with gfortran 9.3 on Ubuntu, though I’m not passing anything with FPPFLAGS.