Compiling Serpent 2.1.31 in Ubuntu 20.04

Compiler issues (Intel compiler, mpicc, etc.), data libraries and everything needed to get Serpent running is discussed here
Post Reply
hirepan
Posts: 5
Joined: Thu Nov 26, 2020 11:35 am
Security question 1: No
Security question 2: 7

Compiling Serpent 2.1.31 in Ubuntu 20.04

Post by hirepan » Wed Mar 24, 2021 5:46 pm

Hi,

I'm trying to compile Serpent 2.1.31 in my ubuntu computer but I find these errors in the file "collectfet.c":


===================================================================================

collectfet.c: In function ‘CollectFET’:
collectfet.c:60:9: error: ‘coef2’ not specified in enclosing ‘parallel’
60 | #pragma omp parallel for collapse(3) default(none) \
| ^~~
collectfet.c:60:9: error: enclosing ‘parallel’
collectfet.c:60:9: error: ‘coef1’ not specified in enclosing ‘parallel’
collectfet.c:60:9: error: enclosing ‘parallel’
collectfet.c:60:9: error: ‘coef0’ not specified in enclosing ‘parallel’
collectfet.c:60:9: error: enclosing ‘parallel’
collectfet.c:68:15: error: ‘params’ not specified in enclosing ‘parallel’
68 | coefIdx = FETIdx(params, n2, n1, n0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
collectfet.c:60:9: error: enclosing ‘parallel’
60 | #pragma omp parallel for collapse(3) default(none) \
| ^~~
collectfet.c:78:25: error: ‘scorePtr’ not specified in enclosing ‘parallel’
78 | bufPtr = scorePtr + coefOffset*BUF_BLOCK_SIZE;
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
collectfet.c:60:9: error: enclosing ‘parallel’
60 | #pragma omp parallel for collapse(3) default(none) \
| ^~~
collectfet.c:93:23: error: ‘totalCoefficients’ not specified in enclosing ‘parallel’
93 | if (coefIdx + 1 == totalCoefficients)
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
collectfet.c:60:9: error: enclosing ‘parallel’
60 | #pragma omp parallel for collapse(3) default(none) \
| ^~~
collectfet.c:70:27: error: ‘totalLayers’ not specified in enclosing ‘parallel’
70 | for (layer = 0; layer < totalLayers; ++layer)
| ~~~~~~^~~~~~~~~~~~~
collectfet.c:60:9: error: enclosing ‘parallel’
60 | #pragma omp parallel for collapse(3) default(none) \
| ^~~
make: *** [Makefile:1477: collectfet.o] Error 1


===================================================================================



What am I doing wrong? The open mp parallel calculation flags are turned on and I'm using the gcc compiler version 9.3.0-17ubuntu1~20.04

Ana Jambrina
Posts: 452
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Compiling Serpent 2.1.31 in Ubuntu 20.04

Post by Ana Jambrina » Wed Mar 24, 2021 5:55 pm

Check the post: viewtopic.php?f=19&t=3260. The issue is related with gcc 9 compiler. In 'collectfet.c' routine line 60, change the ‘none’ by ‘shared’ to describe the 'const' qualified variables, as follows:

Code: Select all

#pragma omp parallel for collapse(3) default(shared) \
- Ana

Post Reply