Pencil code consistency check

30 views
Skip to first unread message

Ken Rice

unread,
Jun 14, 2024, 4:28:07 AMJun 14
to pencil-code-discuss
Hi,

I've just updated my repository to the latest version and it compiles and starts fine, but gets stuck at the " pencil_consistency_check: checking pencil case" stage.  No errors, and it doesn't crash.  Just doesn't progress further.  Seems to have something to do with setting the particle boundary conditions.  If anyone has any suggestions as to how to resolve this, that would be great.

Thanks,

Ken

Ken Rice

unread,
Jun 14, 2024, 9:37:04 AMJun 14
to pencil-code-discuss

This appears to be an issue with precision.  If I compile in double precision (using -fdefault-real-8) it doesn't progress past the checking pencil, but in single precision it does.  However, I get some migrate_particles warnings.  I notice that the mpicomm_double subroutine is no longer present.  Is there some updated way to compile in double precision?

Thanks,

Ken

Philippe-A. Bourdin

unread,
Jun 14, 2024, 10:37:54 AMJun 14
to pencil-code-discuss
Hello Ken,

Is there some updated way to compile in double precision?

The way to switch to double precision is to set:
REAL_PRECISION = double
in "src/Makefile.local" of your run directory.

Alternatively, I would strongly recommend to use "pc_build" for testing purposes. Then you can immediately choose to add all available debug option for compiling, like so:
pc_build -f GNU-GCC,GNU-GCC_debug
(using the GNU compilers)
This should allow you to find the offensive operation and generate a readable error message.

Thanks and best greetings,
Philippe.

Ken Rice

unread,
Jun 15, 2024, 7:50:06 AMJun 15
to pencil-code-discuss
Hi Philippe,

Thanks.  I do have REAL_PRECISION = double in Makefile.local, but it's still compiling in single precsion (I think).  I can force double precision in Makefile using -fdefault-real-8 (I'm using mpif77 or mpif90) but then it doesn't get past the pencil check. 

I've never used pc_build.  Is there some set of instructions for using it?

Thanks,

Ken

Philippe-A. Bourdin

unread,
Jun 15, 2024, 8:14:50 AMJun 15
to pencil-code-discuss
Hello Ken,

I would not recommend fiddling with the Makefile at all. If you use "pc_build", everything is quite straight forward. If you have "REAL_PRECISION = double" in your "run_directory/src/Makefile.local", no more changes are needed.

To learn about how to use pc_build, I recommend the quick start guide:

With this simple command you require to use MPI with the GNU compilers, as well as using all common debug options for testing:
pc_build -f GNU-GCC_MPI,GNU-GCC_debug

Best greetings,
Philippe.

Ken Rice

unread,
Jun 15, 2024, 11:38:11 AMJun 15
to pencil-code-discuss
Hi Philippe,

Okay, that may have solved it.  Thanks.

All the best,

Ken
Reply all
Reply to author
Forward
0 new messages