From NWChem
			Viewed 150 times, With a total of 5 Posts
												
			
                  
        
            
                |  | 
            
                |  | 
		                    
		                        | 12:34:51 AM - Fri, Oct 14th 2011 |  |  
		                        | Hi everyone... 
 I'm trying to set up NWChem on an HPC system that uses a somewhat quirky MPI wrapper.  It uses a single submission interface for a variety of different clusters, so I need to specify which cluster I want using:
 
 mpicc -pc filename.c [options]
 
 where "-pc" is used to specify the PC cluster (as opposed to some other options).  I've tried various different environment variables but I can't seem to figure out which one will allow me to add the "-pc" flag as the first option after the compiler name.  Setting
 
 export CC='mpicc -c'
 
 also doesn't seem to work.
 
 Is it possible to do this with an environment variable, or do I need to modify the makefile?
 
 Thanks!
 
 -Craig
 |  | 
 
        |  | 
        
              
        
            
                | 
                        
                            | 
                                  
                                     Bert  NWChemDeveloper, bureaucrat, sysop
                                    
                                   |  | 
            
                | 
                        
                            | Gets AroundThreads 1 Posts 173
 |  | 
		                    
		                        | 4:56:42 PM - Fri, Oct 14th 2011 |  |  
		                        | Craig, 
 I would think
 
 
    export CC="mpicc -pc"
 would work.
 
 Which version of NWChem are you compiling?
 
 Which platform, i.e. NWCHEM_TARGET, ARMCI_NETWORK, etc.?
 
 Bert
 
 
 
 Quote: Oct 14th 12:34 am Hi everyone...
 I'm trying to set up NWChem on an HPC system that uses a somewhat quirky MPI wrapper.  It uses a single submission interface for a variety of different clusters, so I need to specify which cluster I want using:
 
 mpicc -pc filename.c [options]
 
 where "-pc" is used to specify the PC cluster (as opposed to some other options).  I've tried various different environment variables but I can't seem to figure out which one will allow me to add the "-pc" flag as the first option after the compiler name.  Setting
 
 export CC='mpicc -c'
 
 also doesn't seem to work.
 
 Is it possible to do this with an environment variable, or do I need to modify the makefile?
 
 Thanks!
 
 -Craig
 |  | 
 
        |  | 
        
              
        
            
                |  | 
            
                | 
                        
                            | Clicked A Few TimesThreads 2 Posts 8
 |  | 
		                    
		                        | 12:57:32 AM - Mon, Oct 17th 2011 |  |  
		                        | Quote:Bert Oct 14th 4:56 pm Craig,
 Which version of NWChem are you compiling?
 
 Which platform, i.e. NWCHEM_TARGET, ARMCI_NETWORK, etc.?
 
 
 Bert:
 
 Thanks for helping.  I' m installing NWChem 6.0.  My environment variables are as follows:
 
 export NWCHEM_TOP=/home/Ueda-DNA/nwchem-6.0
 export NWCHEM_TARGET=Linux
 export NWCHEM_MODULES=all
 export USE_MPI=y
 export CC='mpicc -pc'
 
 When I run "make nw_config" things look fine (as far as I can tell), but "make" seems very unhappy.
 
 
 Quote: [Ueda-DNA@ricc3 src]$ make
 test -d /home/Ueda-DNA/nwchem-6.0/lib/Linux || mkdir -p /home/Ueda-DNA/nwchem-6.0/lib/Linux
 test -d /home/Ueda-DNA/nwchem-6.0/bin/Linux || mkdir -p /home/Ueda-DNA/nwchem-6.0/bin/Linux
 Making libraries in tools
 
 make[1]: Entering directory `/home/Ueda-DNA/nwchem-6.0/src/tools'
 
 *** Building Parallel Tools ****
 
 >>> making Memory Allocator (MA) library <<<
 (cd ./ma; make  CC=mpicc -pc FC=f77)
 make: invalid option  - c
 Usage: make [options] [target] ...
 
 </quote>
 
 It looks like (maybe) make isn't recognizing "-pc" as a flag that should be associated with mpicc rather than with make.
 |  | 
 
        |  | 
        
              
        
            
                | 
                        
                            | 
                                  
                                     Bert  NWChemDeveloper, bureaucrat, sysop
                                    
                                   |  | 
            
                | 
                        
                            | Gets AroundThreads 1 Posts 173
 |  | 
		                    
		                        | 7:20:01 PM - Mon, Oct 17th 2011 |  |  
		                        | One trick that may work, alias mpicc to mpicc -pc . Otherwise, we need to start hacking a bunch of makefiles, which I rather avoid. 
 Bert
 
 
 Quote:Cjolley Oct 17th 12:57 am Quote:Bert Oct 14th 4:56 pm Craig,
 Which version of NWChem are you compiling?
 
 Which platform, i.e. NWCHEM_TARGET, ARMCI_NETWORK, etc.?
 
 
Bert:
 
Thanks for helping.  I' m installing NWChem 6.0.  My environment variables are as follows:
 
export NWCHEM_TOP=/home/Ueda-DNA/nwchem-6.0 
export NWCHEM_TARGET=Linux 
export NWCHEM_MODULES=all 
export USE_MPI=y 
export CC='mpicc -pc'
 
When I run "make nw_config" things look fine (as far as I can tell), but "make" seems very unhappy.
 Quote: [Ueda-DNA@ricc3 src]$ make
 test -d /home/Ueda-DNA/nwchem-6.0/lib/Linux || mkdir -p /home/Ueda-DNA/nwchem-6.0/lib/Linux
 test -d /home/Ueda-DNA/nwchem-6.0/bin/Linux || mkdir -p /home/Ueda-DNA/nwchem-6.0/bin/Linux
 Making libraries in tools
 
 make[1]: Entering directory `/home/Ueda-DNA/nwchem-6.0/src/tools'
 
 *** Building Parallel Tools ****
 
 >>> making Memory Allocator (MA) library <<<
 (cd ./ma; make  CC=mpicc -pc FC=f77)
 make: invalid option  - c
 Usage: make [options] [target] ...
 
 </quote>
 
 It looks like (maybe) make isn't recognizing "-pc" as a flag that should be associated with mpicc rather than with make.
 |  | 
 
        |  | 
        
              
        
            
                |  | 
            
                | 
                        
                            | Clicked A Few TimesThreads 2 Posts 8
 |  | 
		                    
		                        | 1:16:40 AM - Tue, Oct 18th 2011 |  |  
		                        | OK... I think I found a workaround.  I'm posting this for the sake of anyone else who might need it. 
 I made a directory called ~/override and placed it at the beginning of my path by adding
 
 PATH=/home/Ueda-DNA/override:$PATH
 
 to my .bashrc file.  Next, I added an executable script called 'mpicc' to this directory that contains the following:
 
 /opt/FJSVcltk/bin/mpicc -pc $@
 
 (where /opt/FJSVcltk/bin is the directory where the mpicc executable lives).  I had to do the same for f77 and ar.  It was necessary to do this rather than just putting aliases into my .bashrc, because make seemed not to want to use any of my aliases.  Once I'd set up my "override" scripts, however, mpicc, ar, and f77 all behaved as they should.
 
 I'm having some trouble with ARMCI now, but that's probably a question for my local HPC support people...
 
 Thanks!
 
 -Craig
 |  | 
 
        |  | 
        
              
        
            
                |  | 
            
                |  | 
		                    
		                        | 3:14:50 PM - Thu, Oct 27th 2011 |  |  | work around not working. 
 |  
		                        | I have been trying to use the same compiler mpicc that comes with openmpi-devel package, but I think I'm running into the same error you had. I've tried your work around by adding 
 PATH=/home/wcucluster master/override:$PATH
 
 To my .bashsrc file then making the directory override with a script called mpicc and the commands
 
 
#!/bin/bash
r/lib/openmpi/bin/mpicc -pc $@
 
 But I'm still receiving the same error you had.
 |  | 
 
        |  | 
        
      
        	
            
                AWC's:
                 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC