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

Missing code in run script after porting

Hi,I'm almost finished porting the CESM v1.2.0 to my local machine (I still need to validate), but I'm having issues with the run script. I completed step 1 of the porting guide and just tried to enable out of the box functionality on this machine. It is missing the execute command and says that the model didn't not complete, when in fact it never ran. I can manually run the executable with the mpirun command and it completes sucessfully. The mkbatch file has the code in it, but it's wrapped in an IF statement that depends on a $PHASE variable that appears to be set in the cesm_setup script. I think for some reason the $PHASE variable isn't being set correctly in the steup script, but I can't figure out why. The cesm_script give an error saying that EXEROOT is an undefinited variable, but the model builds and runs sucessfully. Any advice you can give would be greatly appreaciated. I think I can start performing the functionality tests by adding the code back in, but I would like it to be able to work easily for other users. Thanks,-Aaron
 
Unfortunately whatever is causing the run script to be created incorrectly is also causing the fuctionality tests to fail. There are no run scripts or MPI commands in the test script. The PHASE variable doesn't appear to be used anywhere except in cesmp_setup and mkbatch, would overriding the script and manually setting this variable affect any other aspects of the model?
 

jedwards

CSEG and Liaisons
Staff member
The only reason I can see that the PHASE variable would not be set by cesm_setup is if there is already a file called $CASE.run in which case you should get a message
Code:
Machine/Decomp/Pes configuration has already been done ...skipping<br /><br />are you getting this message from cesm_setup?   <br /><br />You might try creating another case from scratch and saving the output.    Before you start add an x flag to the first line of the mkbatch script :<br />Change<br />#! /bin/csh -f<br />to <br />#! /bin/csh -fx<br /><br />Capture the output of cesm_setup with this change.   If you don't spot the problem, attach that output to your reply.
 
No, I don't get that error. I've built a new case and added the x flag to mkbatch before invoking cesm_setup. Attached is the output from that command. The run script is still missing the mpirun line.Thank you!
 

jedwards

CSEG and Liaisons
Staff member
I think I see the problem.   $EXEROOT needs to be escaped in your mkbatch script
This line:
Code:
/usr/lib64/openmpi/bin/mpirun -np 16 $EXEROOT/cesm.exe >&! cesm.log.$LID

should be<br /><br />/usr/lib64/openmpi/bin/mpirun -np 16 $EXEROOT/cesm.exe >&! cesm.log.$LID
otherwise $EXEROOT and $LID are evaluated too early.   Let me know if that fixes it.
 
Top