Main menu

Navigation

Missing code in run script after porting

8 posts / 0 new
Last post
atp42@...
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

atp42@...

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

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

Machine/Decomp/Pes configuration has already been done ...skipping

are you getting this message from cesm_setup?

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 :
Change
#! /bin/csh -f
to
#! /bin/csh -fx

Capture the output of cesm_setup with this change. If you don't spot the problem, attach that output to your reply.

CESM Software Engineer

atp42@...

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!

Attachment: 
jedwards

The phase variable is correctly set.   What does your mkbatch script look like?

CESM Software Engineer

atp42@...

I've attached both the mkbatch script and the run script

jedwards

I think I see the problem.   $EXEROOT needs to be escaped in your mkbatch script


This line:

/usr/lib64/openmpi/bin/mpirun -np 16 $EXEROOT/cesm.exe >&! cesm.log.$LID

should be

/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.

CESM Software Engineer

atp42@...

Yup, that solves it, the script works perfectly now! Thanks!

Log in or register to post comments

Who's new

  • anjanadevanand@...
  • hfrenzel@...
  • yunqian.zhu@...
  • acostar@...
  • Daniele.visioni@...