Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BEAMnrc fails to compile more than 15 CMs #734

Open
camilabustos1 opened this issue Jun 15, 2021 · 5 comments
Open

BEAMnrc fails to compile more than 15 CMs #734

camilabustos1 opened this issue Jun 15, 2021 · 5 comments
Assignees

Comments

@camilabustos1
Copy link

camilabustos1 commented Jun 15, 2021

Hi, I am having an issue in compiling in BEAMnrc code and i get this error

Mortran compiling ...  compilation error (stop 12)
/home/mayor/EGSnrc/HEN_HOUSE/makefiles/beam_makefile:113: fallo en las instrucciones para el objetivo 'BEAM_bowtie1_linux64.F'
make: *** [BEAM_bowtie1_linux64.F] Error 12
@rtownson
Copy link
Collaborator

rtownson commented Jun 16, 2021

Hello, I believe this is a duplicate of this question: https://www.reddit.com/r/EGSnrc/comments/o00bsu/error_compiling_beamnrc_i_have_tried_to_build/

Could you follow up there? I don't believe this is a bug with the code, but likely an installation or configuration issue.

@rtownson
Copy link
Collaborator

rtownson commented Jun 18, 2021

After some further investigation, I can reproduce the issue. See the link to the subreddit for more details, but essentially adding 15+ CMs to a BEAMnrc accelerator results in compilation warnings like this:

BEAM_test-manycms_win3264.F:5662:1:
 Z---�

even though in the macros I have the maximum number of CMs set to 25. If you look in the .F file, there are corrupted lines:

Z---�
�
�Z������Z��Z�����Z�!��
�Z
�
��"
ZZ�ZZZZZZZ������
Z�����
ZZZZZZZZZZ������Z����Z
�
��"Z���
�����
ZZ�ZZZZZZZ�����
�Z�����&�.

@blakewalters any ideas about this?

Here is an example .module file:

 CM names:  SLABS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS PYRAMIDS
 Identifiers:  q w e r t y u i o p a s d f g h 

@rtownson rtownson reopened this Jun 18, 2021
@rtownson rtownson assigned blakewalters and unassigned rtownson Jun 18, 2021
@rtownson rtownson changed the title Error to compile BEAMnrc BEAMnrc fails to compile more than 15 CMs Jun 18, 2021
@camilabustos1
Copy link
Author

camilabustos1 commented Jun 27, 2021

Hi!, Thanks for your answer, by lowering the number of modular components the error was solved.

@ftessier ftessier added bug and removed question labels Jun 28, 2021
@blakewalters
Copy link
Contributor

@rtownson, @camilabustos1: I've found this upper limit on the no. of CMs is CM-dependent. For example, change one of the PYRAMIDS in the above example to SLABS, and the accelerator will compile. In my experience, this has to do with the size of the MORTRAN macros associated with a particular CM. The larger the macros, the fewer the CMs you'll be able to concatenate and successfully compile. For the above example, replace PYRAMIDS with SYNCHDMLC and you won't even get 15 CMs to compile. In other words, this is an issue with the Mortran compiler and addressing it may require significant revamping/rationalization of the coding for a number of CMs. Moreover, it means that 15 CMs is not a hard limit. We can probably fix PYRAMIDS so that > 15 will compile by "subdividing" some macros, increasing the no. of coding blocks while decreasing the size, but this is a general issue that will require some time to address and likely only on a CM-by-CM basis.

@ftessier
Copy link
Member

I am guessing then that there is a memory, stack or file size limit in the Mortran compiler. The Mortran compiler code is very obscure. I will check if by any chance I can find where that limit is set, anyone please feel free to hunt for it as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants