A getenv issue in gen_domain.F90 of CLM5


Code:
By following the User's Guide of CLM5 "1.6.3.5. Example" (I understand this note still needs updates)<br />https://escomp.github.io/ctsm-docs/doc/build/html/users_guide/running-single-points/running-single-point-configurations.html,<br /><br />I am doing <br /><br />"./gen_domain -m $MAPFILE -o $OCNDOM -l $ATMDOM" in<br /><br />../cime/tools/mapping/gen_domain_files/, <br /><br />and got the following error message:<br /><br />(shr_sys_getenv) ERROR: no implementation of getenv for this architecture<br />(shr_sys_getenv) no implementation of getenv for this machine<br /><br />It seems the error happened in line 796 of <br />../cime/tools/mapping/gen_domain_files/src/gen_domain.F90<br /><br />I did similar regional tests on Yellowstone before, but did not have this type of problem. <br /><br />I tried CISL help, but they cannot figure out this issue:<br /><br />"But I cannot find any that seem to fix the problem.  The best I can do, is recommend that you seek<br />help from the experts at the CESM Bulletin Board." <br /><br />I appreciate someone can help me to get this problem solved.<br /><br />Mingjie
 

jedwards

CSEG and Liaisons
Staff member
Are you building on cheyenne?   Are you following the INSTALL instrucions in cime/tools/mapping/gen_domain_files/ ?Please provide the details of how you build the tool. 
 
Yes, Jedwards. I am budling on Cheyenne. I am creating my own case by following all the steps of 1.6.3.5 here:https://escomp.github.io/ctsm-docs/doc/build/html/users_guide/running-single-points/running-single-point-configurations.htmlEvery step went through, and gmake shows:/gpfs/fs1/work/shimj/clm5.0/cime/tools/mapping/gen_domain_files/src> gmake
use the configure script located in the Machines directory to create the Makefile Macros.make file
gmake: Nothing to be done for 'default'.Then I did "cd ../""./gen_domain -m $MAPFILE -o $OCNDOM -l $ATMDOM"and got the error message I reported.Do you have any suggestions? Thanks!Mingjie 
 

jedwards

CSEG and Liaisons
Staff member
You should have a file Macros.make in your src directory, since you do not I think you must have misread the instructions:
/gpfs/fs1/work/shimj/clm5.0/cime/tools/configure --macros-format=Makefile --mpilib mpi-serialsource .env_mach_specific.sh  (or csh depending on your shell) makeifort  -c   -DFORTRANUNDERSCORE -DCPRINTEL  -D -DOPT -qno-opt-dynamic-align  -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source    -qopt-report -xCORE_AVX2 -no-fma  -I/glade/u/apps/ch/opt/netcdf/4.6.1/intel/17.0.1//include -I/glade/u/apps/ch/opt/netcdf/4.6.1/intel/17.0.1//include gen_domain.F90ifort: remark #10397: optimization reports are generated in *.optrpt files in the output locationifort  -o ../gen_domain gen_domain.o  
 

lbirch@whrc_org

New Member
Hi,I'm also having this problem with gen_domain. Any help would be very much appreciated.I'm following the instructions in INSTALL in cesm/cime/tools/mapping/gen_domain_filesbut I get this error:(shr_sys_getenv) ERROR: no implementation of getenv for this architecture(shr_sys_getenv) no implementation of getenv for this machine
I've created regional domains before on Cheyenne, so I'm confused on this one. I've tried including --machine, --compiler; in a queue vs. the log in nodes; and using (. ./.env_mach_specific.sh ; gmake) vs. source .env_mach_specific.sh.Thanks!
 

jedwards

CSEG and Liaisons
Staff member
Can you point me to where you are trying to build?  Do you have a Macros.make file?  Did you source the .env_mach_specific.sh (or .csh)?
 

lbirch@whrc_org

New Member
Hi, I do have the macros.make in src and I've tried source .env_mach_specific.sh and the exact command from INSTALL (. ./.env_mach_specific.sh ; gmake).This is the location (I'm building in src and running where the executable has been created): cesm/cime/tools/mapping/gen_domain_filesI've done this in the past. I'm just missing something this time, and I can't figure it out. Thanks so much!
 

Zhengjy

