[Users] Compilation Error in cluster ParamGanga

Steven R. Brandt sbrandt at cct.lsu.edu
Thu May 11 12:48:53 CDT 2023


I would talk to the system administrators about that. There is 
definitely something wrong with your compiler install if you can't find 
math.h.

--Steve

On 5/11/2023 2:02 AM, Shamim Haque 1910511 wrote:
> Dear Steve,
>
> I just rechecked the cpp program to output M_PI in the computing 
> nodes, and that is not working right now, which was somehow working 
> fine a few days ago. I also tried different gcc versions (4.8, 10.2, 
> 11.1, gnu8/8.3) available in the cluster. All report similar issue:
>
> prog.cpp:1:18: fatal error: math.h: No such file or directory
>  #include <math.h>
>                   ^
> compilation terminated.
>
> ----OR-----
>
> /home/apps/gcc-10.2.0/include/c++/10.2.0/x86_64-pc-linux-gnu/bits/os_defines.h:39:10: 
> fatal error: features.h: No such file or directory
>    39 | #include <features.h>
>       |          ^~~~~~~~~~~~
> compilation terminated.
>
> The cpp code seems to work fine in login node, as it gives out the 
> value of pi upon execution. I am contacting the hpc admin to resolve 
> this issue.
>
> I am attaching the test code (prog.cpp), the sbatch jobscript 
> (prog.sh) and the output file (slurn-117473.out), if you would like to 
> have a look at it.
>
> Please let me know if I should try something different to get this 
> working.
>
> Regards
> Shamim Haque
> Senior Research Fellow (SRF)
> Department of Physics
> IISER Bhopal
>
>>
> On Mon, May 8, 2023 at 7:25 PM Shamim Haque 1910511 
> <shamims at iiserb.ac.in> wrote:
>
>     Thanks Steve. I'll make the changes and try again. I'll let you
>     know the outcome.
>
>     Regards
>     Shamim Haque
>     Senior Research Fellow (SRF)
>     Department of Physics
>     IISER Bhopal
>
>>
>     On Mon, May 8, 2023 at 7:21 PM Steven R. Brandt
>     <sbrandt at cct.lsu.edu> wrote:
>
>         That tends to make me think you aren't using the compiler you
>         think you're using. You could put full paths in the .cfg files
>         and recompile from scratch.
>
>         i.e.
>
>         CXX = /full/path/to/icc
>
>         --Steve
>
>         On 5/3/2023 3:26 PM, Shamim Haque 1910511 wrote:
>>         Yes, this gives the value of Pi successfully, before starting
>>         the compilation:
>>
>>         //home/vkerni.iitr/sam/trial
>>         3.141593
>>         Current machine: paramganga3
>>         Using configuration: sim
>>         Reconfiguring sim
>>         Writing configuration to:
>>         /home/vkerni.iitr/sam/ET_debug/Cactus/configs/sim/OptionList
>>         Cactus - version: 4.12.0
>>         Reconfiguring sim.
>>         /
>>         /./
>>         /./
>>         /./
>>         /checking for M_PI... no
>>         configure: error: M_PI not defined. Try adding
>>         -D_XOPEN_SOURCE to CPPFLAGS.
>>
>>         Error reconfiguring sim-config
>>         make: *** [sim-config] Error 2
>>         /
>>
>>
>>         Shamim Haque
>>         Senior Research Fellow (SRF)
>>         Department of Physics
>>         IISER Bhopal
>>
>>>>
>>         On Thu, May 4, 2023 at 12:29 AM Steven Brandt
>>         <sbrandt at cct.lsu.edu> wrote:
>>
>>             So, sanity check, can you compile the following program
>>             outside of Cactus?
>>
>>             #include <math.h>
>>             #include <stdio.h>
>>
>>             int main() {
>>                 printf("%f\n", M_PI);
>>                 return 0;
>>             }
>>
>>             On 5/3/2023 1:50 PM, Shamim Haque 1910511 wrote:
>>>             Dear Steve,
>>>
>>>             I tried gcc (10 and 11) as well and I am stuck with the
>>>             following error:
>>>             /configure: error: M_PI not defined. Try adding
>>>             -D_XOPEN_SOURCE to CPPFLAGS./
>>>             /
>>>             /
>>>             This also happened for Intel (2020 and 2019). I
>>>             have attached both the output files here.
>>>
>>>             Please ignore the out file in the first email, I have
>>>             uploaded another out file by mistake. The rest of the
>>>             files are correct in the first mail.
>>>
>>>             Regards
>>>             Shamim Haque
>>>             Senior Research Fellow (SRF)
>>>             Department of Physics
>>>             IISER Bhopal
>>>
>>>>>>
>>>             On Wed, May 3, 2023 at 8:04 PM Steven Brandt
>>>             <sbrandt at cct.lsu.edu> wrote:
>>>
>>>                 I notice from the output that your compiler claims
>>>                 "limits.h" is missing. Possibly there's something
>>>                 wrong with your icc setup? Maybe you should try
>>>                 using gcc / gfortran instead.
>>>
>>>                 --Steve
>>>
>>>                 On 5/3/2023 8:20 AM, Shamim Haque 1910511 wrote:
>>>>                 Dear Frank,
>>>>
>>>>                 I added the alias pattern for the computing nodes
>>>>                 and now ETK can detect the cluster (checked by
>>>>                 asking "whoami") during the batch queuing. I'll get
>>>>                 in touch with the admins to include 'patch'.
>>>>
>>>>                 However, the problem still persists, having assured
>>>>                 that the correct machine file and option list are
>>>>                 being used during the compilation.
>>>>
>>>>                 Regards
>>>>                 Shamim Haque
>>>>                 Senior Research Fellow (SRF)
>>>>                 Department of Physics
>>>>                 IISER Bhopal
>>>>
>>>>>>>>
>>>>                 On Wed, May 3, 2023 at 3:49 PM Frank Loeffler
>>>>                 <frank.loeffler at uni-jena.de> wrote:
>>>>
>>>>                     Hi Shamim
>>>>
>>>>                     On Wed, May 03, 2023 at 03:11:49PM +0530,
>>>>                     Shamim Haque 1910511 wrote:
>>>>                     >We are trying to compile ETK on ParamGanga at
>>>>                     IIT Roorkee. The
>>>>                     >compilation
>>>>                     >stops at a very initial step and gives out the
>>>>                     error:
>>>>                     >
>>>>                     >*checking whether the Fortran compiler
>>>>                     (gfortran  ) works... yeschecking
>>>>                     >whether the Fortran compiler (gfortran  ) is a
>>>>                     cross-compiler... nochecking
>>>>                     >whether the Fortran compiler (gfortran  )
>>>>                     supports TYPE(*) for
>>>>                     >CCTK_PointerTo... yeschecking how to run the C
>>>>                     preprocessor... cppchecking
>>>>                     >for ANSI C header files... nochecking for C99
>>>>                     features... yeschecking for
>>>>                     >M_PI... noconfigure: error: M_PI not defined.
>>>>                     Try adding -D_XOPEN_SOURCE to
>>>>                     >CPPFLAGS.*
>>>>                     >
>>>>                     >We tried adding -D_XOPEN_SOURCE to CPPFLAGS,
>>>>                     but it does not help. This
>>>>                     >error is consistent if we set up using Intel
>>>>                     Compiler (2020 or 2019), or
>>>>                     >gcc (11 or 10). I have attached the outfile,
>>>>                     error file, machine script,
>>>>                     >and option lists for both cases (Intel and
>>>>                     gcc) for any reference.
>>>>                     >
>>>>                     >Secondly, we are not allowed to compile ETK on
>>>>                     login nodes. So we are
>>>>                     >queuing a job script, which upon execution,
>>>>                     enters the Cactus directory,
>>>>                     >does "setup-silent", and then executes the
>>>>                     build command. Is this the right
>>>>                     >way to compile ETK using the batch script? Or
>>>>                     should we do something
>>>>                     >different? I have attached the shell script
>>>>                     (compile.sh) used for sbatch
>>>>                     >queue for reference.
>>>>
>>>>                     I might be wrong, but setup-silent will not use
>>>>                     your machine file which
>>>>                     contains all the compiler flags, but will setup
>>>>                     something "from scratch"
>>>>                     instead. According to the logs, this will be,
>>>>                     e.g., in
>>>>
>>>>                     /home/shamims.iiserb/ET_debug/Cactus/repos/simfactory2/mdb/machines/cn139.iitr.ac.in.ini
>>>>
>>>>                     My guess would be that this misses the compiler
>>>>                     flags necessary to have
>>>>                     M_PI defined. The best way to get this working
>>>>                     might be to let
>>>>                     simfactory also detect the cluster
>>>>                     configuration on the compute nodes
>>>>                     (where you compile), such that setup-silent is
>>>>                     not needed, but instead
>>>>                     the correct cluster configuration is found and
>>>>                     used automatically. In
>>>>                     order to do that, look at examples of
>>>>                     'aliaspattern' in the mdb/machines
>>>>                     directory. An alternative would be to tell
>>>>                     simfactory specifically that
>>>>                     you want to use your machine configuration file.
>>>>
>>>>                     As a side-note: I noticed the command 'patch'
>>>>                     is missing too. This is a
>>>>                     tool so common that it should be installed
>>>>                     everywhere. Your admin is
>>>>                     probably the best person to ask for advise
>>>>                     here. It should not be too
>>>>                     hard to install yourself, but that should not
>>>>                     be necessary either,
>>>>                     especially when you are told to compile on
>>>>                     compute nodes.
>>>>
>>>>                     Frank
>>>>
>>>>
>>>>                 _______________________________________________
>>>>                 Users mailing list
>>>>                 Users at einsteintoolkit.org
>>>>                 http://lists.einsteintoolkit.org/mailman/listinfo/users
>>>                 _______________________________________________
>>>                 Users mailing list
>>>                 Users at einsteintoolkit.org
>>>                 http://lists.einsteintoolkit.org/mailman/listinfo/users
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einsteintoolkit.org/pipermail/users/attachments/20230511/4d2f4701/attachment-0001.htm>


More information about the Users mailing list