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

trouble using build/rebuild cycle #1023

Closed
DeniseWorthen opened this issue Feb 6, 2025 · 4 comments
Closed

trouble using build/rebuild cycle #1023

DeniseWorthen opened this issue Feb 6, 2025 · 4 comments

Comments

@DeniseWorthen
Copy link
Contributor

DeniseWorthen commented Feb 6, 2025

When doing development, I have previous re-built my executable by cd'ing into the build directory and using make executable. For example

[Hera: hfe09] /scratch1/NCEPDEV/nems/Denise.Worthen/WORK/utils_dw/build: make oiprep

That doesn't appear to work currently. If I'm compiling in debug, I get the following

[Hera: hfe09] /scratch1/NCEPDEV/nems/Denise.Worthen/WORK/utils_dw/build: make oiprep
[ 80%] Built target ocnice_prep_lib
Scanning dependencies of target oiprep
[ 80%] Building Fortran object sorc/ocnice_prep.fd/CMakeFiles/oiprep.dir/ocniceprep.F90.o
gfortran: error: byterecl: No such file or directory
gfortran: error: all: No such file or directory
gfortran: error: nouninit: No such file or directory
gfortran: error: unrecognized command line option '-traceback'
gfortran: error: unrecognized command line option '-r8'; did you mean '-k8'?
gfortran: error: unrecognized command line option '-assume'
gfortran: error: unrecognized command line option '-check'; did you mean '-fcheck='?
gfortran: error: unrecognized command line option '-ftrapuv'; did you mean '-ftrapv'?
gfortran: error: unrecognized command line option '-check'; did you mean '-fcheck='?
make[3]: *** [sorc/ocnice_prep.fd/CMakeFiles/oiprep.dir/build.make:75: sorc/ocnice_prep.fd/CMakeFiles/oiprep.dir/ocniceprep.F90.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:1885: sorc/ocnice_prep.fd/CMakeFiles/oiprep.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1892: sorc/ocnice_prep.fd/CMakeFiles/oiprep.dir/rule] Error 2
make: *** [Makefile:754: oiprep] Error 2

If I switch back to the intel compiler compiler=${compiler:-"intel"} in build_all.sh, the rebuilding works in debug mode

[Hera: hfe09] /scratch1/NCEPDEV/nems/Denise.Worthen/WORK/utils_dw/build: make oiprep
[ 80%] Built target ocnice_prep_lib
Scanning dependencies of target oiprep
[ 80%] Building Fortran object sorc/ocnice_prep.fd/CMakeFiles/oiprep.dir/ocniceprep.F90.o
[100%] Linking Fortran executable oiprep
[100%] Built target oiprep
@GeorgeGayno-NOAA
Copy link
Collaborator

@DeniseWorthen - let me try to reproduce this error. Can you list the exact steps you are doing?

@DeniseWorthen
Copy link
Contributor Author

Check out the develop branch.
Edit build.sh to default to Debug build (note: I just tried, and get the same messages w/ Release)

+CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Debug}"

then

[Hera: hfe10] /scratch1/NCEPDEV/nems/Denise.Worthen/WORK/UFS_UTILS: ./build_all.sh

Next I added a print statement in sorc/ocnice_prep.fd/ocniceprep.F90

and tried to rebuild

/scratch1/NCEPDEV/nems/Denise.Worthen/WORK/UFS_UTILS/build: make oiprep

I get errors posted above about gfortran etc.

@GeorgeGayno-NOAA
Copy link
Collaborator

I get the same error.

The build_all.sh script loads the machine specific build module. On Hera, the default is build.hera.intelllvm.lua. So, when the makefiles are created, they are made to work with the Intelllvm compiler.

I don't load any modules when I log in to Hera. In that situation, the default compiler appears to be Gnu. To get around this, I did the following:

  1. module purge
  2. module use -a /scratch1/NCEPDEV/da/George.Gayno/ufs_utils.git/UFS_UTILS/modulefiles
  3. module load build.hera.intelllvm.lua
  4. cd build
  5. make

See if that works for you.

@DeniseWorthen
Copy link
Contributor Author

Yes, thanks, that worked. I don't load any modules by default either, but I must have had some leftover from earlier work in the same terminal. I should have checked that.

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