Zhengjy
New Member
Hello, I also encountered a similar problem. I hope I can get your help. After executing ./gen_domain -m $MAPFILE -o $OCNDOM -l $ATMDOM in gen_domain_files/, I reported an error:
(shr_sys_getenv) ERROR: no implementation of getenv for this architecture
(shr_sys_getenv) no implementation of getenv for this machine

The picture is my running flow process. I would be very grateful if you could help me point out the problem.
gen_domain_error.png
 

slevis

Moderator
Staff member
For reference, this thread appears to continue here:
 

weixinyu

weixinyu
Member
You should have a file Macros.make in your src directory, since you do not I think you must have misread the instructions:
/gpfs/fs1/work/shimj/clm5.0/cime/tools/configure --macros-format=Makefile --mpilib mpi-serialsource .env_mach_specific.sh (or csh depending on your shell) makeifort -c -DFORTRANUNDERSCORE -DCPRINTEL -D -DOPT -qno-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source -qopt-report -xCORE_AVX2 -no-fma -I/glade/u/apps/ch/opt/netcdf/4.6.1/intel/17.0.1//include -I/glade/u/apps/ch/opt/netcdf/4.6.1/intel/17.0.1//include gen_domain.F90ifort: remark #10397: optimization reports are generated in *.optrpt files in the output locationifort -o ../gen_domain gen_domain.o
Dear jedwards
I am also following the process and am in the process of making the surfdata file and I am having the same problem, but after I make in the src directory, it does not generate the gen_domain.F90 file in the directory you provided.
Why is this?
 

Attachments

  • 1719222523964.png
    1719222523964.png
    289.4 KB · Views: 18

mitali

Mitali Gautam
New Member
Hello!
I am having issues with the gen_domain a well, specifically Step #14 in the PaleoToolkit Recipe ( paleoToolkit/cesm1_2/PaleoToolkit_Recipe_2020Jan1.pdf at master · CESM-Development/paleoToolkit. ). I have the Makefile from Jedward's Cime repository. And while looking at the Install as well as this thread, I used the following command:

/glade/work/mitali/cesm/my_cesm_sandbox/CIME/scripts/configure --machine derecho --macros-format=Makefile --mpilib mpi-serial --comp-interface .env_mach_specific.sh

I have been getting the following error (see attached screenshot):
Traceback (most recent call last):
File "/glade/work/mitali/cesm/my_cesm_sandbox/CIME/scripts/configure", line 212, in <module>
_main()
File "/glade/work/mitali/cesm/my_cesm_sandbox/CIME/scripts/configure", line 199, in _main
configure(
File "/glade/work/mitali/cesm/my_cesm_sandbox/CIME/BuildTools/configure.py", line 71, in configure
safe_copy(os.path.join(new_cmake_macros_dir, "Macros.cmake"), output_dir)
File "/glade/u/apps/derecho/23.09/opt/._view/yazo4iwystz7p2hxu5ukzrw3xa24ksen/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType


Can anyone please help me to figure what step I'm doing wrong here? Or could this be a compiler error? If so, then how can I troubleshoot it?


Additional info:
1. My path to the files and executables are located at:
/glade/work/mitali/paleo_setup_PTB/ocn/cpl_mapping/mapping/gen_domain_files/src

2. The Macros.make has been taken from:

Any help or lead would be greatly appreciate it.

Thank you!

Kind regards,
Mitali Gautam
 

Attachments

  • Screenshot 2024-11-20 at 4.06.37 PM.png
    Screenshot 2024-11-20 at 4.06.37 PM.png
    341.5 KB · Views: 11

mitali

Mitali Gautam
New Member
Hello, @slevis
Yes, I absolutely plan to.

I have compiled a document to be able to share here.
I am still working on fixing the error on the final step:
./gen_domain -m /glade/work/mitali/paleo_setup_PTB/ocn/cpl_mapping/mapping/map_gx1PT_TO_fv19_25_aave.241029.nc -o gx1PT -l fv19_25 -c Permian

Error:
(shr_sys_getenv) ERROR: no implementation of getenv for this architecture
(shr_sys_getenv) no implementation of getenv for this machine

Fixes tried so far:
Adding OS to makefile and re-running the steps
Adding host name to the .F90 file and re-running it.

I have not figured it out yet. If you have any leads on 'how to' or any resources that may help, I'd greatly appreciate it.


Regards,
Mitali Gautam
 
Back
Top