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

MPICC command not found when building

freddyzhangy

Freddy Zhang
New Member
Hello,

I tried building a case for CESM 2.0 using an MPI, but I get an error stating that the mpicc command is not found. However, I loaded in the module on my machine and have successfully run other programs that require MPI. I have attached the error that shows up when I try to build a case.
Do you guys have any ideas on how to solve this problem?

Thanks
 

Attachments

  • gptl.bldlog.200628-111826.txt
    956 bytes · Views: 18

fischer

CSEG and Liaisons
Staff member
Hi Freddy,

CESM 2.0 builds in it's own environment. If you loaded a module from the command line, it's not being used. You'll need to add the load into env_machine_specific.xml.

Chris
 

freddyzhangy

Freddy Zhang
New Member
Hi Freddy,

CESM 2.0 builds in it's own environment. If you loaded a module from the command line, it's not being used. You'll need to add the load into env_machine_specific.xml.

Chris

Hi Chris,

Thank you so much for your response. I now understand why the mpicc command is not working. However, I am not sure where to add the load in env_machine_specific.xml. Could you help me with that? I have attached the content in the env_mach_specific.xml file onto this post.

Thanks,
Freddy
 

Attachments

  • env_mach_specific.txt
    1.8 KB · Views: 19

fischer

CSEG and Liaisons
Staff member
Hi Freddy,

If you're using gnu, then you'll add your module load in this section of the file.

<modules compiler="gnu">
<command name="load">compiler/gnu/8.2.0</command>
<command name="load">mpi/3.3/gcc-8.2.0</command>
<command name="load">your_module</command>
<command name="load">tool/netcdf/4.6.1/gcc-8.1.0</command>
</modules>

But looking at this, I would assume that the mpi/3.3/gcc-8.2.0 module would have the mpicc path in it. But I don't know how
your machine is setup.

Chris
 

freddyzhangy

Freddy Zhang
New Member
Hi Freddy,

If you're using gnu, then you'll add your module load in this section of the file.

<modules compiler="gnu">
<command name="load">compiler/gnu/8.2.0</command>
<command name="load">mpi/3.3/gcc-8.2.0</command>
<command name="load">your_module</command>
<command name="load">tool/netcdf/4.6.1/gcc-8.1.0</command>
</modules>

But looking at this, I would assume that the mpi/3.3/gcc-8.2.0 module would have the mpicc path in it. But I don't know how
your machine is setup.

Chris

Hi Chris,

I just added the line into the xml file and it works now!
Thank you so much for your help.

Freddy
 
I have the exact same error message as Freddy's mpicc command not found during build. However a search of all files in my cesm download (I have v2.1.3) with the wildcard "env_mach_specific*" returns three files ending in .xsd, .py, and .pyc; not the file ending in .xml. Am I missing this file? Where should I look?

I too am attempting to compile with gnu and have similar <command name="load">compiler/gnu/8.2.0</command> etc. lines present in 'config_machines.xml' under ../my_cesm_sandbox/cime/config/cesm/machines/ to load in openmpi and netcdf. Do I need these present in a 'env_mach_specific.xml' file somewhere too?
 

lixiao

李霄
New Member
Hi Chris,

I just added the line into the xml file and it works now!
Thank you so much for your help.

Freddy
I'm sorry to bother you, but I want to know that in line "<command name="load">your_module</command>", what exactly do we need to add in "your_module"?
 
Top