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

case.setup ERROR. What is "modulecmd"?

bidyut

BIDYUT BIKASH GOSWAMI
Member
Dear All,
I am trying to port CESM to a new machine. Here is a snippet of my config_machine.xml

Code:
<module_system type="module">
      <init_path lang="perl">/mnt/nfs/clustersw/Debian/bullseye/lmod/lmod/init/perl</init_path>
      <init_path lang="python">/mnt/nfs/clustersw/Debian/bullseye/lmod/lmod/init/env_modules_python.py</init_path>
      <init_path lang="csh">/mnt/nfs/clustersw/Debian/bullseye/lmod/lmod/init/csh</init_path>
      <init_path lang="sh">/mnt/nfs/clustersw/Debian/bullseye/lmod/lmod/init/sh</init_path>
      <cmd_path lang="perl">/mnt/nfs/clustersw/Debian/bullseye/perl/5.34.0/bin perl</cmd_path>          <--- I should have used MODULECMD here
      <cmd_path lang="python">/mnt/nfs/clustersw/Debian/bullseye/python/3.9.9/bin python</cmd_path>     <--- I should have used MODULECMD here
      <cmd_path lang="sh">module</cmd_path>
      <cmd_path lang="csh">module</cmd_path>
      <modules>
        <command name="purge"/>
      </modules>

I could not find "modulecmd" paths in my machine that are required in the config_machine.xml file (as shown above).

When I run the case.setup it gives me the following ERROR

Code:
./case.setup
ERROR: module command None purge  failed with message:
/bin/sh: 1: None: not found

My question is: Am I getting this ERROR because I did not use the "modulecmd" path? what is "modulecmd"? How can I fix this issue? Am I supposed to "install environment-modules"? [FYI: the machine does use module]

Thank you in advance.
Bidyut
 

jedwards

CSEG and Liaisons
Staff member
Depending on what flavor of modules you have you may need something like
<cmd_path lang="python">/apps/lmod/lmod/libexec/lmod python</cmd_path>
<cmd_path lang="perl">/opt/apps/lmod/lmod/libexec/lmod perl</cmd_path>

or something like:
<cmd_path lang="perl">/opt/modules/default/bin/modulecmd perl</cmd_path>
<cmd_path lang="python">/opt/modules/default/bin/modulecmd python</cmd_path>

This is the tool used to run module commands from a given shell (sh, csh, perl, python)
You may need to check with your system administrator.
 

bidyut

BIDYUT BIKASH GOSWAMI
Member
Thank you @jedwards . My system admins helped me to resolve the issue. I am using module system "None" in the config_machine and instead loaded the modules manually. It is working at the moment although not the best solution probably.
 

jedwards

CSEG and Liaisons
Staff member
You should not need to do that - what version of modules do you have that doesn't have one of the commands above available?
 

bidyut

BIDYUT BIKASH GOSWAMI
Member
Hi @jedwards ... sorry for the prolonged silence. I tried the way you suggested and could get it going. Thank you.

But, now it is failing while building csm_share. I did see some "shr_infnan_isnan_real" issue in the csm_share.bldlog and tried the fix that you had suggested in CESM2.1.0 case.build error with CSM_share shr_infnan_mod.F90, but it did not work.

Attaching the config_machine.xml, config_compilers.xml (config_compilers.xml is essentially the downloaded copy, as is) and the csm_share.bldlog herewith.
With a modified config_compilers.xml file (suggested by the system admins; attached as the config_compilers.xml.modified), I get the same error.

Can you please suggest.
Thanks a lot.
 

bidyut

BIDYUT BIKASH GOSWAMI
Member
Oh ... my bad. Did not notice that the files that I had attached did not have any of the allowed extensions and hence were declined. Sorry about that. Attached the files now as .txt files. Thank you.
 

Attachments

  • config_compilers.xml.txt
    40.8 KB · Views: 3
  • config_compilers.xml.modified.txt
    886 bytes · Views: 2
  • config_machines.xml.txt
    4.9 KB · Views: 8
  • csm_share.bldlog.220919-154953.txt
    42.9 KB · Views: 2

jedwards

CSEG and Liaisons
Staff member
I think that this error indicates that your gnu compiler is too old. But you didn't tell me what version you are using.
Now that you have modules working maybe you should try intel again.
 

bidyut

BIDYUT BIKASH GOSWAMI
Member
Hi @jedwards , I tried to install cesm.2.2.0. The same scripts/modules that were giving error (as mentioned above) with CESM.2.1.3 could build CESM2.2.0. However, the run fails. On a closer look, I realized I actually get the error during ./case.setup [Porting error: source not found]. Despite the error during ./case.setup, ./case.build works but ./case.submit fails.

So, now I am following the discussions in Porting error: source not found and waiting for your reply there.

Thanks.
 

bidyut

BIDYUT BIKASH GOSWAMI
Member
Nonetheless, I am still curious, why I could build CESM2.2.0 but failed to build CESM2.1.3. For what its worth, the error reported in Porting error: source not found occurs while doing ./case.setup for both CESM2.1.3 and CESM2.2.0 in my case.
Thanks.
 
Top