Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

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: 5
Top